webMethods

webMethods

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

Ambiguous content model in schema

  • 1.  Ambiguous content model in schema

    Posted Mon October 17, 2011 10:48 AM

    Hi,

    I have an XSD schema for the XML I receive from one of the systems and the XSD structure cannot change. The XSD has one of the elemnts defined as ‘xs:group’. When I validate a sample XML against the schema, the below error is returned:

    errorMessage=[ISC.0082.9015] Ambiguous content model in schema - not LL(1)

    Please could you assist in resolving this error with modifying the XSD being the last resort ? It is kind of urgent, early reply would be highly appreciated, thanks.


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


  • 2.  RE: Ambiguous content model in schema

    Posted Tue October 18, 2011 10:52 AM

    hi shivh,

    An alternative is to generate a document type out of the XSD and validate the xml document (hint: use pub.xml.xmlNodeToDocument) against the document type instead of the IS schema.


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


  • 3.  RE: Ambiguous content model in schema

    Posted Mon October 24, 2011 04:41 PM

    Thanks pchew, that does work. The sequence of calls should be as follows:

    pub.xml:xmlStringToXMLNode
    pub.xml:xmlNodeToDocument
    pub.schema:validate

    So, if the XML is invalid the call pub.xml:xmlNodeToDocument will fail.

    Here is my problem:

    1. I have implemented a publish-subscribe model for sending a specific XML info from source 1 to Targets 1, 2 and 3.
    2. Targets 1 and 2 would need the XML info in different format than the source, so no problem there. I will transform and send it.
    3. However, Target 3 needs the XML in the same format as the source, but I need to supress the invalid XMLs.

    If I have to convert the same document back to an XML, the structure of the XML is changing because of the way wM generates the document structure for a ‘group’ element.

    Any ideas how I can validate the XML string without having to convert to document ? Is it supported in version 8.2 (I am using version 8.0.1) ?


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