Subject: RE: [xsl] Obtaining xml node value and using it as variable From: "Matthieu Ricaud" <matthieu.ricaud@xxxxxxx> Date: Tue, 4 Oct 2005 16:46:55 +0200 |
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
Current Thread |
---|
|
<- Previous | Index | Next -> |
---|---|---|
[xsl] Obtaining xml node value and , geoff hopkins | Thread | RE: [xsl] Obtaining xml node value , Michael Kay |
RE: [xsl] Modification date/time of, Michael Kay | Date | RE: [xsl] Obtaining xml node value , Michael Kay |
Month |