A
anitawa
Hi,
Im in a dilemma and need some help.
I have an xml like this:
<animal species="dog">
<color>brown</color>
</animal>
<animal species="cat">
<color>black</color>
</animal>
<animal>
<color>no color</color>
</animal>
I want to be able to select the color with no attribute. Something
like this:
<xsl:choose>
<xsl:when test="./@species='dog'">
<value-of select=".[@species='dog']//color"/>
</xsl>
<xsl:when test="./@species='cat'">
<value-of select=".[@species='cat']//color"/>
</xsl>
....
....
</xsl:choose>
How would i get the color element under <animal> with no attribute??
Im in a dilemma and need some help.
I have an xml like this:
<animal species="dog">
<color>brown</color>
</animal>
<animal species="cat">
<color>black</color>
</animal>
<animal>
<color>no color</color>
</animal>
I want to be able to select the color with no attribute. Something
like this:
<xsl:choose>
<xsl:when test="./@species='dog'">
<value-of select=".[@species='dog']//color"/>
</xsl>
<xsl:when test="./@species='cat'">
<value-of select=".[@species='cat']//color"/>
</xsl>
....
....
</xsl:choose>
How would i get the color element under <animal> with no attribute??