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.


#TechXchangePresenter
 View Only

Having problems with XSLT transformation. Please Help

  • 1.  Having problems with XSLT transformation. Please Help

    Posted Mon May 28, 2012 03:28 PM

    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]http://www.w3.org/1999/XSL/Transform[/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]
    [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


    #B2B-Integration
    #Integration-Server-and-ESB
    #webMethods