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

Attribute nillable

  • 1.  Attribute nillable

    Posted Wed September 22, 2004 06:53 AM

    Will future versions of Tamino support the attribute “nillable” for elements?

    Thanks


    #webMethods
    #API-Management
    #Tamino


  • 2.  RE: Attribute nillable

    Posted Wed September 22, 2004 01:59 PM

    Hi

    so far, support for nillable is not on our “high priority” list for the next version.
    In general, however, we intend to complete the XML schema support step by step.

    Best regards
    Uli


    #webMethods
    #Tamino
    #API-Management


  • 3.  RE: Attribute nillable

    Posted Tue November 02, 2004 03:45 PM

    OK. Let’s say I have defined a schema in which there is an element e with type xs:date. Without specifying nillable, a document with element e having an empty content will be invalid. is there a way to design a schema, without using nillable, such that element e can accept value that is either a valid date, or empty? Thanks


    #webMethods
    #API-Management
    #Tamino


  • 4.  RE: Attribute nillable

    Posted Wed November 03, 2004 10:40 AM

    Hi

    just model the element as optional, i.e.

    <xs:element name=“theDateElement” type=“xs:date” minOccurs=“0”/>

    Best regards
    Uli


    #webMethods
    #API-Management
    #Tamino


  • 5.  RE: Attribute nillable

    Posted Wed November 03, 2004 06:42 PM

    I think, this allows the element to be missing or present with a data value, but not to be empty. A solution with XML schema means would be the usage of union tpyes, but these are not supported by Tamino. You can, however, define a default value. Then, an empty element is accepted on insert. On retrieval, it will contain the default value.

    Regards

    Harald


    #Tamino
    #webMethods
    #API-Management


  • 6.  RE: Attribute nillable

    Posted Wed January 25, 2006 09:09 AM

    Hi,

    How should I do if I need a date type element, with an attribute. I have a value for the attribute, but not for the element:

    In such a case the optional element does not work because the element exist. I have the a schema validation error.
    Thanks


    #webMethods
    #API-Management
    #Tamino


  • 7.  RE: Attribute nillable

    Posted Thu January 26, 2006 07:12 AM

    Hi JP

    the schema for an empty element with an attribute would look e.g. as follows:

    <xs:element name=“theDateElement”>
    xs:complexType
    <xs:attribute name=“myAtt”/>
    </xs:complexType>
    </xs:element>

    Regards
    Uli


    #API-Management
    #webMethods
    #Tamino


  • 8.  RE: Attribute nillable

    Posted Thu January 26, 2006 04:53 PM

    But this does not include the date type in the element does it ? I need to be able to put a date in the element with the attribute, or an empty element with the attribute.
    I such a case I would need the nillable element . How can I do with tamino ?


    #Tamino
    #webMethods
    #API-Management


  • 9.  RE: Attribute nillable

    Posted Thu January 26, 2006 04:57 PM

    The following should work with Tamino 4.4

    <xs:element name=“theDateElement” nillable=“true”>
    xs:complexType
    xs:simpleContent
    <xs:extension base=“xs:date”/>
    </xs:simpleContent>
    <xs:attribute name=“myAtt”/>
    </xs:complexType>
    </xs:element>

    Regards
    Uli


    #API-Management
    #Tamino
    #webMethods