Link to home
Start Free TrialLog in
Avatar of kalyangkm
kalyangkmFlag for United States of America

asked on

Getting unwanted values between the XML tags in XSLT mapping

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. I have also attached the code snippet pertaining to these 2 tags
Avatar of kalyangkm
kalyangkm
Flag of United States of America image

ASKER

<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>

Open in new window

Hi Folks,

Anyone out there please?
ASKER CERTIFIED SOLUTION
Avatar of mccarl
mccarl
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
McCarl,

I already changed the code by removing the otherwise part, thanks anyway.

Regards
Kalyan.