|
[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message] Re: Change the value of global variables/params ??
<xsl:template name="sub">
<xsl:variable name="foo" select="'abc'"/>
<xsl:value-of select="$foo"/>
<xsl:variable name="foo" select="'def'"/>
<xsl:value-of select="$foo"/>
</xsl:template>
Calling this template will output -- abcdef
that was legal xsl until one of the later drafts, October perhaps
can't remember exactly when they decided to ban such `shadowing'.
There is no way you can ever need such a feature as it is always
possible to change the second variable name to foo2. You are
not really changing the value f foo, just declaring a new variable with
the same name that `hides' the first. As it is always possible to tell
just from the position in the template, which variable is being
referenced by $foo no functionality is lost by insisting that the second
variable has a different name.
David
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








