I have a xml file:
I want to transform it to another xml file, where I should only take the item CHARG if it has a differetn value.
I wrote the following code:
However, I can not define the varial V_MaterialLot twice in the same xsl.
Does someone have a solution to me?
Regards
maxin
Code:
<E1MBXYI SEGMENT="1"> ... <CHARG>1000024187</CHARG> ... </E1MBXYI> <E1MBXYI SEGMENT="1"> ... <CHARG>1000024187</CHARG> ... </E1MBXYI> <E1MBXYI SEGMENT="1"> ... <CHARG>1000024188</CHARG> ... </E1MBXYI>
I wrote the following code:
Code:
<DataArea>
<xsl:variable name="V_MaterialLot" select="''"/>
<xsl:for-each select="E1MBXYI">
<xsl:if test="$V_MaterialLot != CHARG">
<MaterialInformation>
<ID>
<xsl:value-of select="CHARG"/>
<xsl:variable name="V_MaterialLot" select="CHARG"/>
<ID>
<MaterialInformation>
</xsl:if>
</xsl:for-each>
</DataArea>
Does someone have a solution to me?
Regards
maxin
Comment