xmlgraphics-fop-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clay Leeds <cle...@medata.com>
Subject Re: xsl variables
Date Tue, 03 Dec 2002 23:24:32 GMT
Howdy,

Forgive my 'newbie' answer, but it seems like what you're trying to do 
would be better suited to xsl:param than xsl:variable. Why not try using an 
xsl:param instead?

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 and cannot be changed. From the 
Michael Fitzgerald's book, XSL Essentials:

   ...the value bound by param is considered only
   a default or intial value because you can later
   pass a new value to a parameter either from outside
   of the stylesheet, such as from the command line,
   or from another template using the with-param
   element...

   As for the value of variable, as a general rule,
   once it is set, it is set, and you can't change
   it dynamically....Under certain conditions, though,
   you can change the value of a local variable in a
   template.

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.

Like I said. Nothing interesting to see here...

HTH!

:-)

At 02:42 AM 12/3/2002, you wrote:
>Is there a way to change the value of a global xsl variable?
>is it possible to declare a vraiable at some location in the stylesheet and
>affect it a value at some other location?
>
>Thanks!
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
>For additional commands, e-mail: fop-user-help@xml.apache.org

- Clay Leeds
- Web Developer
- cleeds@medata.com 


---------------------------------------------------------------------
To unsubscribe, e-mail: fop-user-unsubscribe@xml.apache.org
For additional commands, e-mail: fop-user-help@xml.apache.org


Mime
View raw message