Can you nest xsl:if within nested xsl:when, for example:
<xsl:choose>
<xsl:when test="param/@id = '1' " >
<xsl:if test="param/value = 'XML' ">
<xsl:when test="param/@id = '2' ">
<xsl:if test="param/value = 'HTTP' ">
<xsl:when test="param/@id = '3' ">
<xsl:if test="param/value = 'Y' ">
<xsl:call-template name="buildPayload"/>
</xsl:if>
</xsl:when>
</xsl:if>
</xsl:when>
</xsl:if>
</xsl:when>
</xsl:choose>
Can this be used, or is there away to streamline this into a more compact code?
Without trying it: I’d think that
<xsl:when>cannot be a child node of<xsl:if>without another<xsl:choose>in between. But, what are you trying to do? If I see that right, you want to run<call-template>if and only if(param/@id='1' and param/value='XML') or (param/@id='2' and param/value='HTTP') or (param/@id='3' and param/value='Y')… try that as the test value: