IBM webMethods Hybrid Integration

IBM webMethods Hybrid Integration

Join this online group to communicate across IBM product users and experts by sharing advice and best practices with peers and staying up to date regarding product enhancements.

 View Only
Expand all | Collapse all

Having problem with XSLT transformation. XSLT service throwing error

  • 1.  Having problem with XSLT transformation. XSLT service throwing error

    Posted Mon May 28, 2012 03:36 PM

    [INDENT]Hi ,
    I am new to XSLT. I have written a XLST service to get the CDATA from XML. My XML looks like

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

    HellosJPTC
    Hello
    Hello

    The XSLT i have written in the XSLT service is

    <?xml version="1.0"?>

    <xsl:stylesheet version=“1.0”
    xmlns:xsl=“[URL=“XSLT Namespace”][COLOR=#22229c]http://www.w3.org/1999/XSL/Transform[/color][/URL]”>
    <! – XSLT code goes here →
    <xsl:template match=“/”>
    <xsl:value-of select=“//text()[contains(.,‘CDATA’)]” />
    </xsl:template>
    </xsl:stylesheet>

    But when I run this service giving the XML above as input, I get the following error
    com.wm.driver.comm.b2b.WmCommException: [[[XSL.0002.9001] JAXP: Error instantiating transformer - com.wm.pkg.xslt.util.LocalizedTransformerException: [XSL.0002.9002] JAXP: Error during transformation - org.xml.sax.SAXParseException: The content of elements must consist of well-formed character data or markup] [XSL.0002.9001] JAXP: Error instantiating transformer -
    This is webMethods 7.1.2 and on the WMXSLT homepage I see
    [TABLE=“class: cms_table”]
    [TR]
    [TD]SAXParserFactory[/TD]
    [TD]org.apache.xerces.jaxp.SAXParserFactoryImpl[/TD]
    [/TR]
    [TR]
    [TD]DocumentBuilderFactory[/TD]
    [TD]org.apache.xerces.jaxp.DocumentBuilderFactoryImpl[/TD]
    [/TR]
    [TR]
    [TD]TransformerFactory[/TD]
    [TD]org.apache.xalan.processor.TransformerFactoryImpl[/TD]
    [/TR]
    [/TABLE]

    this is just for information.

    Could you help me correct the XML/XSLT so that i can get the CDATA as desired.

    Thanks in advance
    Inky [/INDENT]


    #Integration-Server-and-ESB
    #Flow-and-Java-services
    #webMethods


  • 2.  RE: Having problem with XSLT transformation. XSLT service throwing error

    Posted Tue May 29, 2012 05:27 PM

    remove the space in the comment section and try

    replace or remove the comment line <! – XSLT code goes here →

    (no space after exclamation)

    Regards,
    Saravanan.E


    #Flow-and-Java-services
    #webMethods
    #Integration-Server-and-ESB