Re: Bug in content->presentation stylesheet

Robin Green <r.d.green@lancaster.ac.uk> writes:

> There is a small bug in http://www.w3.org/Math/XSL/ctop.xsl

the template currently says:

<xsl:template mode="c2p" match="mml:csymbol/text()">
 <mml:mo><xsl:apply-templates mode="c2p"/></mml:mo>
</xsl:template>

and you think that it should be:

<xsl:template mode="c2p" match="mml:csymbol/text()">
 <mml:mo><xsl:value-of select="."/></mml:mo>
</xsl:template>


In fact both do the same thing, since the template applies to a text
node, even if there is a mode attribute in the apply-templates. The
fact that the built-in text() template is invoked even if called by a
template with a mode is not explicit in the XSL1.0 spec.  XSLT 2.0
does make the rule explicit:

The built-in template rules for text, attribute, comment,
processing-instruction, and namespace nodes for a specific mode are
the same as the rules shown above that apply where no mode is
specified.

and afaik all implementations of 1.0 follow it.

Max.

Received on Monday, 12 August 2002 10:09:08 UTC