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: DocBook XSL, DocBook 5, and Xalan


Has anyone gotten the DocBook XSL stylesheets to work with Docbook 5 
documents? I'm finding them unable to recognize any of my elements. A 
Little hacking shows that this template, which is supposed to remove the 
namespace before applying the stylesheet, isn't working:


<xsl:template match="/">
   <xsl:choose>
     <xsl:when test="function-available('exsl:node-set')       and 
(*/self::ng:* or */self::db:*)">
       <!-- Hack! If someone hands us a DocBook V5.x or DocBook NG document,
	   toss the namespace and continue. Someday we'll reverse this logic
	   and add the namespace to documents that don't have one.
	   But not before the whole stylesheet has been converted to use
	   namespaces. i.e., don't hold your breath -->
       <xsl:message>Stripping NS from DocBook 5/NG document.</xsl:message>
       <xsl:variable name="nons">
	<xsl:apply-templates mode="stripNS"/>
       </xsl:variable>
       <xsl:message>Processing stripped document.</xsl:message>
       <xsl:apply-templates select="exsl:node-set($nons)"/>
     </xsl:when>
     <xsl:otherwise>
       <xsl:message>Can't strip the DocBook 5 namespace. Output will 
suck.</xsl:message>
       <xsl:copy-of select="xalan:checkEnvironment()"/>
...


Perhaps exsl:node-set isn't available in Xalan 2.7? Yep. That seems to 
be it:

     [xslt] opt/xml/docbook-xsl/xhtml/docbook.xsl:318:19: Warning! 
Node-set available:  false

However the Xalan documentation claims this is supported. Any ideas?

-- 
Elliotte Rusty Harold  elharo@metalab.unc.edu
XML in a Nutshell 3rd Edition Just Published!
http://www.cafeconleche.org/books/xian3/
http://www.amazon.com/exec/obidos/ISBN=0596007647/cafeaulaitA/ref=nosim


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