
March 23rd, 2003, 11:54 AM
|
|
Registered User
|
|
Join Date: Mar 2003
Location: new Haven CT
Posts: 3
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
Setting an xsl variable to be equal to a node attribute value based on a condition
Is there anyway to set a xsl:variable to be equal to a node attribute value based on a condition? So for example in the XML below I would want to set a variable to be equal to the value of the name attribute for the third element. So I want to pass the condition of set variable = value of name for the last element where type = "4".
<top>
<element name ="One" type="3"></element>
<element name ="Two" type="4"></element>
<element name ="Three" type="4"></element>
</top>
|