In the sample XML there are two forms that match on number and type; in the second matching form I need to blank out the flag
element's value. I cannot change the level I am iterating over due to some interrelated stylesheets. I can do preceding-sibling
if I were iterating on formslist
but I can't seem to get the syntax correct when I am one level deeper on the flag
element. Both the number and type have to match before blanking it out.
<apply-templates match="formslist/flag">
<xsl:choose>
<xsl:when test=""></xsl:when>
</xsl:choose>
</apply-templates>
Sample XML
<forms>
<formslist>
<number>one</number>
<type>car</type>
<flag>da</flag>
</formslist>
<formslist>
<number>two</number>
<type>truck</type>
<flag>ex</flag>
</formslist>
<formslist>
<number>one</number>
<type>car</type>
<flag>da</flag>
</formslist>
</forms>