Click here to Skip to main content
15,895,740 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am still new to xslt and I have been given an assignment that involves transforming xml to another xml format.

I have multiple <xsl: choose="" xmlns:xsl="#unknown"> with each having <xsl:when> conditions. see below.

My problem is when for example the first choose statement evaluates to true it seems like the code does not go to the next <xsl:choose> element. It just processes that one and does not try evaluate the next <xsl:choose>.

I need to be able to have all the choose statements to be executed.

My code sample:

HTML
 <xsl:choose>
  <xsl:when test="substring(Table/PRODUCTDESCRIPTION,1,2)='01'">
    <policytypecode>01</policytypecode>
    <xsl:call-template name="RALifeAssured" />
  </xsl:when>
</xsl:choose>
<xsl:choose>
  <xsl:when test="substring(Table/PRODUCTDESCRIPTION,1,2)='02'">
    <policytypecode>02</policytypecode>
    <xsl:call-template name="IDBLifeAssured" />
  </xsl:when>
</xsl:choose></xsl:choose></xsl:choose></xsl:when></xsl:>
Posted
Updated 27-Apr-14 3:36am
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900