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

Need help converting a W3C Schema

webMethods Community Member

webMethods Community MemberThu March 27, 2003 06:34 AM

webMethods Community Member

webMethods Community MemberFri March 28, 2003 11:52 AM

  • 1.  Need help converting a W3C Schema

    Posted Tue March 25, 2003 02:23 AM

    Hi,
    I need some help converting a W3C Schema to a TSD4. I’ve tried using converter tool but it had some problems. This W3C schema unfortunately has
    1) imports
    2) attribute groups
    3) facets (simpleTypes)

    Please take a look. I think we should come up with a Schema Repository to store popular XML standards as TSD4s for all to use. If there is, please let me know where I can find it.

    Thanks, Sean Koh
    cpp-cpa-2_0.xsd (24.2 KB)


    #Tamino
    #webMethods
    #API-Management


  • 2.  RE: Need help converting a W3C Schema

    Posted Tue March 25, 2003 12:30 PM

    Hi,

    Unfortunately you did not provide any information about Tamino Server version.
    I have attached a fixed schema file, that should work with Tamino 4.1.1.

    What I did is replacing the attributeGroup references with their content.

    Tamino Schema Editor provides some rudimentary help for converting XSD schema, those functionality is resided beneath menu entry Tools->Transformation.

    A more sophisticated (one-click) transformation help is planned with an upcoming community release of Tamino Schema Editor.

    Hope this helps,

    Best regards,
    Peter
    cpp-cpa-2_0_TSD4_1_1_fixed.tsd (29.8 KB)


    #Tamino
    #API-Management
    #webMethods


  • 3.  RE: Need help converting a W3C Schema

    Posted Wed March 26, 2003 02:07 AM

    Thanks for your help. I’m using Tamino4. I thought mentioning TSD4 would have said it.
    I tried defining the schema and it would not go in. Got an error as below:

    An error occurred while processing a schema document; (src-import.2) Invalid import element. Schema reference could not be resolved. <INOXDE7931,INOXDE7536>
    An error occurred while processing a schema document; (src-import.2) Invalid import element. Schema reference could not be resolved. <INOXDE7931,INOXDE7536>

    I guess this is due to the imports. How do I take care of these. Also, this schema has named simpletypes and complexTypes. Does TSD4 understand these or do I have to convert them manually? Sean.


    #API-Management
    #Tamino
    #webMethods


  • 4.  RE: Need help converting a W3C Schema

    Posted Wed March 26, 2003 09:20 AM

    Tamino 4.1.1 supports named simple and complex types. If you use the schema editor and switch to the TSD4 view (almost) all problems will be listed. Global types are not listed with your schema.
    The imported schemas have to be present in Tamino. Thus you have to define them first and change the schema location on them (see documentation).
    The schema for the xml namespace is already available in Tamino. Schema location is: …/ino:collection/xml_lang_space.
    Please post if you are successful or not. Otherwise post a zip file with your entire schema family. I will convert it tomorrow afternoon.


    #API-Management
    #Tamino
    #webMethods


  • 5.  RE: Need help converting a W3C Schema

    Posted Thu March 27, 2003 06:33 AM

    Yes. I would like to try it out. I had some trouble trying to define the additional xsd. DO I have to load them in as nonXML? The digital signature xsd is in this posting. I will poast xlink in the next one.
    Thank you so much, Sean.
    xmldsig-core-schema.xsd (10.1 KB)


    #webMethods
    #API-Management
    #Tamino


  • 6.  RE: Need help converting a W3C Schema

    Posted Thu March 27, 2003 06:34 AM


  • 7.  RE: Need help converting a W3C Schema

    Posted Thu March 27, 2003 11:44 AM

    The imported schemas have to be present in Tamino. Thus you have to define them first and change the schema location on them (see documentation).

    where is exactly?

    The schema for the xml namespace is already available in Tamino. Schema location is: …/ino:collection/xml_lang_space.
    I try to add this to my schema (attached) but i get the error:
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    - <ino:response xmlns:ino=“http://namespaces.softwareag.com/tamino/response2” xmlns:xql=“XQL FAQ (XML Query Language - Frequently Asked Questions)”>
    - <ino:message ino:returnvalue=“7931”>
    <ino:messagetext ino:code=“INOXDE7931”>An error occurred while processing a schema document</ino:messagetext>
    ino:messagelineINOXDE7533: (mp-valid-appinfo.1.3) Below Schema there needs to be exactly one appinfo node which defines Tamino mappings</ino:messageline>
    </ino:message>
    </ino:response>
    Any help?
    @nto
    presence.xsd (2.82 KB)


    #API-Management
    #webMethods
    #Tamino


  • 8.  RE: Need help converting a W3C Schema

    Posted Thu March 27, 2003 01:40 PM

    Sean,

    Here are the converted schemas.
    xlink: was fine.
    xmldsig: the schema editor did not liked the doctype declaration somehow, after removing it worked.
    ccp-cpa: the attribute groups were converted. The usage of non-empty-string replaced by xs:string.

    [For your schema editor version I did clear the schema version property, too.]
    ccp-converted.zip (5.31 KB)


    #Tamino
    #webMethods
    #API-Management


  • 9.  RE: Need help converting a W3C Schema

    Posted Thu March 27, 2003 01:44 PM

    nto,

    you have to tell Tamino what the schema name and the collection name is to be. Thus currently there is no appinfo for Tamino yet, thats what the error message says.

    You both have to declare the doctypes, too. Otherwise you cannot load documents for your schemas.

    Best is to use the Tamino Schema Editor.


    #API-Management
    #webMethods
    #Tamino


  • 10.  RE: Need help converting a W3C Schema

    Posted Thu March 27, 2003 05:55 PM

    I have added the collection,the schema name and the doctype too, so the file become .tsd.
    But when i insert it i get:
    INOXDE7931">An error occurred while processing a schema document</ino:messagetext>
    ino:messagelineINOXDE7917: Line 7, Column 8: (mp-valid-doctype-name.3) For each doctype name where the doctype is not of type nonXML there must be a matching global element with a matching qualified name.

    But the doctype match with the global element!!!
    Best,
    @nto
    presence.tsd (3.55 KB)


    #API-Management
    #webMethods
    #Tamino


  • 11.  RE: Need help converting a W3C Schema

    Posted Fri March 28, 2003 09:05 AM

    The doctype is a reference on a global element thus it has to be prefixed like other element references: add the target namespace prefix tns to the doctype name.


    #webMethods
    #Tamino
    #API-Management


  • 12.  RE: Need help converting a W3C Schema

    Posted Fri March 28, 2003 11:52 AM

    thanks :slight_smile:

    i didn’t know that thing.
    @nto


    #API-Management
    #Tamino
    #webMethods


  • 13.  RE: Need help converting a W3C Schema

    Posted Mon March 31, 2003 03:27 AM

    Thank you all who have helped in this!
    I did not want to remove the doctype declaration from the digsig xsd. But I guess there is no choice.
    Sean.


    #API-Management
    #webMethods
    #Tamino


  • 14.  RE: Need help converting a W3C Schema

    Posted Mon March 31, 2003 08:25 AM

    Sean,

    you may have doctypes whereever you want. Each schema may have its own doctypes and documents, regardless if a schema is used from another schema, too.


    #Tamino
    #webMethods
    #API-Management


  • 15.  RE: Need help converting a W3C Schema

    Posted Mon March 31, 2003 08:44 AM

    Yes. This is true. In the zipped file, I’ve modified the CPA to declare 2 doctypes. One is
    CollaborationProtocolProfile and another is
    CollaborationProtocolAgreement. I’ve since managed to define the schemas without any trouble. But I’m now unable to load the data. Have a look at test.xml in the zipped attachment. Get a message which says Schema Not Found. Sean.


    #API-Management
    #webMethods
    #Tamino


  • 16.  RE: Need help converting a W3C Schema

    Posted Mon March 31, 2003 10:04 AM

    Please forget about the previous posting. It is working now. Had the wrong document given to me by customer. Sean.


    #webMethods
    #API-Management
    #Tamino


  • 17.  RE: Need help converting a W3C Schema

    Posted Tue April 01, 2003 01:27 PM

    Trying to insert my schema i get:
    =“7703”>
    <ino:messagetext ino:code=“INOXDE7703”>validation has detected an error in document</ino:messagetext>
    ino:messagelineINOXDE7763: Line 71, Column 44: datatype validation for attribute “name” of type xs:NCName failed: (cvc-datatype-valid) An invalid value has been found during validation</ino:messageline>
    </ino:message>
    why?
    @nto
    presencenew.tsd (6.21 KB)


    #Tamino
    #API-Management
    #webMethods


  • 18.  RE: Need help converting a W3C Schema

    Posted Wed April 02, 2003 09:52 AM

    An element name has to be an NCName. No : is allowed there. Remove the prefix from the name. Whether the name of this local element has to be prefixed in the instance or not, depends on the form property or on the general elmentFormDefault property of the schema.


    #Tamino
    #API-Management
    #webMethods


  • 19.  RE: Need help converting a W3C Schema

    Posted Thu April 03, 2003 07:48 AM

    Line 71 points to the subscriber element…also removing the mapns prefix at line 54 for that element…i don’t resolve the problem.
    Which element should i modify?

    @nto


    #Tamino
    #API-Management
    #webMethods


  • 20.  RE: Need help converting a W3C Schema

    Posted Thu April 03, 2003 08:27 AM

    Best is to use the schema editor. If you get an error message, klick on the message and the respective tree node is selected.

    Please read the error messages carefully. After changing the element NAME mapns:contactaddress to contactadress, you get this error:
    An error occurred while processing a schema document; (src-resolve.1.1) Global type reference could not be resolved <INOXDE7931,INOXDE7529>

    Thus the base type of contactadress is mapns:contactaddreass [note the type error]. But no type named contactaddreas or contactaddress is defined in your schema!
    So what?


    #API-Management
    #webMethods
    #Tamino


  • 21.  RE: Need help converting a W3C Schema

    Posted Thu April 03, 2003 09:44 AM

    If “contact” should contain a field “contactaddress” from the namespace xmlns:mapns = “urn:3gpp:params:xml:ns:map-pidf”, you need to define this contactaddress as a global element in a new schema. This schema has to have the targetNamespace “urn:3gpp:params:xml:ns:map-pidf”. Then you need to import this schema into your original schema and use contactaddress by an element reference to mapns:contactaddress.

    Reason: you cannot define elements for two namespaces in one schema.

    I changed your schemas accordingly.
    presence.zip (1.84 KB)


    #webMethods
    #API-Management
    #Tamino