[XSL-LIST Mailing List Archive Home] [By Thread] [By Date] [Recent Entries] [Reply To This Message]

RE: Obtaining xml node value and using it as variable

Subject: RE: Obtaining xml node value and using it as variable
From: "Matthieu Ricaud" <matthieu.ricaud@xxxxxxx>
Date: Tue, 4 Oct 2005 16:46:55 +0200
xml node value
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,

-----Message d'origine-----
De : geoff hopkins [mailto:geoffhopkins123@xxxxxxxxx]
Envoyi : mardi 4 octobre 2005 16:22
@ : xsl-list@xxxxxxxxxxxxxxxxxxxxxx
Objet :  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...?!?


Yahoo! Mail - PC Magazine Editors' Choice 2005

Current Thread


Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced!

Buy Stylus Studio Now

Download The World's Best XML IDE!

Accelerate XML development with our award-winning XML IDE - Download a free trial today!

Don't miss another message! Subscribe to this list today.
First Name
Last Name
Subscribe in XML format
RSS 2.0
Atom 0.3
Site Map | Privacy Policy | Terms of Use | Trademarks
Free Stylus Studio XML Training:
W3C Member
Stylus Studio® and DataDirect XQuery ™are products from DataDirect Technologies, is a registered trademark of Progress Software Corporation, in the U.S. and other countries. © 2004-2013 All Rights Reserved.