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

Empty element: attributes only

  • 1.  Empty element: attributes only

    Posted Mon April 25, 2005 02:23 PM

    Hi all,

    Say this is a piece of my XML

    <internationalPrice currency="EUR" value="423.46"/>

    And this is the Schema

    <xsd:element name="internationalPrice">
    <xsd:complexType>
    <xsd:complexContent>
    <xsd:restriction base="xsd:anyType">
    <xsd:attribute name="currency" type="xsd:string"/>
    <xsd:attribute name="value"    type="xsd:decimal"/>
    </xsd:restriction>
    </xsd:complexContent>
    </xsd:complexType>
    </xsd:element>

    Source: [url]XML Schema Part 0: Primer Second Edition

    What value should I choose in the base property of my “Element with attributes”? There is no anyType value for the base property in the Schema Editor.

    When I set the base property to xs:string in the Schema Editor, it succesfully defines the schema, but I get a “<ino:messagetext ino:code=“INOXDE7710”>(cvc-complex-type.2.1): empty content error</ino:messagetext>” while loading data.

    When I set the base property to something else, I get a “Mismatch of element or attribute type…” error while defining the schema.

    What should I do ?


    #API-Management
    #Tamino
    #webMethods


  • 2.  RE: Empty element: attributes only

    Posted Wed April 27, 2005 10:47 AM

    Solved my own problem …

    I don’t know exactly what I did wrong, I guess I had some errors in my TSD.

    I’ve now created my own “ComplexType” instead of using a “Element with attributes” and since I used that one, no more errors occurred.

    Thanks anyway


    #API-Management
    #Tamino
    #webMethods