on 05-15-2013 5:53 PM
Hello Experts,
I need help in XSLT mapping.
This is a mapping between IDoc-XMLand XML. the source being IDoc-XML and the target being the XML.
Existing XSLT code, If the source has some value in the field E1EDP10/IDNKD, then map it to target Item/Product/InternalID.
Need to put condition: If the field IDKND is not present in the source then the target field InternalID should have the value 'DUMMY'. The field IDKND would not be present in the Source IDoc-XML. I need to extend the code and put the new condition.
<xsl:when
test="count(./IDNKD)!=0">
<Product>
<xsl:element name="InternalID">
<xsl:attribute name="schemeAgencyID">
<xsl:value-of select="$LogSys"/>
</xsl:attribute>
<xsl:value-of select="./IDNKD"/>
</xsl:element>
</Product>
</xsl:when> Thanks.
Thanks for all the inputs. I am done with this code now.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If your parent node has occurrence then use for each, otherwise just use xsl:if "not(path/IDNKD) alone
<xsl:for-each select="/yourNodepath/.../">
<xsl:if test="not(IDNKD)">
<! write your logic here ->
</xsl:if>
</xsl:for-each>
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
95 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
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.