Will future versions of Tamino support the attribute “nillable” for elements?
Thanks
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
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
Hi
just model the element as optional, i.e.
<xs:element name=“theDateElement” type=“xs:date” minOccurs=“0”/>
Best regards
Uli
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
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
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
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 ?
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