[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: xsl:variable and match

Subject: RE: xsl:variable and match
From: Kay Michael <Michael.Kay@xxxxxxx>
Date: Mon, 22 May 2000 18:04:54 +0100
xsl match variable
> >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


Current Thread

PURCHASE STYLUS STUDIO ONLINE TODAY!

Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
Email
First Name
Last Name
Company
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.