OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

docbook-apps message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: RE: [docbook-apps] Docbook XSL and RELAX NG documents


> -----Original Message-----
> From: Matthew Burgess 
> Subject: Re: [docbook-apps] Docbook XSL and RELAX NG documents
> 
> Dave Pawson wrote:
> > On Wed, 2004-12-15 at 22:42 +0000, Matthew Burgess wrote:
> > 
> >>Hi all!
> >>
> >>I'm trying to process an XML document using the Docbook XSL 
> stylesheets 
> >>(1.67.2).  The document itself is a valid Docbook RELAX NG ('gin') 
> >>document - validated using both 'xmllint' and 'jing'.
> >>
> >>Processing the document with:
> >>
> >>`xsltproc --xinclude --nonet --output index.html 
> >>/usr/share/xml/docbook/xsl-stylesheets-1.67.2/xhtml/docbook.
> xsl index.xml`
> >>
> >>and
> >>
> >>`xmllint --xinclude index.xml --output index-big.xml && java 
> >>org.apache.xalan.xslt.Process -in index-big.xml -xsl 
> >>/usr/share/xml/docbook/xsl-stylesheets-1.67.2/xhtml/docbook.
> xsl -out 
> >>index.html`
> >>
> >>both fail with lots of warnings about templates not found:
> >>
> >>"Request for title of element with no title: book
> >>No template matches book.
> >>No template matches info in book.
> >>No template matches title in info.
> > 
> > 
> > I'd suspect that its the namespace getting in the way?
> 
> That was my initial suspicion too.
> 
> > I believe the relax ng schema is namespaced?
> 
> Yes, the RELAX NG schema is namespaced.
> > 
> > The stylesheets are ns unaware | innocent as yet.
> 
> Well, I would have expected so given DocBook NG's pre-alpha state. 
> However, there is a comment in xhtml/docbook.xsl (line 267) 
> suggesting 
> that what the stylesheets will do is simply strip any namespaces if 
> handed a DocBook NG document.


The template that does the namespace stripping (the last one in
xhtml/docbook.xsl) also adds the XHTML namespace. But this can't be right,
since from then on, all the elements from the source file will be in the
XHTML namespace. Hence the "No template matches" errors.

If you change to a "null namespace" in the template, then things work
better. That is, change 

 <xsl:element name="{local-name(.)}"
namespace="http://www.w3.org/1999/xhtml";>

to 
 
 <xsl:element name="{local-name(.)}" namespace="">


/MJ



[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]