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

Where to place tsd:index on an attribute of a ref-element?

  • 1.  Where to place tsd:index on an attribute of a ref-element?

    Posted Fri November 11, 2005 02:08 PM

    Hello!

    We are using Tamino 4.4.1.1 under XP.

    We made up a doctpye-schema which references other doctypes:

    <schema…>

    <xs:include schemaLocation = “methodHeaderSchema”></xs:include>
    <xs:include schemaLocation = “reportedPersonSchema”></xs:include>

    <xs:element name = “stateMachine”>
    xs:complexType
    xs:sequence
    <xs:element ref = “methodHeader” ></xs:element>
    <xs:element ref = “reportedPerson” ></xs:element>
    </xs:sequence>
    <xs:attribute name = “dateOfDeath” use = “required”>

    A document looks like this:
    xql:result




    </xql:result>

    For the attribute “sessionID” of the referenced “methodHeader” I want to define an Index using tsd:index.

    My simple question is: where to place it?

    Any hint it welcomed.
    Christian


    #API-Management
    #Tamino
    #webMethods


  • 2.  RE: Where to place tsd:index on an attribute of a ref-element?

    Posted Sat November 12, 2005 01:48 PM

    Hi Christian

    there are two ways - in both cases you need a
    tsd:attributeInfotsd:physicaltsd:nativetsd:indextsd:standard</… >…</tsd:attributeInfo>, but the way how this is associated with the attribute declaration differs:

    (1) place the tsd:attributeInfo inside xs:annotationxs:appinfo inside the attribute declaration (i.e. if there is an <xs:attribute ref=…/>, then at the referenced global attribute declaration)

    (2) put the tsd:attributeInfo with an additional attribute context=“stateMachine/methodHeader/@sessionID” below tsd:schemaInfo having the <tsd:doctype name=“stateMachine”> child

    Approach (1) will be rejected if the attribute is declared in an included schema which is defined in another collection, (2) does not have this restriction.

    Best regards
    Uli


    #Tamino
    #webMethods
    #API-Management


  • 3.  RE: Where to place tsd:index on an attribute of a ref-element?

    Posted Tue November 15, 2005 11:09 AM

    Hi Uli.

    Thanks for your help.
    Finally we decided to use tsd:unique, because this more suitable:

    <tsd:doctype name = “stateMachine”>
    tsd:logical
    tsd:contentclosed</tsd:content>
    <tsd:unique name = “D-sessionID”>
    <tsd:field xpath = “methodHeader/@sessionID”></tsd:field>
    </tsd:unique>
    </tsd:logical>
    </tsd:doctype>

    Best regards Christian


    #webMethods
    #API-Management
    #Tamino