xml schema and subsitution group or xs choice

Discussion in 'XML & RSS' started by alex57, Nov 12, 2006.

  1. #1
    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>
    Code (markup):
    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>
    Code (markup):
    or to substitute an element with no element using subtitution group attributes on a schema??
    Thanks
     
    alex57, Nov 12, 2006 IP