#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2012
    Posts
    7
    Rep 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?
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2012
    Posts
    7
    Rep Power
    0
    text() gets me the value

IMN logo majestic logo threadwatch logo seochat tools logo