Skip to Content
avatar image
Former Member

XSLT Mapping error

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

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Mar 05, 2014 at 07:13 AM

    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-ff8045bdd37d?QuickLink=index&…

    Thanks

    Amit Srivastava

    Add comment
    10|10000 characters needed characters exceeded

  • Mar 05, 2014 at 07:43 AM

    Hi,

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

    Online XSLT Test Tool

    Regards,

    Muni.

    Add comment
    10|10000 characters needed characters exceeded