How to form a conditional XPath expression

admin

Administrator
Staff member
I've the following structure,<Root><A f1="1" f2="2"/><A f1="3" f2="4"/><A f1="5" f2="6"/></Root>Could I NOT use <xsl:if> element but ONLY ONE XPath expression to outputf2 value (in this case, '4' should be used) if f1='3' to fit to the following<<XPATH>>?<Output><xsl:attribute name="x"><xsl:value-of select="<<XPATH>>"/></xsl:attribute></Output>The expected Output will be:-<Output x="4"/>Thanks!
 
Back
Top