The choice Element
The choice element provides an XML
representation for describing a selection from a set of element
types. An XML instance contains elements that correspond to a
selection from the set of element types defined by the
choice element in an XML Schema Document. The
minOccurs and maxOccurs attributes may permit the XML instance to
select several (e.g., between two and four) occurrences of element
types from the set.
<xsd:group name="priceGroup">
<xsd:annotation>
<xsd:documentation xml:lang="en">
A price is any one of the following:
* Full Price (with amount)
* Sale Price (with amount and authorization)
* Clearance Price (with amount and authorization)
* Free (with authorization)
</xsd:documentation>
</xsd:annotation>
<xsd:choice id="pg.choice">
<xsd:element name="fullPrice"
type="fullPriceType"/>
<xsd:element name="salePrice"
type="salePriceType"/>
<xsd:element name="clearancePrice"
type="clearancePriceType"/>
<xsd:element name="freePrice" type="freePriceType"/>
</xsd:choice>
</xsd:group>
|