W3C

AttributeOptional Example

  <xs:element name="attributeOptional" type="ex:AttributeOptional"/>

  <xs:complexType name="AttributeOptional">
        <xs:sequence>
          <xs:element name="amount" type="xs:long"/>
        </xs:sequence>
        <xs:attribute name="id" type="xs:string"/>
        <xs:attribute name="currency" type="xs:string" use="optional"/>
      </xs:complexType>

The example schema [AttributeOptional.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
AttributeOptional01
AttributeOptional02

  <ex:attributeOptional id="1711" currency="EUR">
        <ex:amount>1250</ex:amount>
      </ex:attributeOptional>
  <ex:attributeOptional id="1712">
        <ex:amount>1250</ex:amount>
      </ex:attributeOptional>

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$