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

SR503132: duplicate element decl: Page

  • 1.  SR503132: duplicate element decl: Page

    Posted Tue February 25, 2003 02:27 AM

    Cu got a problem in using the x-application with Tamino. The element ‘Page’ was defined in 2 location. Cu thinks it is OK and the following statement is used:-

    Schema schema = Schema.read(store, sTaminoDoctype, false);
    to get the schema as attached. The following error occurs:
    com.softwareag.xtools.xapplication.businessdocument.InvalidSchemaException
    duplicate element decl: Page

    The .TSD schema is as follows:
    <?xml version = "1.0" encoding = "UTF-8"?>
    <xs:schema xmlns:xs = “XML Schema” xmlns:tsd = “http://namespaces.softwareag.com/tamino/TaminoSchemaDefinition”>
    xs:annotation
    xs:appinfo
    <tsd:schemaInfo name = “Senate”>
    <tsd:collection name = “ebooks”></tsd:collection>
    <tsd:doctype name = “Senate”>
    tsd:logical
    tsd:contentclosed</tsd:content>
    </tsd:logical>
    </tsd:doctype>
    tsd:adminInfo
    tsd:versionTSD3</tsd:version>
    tsd:created2002-12-07T15:07:30.047+08:00</tsd:created>
    tsd:modified2002-12-07T15:07:30.047+08:00</tsd:modified>
    </tsd:adminInfo>
    </tsd:schemaInfo>
    </xs:appinfo>
    </xs:annotation>
    <xs:element name = “Senate”>
    xs:complexType
    <xs:sequence minOccurs = “0” maxOccurs = “unbounded”>
    <xs:element name = “RecordNo” type = “xs:string”>
    xs:annotation
    xs:appinfo
    tsd:elementInfo
    tsd:physical
    tsd:native
    tsd:index
    tsd:standard</tsd:standard>
    </tsd:index>
    </tsd:native>
    </tsd:physical>
    </tsd:elementInfo>
    </xs:appinfo>
    </xs:annotation>
    </xs:element>
    <xs:element name = “Type” type = “xs:string”>
    xs:annotation
    xs:appinfo
    tsd:elementInfo
    tsd:physical
    tsd:native
    tsd:index
    tsd:standard</tsd:standard>
    </tsd:index>
    </tsd:native>
    </tsd:physical>
    </tsd:elementInfo>
    </xs:appinfo>
    </xs:annotation>
    </xs:element>
    <xs:element name = “Title” type = “xs:string”>
    xs:annotation
    xs:appinfo
    tsd:elementInfo
    tsd:physical
    tsd:native
    tsd:index
    tsd:standard</tsd:standard>
    tsd:text</tsd:text>
    </tsd:index>
    </tsd:native>
    </tsd:physical>
    </tsd:elementInfo>
    </xs:appinfo>
    </xs:annotation>
    </xs:element>
    <xs:element name = “MeetingDate” type = “xs:string”>
    xs:annotation
    xs:appinfo
    tsd:elementInfo
    tsd:physical
    tsd:native
    tsd:index
    tsd:standard</tsd:standard>
    </tsd:index>
    </tsd:native>
    </tsd:physical>
    </tsd:elementInfo>
    </xs:appinfo>
    </xs:annotation>
    </xs:element>
    <xs:element name = “DisplayTitle” type = “xs:string”></xs:element>
    <xs:element name = “Suppress” type = “xs:string”></xs:element>
    <xs:element name = “Code1” type = “xs:string”></xs:element>
    <xs:element name = “Code2” type = “xs:string”></xs:element>
    <xs:element name = “Content”>
    xs:complexType
    xs:sequence
    <xs:element name = “Page” maxOccurs = “unbounded”>
    xs:annotation
    xs:appinfo
    tsd:elementInfo
    tsd:physical
    tsd:native
    tsd:index
    tsd:text</tsd:text>
    </tsd:index>
    </tsd:native>
    </tsd:physical>
    </tsd:elementInfo>
    </xs:appinfo>
    </xs:annotation>
    xs:complexType
    xs:simpleContent
    <xs:extension base = “xs:string”>
    <xs:attribute name = “PageNo” type = “xs:string”></xs:attribute>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name = “DisplayContent”>
    xs:complexType
    xs:sequence
    <xs:element name = “Page” maxOccurs = “unbounded”>
    xs:complexType
    xs:simpleContent
    <xs:extension base = “xs:string”>
    <xs:attribute name = “PageNo” type = “xs:string”></xs:attribute>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name = “FileSize” type = “xs:string”></xs:element>
    <xs:element name = “Location” type = “xs:string”></xs:element>
    <xs:element name = “ChangeInfo”>
    xs:complexType
    xs:sequence
    <xs:element name = “Creation”>
    xs:complexType
    xs:simpleContent
    <xs:extension base = “xs:string”>
    <xs:attribute name = “CreatedBy” type = “xs:string”></xs:attribute>
    <xs:attribute name = “CreatedDate” type = “xs:string”></xs:attribute>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    </xs:element>
    <xs:element name = “Modification” minOccurs = “0” maxOccurs = “unbounded”>
    xs:complexType
    xs:simpleContent
    <xs:extension base = “xs:string”>
    <xs:attribute name = “ModifiedBy” type = “xs:string”></xs:attribute>
    <xs:attribute name = “ModifiedDate” type = “xs:string”></xs:attribute>
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>


    #Tamino
    #API-Management
    #webMethods


  • 2.  RE: SR503132: duplicate element decl: Page

    Posted Tue February 25, 2003 09:36 AM

    Hello,

    yes it is right. X-Application can not handle schemas that contains an element declaration twice.

    Could you propose the customer to change the schema?

    Possible solution:

      <xs:schema ...>
    ...
    <xs:element name = "Content">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref = "Page" maxOccurs = "unbounded" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    <xs:element name = "DisplayContent">
    <xs:complexType>
    <xs:sequence>
    <xs:element ref = "Page" maxOccurs = "unbounded" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    ...
    <xs:element name = "Page">
    <xs:annotation>
    <xs:appinfo>
    <tsd:elementInfo>
    <tsd:physical>
    <tsd:native>
    <tsd:index>
    <tsd:text/>              
    </tsd:index>
    </tsd:native>
    </tsd:physical>
    </tsd:elementInfo>
    </xs:appinfo>
    </xs:annotation>
    <xs:complexType>
    <xs:simpleContent>
    <xs:extension base = "xs:string">
    <xs:attribute name = "PageNo" type = "xs:string" />
    </xs:extension>
    </xs:simpleContent>
    </xs:complexType>
    </xs:element>
    </xs:schema>



    With this modification I was able to generate an application with the generator of X-Application 3.1.3.

    I attach the schema as I used it to generate the application.

    Bye,
    Christian.
    senate2.tsd (5.31 KB)


    #Tamino
    #webMethods
    #API-Management


  • 3.  RE: SR503132: duplicate element decl: Page

    Posted Tue March 11, 2003 12:53 PM

    Hello,

    this topic will be moved to the Assistance Forum in the next days.
    The assistance forum is intended to be used for technical questions and answers.

    Thank you for your understanding.

    Regards,
    Christian.


    #API-Management
    #Tamino
    #webMethods