cancel
Showing results for 
Search instead for 
Did you mean: 

XSLT Mapping error

Former Member
0 Kudos

Hi Everyone,

I was trying to implement the simple XSLT mapping. I have written the XSLT mapping using notepad. When i am testing the XSLT mapping in operation mapping it was giving below error.

        TransformerConfigurationException occurred when loading XSLT sample_xslt.xsl; details: Could not compile stylesheet

Below is the code i have written:

<xsl:style-sheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema" exclude-result-prefixes="xs xsi xsl">

<xsl:output method="xml" encoding="UTF-8" indent="yes"/>

<xsl:template match="/">

<ns1:MT_RCV_XSLT_Mapping>

<Gender>

<xsl:value-of select="ns0:MT_SND_XSLT_Mapping/Employee/Gender"/>

</Gender>

<Name>

<xsl:value-of select="concat(concat(ns0:MT_SND_XSLT_Mapping/Employee/First_Name,''),ns0:MT_SND_XSLT_Mapping/Employee/Last_Name)"/>

</Name>

<Street>

<xsl:value-of select="concat(concat(ns0:MT_SND_XSLT_Mapping/Employee/Address/House_No,''),ns0:MT_SND_XSLT_Mapping/Employee/Address/Street)"/>

</Street>

<City>

<xsl:value-of select="ns0:MT_SND_XSLT_Mapping/Employee/Address/City"/>

</City>

</ns1:MT_RCV_XSLT_Mapping>

</xsl:template>

</xsl:style-sheet>

Please help in resolving this issue.

Regards,

Raju

Accepted Solutions (0)

Answers (2)

Answers (2)

Muniyappan
Active Contributor
0 Kudos

Hi,

use this online test tool to test your xsl code. then import it into ESR.

Online XSLT Test Tool

Regards,

Muni.

Former Member
0 Kudos

Hello,

U have to declare namespace prefixes along with namespace under xsl:stylesheet and then u can refer the same in ur code. For example:

xmlns:ns0="http://XYZ.com/Gen" Xmlns:ns1=”http://XYZ.com/Test”>

Change the same and then test?

http://www.sdn.sap.com/irj/scn/go/portal/prtroot/docs/library/uuid/000ee4d0-be91-2d10-8aaf-ff8045bdd...

Thanks

Amit Srivastava