cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT issue

former_member206760
Active Contributor
0 Kudos

I have written the following xslt code :

XSLT :

    <?xml version="1.0" encoding="UTF-8" ?>

-       <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:ns0="http://XYZ.com/Gen" xmlns:ns1="http://XYZ.com/Test">

-         <xsl:template match="/">

-          <ns1:MT_XSLT_Target>

-          <Title>

            <xsl:value-of select="ns0:MT_XSLT_Source/Person/Gender" />

         </Title>

-            <Name>

              <xsl:value-of select="concat(concat(ns0:MT_XSLT_Source/Person/FirstName,' '), ns0:MT_XSLT_Source/Person/LastName)" />

          </Name>

-             <Street>

              <xsl:value-of select="concat(concat(ns0:Mt_XSLT_Source/Person/Address/Houseno,' '), ns0:Mt_XSLT_Source/Person/Address/Street)" />

            </Street>

-               <City>

                <xsl:value-of select="ns0:Mt_XSLT_Source/Person/Address/City" />

             </City>

             </ns1:MT_XSLT_Target>

              </xsl:template>

              </xsl:stylesheet>

           

Here in the output the Title and Name field are populated correctly but the Street and City fields are coming as blank in the output ...

what may be the reason.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184681
Active Contributor
0 Kudos

Hi,

Bear in mind that XML is case-sensitive. Check all the names against upper/lower case. For instance, in Title and Name you are using MT_XSLT_Source, and in Street and City: Mt_XSLT_Source (with lowercase "t"). Change it to MT_XSLT_Source, verify the rest of the field names and it should work fine.

By the way, why don't you use graphical mapping?

Regards,

Greg

former_member206760
Active Contributor
0 Kudos

Highly appreciate your excellent reply ..that was the issue

Answers (0)