|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] XSL:T Spec - qname processing - Question/Suggestion
Greetings,
Being the programming type I find it strange that the XSL:T standard
does not allow variables / parameters expansion in qnames such as
"mode" in <apply-templates>.
While I have read part of XSL:T and XML standards regarding qnames I
can't really see why simple variable/parameter expansion is not
permitted.
Will this change in XSLT 2.0 ?
Regards,
Peter
This might be best illustrated by an example.
INVALID XSLT
============
<xsl:template name="generateTableRow">
<xsl:param name="label"/>
<xsl:param name="match"/>
<xsl:param name="count"/>
<xsl:param name="mode" select="''"/>
<!-- Other Logic and Markup -->
<xsl:apply-templates select="$match" mode="$mode"/>
<!-- Other Logic and Markup -->
</xsl:template>
VALID XSLT
==========
<xsl:template name="generateTableRow">
<xsl:param name="label"/>
<xsl:param name="match"/>
<xsl:param name="count"/>
<xsl:param name="mode" select="''"/>
<!-- Other Logic and Markup -->
<!-- xsl:apply-templates' mode is a qname
and qnames do not seem to expand variable references :-( -->
<xsl:choose>
<xsl:when test="$mode = 'RequiredByGeneration'">
<xsl:apply-templates select="$match"
mode="RequiredByGeneration"/>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="$match"/>
</xsl:otherwise>
</xsl:choose>
<!-- Other Markup and Logic -->
</xsl:template>
http://movies.yahoo.com.au - Yahoo! Movies
- Vote for your nominees in our online Oscars pool.
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|

Cart








