[xslt] bug in processing templates with modes (shouldn't cascade)



In the xslt spec (http://www.w3.org/TR/xslt#modes) it says:

"If an xsl:apply-templates element has a mode attribute, then it applies
only to those template rules from xsl:template elements that have a mode
attribute with the same value; if an xsl:apply-templates element does not
have a mode attribute, then it applies only to those template rules from
xsl:template elements that do not have a mode attribute."
--------------------------------

When I apply-templates like so:

...
<xsl:apply-templates mode="H1"/>
...
<xsl:template match="title" mode="H1">
   <H1 CONTENTEDITABLE="true">

     <xsl:value-of select="."/>

   </H1>

   <xsl:apply-templates select="not(name='title')"/>

</xsl:template>
------------------------------
I should be able to match a template with no mode. But it seems I need to
match a template with mode="H1". So the mode attribute is cascading (using
the latest version of libxslt or perhaps it is the perl-wrapper
XML::LibXSLT??).

best,
-Rob





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]