cancel
Showing results for 
Search instead for 
Did you mean: 

Getting unwanted values between the XML tags in XSLT mapping

former_member187447
Participant
0 Kudos

Hi Folks

I have come across a very strange situation with my xslt mapping.

I am getting unwated values "11" between xml tags

as follows

<Tag>0001</Tag>

11

<DataID>3</DataID>

I am not sure why I am getting these values in between the tags. Any suggestions would be appreciated.

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello Kalyan Golla,

Can I get the source code fragment?

regards,

David

former_member187447
Participant
0 Kudos

Hi David,

Here is the code fragment where these 2 tags are mapped, FYI, the source is an IDOC message. The unwanted "11" is coming After the <Tag></Tag> and <DataID></DataID>. FYI, Fof the element <Tag></Tag> its a default value. But for <DataID> </DataID>  I have the mapping logic.

<Order>

            <OrderHeader>

              <Tag>009</Tag>

              <xsl:for-each select="E1EDKA1">

                <xsl:choose>

                  <xsl:when test="normalize-space(PARVW) = 'WE' and normalize-space(LIFNR) = 'U960'">

   <DataID>

                    <xsl:value-of select="'1'" />

   </DataID>

                  </xsl:when>

                  <xsl:when test="normalize-space(PARVW) = 'WE' and normalize-space(LIFNR) = 'U300'">

   <DataID>

                    <xsl:value-of select="'3'" />

       </DataID>

                  </xsl:when>

   <xsl:when test="normalize-space(PARVW) = 'WE' and normalize-space(LIFNR) = 'U930'">

   <DataID>

                    <xsl:value-of select="'1'" />

   </DataID>

                  </xsl:when>

   <xsl:when test="normalize-space(PARVW) = 'WE' and normalize-space(LIFNR) = 'U400'">

   <DataID>

                    <xsl:value-of select="'3'" />

   </DataID>

                  </xsl:when>

                  <xsl:otherwise>

                    <xsl:value-of select="'1'" />

                  </xsl:otherwise>

                </xsl:choose>

               </xsl:for-each>