
October 11th, 2012, 12:41 PM
|
|
Registered User
|
|
Join Date: Jan 2012
Posts: 7
Time spent in forums: 1 h 41 m 10 sec
Reputation Power: 0
|
|
|
Simple newbee XSL question
HI Folks,
I have XML like:
<level>
<properties>
<property name="A">1</property>
<property name="B">2</property>
</properties>
</level>
And I am at "level" in my XSL processing and what to check for certain property names / values and am not sure how to check the value of a given property for the XML in my XSL along the lines of :
<xsl:for-each select="properties/property">
<xsl:choose>
<xsl:when test="@name='A' and @value='1'">
do something
</xsl:when>
<xsl:when test="@name='B' and @value='2'">
do something
</xsl:when>
</xsl:choose>
</xsl:for-each>
The @name gets the right propety name, but the @value does not get the property value .. what do I use to get the value for he property?
|