micronoodles
Technical User
This bit of xsl takes a letter from A-T (in $MYxaxis) and converts it into a number 0-18 (in $x)
<xsl:variable name="x" select="translate($MYxaxis,'ABCDEFGHJKLMNOPQRST','0123456789012345678')" saxon:assignable="yes"/>
<xsl:if test="contains('LMNOPQRST',$MYxaxis)">
<saxon:assign name="x" select="($x)+10"/>
</xsl:if>
My question is how can i do the same thing efficiently without using saxon:assign, whilst still having access to $x outside the <xsl:if> statement?
Currently i am in a catch22 where if i define x outside the 'if' i cannot change it inside, and if i define something inside the 'if' i am not able to refer to it outside.
<xsl:variable name="x" select="translate($MYxaxis,'ABCDEFGHJKLMNOPQRST','0123456789012345678')" saxon:assignable="yes"/>
<xsl:if test="contains('LMNOPQRST',$MYxaxis)">
<saxon:assign name="x" select="($x)+10"/>
</xsl:if>
My question is how can i do the same thing efficiently without using saxon:assign, whilst still having access to $x outside the <xsl:if> statement?
Currently i am in a catch22 where if i define x outside the 'if' i cannot change it inside, and if i define something inside the 'if' i am not able to refer to it outside.