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

define reference index in a importing schema

  • 1.  define reference index in a importing schema

    Posted Mon November 27, 2006 02:04 PM

    Hi,
    i have the following schema structure:

    <xs:schema ..... xmlns:c = "http://www.destatis.de/schema/edb/commonType/1.0" .....> 
    <xs:import namespace = "...." schemaLocation "commonTypeSchema"></xs:import>
    <xs:element name = "organisation"> 
    <xs:complexType> 
    ..... 
    <xs:element name = "contact" type = "c:employeeType" minOccurs = "0" maxOccurs = "2"> 
    <xs:annotation> 
    <xs:appinfo> 
    <tsd:elementInfo> 
    <tsd:physical> 
    <tsd:which>/organisation/contact</tsd:which> 
    <tsd:native> 
    <tsd:index> 
    <tsd:reference></tsd:reference> 
    </tsd:index> 
    </tsd:native> 
    </tsd:physical> 
    </tsd:elementInfo> 
    </xs:appinfo> 
    </xs:annotation> 
    </xs:element> 
    .......

    in the imported schema i defined the employee type:

    <xs:complexType name = "employeeType"> 
    <xs:sequence> 
    <xs:element name = "firstName" type = "xs:string"></xs:element> 
    <xs:element name = "lastName" type = "xs:string"></xs:element> 
    <xs:element name = "titel" type = "xs:string" minOccurs = "0"></xs:element> 
    <xs:element name = "salutation" type = "xs:string"></xs:element> 
    <xs:element name = "unit" type = "xs:string"></xs:element> 
    <xs:element name = "phone" type = "xs:string"></xs:element> 
    <xs:element name = "mobilePhone" type = "xs:string" minOccurs = "0"></xs:element> 
    <xs:element name = "fax" type = "xs:string" minOccurs = "0"></xs:element> 
    <xs:element name = "email" type = "xs:string"></xs:element> 
    </xs:sequence> 
    </xs:complexType> 

    my question is :
    how can i reference to the reference index, which is defined in the importing schema(organisationSchema), in imported schema(commonTypSchema)?


    #Tamino
    #API-Management
    #webMethods


  • 2.  RE: define reference index in a importing schema

    Posted Tue November 28, 2006 12:09 PM

    Hi

    You may use the following fragment in the imported schema - but you have to assert that wherever employeeType is used it is a descendant node of the referenced node /organisation/contact.

    Regards
    Uli

    <xs:complexType name = “employeeType”>
    xs:sequence
    <xs:element name = “firstName” type = “xs:string”>
    xs:annotation
    xs:appinfo
    tsd:elementInfo
    tsd:physical
    tsd:native
    tsd:index
    tsd:standard
    tsd:refers/organisation/contact</tsd:refers>
    </tsd:standard>
    </tsd:index>
    </tsd:native>
    </tsd:physical>
    </tsd:elementInfo>
    </xs:appinfo>
    </xs:annotation>
    </xs:element>
    <xs:element name = “lastName” type = “xs:string”></xs:element>


    #API-Management
    #Tamino
    #webMethods