Home. 
.

transparent

transparent

transparent

Altova Mailing List Archives


RE: [xsl] Obtaining xml node value and using it as variable

From: "Matthieu Ricaud" <matthieu.ricaud@------->
To:
Date: 10/4/2005 2:42:00 PM
Hello,
xsl:variable is made on this purpose, just use the select attribute to get
your node value :
<xsl:variable name="myVar" select="."/> for example, get the value of the
context node.
Within the same template you can then get your variable value with
<xsl:value-of select="$myVar"/>
If you want to use it anywhere in your xsl, then make it global : declare
your variable just under the xsl root (<xsl:stylesheet>) and start your
select with : "/your_xml_root/xpath_to_your_node"
If you want to pass this variable as parameter to a template, then use
better <xsl:param>
Hope this help,
Matthieu

-----Message d'origine-----
De : geoff hopkins [mailto:geoffhopkins123@xxxxxxxxx]
Envoyi : mardi 4 octobre 2005 16:22
@ : xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Objet : [xsl] Obtaining xml node value and using it as variable


xslt (1.0) - using MSXML4.0

During xslt run time...

Is there a way to get a node value from a xml document
and set this as a parameter.

hope I have explained this well enough...?!?

Geoff



__________________________________
Yahoo! Mail - PC Magazine Editors' Choice 2005
http://mail.yahoo.com


transparent
Print
Mail
Like It
Disclaimer
.

These Archives are provided for informational purposes only and have been generated directly from the Altova mailing list archive system and are comprised of the lists set forth on www.altova.com/list/index.html. Therefore, Altova does not warrant or guarantee the accuracy, reliability, completeness, usefulness, non-infringement of intellectual property rights, or quality of any content on the Altova Mailing List Archive(s), regardless of who originates that content. You expressly understand and agree that you bear all risks associated with using or relying on that content. Altova will not be liable or responsible in any way for any content posted including, but not limited to, any errors or omissions in content, or for any losses or damage of any kind incurred as a result of the use of or reliance on any content. This disclaimer and limitation on liability is in addition to the disclaimers and limitations contained in the Website Terms of Use and elsewhere on the site.

.
.

transparent

transparent