[Home] [By Thread] [By Date] [Recent Entries]
While recursively copying and manipulating an xml tree, I need to handle
the same attribute differently, depending on its element.
I have: 1) entity/@vo-name 2) property/@vo-name I hoped to be able to treat this in one template match for @vo-name, something like <xsl:template match="@vo-name" mode="copy-modify">
<xsl:variable name="temp">
<xsl:choose>
<xsl:when test="~something with entity~" >...</xsl:when>
<xsl:when test="~something with property~" >...</xsl:when>
...and to distinguish them in between the template (eg. with xsl:choose). But is there an appropriate test for the node name, when my current node is an attribute? Obviously I can't say "parent::entity". Solution may be XSLT2.0 Many thanks, Georges
|

Cart



