Request clarification for XSLT 1.0: setting mode externally

[email protected]
Newsgroups gmane.org.w3c.xsl-editors
Message-ID <[email protected]>
The Apache Xalan Project has just received an enhancement request from Mukul Gandhi that our XSLT 1.0 processor allow setting of the mode before transformation begins. Of course, Section 5.7 of the 1.0 spec is silent on this point, being only two paragraphs. However, the report cites an interesting part of 5.8:

"The XSLT 1.0 spec explicitly says (section '5.8 Built-in Template Rules')..

<quote>

The following shows the equivalent of the built-in template rule for mode m.

<xsl:template match="*|/" mode="m">

<xsl:apply-templates mode="m"/>

</xsl:template>

</quote>

This gives impression that the template rule for root node in an initial mode exists. So the XSLT processor should provide an option to pass initial mode to the transformation.

But I cannot find anywhere in spec that this is a mandatory requirement(i.e. passing initial mode). So I have not called this a bug, but as a 'improvement request'."

Even if such a capability is an optional feature, Section 5.7 should acknowledge the possibility. In so doing, I hope you would make it resemble the 2.0 capability as much as possible. Also, you would want to address whether and how the mode name could be a namespace-qualified name.

.................David Marston
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.