Quantcast
Channel: XML, System.Xml, MSXML and XmlLite forum
Viewing all articles
Browse latest Browse all 935

How Can i add a wild card condition for XSLT choose

$
0
0

Currently  i have Requirement to add a wildcard condition for a Choose statement condition, i want to filter out and equal first two digit start from  'US' ,  Discharge and LoadPort tags. Below is a my own created script but its not functioninonfg, Could you  please guide me to correct this,

<xsl:for-each select="a:Root/Consol_Details">
  
<xsl:choose>
    <xsl:when test="position() = 2  and   Discharge = 'US*' ">   
 
<RecipientRoleCollection>
        <RecipientRole> 
      <Code>RAG</Code>
  </RecipientRole>
 </RecipientRoleCollection>
  
    </xsl:when>
    <xsl:when test="position() = 2  and   LoadPort = 'US*' ">   
     
<RecipientRoleCollection>
        <RecipientRole> 
      <Code>SAG</Code>
  </RecipientRole>
 </RecipientRoleCollection>
  
    </xsl:when>
  </xsl:choose>
  
</xsl:for-each>


Viewing all articles
Browse latest Browse all 935

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>