xsl-list
[Top] [All Lists]

Re: [xsl] two-phase transformation fails to match with expected template.

2009-11-24 17:18:20

Thanks Michael, that did the trick.

Actually, the original was using the http://www.daisy.org/z3986/2005/ncx/ namespace.

Interesting I had to create an explicit prefix for it:

   <xsl:stylesheet
       xmlns="http://www.daisy.org/z3986/2005/ncx/";
       xmlns:ncx="http://www.daisy.org/z3986/2005/ncx/";
       xmlns:xsl="http://www.w3.org/1999/XSL/Transform";
       version="2.0">

   <!-- ..... -->

   <xsl:template match="ncx:navPoint" mode="playorder">
       <xsl:copy>
<xsl:attribute name="playOrder"><xsl:number level="any" count="ncx:navPoint"/></xsl:attribute>
           <xsl:apply-templates select="@*|node()" mode="playorder"/>
       </xsl:copy>
   </xsl:template>

The full, now functional, style sheet is here: http://code.google.com/p/tei2html/source/browse/trunk/tei2ncx.xsl

Jeroen.

Michael Kay wrote:
You created the navPoint element in the namespace
http://www.w3.org/1999/xhtml (which seems a bad idea, but if you do it, then
you need to match it in that namespace).
Regards,

Michael Kay
http://www.saxonica.com/
http://twitter.com/michaelhkay

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--

<Prev in Thread] Current Thread [Next in Thread>