Newbie question on xslt. I've multiple xsl:if checks like
<xsl:if test="node/node1"> ...</xsl:if>
...
<xsl:if test="node/node1"> ...</xsl:if>
...
<xsl:if test="node/node1"> ... </xsl:if>
Is there a way to parameterize the test condition to make the code more readable and easy to maintain? Maybe with a variable or something like
<xsl:variable name="node1Present" select="true()"/>
<xsl:if test="$node1Present"> ... </xsl:if>
I don't understand how to construct the variable to reflect the 'test a node exist' (test="node/node1")