Clay Leeds wrote:
You don't need to read further (move along folks, there's nothing
interesting to see here), but as I understand it, an xsl:variable must
be defined at the top of an xsl:template
That's about <xsl:param>, <xsl:variable> can be defined anywhere except top
level.
it dynamically....Under certain conditions, though,
you can change the value of a local variable in a
template.
hmmm, what does he mean? I presume either extension functions (which generally
speaking break side-free nature of xslt) or he has meant possibility to
override global variable by a local one with the same name - it looks like
*local* assignment, but we know it's only temporary overriding.
Again, as I understand it, those "certain conditions" are essentially if
you assign a xsl:variable name="myVar-1" select="Price[1]", and then the
value of "Price[1]" (where Price[1] is the first position of the "Price"
nodein a group of "Price" nodes) changes, it is effectively changing the
xsl:variable.
First of all source tree in xslt is strictly read-only, therefore value of a
node cannot be changed during transformation and secondly, in xsl:variable
name="myVar-1" select="Price[1]" case variable myVar-1 is bound not to
"Price[1]" expression, but to the *result* of "Price[1]" expression
evaluation. Variables are not macros.
--
Oleg Tkachenko
eXperanto team
Multiconn Technologies, Israel
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]