W3C

ComplexTypeChoice Example

  <xs:element name="fruit" type="ex:Fruit"/>

  <xs:complexType name="Fruit">
        <xs:choice>
          <xs:element name="apple" type="xs:int"/>
          <xs:element name="orange" type="xs:string"/>
          <xs:element name="banana" type="xs:int"/>
        </xs:choice>
      </xs:complexType>

The example schema [ComplexTypeChoice.xsd] has been classified as being "" as it exhibits the following patterns:

Status Name XPath

To facilitate testing, the example schema element has been wrapped in the following descriptions:

The following valid instance documents are provided:

Instance Validity
ComplexTypeChoice01
ComplexTypeChoice02
ComplexTypeChoice03

  <ex:fruit>
        <ex:apple>21</ex:apple>
      </ex:fruit>
  <ex:fruit>
        <ex:orange>Two Hundred</ex:orange>
      </ex:fruit>
  <ex:fruit>
        <ex:banana>329</ex:banana>
      </ex:fruit>

This document was produced by the W3C XML Schema Patterns for Databinding Working Group. Comments on this document may be sent to the public public-xsd-databinding-comments@w3.org mailing list (public archive).

Generated from examples.xml $Date$