|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] RE: xsl:variable and match
> >Can I use a variable in the match part of xsl:template?
> ><xsl:variable name="x" select="/ROWSET/REPLACE/@EL"/>
> ><xsl:template match="/ROWSET/{$x}">
> > <NEWELEMENT><xsl:apply-templates/></NEWELEMENT>
> ></xsl:template>
>
> Although you can't use it the way you have indicated above,
> it isn't a blanket truth that a variable name cannot be used at all in
> the match part of a template.
Oh yes it is. First para of XSLT 5.3 after the format box.
>
> Interestingly, Saxon gives an error on this stylesheet that
> works fine with XT.
The spec was changed after I reported logical inconsistencies that could
result, this was quite late in the day so xt probably implements an older
version of the spec.
(But there are still some opportunities for circularity left, e.g. a key
that is defined directly or indirectly in terms of itself).
Mike Kay
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








