Click to See Complete Forum and Search --> : xml schema and substitution groups or xs choice


alex57
11-12-2006, 09:16 AM
Hello,

I undestand the choice tag allows one or the other element to be valid from an xml document.

<xs:choice>
<xsd:element name="full" Pricetype="fullPriceType"/>
<xsd:element name="salePrice" type="salePriceType"/>
</xs:choice>

Is there a way to make a choice between having an element and having nothingif you understand what i mean. eg.

<xs:choice>
<xsd:element name="full" Pricetype="fullPriceType"/>
"or no element at all"
</xs:choice>

or to substitute an element with no element using subtitution group attributes on a schema??
Thanks