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

Problem with XSLT transformation in webmethods

  • 1.  Problem with XSLT transformation in webmethods

    Posted Tue May 29, 2012 01:12 AM

    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=“XSLT Namespace”>
    <! – 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

    SAXParserFactory org.apache.xerces.jaxp.SAXParserFactoryImpl
    DocumentBuilderFactory org.apache.xerces.jaxp.DocumentBuilderFactoryImpl
    TransformerFactory org.apache.xalan.processor.TransformerFactoryImpl

    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


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


  • 2.  RE: Problem with XSLT transformation in webmethods

    Posted Fri January 17, 2014 06:54 PM

    I have kind of same error when I try parse the EDI xml use XSLT. The XSLT itself works fine for the XML because I test it use the tool online. The more weird thing is error message said I miss class which is used for convert EDI to XML.

    We use webMethods 7.3
    Here is the error message:

    Could not run ‘convertEDI850XMLUsingXSLT’.
    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.SAXException: javax.xml.parsers.FactoryConfigurationError: Provider com.berryworks.edireader.EDIParserFactory not found] [XSL.0002.9001] JAXP: Error instantiating transformer - com.wm.pkg.xslt.util.LocalizedTransformerException: [XSL.0002.9002] JAXP: Error during transformation - org.xml.sax.SAXException: javax.xml.parsers.FactoryConfigurationError: Provider com.berryworks.edireader.EDIParserFactory not found] [[XSL.0002.9001] JAXP: Error instantiating transformer - com.wm.pkg.xslt.util.LocalizedTransformerException: [XSL.0002.9002] JAXP: Error during transformation - org.xml.sax.SAXException: javax.xml.parsers.FactoryConfigurationError: Provider com.berryworks.edireader.EDIParserFactory not found] [XSL.0002.9001] JAXP: Error instantiating transformer - com.wm.pkg.xslt.util.LocalizedTransformerException: [XSL.0002.9002] JAXP: Error during transformation - org.xml.sax.SAXException: javax.xml.parsers.FactoryConfigurationError: Provider com.berryworks.edireader.EDIParserFactory not found

    Please help!


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


  • 3.  RE: Problem with XSLT transformation in webmethods

    Posted Fri January 24, 2014 11:14 AM

    @Inky,

    the issue is the comment line in the XSLT.

    Remove the following in your XSLT code, that will resolve the issue.

    <! – XSLT code goes here →

    correct XSLT:

    <?xml version="1.0"?>

    <xsl:stylesheet
    version=“1.0”
    xmlns:xsl=“XSLT Namespace”>
    <xsl:template match=“/”>
    <xsl:value-of select=“//text()[contains(.,‘CDATA’)]” />
    </xsl:template>
    </xsl:stylesheet>


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