xsl-list
[Top] [All Lists]

RE: Obtaining xml node value and using it as variable

2005-10-04 07:46:55
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(_at_)yahoo(_dot_)com]
Envoyé : mardi 4 octobre 2005 16:22
À : xsl-list(_at_)lists(_dot_)mulberrytech(_dot_)com
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

--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--


--~------------------------------------------------------------------
XSL-List info and archive:  http://www.mulberrytech.com/xsl/xsl-list
To unsubscribe, go to: http://lists.mulberrytech.com/xsl-list/
or e-mail: <mailto:xsl-list-unsubscribe(_at_)lists(_dot_)mulberrytech(_dot_)com>
--~--