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
  • 1.  Retrive DTD or Schema

    Posted Wed April 03, 2002 08:49 PM

    Hello
    Can somebody tell my, if there is a possibility to retrieve the DTD or the Schema of a XML object stored in Tamino?

    Thanx
    Daniel


    #Tamino
    #webMethods
    #API-Management


  • 2.  RE: Retrive DTD or Schema

    Posted Thu April 04, 2002 08:35 AM

    Yes it possible to get the schema (not DTD) but this depends on the version of Tamino.

    Assume database is MYDB, collection name is COLNAME and document type for which you wish to get the schema is DOCTYPE, then:

    for v2.3 (and v3.1 if you upgraded from v2.3 with schemas already defined) :

    <A HREF=“http://localhost/tamino/MYDB/ino:collection?_xql=ino:collection[@ino:name=“COLNAME”]/ino:doctype[@ino:name=“DOCTYPE”]” TARGET=_blank>http://localhost/tamino/MYDB/ino:collection?_xql=ino:collection[@ino:name=“COLNAME”]/ino:doctype[@ino:name=“DOCTYPE”]

    for v3.1 (which uses XML schemas):

    <A HREF=“http://localhost/tamino/MYDB/ino:collection?_xql=xs:schema[//tsd:collection/@name=“COLNAME”” TARGET=_blank>http://localhost/tamino/MYDB/ino:collection?_xql=xs:schema[//tsd:collection/@name=“COLNAME” and //tsd:doctype/@name=“DOCTYPE”]

    Also the API’s contain methods to get, define and undefine schemas.

    hope this helps.


    #Tamino
    #webMethods
    #API-Management


  • 3.  RE: Retrive DTD or Schema

    Posted Thu April 04, 2002 11:20 AM

    The URL of a TSD3 schema for COLLECTION and DOCTYPE in database MYDB

    http://localhost/tamino/MYDB/ino:collection/xs:schema/COLLECTION/DOCTYPE

    Useful if you want to include the schema in a schema hint


    #webMethods
    #Tamino
    #API-Management


  • 4.  RE: Retrive DTD or Schema

    Posted Sun April 07, 2002 05:07 PM

    Thanx for your reply

    Can you also tell me, if the format of the schema I get from the Database, is written as W3C-Standard or as the proprietary Tamino Schema.

    Thanx for your help
    Daniel


    #Tamino
    #webMethods
    #API-Management


  • 5.  RE: Retrive DTD or Schema

    Posted Mon April 08, 2002 05:02 PM

    Hi Daniel,

    with Tamino 3.1, both Stuart’s second query and Nigel’s query will return you an instance of xs:schema, which is the W3C Schema.
    (The Tamino specific information is stored in annotations to the schema.)

    code:

    <?xml version="1.0" encoding="iso-8859-1" ?>
    <xs:schema xmlns:xs=“http://www.w3.org/2001/XMLSchema” xmlns:tsd=“http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition”>
    xs:annotation
    xs:appinfo
    <tsd:schemaInfo name=“cd”>
    <tsd:collection name=“xapp” />
    <tsd:doctype name=“cd”>
    tsd:logical
    tsd:contentclosed</tsd:content>
    </tsd:logical>
    </tsd:doctype>
    tsd:adminInfo
    tsd:versionTSD3</tsd:version>
    tsd:created2002-02-11T17:47:09.029-08:00</tsd:created>
    tsd:modified2002-02-26T09:08:10.815-08:00</tsd:modified>
    </tsd:adminInfo>
    </tsd:schemaInfo>
    </xs:appinfo>
    </xs:annotation>
    <xs:element name=“cd”>
    xs:complexType
    xs:sequence
    <xs:element ref=“id” />
    <xs:element ref=“title” />
    <xs:element ref=“desc” />
    <xs:element ref=“category” />
    <xs:element ref=“comments” minOccurs=“0” />
    <xs:element ref=“price” />
    <xs:element ref=“availableDate” />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name=“id” type=“xs:string” />
    <xs:element name=“title” type=“xs:string” />
    <xs:element name=“desc” type=“xs:string” />
    <xs:element name=“category” type=“xs:string” />
    <xs:element name=“comments” type=“xs:string” />
    <xs:element name=“price” type=“xs:string” />
    <xs:element name=“availableDate” type=“xs:string” />
    </xs:schema>

    HTH,
    Trevor.


    #API-Management
    #webMethods
    #Tamino