Reputation: 29
I have long list from a query statement to check if the said tag exist. If it does. copy-of with value. If not do something else with it. I am trying to do something like
<xsl:choose>
<xsl:when test="$TEST1/THING/row/name() = $tagname">
<xsl:copy-of select = "$TEST1/THING/row/name()"/>
</xsl:when>
<xsl:otherwise>
<!-- DO something -->
</xsl:otherwise>
</xsl:choose>
And it is not working! Any ideas?
Upvotes: 0
Views: 160
Reputation: 116992
Try:
<xsl:when test="$TEST1/THING/row/*[name() = $tagname]">
Note that this is pretty much a guess. Without context, that's all you can get.
Upvotes: 1