xml schema and substitution groups or xs choice

admin

Administrator
Staff member
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
 
Back
Top