We use XSLT Map in SAP XI. We recently applied some patches in SAP XI.
The following XSLT map use to work earlier and now its broken. Not sure what have changed in sapxmltoolkit.jar from SAP. But i am here to request expert help to see if there is any problem with the following xslt and suggest if there are any changes with in XSLT 1.0 release in between. Or help me to rewrite this in some other simple way. So that i can test and see how this works.
The following code look for RFID_PALL first and copy RFID_CASE which will appear later. We are just trying to do sorting on this, as we are not sure how the source is going to come always.
There might be multiple RFID_PALL will occur sometimes.
Appreciate your help in advance
Code:
<xsl:choose>
<xsl:when test="E1EDL37[VHILM='RFID_PALL']">
<xsl:for-each select="E1EDL37[VHILM='RFID_PALL']">
<xsl:copy-of select="."/>
<xsl:for-each select="E1EDL44">
<xsl:variable name="Case" select="EXIDV"/>
<xsl:copy-of select="../../E1EDL37[EXIDV=$Case]"/>
</xsl:for-each>
</xsl:for-each>
<xsl:for-each select="E1EDL37[VHILM='RFID_CASE']">
<xsl:for-each select="E1EPC02">
<xsl:if test="not(PARENT_NAME)">
<!--<xsl:variable name="Case1" select="EXIDV"/>-->
<xsl:copy-of select="../."/>
</xsl:if>
</xsl:for-each>
</xsl:for-each>
</xsl:when>
<xsl:otherwise>
<xsl:for-each select="E1EDL37[VHILM='RFID_CASE']">
<xsl:copy-of select="."/>
</xsl:for-each>
</xsl:otherwise>
</xsl:choose>