on 01-13-2011 11:05 AM
Hi,
i need some help by adding an expression in a XSLT
this is what it is now
<sch:CustomFieldList>
<sch:CustomField>
<sch:Attribute>ERP_UOM</sch:Attribute>
<sch:Value>
<xsl:value-of select="IDOC/E1AFKOL/GMEIN"/>
</sch:Value>
</sch:CustomField>
</sch:CustomFieldList>
and this is what I want
when value of "IDOC/E1AFKOL/GMEIN" is KGM this value must then be changed in KG
Thanks in advance and Best regards,
Marieke de Lange
<sch:CustomFieldList>
<sch:CustomField>
<sch:Attribute>ERP_UOM</sch:Attribute>
<xsl:choose>
<xsl:when test="IDOC/E1AFKOL/GMEIN[text()="KGM]">
<sch:Value><xsl:text>KG</xsl:text></sch:Value>
</xsl:when>
<xsl:otherwise>
<sch:Value>
<xsl:value-of select="IDOC/E1AFKOL/GMEIN"/>
</sch:Value>
</xsl:otherwise>
</xsl:choose>
</sch:CustomField>
</sch:CustomFieldList>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You can try:
http://www.w3schools.com/xsl/xsl_choose.asp
<xsl:choose>
<xsl:when test="expression">
<xsl:value-of select="substring(IDOC/E1AFKOL/GMEIN, 1, 2)"/> </xsl:when>
<xsl:otherwise>
<xsl:value-of select="IDOC/E1AFKOL/GMEIN"/>
</xsl:otherwise>
</xsl:choose>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
84 | |
23 | |
11 | |
9 | |
8 | |
5 | |
5 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.