You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@xalan.apache.org by Ram Gajavelli <rg...@yahoo.com> on 2001/05/29 19:36:59 UTC

setting the value of xsl:variable - could not find more information

Hello,

Can somebody help me with the information about how to
use a "xsl:variable" to be populated from the value of
a given xml file so that I can use that variable in
templates used on other elements.

Basically, setting the value of a defined variable to
one of the elements' value and then be able to use it
in the templates that will be called later.

Thanks,
..Ram.

__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/

Re: setting the value of xsl:variable - could not find more information

Posted by jason heddings <Ja...@Sun.COM>.
Ram-

The easiest way to do this is to use the "select" attribute for the
<xsl:variable .../> element.  Example:

<xsl:variable name="pi" select="/document/constants/pi-value" />

Or something similar.

HTH,
--jah

Ram Gajavelli wrote:
> 
> Hello,
> 
> Can somebody help me with the information about how to
> use a "xsl:variable" to be populated from the value of
> a given xml file so that I can use that variable in
> templates used on other elements.
> 
> Basically, setting the value of a defined variable to
> one of the elements' value and then be able to use it
> in the templates that will be called later.
> 
> Thanks,
> ..Ram.
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - buy the things you want at great prices
> http://auctions.yahoo.com/

-- 

 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
      \\\|///                 Jason Heddings             ((
     \\ ~ ~ //                303.272.5166 (x75166)    C|~~|
     (/ @ @ /)                Jason.Heddings@Sun.COM    `__'
 ~~oOOo~(_)~oOOo~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~