[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
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 : 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
|
PURCHASE STYLUS STUDIO ONLINE TODAY!Purchasing Stylus Studio from our online shop is Easy, Secure and Value Priced! Download The World's Best XML IDE!Accelerate XML development with our award-winning XML IDE - Download a free trial today! Subscribe in XML format
|