This is the mail archive of the
xsl-list@mulberrytech.com
mailing list .
Giving values to xsl:variable by xml attribute
- To: <XSL-List at lists dot mulberrytech dot com>
- Subject: [xsl] Giving values to xsl:variable by xml attribute
- From: "Ofer Kalisky" <kalisky at messagevine dot com>
- Date: Thu, 4 Oct 2001 13:07:53 +0200
- Reply-To: xsl-list at lists dot mulberrytech dot com
How do I set a value of a variable by attribute?
Let's say I want to determine the value of a variable from a list by node
name (I have the static names in advance):
This is my static xsl tree
<xsl:variable name="values">
<one>1</one>
<two>2</two>
</values>
This is the input xml:
<x value="one"/>
and now I want to access it in the xsl:
.
.
.
<xsl:value-of name="$values/one"/>
This will work, but what if I want the "one" node to be determined by the
xml value?
XSL-List info and archive: http://www.mulberrytech.com/xsl/xsl-list