<?xml version="1.0" encoding="UTF-8"?>
<ex:examples xmlns:ex="http://www.w3.org/2002/ws/databinding/examples/6/09/"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema"
  xmlns:wsdl11="http://schemas.xmlsoap.org/wsdl/"
  xmlns:soap11enc="http://schemas.xmlsoap.org/soap/encoding/"
  wsdlNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/"
  targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/">

  <ex:ns prefix="ex" uri="http://www.w3.org/2002/ws/databinding/examples/6/09/"/>
  <ex:ns prefix="log" uri="http://www.w3.org/2002/ws/databinding/log/6/09/"/>
  <ex:ns prefix="xs" uri="http://www.w3.org/2001/XMLSchema"/>
  <ex:ns prefix="xsi" uri="http://www.w3.org/2001/XMLSchema-instance"/>
  <ex:ns prefix="soap11enc" uri="http://schemas.xmlsoap.org/soap/envelope/"/>
  <ex:ns prefix="soap11" uri="http://schemas.xmlsoap.org/soap/envelope/"/>
  <ex:ns prefix="wsdl11" uri="http://schemas.xmlsoap.org/wsdl/"/>

  <ex:version>$Id: examples.xml,v 1.174 2009/03/19 17:20:15 pdowney Exp $</ex:version>

  <ex:example xml:id="TargetNamespace" element="ex:targetNamespace">
    <ex:types>
      <xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/"
        elementFormDefault="qualified">
        <xs:element name="targetNamespace" type="xs:string"/>
      </xs:schema>
    </ex:types>
    <ex:instance xml:id="TargetNamespace01">
      <ex:targetNamespace>foo</ex:targetNamespace>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="NoTargetNamespace" element="ex:noTargetNamespace">
    <ex:types>
      <xs:schema>
        <xs:element name="noTargetNamespace" type="xs:string"/>
      </xs:schema>
    </ex:types>
    <ex:instance xml:id="NoTargetNamespace01">
      <noTargetNamespace xsi:noNamespaceSchemaLocation="NoTargetNamespace.xsd"
        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">some data</noTargetNamespace>
    </ex:instance>
  </ex:example>

    <ex:example xml:id="QualifiedLocalElements" element="ex:qualifiedLocalElements">
    <ex:types>
      <xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/"
        xmlns:xs="http://www.w3.org/2001/XMLSchema"
        elementFormDefault="qualified">
        <xs:element name="qualifiedLocalElements">
          <xs:complexType>
            <xs:sequence>
              <xs:element name="element1" type="xs:string"/>
              <xs:element name="element2" type="xs:string"/>
            </xs:sequence>
          </xs:complexType>
        </xs:element>
      </xs:schema>
    </ex:types>
    <ex:instance xml:id="QualifiedLocalElements01">
      <ex:qualifiedLocalElements>
        <ex:element1>some data</ex:element1>
        <ex:element2>some more data</ex:element2>
      </ex:qualifiedLocalElements>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="UnqualifiedLocalAttributes" element="ex:unqualifiedLocalAttributes">
    <ex:types>
      <xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/"
        attributeFormDefault="unqualified" elementFormDefault="qualified">
        <xs:element name="unqualifiedLocalAttributes" type="xs:string"/>
      </xs:schema>
    </ex:types>
    <ex:instance xml:id="UnqualifiedLocalAttributes01">
      <ex:unqualifiedLocalAttributes>foo</ex:unqualifiedLocalAttributes>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="SchemaVersion" element="ex:schemaVersion">
    <ex:types>
      <xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/"
        elementFormDefault="qualified" version="this is version 42">
        <xs:element name="schemaVersion" type="xs:string"/>
      </xs:schema>
    </ex:types>
    <ex:instance xml:id="SchemaVersion01">
      <ex:schemaVersion>foo</ex:schemaVersion>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="FinalDefault" element="ex:finalDefault">
    <ex:types>
      <xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/"
        elementFormDefault="qualified" finalDefault="#all">
        <xs:element name="finalDefault" type="xs:string"/>
      </xs:schema>
    </ex:types>
    <ex:instance xml:id="FinalDefault01">
      <ex:finalDefault>foo</ex:finalDefault>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="BlockDefault" element="ex:blockDefault">
    <ex:types>
      <xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/"
        elementFormDefault="qualified" blockDefault="#all">
        <xs:element name="blockDefault" type="xs:string"/>
      </xs:schema>
    </ex:types>
    <ex:instance xml:id="BlockDefault01">
      <ex:blockDefault>foo</ex:blockDefault>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AnySimpleTypeAttribute" element="ex:anySimpleTypeAttribute">
    <ex:typedef>
      <xs:element name="anySimpleTypeAttribute" type="ex:AnySimpleTypeAttribute"/>
      <xs:complexType name="AnySimpleTypeAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="anySimpleType" type="xs:anySimpleType"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="AnySimpleTypeAttribute01">
      <ex:anySimpleTypeAttribute anySimpleType="hello"/>
    </ex:instance>
    <ex:instance xml:id="AnySimpleTypeAttribute02">
      <ex:anySimpleTypeAttribute anySimpleType="1"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AnySimpleTypeElement" element="ex:anySimpleTypeElement">
    <ex:typedef>
      <xs:element name="anySimpleTypeElement" type="xs:anySimpleType"/>
    </ex:typedef>
    <ex:instance xml:id="AnySimpleTypeElement01">
      <ex:anySimpleTypeElement/>
    </ex:instance>
    <ex:instance xml:id="AnySimpleTypeElement02">
      <ex:anySimpleTypeElement>anySimpleTypeValue</ex:anySimpleTypeElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AnyTypeElement" element="ex:anyTypeElement">
    <ex:typedef>
      <xs:element name="anyTypeElement" type="xs:anyType"/>
    </ex:typedef>
    <ex:instance xml:id="AnyTypeElement01">
      <ex:anyTypeElement/>
    </ex:instance>
    <ex:instance xml:id="AnyTypeElement02">
      <ex:anyTypeElement>
        <foo>
          <bar>cheese</bar>
        </foo>
      </ex:anyTypeElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ImportSchemaNamespace" element="ex:importSchemaNamespace">
    <ex:typedef>
      <xs:import namespace="http://www.w3.org/2001/XMLSchema"/>
    </ex:typedef>
  </ex:example>

  <ex:example xml:id="ImportNamespace" element="ex:importNamespace">
    <ex:typedef>
      <xs:import namespace="http://example.com/a/namespace"/>
    </ex:typedef>
  </ex:example>

  <ex:example xml:id="ImportSchema" element="ex:importSchema">
    <ex:typedef>
      <xs:import namespace="http://example.com/a/namespace"
        schemaLocation="http://www.w3.org/2002/ws/databinding/examples/6/09/static/Imported.xsd"/>
    </ex:typedef>
  </ex:example>

  <ex:example xml:id="ImportTypesNamespace" element="ex:importTypesNamespace">
    <ex:typedef>
      <wsdl>
        <xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/static/1"
          elementFormDefault="qualified">
          <xs:element name="importTypesNamespace" type="xs:string"/>
        </xs:schema>
        <xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/static/2"
          elementFormDefault="qualified">
          <xs:import namespace="http://www.w3.org/2002/ws/databinding/examples/6/09/static/1"/>
        </xs:schema>
      </wsdl>
    </ex:typedef>
  </ex:example>


  <ex:example xml:id="DocumentationElement" element="ex:documentationElement">
    <ex:typedef>
      <xs:annotation>
        <xs:documentation xml:lang="en">Schema Level Documentation</xs:documentation>
      </xs:annotation>
      <xs:element name="documentationElement" type="xs:string">
        <xs:annotation>
          <xs:documentation xml:lang="en">This is a string Element</xs:documentation>
        </xs:annotation>
      </xs:element>
    </ex:typedef>
    <ex:instance xml:id="DocumentationElement01">
      <ex:documentationElement>hello world</ex:documentationElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="IdentifierName" element="ex:identifierName">
    <ex:typedef>
      <xs:element name="identifierName" type="xs:string"/>
    </ex:typedef>
    <ex:instance xml:id="IdentifierName02">
      <ex:identifierName>Hello</ex:identifierName>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NonIdentifierName" element="ex:non-Identifier-Name">
    <ex:typedef>
      <xs:element name="non-Identifier-Name" type="xs:string"/>
    </ex:typedef>
    <ex:instance xml:id="NonIdentifierName02">
      <ex:non-Identifier-Name>Hello</ex:non-Identifier-Name>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="StringElement" element="ex:stringElement">
    <ex:typedef>
      <xs:element name="stringElement" type="xs:string"/>
    </ex:typedef>
    <ex:instance xml:id="StringElement01">
      <ex:stringElement/>
    </ex:instance>
    <ex:instance xml:id="StringElement02">
      <ex:stringElement>Hello cruel world.</ex:stringElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="StringAttribute" element="ex:stringAttribute">
    <ex:typedef>
      <xs:element name="stringAttribute" type="ex:StringAttribute"/>
      <xs:complexType name="StringAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="string" type="xs:string"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="StringAttribute01">
      <ex:stringAttribute string="hello"/>
    </ex:instance>
    <ex:instance xml:id="StringAttribute02">
      <ex:stringAttribute string="0123456789"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="BooleanElement" element="ex:booleanElement">
    <ex:typedef>
      <xs:element name="booleanElement" type="xs:boolean"/>
    </ex:typedef>
    <ex:instance xml:id="BooleanElement01">
      <ex:booleanElement>false</ex:booleanElement>
    </ex:instance>
    <ex:instance xml:id="BooleanElement02">
      <ex:booleanElement>true</ex:booleanElement>
    </ex:instance>
    <ex:instance xml:id="BooleanElement03">
      <ex:booleanElement>0</ex:booleanElement>
    </ex:instance>
    <ex:instance xml:id="BooleanElement04">
      <ex:booleanElement>1</ex:booleanElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="BooleanAttribute" element="ex:booleanAttribute">
    <ex:typedef>
      <xs:element name="booleanAttribute" type="ex:BooleanAttribute"/>
      <xs:complexType name="BooleanAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="boolean" type="xs:boolean"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="BooleanAttribute01">
      <ex:booleanAttribute boolean="true"/>
    </ex:instance>
    <ex:instance xml:id="BooleanAttribute02">
      <ex:booleanAttribute boolean="0"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="DecimalElement" element="ex:decimalElement">
    <ex:typedef>
      <xs:element name="decimalElement" type="xs:decimal"/>
    </ex:typedef>
    <ex:instance xml:id="DecimalElement01">
      <ex:decimalElement>0</ex:decimalElement>
    </ex:instance>
    <ex:instance xml:id="DecimalElement02">
      <ex:decimalElement>-1.23</ex:decimalElement>
    </ex:instance>
    <ex:instance xml:id="DecimalElement03">
      <ex:decimalElement>12678967.543233</ex:decimalElement>
    </ex:instance>
    <ex:instance xml:id="DecimalElement04">
      <ex:decimalElement>+1000000.00</ex:decimalElement>
    </ex:instance>
    <ex:instance xml:id="DecimalElement05">
      <ex:decimalElement>+100000000000000000000000000000000000000000000.00</ex:decimalElement>
    </ex:instance>
    <ex:instance xml:id="DecimalElement06">
      <ex:decimalElement>210</ex:decimalElement>
    </ex:instance>
    <ex:instance xml:id="DecimalElement07">
      <ex:decimalElement>210.00</ex:decimalElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="DecimalAttribute" element="ex:decimalAttribute">
    <ex:typedef>
      <xs:element name="decimalAttribute" type="ex:DecimalAttribute"/>
      <xs:complexType name="DecimalAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="decimal" type="xs:decimal"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="DecimalAttribute01">
      <ex:decimalAttribute decimal="+10000000999829292922093443563.32423442"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="FloatElement" element="ex:floatElement">
    <ex:match type="xs:float">ex:floatElement</ex:match>
    <ex:typedef>
      <xs:element name="floatElement" type="xs:float"/>
    </ex:typedef>
    <ex:instance xml:id="FloatElement01">
      <ex:floatElement>-1E4</ex:floatElement>
    </ex:instance>
    <ex:instance xml:id="FloatElement02">
      <ex:floatElement>1267.43233E12</ex:floatElement>
    </ex:instance>
    <ex:instance xml:id="FloatElement03">
      <ex:floatElement>12.78e-2</ex:floatElement>
    </ex:instance>
    <ex:instance xml:id="FloatElement04">
      <ex:floatElement>12</ex:floatElement>
    </ex:instance>
    <ex:instance xml:id="FloatElement05">
      <ex:floatElement>INF</ex:floatElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="FloatAttribute" element="ex:floatAttribute">
    <ex:typedef>
      <xs:element name="floatAttribute" type="ex:FloatAttribute"/>
      <xs:complexType name="FloatAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="float" type="xs:float"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="FloatAttribute01">
      <ex:floatAttribute float="-7446.445E5"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="DoubleElement" element="ex:doubleElement">
    <ex:typedef>
      <xs:element name="doubleElement" type="xs:double"/>
    </ex:typedef>
    <ex:instance xml:id="DoubleElement01">
      <ex:doubleElement>-1E4</ex:doubleElement>
    </ex:instance>
    <ex:instance xml:id="DoubleElement02">
      <ex:doubleElement>1267.432233E12</ex:doubleElement>
    </ex:instance>
    <ex:instance xml:id="DoubleElement03">
      <ex:doubleElement>12.78e-2</ex:doubleElement>
    </ex:instance>
    <ex:instance xml:id="DoubleElement04">
      <ex:doubleElement>12</ex:doubleElement>
    </ex:instance>
    <ex:instance xml:id="DoubleElement05">
      <ex:doubleElement>INF</ex:doubleElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="DoubleAttribute" element="ex:doubleAttribute">
    <ex:typedef>
      <xs:element name="doubleAttribute" type="ex:DoubleAttribute"/>
      <xs:complexType name="DoubleAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="double" type="xs:double"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="DoubleAttribute01">
      <ex:doubleAttribute double="12.334"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="DurationElement" element="ex:durationElement">
    <ex:typedef>
      <xs:element name="durationElement" type="xs:duration"/>
    </ex:typedef>
    <ex:instance xml:id="DurationElement01">
      <ex:durationElement>P1Y2M3DT10H30M</ex:durationElement>
    </ex:instance>
    <ex:instance xml:id="DurationElement02">
      <ex:durationElement>-P1347M</ex:durationElement>
    </ex:instance>
    <ex:instance xml:id="DurationElement03">
      <ex:durationElement>P1347Y</ex:durationElement>
    </ex:instance>
    <ex:instance xml:id="DurationElement04">
      <ex:durationElement>P1M</ex:durationElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="DurationAttribute" element="ex:durationAttribute">
    <ex:typedef>
      <xs:element name="durationAttribute" type="ex:DurationAttribute"/>
      <xs:complexType name="DurationAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="duration" type="xs:duration"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="DurationAttribute01">
      <ex:durationAttribute duration="P1M"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="DateTimeElement" element="ex:dateTimeElement">
    <ex:typedef>
      <xs:element name="dateTimeElement" type="xs:dateTime"/>
    </ex:typedef>
    <ex:instance xml:id="DateTimeElement01">
      <ex:dateTimeElement>1999-05-31T13:20:00-05:42</ex:dateTimeElement>
    </ex:instance>
    <ex:instance xml:id="DateTimeElement02">
      <ex:dateTimeElement>2000-03-04T23:00:00+03:00</ex:dateTimeElement>
    </ex:instance>
    <ex:instance xml:id="DateTimeElement03">
      <ex:dateTimeElement>2000-03-04T23:00:00Z</ex:dateTimeElement>
    </ex:instance>
    <ex:instance xml:id="DateTimeElement04">
      <ex:dateTimeElement>2038-12-12T23:00:00</ex:dateTimeElement>
    </ex:instance>
    <ex:instance xml:id="DateTimeElement05">
      <ex:dateTimeElement>0739-03-04T23:00:00</ex:dateTimeElement>
    </ex:instance>
    <ex:instance xml:id="DateTimeElement06">
      <ex:dateTimeElement>10739-03-04T23:00:00</ex:dateTimeElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="DateTimeAttribute" element="ex:dateTimeAttribute">
    <ex:typedef>
      <xs:element name="dateTimeAttribute" type="ex:DateTimeAttribute"/>
      <xs:complexType name="DateTimeAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="dateTime" type="xs:dateTime"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="DateTimeAttribute01">
      <ex:dateTimeAttribute dateTime="2006-10-26T04:51:00-05:42"/>
    </ex:instance>
    <ex:instance xml:id="DateTimeAttribute02">
      <ex:dateTimeAttribute dateTime="2006-10-26T04:51:00+03:00"/>
    </ex:instance>
    <ex:instance xml:id="DateTimeAttribute03">
      <ex:dateTimeAttribute dateTime="2006-10-26T04:51:00Z"/>
    </ex:instance>
    <ex:instance xml:id="DateTimeAttribute04">
      <ex:dateTimeAttribute dateTime="2038-12-12T23:59:59"/>
    </ex:instance>
    <ex:instance xml:id="DateTimeAttribute05">
      <ex:dateTimeAttribute dateTime="0739-04-04T04:51:00"/>
    </ex:instance>
    <ex:instance xml:id="DateTimeAttribute06">
      <ex:dateTimeAttribute dateTime="10739-04-04T04:51:00"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="TimeElement" element="ex:timeElement">
    <ex:typedef>
      <xs:element name="timeElement" type="xs:time"/>
    </ex:typedef>
    <ex:instance xml:id="TimeElement01">
      <ex:timeElement>00:00:00</ex:timeElement>
    </ex:instance>
    <ex:instance xml:id="TimeElement02">
      <ex:timeElement>12:00:01</ex:timeElement>
    </ex:instance>
    <ex:instance xml:id="TimeElement03">
      <ex:timeElement>23:59:59</ex:timeElement>
    </ex:instance>
    <ex:instance xml:id="TimeElement04">
      <ex:timeElement>13:21:03Z</ex:timeElement>
    </ex:instance>
    <ex:instance xml:id="TimeElement05">
      <ex:timeElement>13:21:03-04:32</ex:timeElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="TimeAttribute" element="ex:timeAttribute">
    <ex:typedef>
      <xs:element name="timeAttribute" type="ex:TimeAttribute"/>
      <xs:complexType name="TimeAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="time" type="xs:time"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="TimeAttribute01">
      <ex:timeAttribute time="00:00:00"/>
    </ex:instance>
    <ex:instance xml:id="TimeAttribute02">
      <ex:timeAttribute time="12:00:01"/>
    </ex:instance>
    <ex:instance xml:id="TimeAttribute03">
      <ex:timeAttribute time="23:59:59"/>
    </ex:instance>
    <ex:instance xml:id="TimeAttribute04">
      <ex:timeAttribute time="12:34:56Z"/>
    </ex:instance>
    <ex:instance xml:id="TimeAttribute05">
      <ex:timeAttribute time="12:34:56+01:23"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="DateElement" element="ex:dateElement">
    <ex:typedef>
      <xs:element name="dateElement" type="xs:date"/>
    </ex:typedef>
    <ex:instance xml:id="DateElement01">
      <ex:dateElement>1999-05-31</ex:dateElement>
    </ex:instance>
    <ex:instance xml:id="DateElement02">
      <ex:dateElement>0739-05-31</ex:dateElement>
    </ex:instance>
    <ex:instance xml:id="DateElement03">
      <ex:dateElement>2038-05-31Z</ex:dateElement>
    </ex:instance>
    <ex:instance xml:id="DateElement04">
      <ex:dateElement>1999-05-31+05:43</ex:dateElement>
    </ex:instance>
    <ex:instance xml:id="DateElement05">
      <ex:dateElement>10739-05-31</ex:dateElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="DateAttribute" element="ex:dateAttribute">
    <ex:typedef>
      <xs:element name="dateAttribute" type="ex:DateAttribute"/>
      <xs:complexType name="DateAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="date" type="xs:date"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="DateAttribute01">
      <ex:dateAttribute date="2006-05-30"/>
    </ex:instance>
    <ex:instance xml:id="DateAttribute02">
      <ex:dateAttribute date="0739-05-31"/>
    </ex:instance>
    <ex:instance xml:id="DateAttribute03">
      <ex:dateAttribute date="2038-12-31Z"/>
    </ex:instance>
    <ex:instance xml:id="DateAttribute04">
      <ex:dateAttribute date="2006-05-30-01:00"/>
    </ex:instance>
    <ex:instance xml:id="DateAttribute05">
      <ex:dateAttribute date="10739-05-31"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GYearMonthElement" element="ex:gYearMonthElement">
    <ex:typedef>
      <xs:element name="gYearMonthElement" type="xs:gYearMonth"/>
    </ex:typedef>
    <ex:instance xml:id="GYearMonthElement01">
      <ex:gYearMonthElement>1999-05</ex:gYearMonthElement>
    </ex:instance>
    <ex:instance xml:id="GYearMonthElement02">
      <ex:gYearMonthElement>0739-05</ex:gYearMonthElement>
    </ex:instance>
    <ex:instance xml:id="GYearMonthElement03">
      <ex:gYearMonthElement>2038-02</ex:gYearMonthElement>
    </ex:instance>
    <ex:instance xml:id="GYearMonthElement04">
      <ex:gYearMonthElement>2007-05+01:00</ex:gYearMonthElement>
    </ex:instance>
    <ex:instance xml:id="GYearMonthElement05">
      <ex:gYearMonthElement>2007-05-01:00</ex:gYearMonthElement>
    </ex:instance>
    <ex:instance xml:id="GYearMonthElement06">
      <ex:gYearMonthElement>2007-05Z</ex:gYearMonthElement>
    </ex:instance>
    <ex:instance xml:id="GYearMonthElement07">
      <ex:gYearMonthElement>10739-05</ex:gYearMonthElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GYearMonthAttribute" element="ex:gYearMonthAttribute">
    <ex:typedef>
      <xs:element name="gYearMonthAttribute" type="ex:GYearMonthAttribute"/>
      <xs:complexType name="GYearMonthAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="gYearMonth" type="xs:gYearMonth"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="GYearMonthAttribute01">
      <ex:gYearMonthAttribute gYearMonth="2006-09"/>
    </ex:instance>
    <ex:instance xml:id="GYearMonthAttribute02">
      <ex:gYearMonthAttribute gYearMonth="0739-09"/>
    </ex:instance>
    <ex:instance xml:id="GYearMonthAttribute03">
      <ex:gYearMonthAttribute gYearMonth="2038-09"/>
    </ex:instance>
    <ex:instance xml:id="GYearMonthAttribute04">
      <ex:gYearMonthAttribute gYearMonth="2006-09+01:00"/>
    </ex:instance>
    <ex:instance xml:id="GYearMonthAttribute05">
      <ex:gYearMonthAttribute gYearMonth="2006-09-01:00"/>
    </ex:instance>
    <ex:instance xml:id="GYearMonthAttribute06">
      <ex:gYearMonthAttribute gYearMonth="2007-05Z"/>
    </ex:instance>
    <ex:instance xml:id="GYearMonthAttribute07">
      <ex:gYearMonthAttribute gYearMonth="10739-09"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GYearElement" element="ex:gYearElement">
    <ex:typedef>
      <xs:element name="gYearElement" type="xs:gYear"/>
    </ex:typedef>
    <ex:instance xml:id="GYearElement01">
      <ex:gYearElement>1999</ex:gYearElement>
    </ex:instance>
    <ex:instance xml:id="GYearElement02">
      <ex:gYearElement>0739</ex:gYearElement>
    </ex:instance>
    <ex:instance xml:id="GYearElement03">
      <ex:gYearElement>2039</ex:gYearElement>
    </ex:instance>
    <ex:instance xml:id="GYearElement04">
      <ex:gYearElement>2007-13:00</ex:gYearElement>
    </ex:instance>
    <ex:instance xml:id="GYearElement05">
      <ex:gYearElement>1999+02:00</ex:gYearElement>
    </ex:instance>
    <ex:instance xml:id="GYearElement06">
      <ex:gYearElement>2008Z</ex:gYearElement>
    </ex:instance>
    <ex:instance xml:id="GYearElement07">
      <ex:gYearElement>10739</ex:gYearElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GYearAttribute" element="ex:gYearAttribute">
    <ex:typedef>
      <xs:element name="gYearAttribute" type="ex:GYearAttribute"/>
      <xs:complexType name="GYearAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="gYear" type="xs:gYear"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="GYearAttribute01">
      <ex:gYearAttribute gYear="1999"/>
    </ex:instance>
    <ex:instance xml:id="GYearAttribute02">
      <ex:gYearAttribute gYear="0739"/>
    </ex:instance>
    <ex:instance xml:id="GYearAttribute03">
      <ex:gYearAttribute gYear="2039"/>
    </ex:instance>
    <ex:instance xml:id="GYearAttribute04">
      <ex:gYearAttribute gYear="2007-13:00"/>
    </ex:instance>
    <ex:instance xml:id="GYearAttribute05">
      <ex:gYearAttribute gYear="1999+02:00"/>
    </ex:instance>
    <ex:instance xml:id="GYearAttribute06">
      <ex:gYearAttribute gYear="2008Z"/>
    </ex:instance>
    <ex:instance xml:id="GYearAttribute07">
      <ex:gYearAttribute gYear="10739"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GMonthDayElement" element="ex:gMonthDayElement">
    <ex:typedef>
      <xs:element name="gMonthDayElement" type="xs:gMonthDay"/>
    </ex:typedef>
    <ex:instance xml:id="GMonthDayElement01">
      <ex:gMonthDayElement>--12-31</ex:gMonthDayElement>
    </ex:instance>
    <ex:instance xml:id="GMonthDayElement02">
      <ex:gMonthDayElement>--12-31Z</ex:gMonthDayElement>
    </ex:instance>
    <ex:instance xml:id="GMonthDayElement03">
      <ex:gMonthDayElement>--12-31-05:00</ex:gMonthDayElement>
    </ex:instance>
    <ex:instance xml:id="GMonthDayElement04">
      <ex:gMonthDayElement>--12-31+01:00</ex:gMonthDayElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GMonthDayAttribute" element="ex:gMonthDayAttribute">
    <ex:typedef>
      <xs:element name="gMonthDayAttribute" type="ex:GMonthDayAttribute"/>
      <xs:complexType name="GMonthDayAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="gMonthDay" type="xs:gMonthDay"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="GMonthDayAttribute01">
      <ex:gMonthDayAttribute gMonthDay="--09-28"/>
    </ex:instance>
    <ex:instance xml:id="GMonthDayAttribute02">
      <ex:gMonthDayAttribute gMonthDay="--09-28Z"/>
    </ex:instance>
    <ex:instance xml:id="GMonthDayAttribute03">
      <ex:gMonthDayAttribute gMonthDay="--09-28-13:00"/>
    </ex:instance>
    <ex:instance xml:id="GMonthDayAttribute04">
      <ex:gMonthDayAttribute gMonthDay="--09-28+01:00"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GDayElement" element="ex:gDayElement">
    <ex:typedef>
      <xs:element name="gDayElement" type="xs:gDay"/>
    </ex:typedef>
    <ex:instance xml:id="GDayElement01">
      <ex:gDayElement>---05</ex:gDayElement>
    </ex:instance>
    <ex:instance xml:id="GDayElement02">
      <ex:gDayElement>---12Z</ex:gDayElement>
    </ex:instance>
    <ex:instance xml:id="GDayElement03">
      <ex:gDayElement>---31-12:00</ex:gDayElement>
    </ex:instance>
    <ex:instance xml:id="GDayElement04">
      <ex:gDayElement>---05+01:00</ex:gDayElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GDayAttribute" element="ex:gDayAttribute">
    <ex:typedef>
      <xs:element name="gDayAttribute" type="ex:GDayAttribute"/>
      <xs:complexType name="GDayAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="gDay" type="xs:gDay"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="GDayAttribute01">
      <ex:gDayAttribute gDay="---09"/>
    </ex:instance>
    <ex:instance xml:id="GDayAttribute02">
      <ex:gDayAttribute gDay="---12Z"/>
    </ex:instance>
    <ex:instance xml:id="GDayAttribute03">
      <ex:gDayAttribute gDay="---24-12:00"/>
    </ex:instance>
    <ex:instance xml:id="GDayAttribute04">
      <ex:gDayAttribute gDay="---31+01:00"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GMonthElement" element="ex:gMonthElement">
    <ex:typedef>
      <xs:element name="gMonthElement" type="xs:gMonth"/>
    </ex:typedef>
    <ex:instance xml:id="GMonthElement01">
      <ex:gMonthElement>--02</ex:gMonthElement>
    </ex:instance>
    <ex:instance xml:id="GMonthElement02">
      <ex:gMonthElement>--12-01:33</ex:gMonthElement>
    </ex:instance>
    <ex:instance xml:id="GMonthElement03">
      <ex:gMonthElement>--12+01:02</ex:gMonthElement>
    </ex:instance>
    <ex:instance xml:id="GMonthElement04">
      <ex:gMonthElement>--12Z</ex:gMonthElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GMonthAttribute" element="ex:gMonthAttribute">
    <ex:typedef>
      <xs:element name="gMonthAttribute" type="ex:GMonthAttribute"/>
      <xs:complexType name="GMonthAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="gMonth" type="xs:gMonth"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="GMonthAttribute01">
      <ex:gMonthAttribute gMonth="--04--"/>
    </ex:instance>
    <ex:instance xml:id="GMonthAttribute02">
      <ex:gMonthAttribute gMonth="--04Z"/>
    </ex:instance>
    <ex:instance xml:id="GMonthAttribute03">
      <ex:gMonthAttribute gMonth="--12+02:00"/>
    </ex:instance>
    <ex:instance xml:id="GMonthAttribute04">
      <ex:gMonthAttribute gMonth="--04-10:00"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="HexBinaryElement" element="ex:hexBinaryElement">
    <ex:typedef>
      <xs:element name="hexBinaryElement" type="xs:hexBinary"/>
    </ex:typedef>
    <ex:instance xml:id="HexBinaryElement01">
      <ex:hexBinaryElement>76</ex:hexBinaryElement>
    </ex:instance>
    <ex:instance xml:id="HexBinaryElement02">
      <ex:hexBinaryElement>77696f646d6f6e7974637174716a7169696e6b65616f76786f746e66716b707875757261736e686469796b65706c656d7465626661637661646e6b65636662647669726d6f6e757361</ex:hexBinaryElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="HexBinaryAttribute" element="ex:hexBinaryAttribute">
    <ex:typedef>
      <xs:element name="hexBinaryAttribute" type="ex:HexBinaryAttribute"/>
      <xs:complexType name="HexBinaryAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="hexBinary" type="xs:hexBinary"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="HexBinaryAttribute01">
      <ex:hexBinaryAttribute hexBinary="77696f"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="Base64BinaryElement" element="ex:base64BinaryElement">
    <ex:typedef>
      <xs:element name="base64BinaryElement" type="xs:base64Binary"/>
    </ex:typedef>
    <ex:instance xml:id="Base64BinaryElement01">
      <ex:base64BinaryElement>bQ==</ex:base64BinaryElement>
    </ex:instance>
    <ex:instance xml:id="Base64BinaryElement02">
      <ex:base64BinaryElement>eHdmb3Rh</ex:base64BinaryElement>
    </ex:instance>
    <ex:instance xml:id="Base64BinaryElement03">
      <ex:base64BinaryElement>cnRjbGNyZW9scg==</ex:base64BinaryElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="Base64BinaryAttribute" element="ex:base64BinaryAttribute">
    <ex:typedef>
      <xs:element name="base64BinaryAttribute" type="ex:Base64BinaryAttribute"/>
      <xs:complexType name="Base64BinaryAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="base64Binary" type="xs:base64Binary"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="Base64BinaryAttribute01">
      <ex:base64BinaryAttribute base64Binary="cnRjbGNyZW9scg=="/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AnyURIElement" element="ex:anyURIElement">
    <ex:typedef>
      <xs:element name="anyURIElement" type="xs:anyURI"/>
    </ex:typedef>
    <ex:instance xml:id="AnyURIElement01">
      <ex:anyURIElement>http://www.w3.org/2002/ws/databinding/</ex:anyURIElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AnyURIAttribute" element="ex:anyURIAttribute">
    <ex:typedef>
      <xs:element name="anyURIAttribute" type="ex:AnyURIAttribute"/>
      <xs:complexType name="AnyURIAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="anyURI" type="xs:anyURI"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="AnyURIAttribute01">
      <ex:anyURIAttribute anyURI="http://www.w3.org/2002/ws/"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="QNameElement" element="ex:QNameElement">
    <ex:typedef>
      <xs:element name="QNameElement" type="xs:QName"/>
    </ex:typedef>
    <ex:instance xml:id="QNameElement01">
      <ex:QNameElement>ex:QNameElement</ex:QNameElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="QNameAttribute" element="ex:QNameAttribute">
    <ex:typedef>
      <xs:element name="QNameAttribute" type="ex:QNameAttribute"/>
      <xs:complexType name="QNameAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="QName" type="xs:QName"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="QNameAttribute01">
      <ex:QNameAttribute QName="ex:QNameAttribute"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NormalizedStringElement" element="ex:normalizedStringElement">
    <ex:typedef>
      <xs:element name="normalizedStringElement" type="xs:normalizedString"/>
    </ex:typedef>
    <ex:instance xml:id="NormalizedStringElement01">
      <ex:normalizedStringElement/>
    </ex:instance>
    <ex:instance xml:id="NormalizedStringElement02">
      <ex:normalizedStringElement>How now brown cow.</ex:normalizedStringElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NormalizedStringAttribute" element="ex:normalizedStringAttribute">
    <ex:typedef>
      <xs:element name="normalizedStringAttribute" type="ex:NormalizedStringAttribute"/>
      <xs:complexType name="NormalizedStringAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="normalizedString" type="xs:normalizedString"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="NormalizedStringAttribute01">
      <ex:normalizedStringAttribute normalizedString="Hello Paris"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="TokenElement" element="ex:tokenElement">
    <ex:typedef>
      <xs:element name="tokenElement" type="xs:token"/>
    </ex:typedef>
    <ex:instance xml:id="TokenElement01">
      <ex:tokenElement>tokenElement</ex:tokenElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="TokenAttribute" element="ex:tokenAttribute">
    <ex:typedef>
      <xs:element name="tokenAttribute" type="ex:TokenAttribute"/>
      <xs:complexType name="TokenAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="token" type="xs:token"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="TokenAttribute01">
      <ex:tokenAttribute token="hello"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="LanguageElement" element="ex:languageElement">
    <ex:typedef>
      <xs:element name="languageElement" type="xs:language"/>
    </ex:typedef>
    <ex:instance xml:id="LanguageElement01">
      <ex:languageElement>en</ex:languageElement>
    </ex:instance>
    <ex:instance xml:id="LanguageElement02">
      <ex:languageElement>fr</ex:languageElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="LanguageAttribute" element="ex:languageAttribute">
    <ex:typedef>
      <xs:element name="languageAttribute" type="ex:LanguageAttribute"/>
      <xs:complexType name="LanguageAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="language" type="xs:language"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="LanguageAttribute01">
      <ex:languageAttribute language="en"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NMTOKENElement" element="ex:NMTOKENElement">
    <ex:typedef>
      <xs:element name="NMTOKENElement" type="xs:NMTOKEN"/>
    </ex:typedef>
    <ex:instance xml:id="NMTOKENElement01">
      <ex:NMTOKENElement>id</ex:NMTOKENElement>
    </ex:instance>
    <ex:instance xml:id="NMTOKENElement02">
      <ex:NMTOKENElement>vocabularies:that.as:clean:assuring-s_to:The_we:contain</ex:NMTOKENElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NMTOKENAttribute" element="ex:NMTOKENAttribute">
    <ex:typedef>
      <xs:element name="NMTOKENAttribute" type="ex:NMTOKENAttribute"/>
      <xs:complexType name="NMTOKENAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="NMTOKEN" type="xs:NMTOKEN"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="NMTOKENAttribute01">
      <ex:NMTOKENAttribute NMTOKEN="id"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NMTOKENSElement" element="ex:NMTOKENSElement">
    <ex:typedef>
      <xs:element name="NMTOKENSElement" type="xs:NMTOKENS"/>
    </ex:typedef>
    <ex:instance xml:id="NMTOKENSElement01">
      <ex:NMTOKENSElement>a b c d e.b:s-w_x:q</ex:NMTOKENSElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NMTOKENSAttribute" element="ex:NMTOKENSAttribute">
    <ex:typedef>
      <xs:element name="NMTOKENSAttribute" type="ex:NMTOKENSAttribute"/>
      <xs:complexType name="NMTOKENSAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="NMTOKENS" type="xs:NMTOKENS"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="NMTOKENSAttribute01">
      <ex:NMTOKENSAttribute NMTOKENS="id a b e.b:s-dd:q"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NameElement" element="ex:NameElement">
    <ex:typedef>
      <xs:element name="NameElement" type="xs:Name"/>
    </ex:typedef>
    <ex:instance xml:id="NameElement01">
      <ex:NameElement>foo</ex:NameElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NameAttribute" element="ex:nameAttribute">
    <ex:typedef>
      <xs:element name="nameAttribute" type="ex:NameAttribute"/>
      <xs:complexType name="NameAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="name" type="xs:Name"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="NameAttribute01">
      <ex:nameAttribute name="foo"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NCNameElement" element="ex:NCNameElement">
    <ex:typedef>
      <xs:element name="NCNameElement" type="xs:NCName"/>
    </ex:typedef>
    <ex:instance xml:id="NCNameElement01">
      <ex:NCNameElement>foo</ex:NCNameElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NCNameAttribute" element="ex:NCNameAttribute">
    <ex:typedef>
      <xs:element name="NCNameAttribute" type="ex:NCNameAttribute"/>
      <xs:complexType name="NCNameAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="NCName" type="xs:NCName"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="NCNameAttribute01">
      <ex:NCNameAttribute NCName="bar"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="IDElement" element="ex:IDElement">
    <ex:typedef>
      <xs:element name="IDElement" type="xs:ID"/>
    </ex:typedef>
    <ex:instance xml:id="IDElement01">
      <ex:IDElement>foo</ex:IDElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="IDAttribute" element="ex:IDAttribute">
    <ex:typedef>
      <xs:element name="IDAttribute" type="ex:IDAttribute"/>
      <xs:complexType name="IDAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="ID" type="xs:ID"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="IDAttribute01">
      <ex:IDAttribute ID="bar"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="IDREFElement" element="ex:IDREFElement">
    <ex:typedef>
      <xs:element name="IDREFElement" type="ex:IDREFElementComplextType"/>
      <xs:complexType name="IDREFElementComplextType">
        <xs:sequence>
          <xs:element name="element" type="xs:IDREF"/>
          <xs:element name="id" type="xs:ID"/>
        </xs:sequence>
      </xs:complexType> 
    </ex:typedef>
    <ex:instance xml:id="IDREFElement01">
      <ex:IDREFElement>
        <ex:element>idref</ex:element>
        <ex:id>idref</ex:id>
      </ex:IDREFElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="IDREFAttribute" element="ex:IDREFAttribute">
    <ex:typedef>
      <xs:element name="IDREFAttribute" type="ex:IDREFAttributeComplexType"/>
      <xs:complexType name="IDREFAttributeComplexType">
        <xs:sequence>
          <xs:element name="id" type="xs:ID"/>
        </xs:sequence>
        <xs:attribute name="IDREF" type="xs:IDREF"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="IDREFAttribute01">
      <ex:IDREFAttribute IDREF="id1">
        <ex:id>id1</ex:id>
      </ex:IDREFAttribute>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="IDREFSElement" element="ex:IDREFSElement">
    <ex:typedef>
      <xs:element name="IDREFSElement" type="ex:IDREFSElementComplextType"/>
      <xs:complexType name="IDREFSElementComplextType">
        <xs:sequence>
          <xs:element name="element" type="xs:IDREFS"/>
          <xs:element name="id1" type="xs:ID"/>
          <xs:element name="id2" type="xs:ID"/>
          <xs:element name="id3" type="xs:ID"/>
        </xs:sequence>
      </xs:complexType> 
    </ex:typedef>
    <ex:instance xml:id="IDREFSElement01">
      <ex:IDREFSElement>
        <ex:element>id1 id2 id3</ex:element>
        <ex:id1>id1</ex:id1>
        <ex:id2>id2</ex:id2>
        <ex:id3>id3</ex:id3>
      </ex:IDREFSElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="IDREFSAttribute" element="ex:IDREFSAttribute">
    <ex:typedef>
      <xs:element name="IDREFSAttribute" type="ex:IDREFSAttributeComplexType"/>
      <xs:complexType name="IDREFSAttributeComplexType">
        <xs:sequence>
          <xs:element name="id1" type="xs:ID"/>
          <xs:element name="id2" type="xs:ID"/>
          <xs:element name="id3" type="xs:ID"/>
        </xs:sequence>
        <xs:attribute name="IDREFS" type="xs:IDREFS"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="IDREFSAttribute01">
      <ex:IDREFSAttribute IDREFS="id1 id2 id3">
        <ex:id1>id1</ex:id1>
        <ex:id2>id2</ex:id2>
        <ex:id3>id3</ex:id3>
      </ex:IDREFSAttribute>
    </ex:instance>
  </ex:example>


  <ex:example xml:id="ENTITYElement" element="ex:ENTITYElement">
    <ex:typedef>
      <xs:element name="ENTITYElement" type="xs:ENTITY"/>
    </ex:typedef>
    <ex:instance xml:id="ENTITYElement01">
      <ex:ENTITYElement>lt</ex:ENTITYElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ENTITYAttribute" element="ex:ENTITYAttribute">
    <ex:typedef>
      <xs:element name="ENTITYAttribute" type="ex:ENTITYAttribute"/>
      <xs:complexType name="ENTITYAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="ENTITY" type="xs:ENTITY"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ENTITYAttribute01">
      <ex:ENTITYAttribute ENTITY="lt"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ENTITIESElement" element="ex:ENTITIESElement">
    <ex:typedef>
      <xs:element name="ENTITIESElement" type="xs:ENTITIES"/>
    </ex:typedef>
    <ex:instance xml:id="ENTITIESElement01">
      <ex:ENTITIESElement>lt gt apos quot</ex:ENTITIESElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ENTITIESAttribute" element="ex:ENTITIESAttribute">
    <ex:typedef>
      <xs:element name="ENTITIESAttribute" type="ex:ENTITIESAttribute"/>
      <xs:complexType name="ENTITIESAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="ENTITIES" type="xs:ENTITIES"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ENTITIESAttribute01">
      <ex:ENTITIESAttribute ENTITIES="lt gt"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="IntegerElement" element="ex:integerElement">
    <ex:typedef>
      <xs:element name="integerElement" type="xs:integer"/>
    </ex:typedef>
    <ex:instance xml:id="IntegerElement01">
      <ex:integerElement>0</ex:integerElement>
    </ex:instance>
    <ex:instance xml:id="IntegerElement02">
      <ex:integerElement>1</ex:integerElement>
    </ex:instance>
    <ex:instance xml:id="IntegerElement03">
      <ex:integerElement>-42</ex:integerElement>
    </ex:instance>
    <ex:instance xml:id="IntegerElement04">
      <ex:integerElement>12678967543233</ex:integerElement>
    </ex:instance>
    <ex:instance xml:id="IntegerElement05">
      <ex:integerElement>+10000</ex:integerElement>
    </ex:instance>
    <ex:instance xml:id="IntegerElement06">
      <ex:integerElement>1234567891234567838475834753838887348573489123456789123456789</ex:integerElement>
    </ex:instance>
    <ex:instance xml:id="IntegerElement07">
      <ex:integerElement>-1234567891234567838475834753838887348573489123456789123456789</ex:integerElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="IntegerAttribute" element="ex:integerAttribute">
    <ex:typedef>
      <xs:element name="integerAttribute" type="ex:IntegerAttribute"/>
      <xs:complexType name="IntegerAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="integer" type="xs:integer"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="IntegerAttribute01">
      <ex:integerAttribute integer="10002"/>
    </ex:instance>
    <ex:instance xml:id="IntegerAttribute02">
      <ex:integerAttribute integer="-0"/>
    </ex:instance>
    <ex:instance xml:id="IntegerAttribute03">
      <ex:integerAttribute integer="+42"/>
    </ex:instance>
    <ex:instance xml:id="IntegerAttribute04">
      <ex:integerAttribute integer="-42"/>
    </ex:instance>
    <ex:instance xml:id="IntegerAttribute05">
      <ex:integerAttribute integer="-45345384593849583945843453454293405930495309450394503"/>
    </ex:instance>
    <ex:instance xml:id="IntegerAttribute06">
      <ex:integerAttribute integer="123456789013234235435325235325325345432543253425324534253245"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NonPositiveIntegerElement" element="ex:nonPositiveIntegerElement">
    <ex:typedef>
      <xs:element name="nonPositiveIntegerElement" type="xs:nonPositiveInteger"/>
    </ex:typedef>
    <ex:instance xml:id="NonPositiveIntegerElement01">
      <ex:nonPositiveIntegerElement>-1</ex:nonPositiveIntegerElement>
    </ex:instance>
    <ex:instance xml:id="NonPositiveIntegerElement02">
      <ex:nonPositiveIntegerElement>0</ex:nonPositiveIntegerElement>
    </ex:instance>
    <ex:instance xml:id="NonPositiveIntegerElement03">
      <ex:nonPositiveIntegerElement>+0</ex:nonPositiveIntegerElement>
    </ex:instance>
    <ex:instance xml:id="NonPositiveIntegerElement04">
      <ex:nonPositiveIntegerElement>-1234324234532534254325234534252345342534253425324534253244</ex:nonPositiveIntegerElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NonPositiveIntegerAttribute" element="ex:nonPositiveIntegerAttribute">
    <ex:typedef>
      <xs:element name="nonPositiveIntegerAttribute" type="ex:NonPositiveIntegerAttribute"/>
      <xs:complexType name="NonPositiveIntegerAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="nonPositiveInteger" type="xs:nonPositiveInteger"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="NonPositiveIntegerAttribute01">
      <ex:nonPositiveIntegerAttribute nonPositiveInteger="-20"/>
    </ex:instance>
    <ex:instance xml:id="NonPositiveIntegerAttribute02">
      <ex:nonPositiveIntegerAttribute nonPositiveInteger="0"/>
    </ex:instance>
    <ex:instance xml:id="NonPositiveIntegerAttribute03">
      <ex:nonPositiveIntegerAttribute nonPositiveInteger="+0"/>
    </ex:instance>
    <ex:instance xml:id="NonPositiveIntegerAttribute04">
      <ex:nonPositiveIntegerAttribute
        nonPositiveInteger="-202342353425435345342567965342969786978679"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NegativeIntegerElement" element="ex:negativeIntegerElement">
    <ex:typedef>
      <xs:element name="negativeIntegerElement" type="xs:negativeInteger"/>
    </ex:typedef>
    <ex:instance xml:id="NegativeIntegerElement01">
      <ex:negativeIntegerElement>-1</ex:negativeIntegerElement>
    </ex:instance>
    <ex:instance xml:id="NegativeIntegerElement02">
      <ex:negativeIntegerElement>-12343242342345345346453643564536543645363456</ex:negativeIntegerElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NegativeIntegerAttribute" element="ex:negativeIntegerAttribute">
    <ex:typedef>
      <xs:element name="negativeIntegerAttribute" type="ex:NegativeIntegerAttribute"/>
      <xs:complexType name="NegativeIntegerAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="negativeInteger" type="xs:negativeInteger"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="NegativeIntegerAttribute01">
      <ex:negativeIntegerAttribute negativeInteger="-100"/>
    </ex:instance>
    <ex:instance xml:id="NegativeIntegerAttribute02">
      <ex:negativeIntegerAttribute negativeInteger="-12343242342345345346453643564536543645363456"/>
    </ex:instance>
  </ex:example>


  <ex:example xml:id="LongElement" element="ex:longElement">
    <ex:typedef>
      <xs:element name="longElement" type="xs:long"/>
    </ex:typedef>
    <ex:instance xml:id="LongElement01">
      <ex:longElement>1</ex:longElement>
    </ex:instance>
    <ex:instance xml:id="LongElement02">
      <ex:longElement>-1</ex:longElement>
    </ex:instance>
    <ex:instance xml:id="LongElement03">
      <ex:longElement>+42</ex:longElement>
    </ex:instance>
    <ex:instance xml:id="LongElement04">
      <ex:longElement>-9223372036854775808</ex:longElement>
    </ex:instance>
    <ex:instance xml:id="LongElement05">
      <ex:longElement>9223372036854775807</ex:longElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="LongAttribute" element="ex:longAttribute">
    <ex:typedef>
      <xs:element name="longAttribute" type="ex:LongAttribute"/>
      <xs:complexType name="LongAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="long" type="xs:long"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="LongAttribute01">
      <ex:longAttribute long="1066"/>
    </ex:instance>
    <ex:instance xml:id="LongAttribute02">
      <ex:longAttribute long="-1515"/>
    </ex:instance>
    <ex:instance xml:id="LongAttribute03">
      <ex:longAttribute long="+42"/>
    </ex:instance>
    <ex:instance xml:id="LongAttribute04">
      <ex:longAttribute long="-9223372036854775808"/>
    </ex:instance>
    <ex:instance xml:id="LongAttribute05">
      <ex:longAttribute long="9223372036854775807"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="IntElement" element="ex:intElement">
    <ex:typedef>
      <xs:element name="intElement" type="xs:int"/>
    </ex:typedef>
    <ex:instance xml:id="IntElement01">
      <ex:intElement>1</ex:intElement>
    </ex:instance>
    <ex:instance xml:id="IntElement02">
      <ex:intElement>-42</ex:intElement>
    </ex:instance>
    <ex:instance xml:id="IntElement03">
      <ex:intElement>+42</ex:intElement>
    </ex:instance>
    <ex:instance xml:id="IntElement04">
      <ex:intElement>2147483647</ex:intElement>
    </ex:instance>
    <ex:instance xml:id="IntElement05">
      <ex:intElement>-2147483648</ex:intElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="IntAttribute" element="ex:intAttribute">
    <ex:typedef>
      <xs:element name="intAttribute" type="ex:IntAttribute"/>
      <xs:complexType name="IntAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="int" type="xs:int"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="IntAttribute01">
      <ex:intAttribute int="42"/>
    </ex:instance>
    <ex:instance xml:id="IntAttribute02">
      <ex:intAttribute int="-42"/>
    </ex:instance>
    <ex:instance xml:id="IntAttribute03">
      <ex:intAttribute int="+42"/>
    </ex:instance>
    <ex:instance xml:id="IntAttribute04">
      <ex:intAttribute int="2147483647"/>
    </ex:instance>
    <ex:instance xml:id="IntAttribute05">
      <ex:intAttribute int="-2147483648"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ShortElement" element="ex:shortElement">
    <ex:typedef>
      <xs:element name="shortElement" type="xs:short"/>
    </ex:typedef>
    <ex:instance xml:id="ShortElement01">
      <ex:shortElement>1</ex:shortElement>
    </ex:instance>
    <ex:instance xml:id="ShortElement02">
      <ex:shortElement>+42</ex:shortElement>
    </ex:instance>
    <ex:instance xml:id="ShortElement03">
      <ex:shortElement>32767</ex:shortElement>
    </ex:instance>
    <ex:instance xml:id="ShortElement04">
      <ex:shortElement>-32768</ex:shortElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ShortAttribute" element="ex:shortAttribute">
    <ex:typedef>
      <xs:element name="shortAttribute" type="ex:ShortAttribute"/>
      <xs:complexType name="ShortAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="short" type="xs:short"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ShortAttribute01">
      <ex:shortAttribute short="22"/>
    </ex:instance>
    <ex:instance xml:id="ShortAttribute02">
      <ex:shortAttribute short="+42"/>
    </ex:instance>
    <ex:instance xml:id="ShortAttribute03">
      <ex:shortAttribute short="32767"/>
    </ex:instance>
    <ex:instance xml:id="ShortAttribute04">
      <ex:shortAttribute short="-32768"/>
    </ex:instance>
  </ex:example>


  <ex:example xml:id="ByteElement" element="ex:byteElement">
    <ex:typedef>
      <xs:element name="byteElement" type="xs:byte"/>
    </ex:typedef>
    <ex:instance xml:id="ByteElement01">
      <ex:byteElement>1</ex:byteElement>
    </ex:instance>
    <ex:instance xml:id="ByteElement02">
      <ex:byteElement>127</ex:byteElement>
    </ex:instance>
    <ex:instance xml:id="ByteElement03">
      <ex:byteElement>-128</ex:byteElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ByteAttribute" element="ex:byteAttribute">
    <ex:typedef>
      <xs:element name="byteAttribute" type="ex:ByteAttribute"/>
      <xs:complexType name="ByteAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="byte" type="xs:byte"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ByteAttribute01">
      <ex:byteAttribute byte="64"/>
    </ex:instance>
    <ex:instance xml:id="ByteAttribute02">
      <ex:byteAttribute byte="127"/>
    </ex:instance>
    <ex:instance xml:id="ByteAttribute03">
      <ex:byteAttribute byte="-128"/>
    </ex:instance>
  </ex:example>


  <ex:example xml:id="NonNegativeIntegerElement" element="ex:nonNegativeIntegerElement">
    <ex:typedef>
      <xs:element name="nonNegativeIntegerElement" type="xs:nonNegativeInteger"/>
    </ex:typedef>
    <ex:instance xml:id="NonNegativeIntegerElement01">
      <ex:nonNegativeIntegerElement>1</ex:nonNegativeIntegerElement>
    </ex:instance>
    <ex:instance xml:id="NonNegativeIntegerElement02">
      <ex:nonNegativeIntegerElement>-0</ex:nonNegativeIntegerElement>
    </ex:instance>
    <ex:instance xml:id="NonNegativeIntegerElement03">
      <ex:nonNegativeIntegerElement>0</ex:nonNegativeIntegerElement>
    </ex:instance>
    <ex:instance xml:id="NonNegativeIntegerElement04">
      <ex:nonNegativeIntegerElement>+42</ex:nonNegativeIntegerElement>
    </ex:instance>
    <ex:instance xml:id="NonNegativeIntegerElement05">
      <ex:nonNegativeIntegerElement>3141592653531415926536106615151970884848347234273984723</ex:nonNegativeIntegerElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NonNegativeIntegerAttribute" element="ex:nonNegativeIntegerAttribute">
    <ex:typedef>
      <xs:element name="nonNegativeIntegerAttribute" type="ex:NonNegativeIntegerAttribute"/>
      <xs:complexType name="NonNegativeIntegerAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="nonNegativeInteger" type="xs:nonNegativeInteger"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="NonNegativeIntegerAttribute01">
      <ex:nonNegativeIntegerAttribute nonNegativeInteger="20"/>
    </ex:instance>
    <ex:instance xml:id="NonNegativeIntegerAttribute02">
      <ex:nonNegativeIntegerAttribute nonNegativeInteger="-0"/>
    </ex:instance>
    <ex:instance xml:id="NonNegativeIntegerAttribute03">
      <ex:nonNegativeIntegerAttribute nonNegativeInteger="0"/>
    </ex:instance>
    <ex:instance xml:id="NonNegativeIntegerAttribute04">
      <ex:nonNegativeIntegerAttribute nonNegativeInteger="+42"/>
    </ex:instance>
    <ex:instance xml:id="NonNegativeIntegerAttribute05">
      <ex:nonNegativeIntegerAttribute
        nonNegativeInteger="3141592653531415926536106615151970884848347234273984723"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="UnsignedLongElement" element="ex:unsignedLongElement">
    <ex:typedef>
      <xs:element name="unsignedLongElement" type="xs:unsignedLong"/>
    </ex:typedef>
    <ex:instance xml:id="UnsignedLongElement01">
      <ex:unsignedLongElement>1</ex:unsignedLongElement>
    </ex:instance>
    <ex:instance xml:id="UnsignedLongElement02">
      <ex:unsignedLongElement>-0</ex:unsignedLongElement>
    </ex:instance>
    <ex:instance xml:id="UnsignedLongElement03">
      <ex:unsignedLongElement>+42</ex:unsignedLongElement>
    </ex:instance>
    <ex:instance xml:id="UnsignedLongElement04">
      <ex:unsignedLongElement>18446744073709551615</ex:unsignedLongElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="UnsignedLongAttribute" element="ex:unsignedLongAttribute">
    <ex:typedef>
      <xs:element name="unsignedLongAttribute" type="ex:UnsignedLongAttribute"/>
      <xs:complexType name="UnsignedLongAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="unsignedLong" type="xs:unsignedLong"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="UnsignedLongAttribute01">
      <ex:unsignedLongAttribute unsignedLong="2034"/>
    </ex:instance>
    <ex:instance xml:id="UnsignedLongAttribute02">
      <ex:unsignedLongAttribute unsignedLong="-0"/>
    </ex:instance>
    <ex:instance xml:id="UnsignedLongAttribute03">
      <ex:unsignedLongAttribute unsignedLong="+42"/>
    </ex:instance>
    <ex:instance xml:id="UnsignedLongAttribute04">
      <ex:unsignedLongAttribute unsignedLong="18446744073709551615"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="UnsignedIntElement" element="ex:unsignedIntElement">
    <ex:typedef>
      <xs:element name="unsignedIntElement" type="xs:unsignedInt"/>
    </ex:typedef>
    <ex:instance xml:id="UnsignedIntElement01">
      <ex:unsignedIntElement>1</ex:unsignedIntElement>
    </ex:instance>
    <ex:instance xml:id="UnsignedIntElement02">
      <ex:unsignedIntElement>-0</ex:unsignedIntElement>
    </ex:instance>
    <ex:instance xml:id="UnsignedIntElement03">
      <ex:unsignedIntElement>+42</ex:unsignedIntElement>
    </ex:instance>
    <ex:instance xml:id="UnsignedIntElement04">
      <ex:unsignedIntElement>4294967295</ex:unsignedIntElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="UnsignedIntAttribute" element="ex:unsignedIntAttribute">
    <ex:typedef>
      <xs:element name="unsignedIntAttribute" type="ex:UnsignedIntAttribute"/>
      <xs:complexType name="UnsignedIntAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="unsignedInt" type="xs:unsignedInt"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="UnsignedIntAttribute01">
      <ex:unsignedIntAttribute unsignedInt="32334"/>
    </ex:instance>
    <ex:instance xml:id="UnsignedIntAttribute02">
      <ex:unsignedIntAttribute unsignedInt="-0"/>
    </ex:instance>
    <ex:instance xml:id="UnsignedIntAttribute03">
      <ex:unsignedIntAttribute unsignedInt="+42"/>
    </ex:instance>
    <ex:instance xml:id="UnsignedIntAttribute04">
      <ex:unsignedIntAttribute unsignedInt="4294967295"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="UnsignedShortElement" element="ex:unsignedShortElement">
    <ex:typedef>
      <xs:element name="unsignedShortElement" type="xs:unsignedShort"/>
    </ex:typedef>
    <ex:instance xml:id="UnsignedShortElement01">
      <ex:unsignedShortElement>1</ex:unsignedShortElement>
    </ex:instance>
    <ex:instance xml:id="UnsignedShortElement02">
      <ex:unsignedShortElement>-0</ex:unsignedShortElement>
    </ex:instance>
    <ex:instance xml:id="UnsignedShortElement03">
      <ex:unsignedShortElement>+42</ex:unsignedShortElement>
    </ex:instance>
    <ex:instance xml:id="UnsignedShortElement04">
      <ex:unsignedShortElement>65535</ex:unsignedShortElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="UnsignedShortAttribute" element="ex:unsignedShortAttribute">
    <ex:typedef>
      <xs:element name="unsignedShortAttribute" type="ex:UnsignedShortAttribute"/>
      <xs:complexType name="UnsignedShortAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="unsignedShort" type="xs:unsignedShort"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="UnsignedShortAttribute01">
      <ex:unsignedShortAttribute unsignedShort="22"/>
    </ex:instance>
    <ex:instance xml:id="UnsignedShortAttribute02">
      <ex:unsignedShortAttribute unsignedShort="-0"/>
    </ex:instance>
    <ex:instance xml:id="UnsignedShortAttribute03">
      <ex:unsignedShortAttribute unsignedShort="+42"/>
    </ex:instance>
    <ex:instance xml:id="UnsignedShortAttribute04">
      <ex:unsignedShortAttribute unsignedShort="65535"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="UnsignedByteElement" element="ex:unsignedByteElement">
    <ex:typedef>
      <xs:element name="unsignedByteElement" type="xs:unsignedByte"/>
    </ex:typedef>
    <ex:instance xml:id="UnsignedByteElement01">
      <ex:unsignedByteElement>1</ex:unsignedByteElement>
    </ex:instance>
    <ex:instance xml:id="UnsignedByteElement02">
      <ex:unsignedByteElement>-0</ex:unsignedByteElement>
    </ex:instance>
    <ex:instance xml:id="UnsignedByteElement03">
      <ex:unsignedByteElement>+42</ex:unsignedByteElement>
    </ex:instance>
    <ex:instance xml:id="UnsignedByteElement04">
      <ex:unsignedByteElement>255</ex:unsignedByteElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="UnsignedByteAttribute" element="ex:unsignedByteAttribute">
    <ex:typedef>
      <xs:element name="unsignedByteAttribute" type="ex:UnsignedByteAttribute"/>
      <xs:complexType name="UnsignedByteAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="unsignedByte" type="xs:unsignedByte"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="UnsignedByteAttribute01">
      <ex:unsignedByteAttribute unsignedByte="64"/>
    </ex:instance>
    <ex:instance xml:id="UnsignedByteAttribute02">
      <ex:unsignedByteAttribute unsignedByte="-0"/>
    </ex:instance>
    <ex:instance xml:id="UnsignedByteAttribute03">
      <ex:unsignedByteAttribute unsignedByte="+42"/>
    </ex:instance>
    <ex:instance xml:id="UnsignedByteAttribute04">
      <ex:unsignedByteAttribute unsignedByte="255"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="PositiveIntegerElement" element="ex:positiveIntegerElement">
    <ex:typedef>
      <xs:element name="positiveIntegerElement" type="xs:positiveInteger"/>
    </ex:typedef>
    <ex:instance xml:id="PositiveIntegerElement01">
      <ex:positiveIntegerElement>1</ex:positiveIntegerElement>
    </ex:instance>
    <ex:instance xml:id="PositiveIntegerElement02">
      <ex:positiveIntegerElement>+42</ex:positiveIntegerElement>
    </ex:instance>
    <ex:instance xml:id="PositiveIntegerElement03">
      <ex:positiveIntegerElement>153452759384758934752984759387692835739846739486754598674</ex:positiveIntegerElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="PositiveIntegerAttribute" element="ex:positiveIntegerAttribute">
    <ex:typedef>
      <xs:element name="positiveIntegerAttribute" type="ex:PositiveIntegerAttribute"/>
      <xs:complexType name="PositiveIntegerAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="positiveInteger" type="xs:positiveInteger"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="PositiveIntegerAttribute01">
      <ex:positiveIntegerAttribute positiveInteger="257"/>
    </ex:instance>
    <ex:instance xml:id="PositiveIntegerAttribute02">
      <ex:positiveIntegerAttribute positiveInteger="+42"/>
    </ex:instance>
    <ex:instance xml:id="PositiveIntegerAttribute03">
      <ex:positiveIntegerAttribute
        positiveInteger="153452759384758934752984759387692835739846739486754598674"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalSimpleType" element="ex:globalSimpleType">
    <ex:typedef>
      <xs:element name="globalSimpleType" type="ex:GlobalSimpleType"/>
      <xs:simpleType name="GlobalSimpleType">
        <xs:restriction base="xs:string">
          <xs:enumeration value="foo"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="GlobalSimpleType01">
      <ex:globalSimpleType>foo</ex:globalSimpleType>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="StringEnumerationType" element="ex:beatle">
    <ex:typedef>
      <xs:element name="beatle" type="ex:Beatle"/>
      <xs:simpleType name="Beatle">
        <xs:restriction base="xs:string">
          <xs:enumeration value="John"/>
          <xs:enumeration value="Paul"/>
          <xs:enumeration value="George"/>
          <xs:enumeration value="Stuart"/>
          <xs:enumeration value="Pete"/>
          <xs:enumeration value="Ringo"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="StringEnumerationType01">
      <ex:beatle>John</ex:beatle>
    </ex:instance>
    <ex:instance xml:id="StringEnumerationType02">
      <ex:beatle>Paul</ex:beatle>
    </ex:instance>
    <ex:instance xml:id="StringEnumerationType03">
      <ex:beatle>Ringo</ex:beatle>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NMTOKENEnumerationType" element="ex:nMTOKENEnumerationType">
    <ex:typedef>
      <xs:element name="nMTOKENEnumerationType" type="ex:NMTOKENEnumerationType"/>
      <xs:simpleType name="NMTOKENEnumerationType">
        <xs:restriction base="xs:NMTOKEN">
          <xs:enumeration value="token1"/>
          <xs:enumeration value="token2"/>
          <xs:enumeration value="token3"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="NMTOKENEnumerationType01">
      <ex:nMTOKENEnumerationType>token1</ex:nMTOKENEnumerationType>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="IntEnumerationType" element="ex:intEnumerationType">
    <ex:typedef>
      <xs:element name="intEnumerationType" type="ex:IntEnumerationType"/>
      <xs:simpleType name="IntEnumerationType">
        <xs:restriction base="xs:int">
          <xs:enumeration value="2"/>
          <xs:enumeration value="3"/>
          <xs:enumeration value="5"/>
          <xs:enumeration value="7"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="IntEnumerationType01">
      <ex:intEnumerationType>2</ex:intEnumerationType>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="ShortEnumerationType" element="ex:shortEnumerationType">
    <ex:typedef>
      <xs:element name="shortEnumerationType" type="ex:ShortEnumerationType"/>
      <xs:simpleType name="ShortEnumerationType">
        <xs:restriction base="xs:short">
          <xs:enumeration value="7"/>
          <xs:enumeration value="11"/>
          <xs:enumeration value="13"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="ShortEnumerationType01">
      <ex:shortEnumerationType>11</ex:shortEnumerationType>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="LongEnumerationType" element="ex:longEnumerationType">
    <ex:typedef>
      <xs:element name="longEnumerationType" type="ex:LongEnumerationType"/>
      <xs:simpleType name="LongEnumerationType">
        <xs:restriction base="xs:long">
          <xs:enumeration value="9152052"/>
          <xs:enumeration value="7816230"/>
          <xs:enumeration value="7235733"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="LongEnumerationType01">
      <ex:longEnumerationType>9152052</ex:longEnumerationType>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="DoubleEnumerationType" element="ex:doubleEnumerationType">
    <ex:typedef>
      <xs:element name="doubleEnumerationType" type="ex:DoubleEnumerationType"/>
      <xs:simpleType name="DoubleEnumerationType">
        <xs:restriction base="xs:double">
          <xs:enumeration value="1267.43233E12"/>
          <xs:enumeration value="7234.34541E12"/>
          <xs:enumeration value="5733.65565E12"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="DoubleEnumerationType01">
      <ex:doubleEnumerationType>1267.43233E12</ex:doubleEnumerationType>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="IntegerEnumerationType" element="ex:integerEnumerationType">
    <ex:typedef>
      <xs:element name="integerEnumerationType" type="ex:IntegerEnumerationType"/>
      <xs:simpleType name="IntegerEnumerationType">
        <xs:restriction base="xs:integer">
          <xs:enumeration value="4000000"/>
          <xs:enumeration value="5000000"/>
          <xs:enumeration value="6000000"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="IntegerEnumerationType01">
      <ex:integerEnumerationType>4000000</ex:integerEnumerationType>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="DecimalEnumerationType" element="ex:decimalEnumerationType">
    <ex:typedef>
      <xs:element name="decimalEnumerationType" type="ex:DecimalEnumerationType"/>
      <xs:simpleType name="DecimalEnumerationType">
        <xs:restriction base="xs:decimal">
          <xs:enumeration value="+1000.0001"/>
          <xs:enumeration value="-1000.0001"/>
          <xs:enumeration value="1000.0002"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="DecimalEnumerationType01">
      <ex:decimalEnumerationType>1000.0002</ex:decimalEnumerationType>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="FloatEnumerationType" element="ex:floatEnumerationType">
    <ex:typedef>
      <xs:element name="floatEnumerationType" type="ex:FloatEnumerationType"/>
      <xs:simpleType name="FloatEnumerationType">
        <xs:restriction base="xs:float">
          <xs:enumeration value="1267.43233E12"/>
          <xs:enumeration value="7234.34541E12"/>
          <xs:enumeration value="5733.65565E12"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="FloatEnumerationType01">
      <ex:floatEnumerationType>1267.43233E12</ex:floatEnumerationType>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="NonNegativeIntegerEnumerationType"
    element="ex:nonNegativeIntegerEnumerationType">
    <ex:typedef>
      <xs:element name="nonNegativeIntegerEnumerationType"
        type="ex:NonNegativeIntegerEnumerationType"/>
      <xs:simpleType name="NonNegativeIntegerEnumerationType">
        <xs:restriction base="xs:nonNegativeInteger">
          <xs:enumeration value="12"/>
          <xs:enumeration value="24"/>
          <xs:enumeration value="33"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="NonNegativeIntegerEnumerationType01">
      <ex:nonNegativeIntegerEnumerationType>12</ex:nonNegativeIntegerEnumerationType>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="PositiveIntegerEnumerationType" element="ex:positiveIntegerEnumerationType">
    <ex:typedef>
      <xs:element name="positiveIntegerEnumerationType" type="ex:PositiveIntegerEnumerationType"/>
      <xs:simpleType name="PositiveIntegerEnumerationType">
        <xs:restriction base="xs:positiveInteger">
          <xs:enumeration value="12"/>
          <xs:enumeration value="24"/>
          <xs:enumeration value="33"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="PositiveIntegerEnumerationType01">
      <ex:positiveIntegerEnumerationType>12</ex:positiveIntegerEnumerationType>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="UnsignedLongEnumerationType" element="ex:unsignedLongEnumerationType">
    <ex:typedef>
      <xs:element name="unsignedLongEnumerationType" type="ex:UnsignedLongEnumerationType"/>
      <xs:simpleType name="UnsignedLongEnumerationType">
        <xs:restriction base="xs:unsignedLong">
          <xs:enumeration value="11111111111111"/>
          <xs:enumeration value="22222222222222"/>
          <xs:enumeration value="33333333333333"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="UnsignedLongEnumerationType01">
      <ex:unsignedLongEnumerationType>33333333333333</ex:unsignedLongEnumerationType>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="UnsignedIntEnumerationType" element="ex:unsignedIntEnumerationType">
    <ex:typedef>
      <xs:element name="unsignedIntEnumerationType" type="ex:UnsignedIntEnumerationType"/>
      <xs:simpleType name="UnsignedIntEnumerationType">
        <xs:restriction base="xs:unsignedInt">
          <xs:enumeration value="1111111111"/>
          <xs:enumeration value="2222222222"/>
          <xs:enumeration value="3333333333"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="UnsignedIntEnumerationType01">
      <ex:unsignedIntEnumerationType>3333333333</ex:unsignedIntEnumerationType>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="UnsignedShortEnumerationType" element="ex:unsignedShortEnumerationType">
    <ex:typedef>
      <xs:element name="unsignedShortEnumerationType" type="ex:UnsignedShortEnumerationType"/>
      <xs:simpleType name="UnsignedShortEnumerationType">
        <xs:restriction base="xs:unsignedShort">
          <xs:enumeration value="1111"/>
          <xs:enumeration value="2222"/>
          <xs:enumeration value="3333"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="UnsignedShortEnumerationType01">
      <ex:unsignedShortEnumerationType>3333</ex:unsignedShortEnumerationType>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="TokenEnumerationType" element="ex:tokenEnumerationType">
    <ex:typedef>
      <xs:element name="tokenEnumerationType" type="ex:TokenEnumerationType"/>
      <xs:simpleType name="TokenEnumerationType">
        <xs:restriction base="xs:token">
          <xs:enumeration value="1"/>
          <xs:enumeration value="2"/>
          <xs:enumeration value="3"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="TokenEnumerationType01">
      <ex:tokenEnumerationType>1</ex:tokenEnumerationType>
    </ex:instance>
    <ex:instance xml:id="TokenEnumerationType02">
      <ex:tokenEnumerationType>2</ex:tokenEnumerationType>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="ComplexTypeSequence" element="ex:complexTypeSequence">
    <ex:typedef>
      <xs:element name="complexTypeSequence" type="ex:ComplexTypeSequence"/>
      <xs:complexType name="ComplexTypeSequence">
        <xs:sequence>
          <xs:element name="name" type="xs:string"/>
          <xs:element name="shade" type="xs:string"/>
          <xs:element name="length" type="xs:int"/>
        </xs:sequence>
        <xs:attribute name="id" type="xs:string"/>
        <xs:attribute name="inStock" type="xs:int"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ComplexTypeSequence01">
      <ex:complexTypeSequence id="6026" inStock="232">
        <ex:name>Widget</ex:name>
        <ex:shade>Light Blue</ex:shade>
        <ex:length>33</ex:length>
      </ex:complexTypeSequence>
    </ex:instance>
    <ex:instance xml:id="ComplexTypeSequence02">
      <ex:complexTypeSequence inStock="52" id="6026">
        <ex:name>Widget</ex:name>
        <ex:shade>Green</ex:shade>
        <ex:length>1233</ex:length>
      </ex:complexTypeSequence>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="ComplexTypeOnlyAttributes" element="ex:complexTypeOnlyAttributes">
    <ex:typedef>
      <xs:element name="complexTypeOnlyAttributes" type="ex:ComplexTypeOnlyAttributes"/>
      <xs:complexType name="ComplexTypeOnlyAttributes">
        <xs:attribute name="a1" type="xs:string"/>
        <xs:attribute name="a2" type="xs:int"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ComplexTypeOnlyAttributes01">
      <ex:complexTypeOnlyAttributes a1="11226026" a2="223232"/>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="ComplexTypeAll" element="ex:complexTypeAll">
    <ex:typedef>
      <xs:element name="complexTypeAll" type="ex:ComplexTypeAll"/>
      <xs:complexType name="ComplexTypeAll">
        <xs:all>
          <xs:element name="name" type="xs:string"/>
          <xs:element name="shade" type="xs:string"/>
          <xs:element name="length" type="xs:int"/>
        </xs:all>
        <xs:attribute name="id" type="xs:string"/>
        <xs:attribute name="inStock" type="xs:int"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ComplexTypeAll01">
      <ex:complexTypeAll id="6026" inStock="232">
        <ex:name>Widget</ex:name>
        <ex:length>33</ex:length>
        <ex:shade>Light Blue</ex:shade>
      </ex:complexTypeAll>
    </ex:instance>
    <ex:instance xml:id="ComplexTypeAll02">
      <ex:complexTypeAll inStock="332" id="6026">
        <ex:shade>Green</ex:shade>
        <ex:length>21</ex:length>
        <ex:name>Widget</ex:name>
      </ex:complexTypeAll>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="ComplexTypeChoice" element="ex:fruit">
    <ex:typedef>
      <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>
    </ex:typedef>
    <ex:instance xml:id="ComplexTypeChoice01">
      <ex:fruit>
        <ex:apple>21</ex:apple>
      </ex:fruit>
    </ex:instance>
    <ex:instance xml:id="ComplexTypeChoice02">
      <ex:fruit>
        <ex:orange>Two Hundred</ex:orange>
      </ex:fruit>
    </ex:instance>
    <ex:instance xml:id="ComplexTypeChoice03">
      <ex:fruit>
        <ex:banana>329</ex:banana>
      </ex:fruit>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="ComplexTypeSequenceChoice" element="ex:mortgage">
    <ex:typedef>
      <xs:element name="mortgage" type="ex:Mortgage"/>
      <xs:complexType name="Mortgage">
        <xs:sequence>
          <xs:element name="amount" type="xs:int"/>
          <xs:choice>
            <xs:element name="repayment" type="ex:Repayment"/>
            <xs:element name="interestonly" type="ex:InterestOnly"/>
          </xs:choice>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="Repayment">
        <xs:sequence>
          <xs:element name="years" type="xs:int"/>
          <xs:element name="months" type="xs:int"/>
          <xs:element name="rate" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="InterestOnly">
        <xs:sequence>
          <xs:element name="years" type="xs:int"/>
          <xs:element name="rate" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ComplexTypeSequenceChoice01">
      <ex:mortgage>
        <ex:amount>225000</ex:amount>
        <ex:repayment>
          <ex:years>20</ex:years>
          <ex:months>6</ex:months>
          <ex:rate>5.25</ex:rate>
        </ex:repayment>
      </ex:mortgage>
    </ex:instance>
    <ex:instance xml:id="ComplexTypeSequenceChoice02">
      <ex:mortgage>
        <ex:amount>225000</ex:amount>
        <ex:interestonly>
          <ex:years>25</ex:years>
          <ex:rate>5.50</ex:rate>
        </ex:interestonly>
      </ex:mortgage>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementMinOccurs1" element="ex:elementMinOccurs1">
    <ex:typedef>
      <xs:element name="elementMinOccurs1" type="ex:ElementMinOccurs1"/>
      <xs:complexType name="ElementMinOccurs1">
        <xs:sequence>
          <xs:element name="elementMinOccurs1item" type="xs:string" minOccurs="1"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ElementMinOccurs101">
      <ex:elementMinOccurs1>
        <ex:elementMinOccurs1item>item1</ex:elementMinOccurs1item>
      </ex:elementMinOccurs1>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementMinOccursFinite" element="ex:elementMinOccursFinite">
    <ex:typedef>
      <xs:element name="elementMinOccursFinite" type="ex:ElementMinOccursFinite"/>
      <xs:complexType name="ElementMinOccursFinite">
        <xs:sequence>
          <xs:element name="elementMinOccursFiniteitem" type="xs:string" minOccurs="3" maxOccurs="3"
          />
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ElementMinOccursFinite01">
      <ex:elementMinOccursFinite>
        <ex:elementMinOccursFiniteitem>item1</ex:elementMinOccursFiniteitem>
        <ex:elementMinOccursFiniteitem>item3</ex:elementMinOccursFiniteitem>
        <ex:elementMinOccursFiniteitem>item2</ex:elementMinOccursFiniteitem>
      </ex:elementMinOccursFinite>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementMinOccurs2MaxOccurs2" pattern="ElementMinOccursFinite"
    element="ex:itemColors2">
    <ex:typedef>
      <xs:element name="itemColors2" type="ex:ItemColors2"/>
      <xs:complexType name="ItemColors2">
        <xs:sequence>
          <xs:element name="itemColor" type="xs:string" minOccurs="2" maxOccurs="2"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ElementMinOccurs2MaxOccurs201">
      <ex:itemColors2>
        <ex:itemColor>Red</ex:itemColor>
        <ex:itemColor>Yellow</ex:itemColor>
      </ex:itemColors2>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementMinOccurs2orMore" pattern="ElementMinOccursFinite"
    element="ex:itemColors">
    <ex:typedef>
      <xs:element name="itemColors" type="ex:ItemColors"/>
      <xs:complexType name="ItemColors">
        <xs:sequence>
          <xs:element name="itemColor" type="xs:string" minOccurs="2" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ElementMinOccurs2orMore01">
      <ex:itemColors>
        <ex:itemColor>Red</ex:itemColor>
        <ex:itemColor>Black</ex:itemColor>
        <ex:itemColor>White</ex:itemColor>
        <ex:itemColor>Yellow</ex:itemColor>
      </ex:itemColors>
    </ex:instance>
    <ex:instance xml:id="ElementMinOccurs2orMore02">
      <ex:itemColors>
        <ex:itemColor>Black</ex:itemColor>
        <ex:itemColor>White</ex:itemColor>
      </ex:itemColors>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementMaxOccurs1" element="ex:elementMaxOccurs1">
    <ex:typedef>
      <xs:element name="elementMaxOccurs1" type="ex:ElementMaxOccurs1"/>
      <xs:complexType name="ElementMaxOccurs1">
        <xs:sequence>
          <xs:element name="value" type="xs:string" minOccurs="1" maxOccurs="1"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ElementMaxOccurs101">
      <ex:elementMaxOccurs1>
        <ex:value>44</ex:value>
      </ex:elementMaxOccurs1>
    </ex:instance>
    <ex:instance xml:id="ElementMaxOccurs102">
      <ex:elementMaxOccurs1>
        <ex:value>4</ex:value>
      </ex:elementMaxOccurs1>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementMaxOccursUnbounded" element="ex:publications"
    pattern="ElementMinOccurs1MaxOccursUnbounded">
    <ex:typedef>
      <xs:element name="publications" type="ex:Publications"/>
      <xs:complexType name="Publications">
        <xs:sequence>
          <xs:element name="day" type="xs:string" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ElementMaxOccursUnbounded01">
      <ex:publications>
        <ex:day>2002-09-24</ex:day>
        <ex:day>2003-04-14</ex:day>
        <ex:day>2004-03-31</ex:day>
        <ex:day>2005-06-04</ex:day>
        <ex:day>2006-07-03</ex:day>
      </ex:publications>
    </ex:instance>
    <ex:instance xml:id="ElementMaxOccursUnbounded02">
      <ex:publications>
        <ex:day>2006-01-26</ex:day>
      </ex:publications>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementMaxOccursFinite" element="ex:summer">
    <ex:typedef>
      <xs:element name="summer" type="ex:Summer"/>
      <xs:complexType name="Summer">
        <xs:sequence>
          <xs:element name="mnth" type="xs:string" maxOccurs="4"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ElementMaxOccursFinite01">
      <ex:summer>
        <ex:mnth>May</ex:mnth>
        <ex:mnth>June</ex:mnth>
        <ex:mnth>July</ex:mnth>
        <ex:mnth>August</ex:mnth>
      </ex:summer>
    </ex:instance>
    <ex:instance xml:id="ElementMaxOccursFinite02">
      <ex:summer>
        <ex:mnth>August</ex:mnth>
        <ex:mnth>September</ex:mnth>
      </ex:summer>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AttributeOptional" element="ex:attributeOptional">
    <ex:typedef>
      <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>
    </ex:typedef>
    <ex:instance xml:id="AttributeOptional01">
      <ex:attributeOptional id="1711" currency="EUR">
        <ex:amount>1250</ex:amount>
      </ex:attributeOptional>
    </ex:instance>
    <ex:instance xml:id="AttributeOptional02">
      <ex:attributeOptional id="1712">
        <ex:amount>1250</ex:amount>
      </ex:attributeOptional>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AttributeRequired" element="ex:attributeRequired">
    <ex:typedef>
      <xs:element name="attributeRequired" type="ex:AttributeRequired"/>
      <xs:complexType name="AttributeRequired">
        <xs:sequence>
          <xs:element name="percentage" type="xs:int"/>
        </xs:sequence>
        <xs:attribute name="id" type="xs:string"/>
        <xs:attribute name="seasonal" type="xs:string" use="required"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="AttributeRequired01">
      <ex:attributeRequired id="1611" seasonal="yes">
        <ex:percentage>5</ex:percentage>
      </ex:attributeRequired>
    </ex:instance>
    <ex:instance xml:id="AttributeRequired02">
      <ex:attributeRequired id="1612" seasonal="no">
        <ex:percentage>2</ex:percentage>
      </ex:attributeRequired>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AttributeFixed" element="ex:attributeFixed">
    <ex:typedef>
      <xs:element name="attributeFixed" type="ex:AttributeFixed"/>
      <xs:complexType name="AttributeFixed">
        <xs:sequence>
          <xs:element name="fee" type="xs:int"/>
        </xs:sequence>
        <xs:attribute name="id" type="xs:string"/>
        <xs:attribute name="currency" type="xs:string" fixed="GBP"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="AttributeFixed01">
      <ex:attributeFixed id="1511" currency="GBP">
        <ex:fee>500</ex:fee>
      </ex:attributeFixed>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AttributeDefault" element="ex:attributeDefault">
    <ex:typedef>
      <xs:element name="attributeDefault" type="ex:AttributeDefault"/>
      <xs:complexType name="AttributeDefault">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="defaultedValue" type="xs:string" default="theDefaultValue"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="AttributeDefault01">
      <ex:attributeDefault/>
    </ex:instance>
    <ex:instance xml:id="AttributeDefault02">
      <ex:attributeDefault defaultedValue="theDefaultValue"/>
    </ex:instance>
    <ex:instance xml:id="AttributeDefault03">
      <ex:attributeDefault defaultedValue=""/>
    </ex:instance>
    <ex:instance xml:id="AttributeDefault04">
      <ex:attributeDefault defaultedValue="anotherValue"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalElement" element="ex:globalElement" pattern="GlobalElement">
    <ex:typedef>
      <xs:element name="globalElement" type="xs:string"/>
    </ex:typedef>
    <ex:instance xml:id="GlobalElement01">
      <ex:globalElement/>
    </ex:instance>
    <ex:instance xml:id="GlobalElement02">
      <ex:globalElement>a value</ex:globalElement>
    </ex:instance>
    <ex:instance xml:id="GlobalElement03">
      <ex:globalElement>another Value</ex:globalElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalElementDefault" element="ex:globalElementDefault"
    pattern="ElementDefault">
    <ex:typedef>
      <xs:element name="globalElementDefault" type="xs:string" default="theDefaultValue"/>
    </ex:typedef>
    <ex:instance xml:id="GlobalElementDefault01">
      <ex:globalElementDefault/>
    </ex:instance>
    <ex:instance xml:id="GlobalElementDefault02">
      <ex:globalElementDefault>theDefaultValue</ex:globalElementDefault>
    </ex:instance>
    <ex:instance xml:id="GlobalElementDefault03">
      <ex:globalElementDefault>anotherValue</ex:globalElementDefault>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementMinOccurs0" element="ex:elementMinOccurs0">
    <ex:typedef>
      <xs:element name="elementMinOccurs0" type="ex:ElementMinOccurs0"/>
      <xs:complexType name="ElementMinOccurs0">
        <xs:sequence>
          <xs:element name="firstName" type="xs:string"/>
          <xs:element name="middleName" type="xs:string" minOccurs="0"/>
          <xs:element name="lastName" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ElementMinOccurs001">
      <ex:elementMinOccurs0>
        <ex:firstName>Paul</ex:firstName>
        <ex:lastName>Downey</ex:lastName>
      </ex:elementMinOccurs0>
    </ex:instance>
    <ex:instance xml:id="ElementMinOccurs002">
      <ex:elementMinOccurs0>
        <ex:firstName>Paul</ex:firstName>
        <ex:middleName>Sumner</ex:middleName>
        <ex:lastName>Downey</ex:lastName>
      </ex:elementMinOccurs0>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NillableElement" element="ex:nillableMiddleName">
    <ex:typedef>
      <xs:element name="nillableMiddleName" type="ex:NillableMiddleName"/>
      <xs:complexType name="NillableMiddleName">
        <xs:sequence>
          <xs:element name="firstName" type="xs:string"/>
          <xs:element name="middleName" type="xs:string" nillable="true"/>
          <xs:element name="lastName" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="NillableElement01">
      <ex:nillableMiddleName>
        <ex:firstName>Paul</ex:firstName>
        <ex:middleName xsi:nil="true"/>
        <ex:lastName>Downey</ex:lastName>
      </ex:nillableMiddleName>
    </ex:instance>
    <ex:instance xml:id="NillableElement02">
      <ex:nillableMiddleName>
        <ex:firstName>Paul</ex:firstName>
        <ex:middleName>Sumner</ex:middleName>
        <ex:lastName>Downey</ex:lastName>
      </ex:nillableMiddleName>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NillableOptionalElement" element="ex:nillableOptionalMiddleName">
    <ex:typedef>
      <xs:element name="nillableOptionalMiddleName" type="ex:NillableOptionalMiddleName"/>
      <xs:complexType name="NillableOptionalMiddleName">
        <xs:sequence>
          <xs:element name="firstName" type="xs:string"/>
          <xs:element name="middleName" type="xs:string" minOccurs="0" nillable="true"/>
          <xs:element name="lastName" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="NillableOptionalElement01">
      <ex:nillableOptionalMiddleName>
        <ex:firstName>Paul</ex:firstName>
        <ex:lastName>Downey</ex:lastName>
      </ex:nillableOptionalMiddleName>
    </ex:instance>
    <ex:instance xml:id="NillableOptionalElement02">
      <ex:nillableOptionalMiddleName>
        <ex:firstName>Paul</ex:firstName>
        <ex:middleName>Sumner</ex:middleName>
        <ex:lastName>Downey</ex:lastName>
      </ex:nillableOptionalMiddleName>
    </ex:instance>
    <ex:instance xml:id="NillableOptionalElement03">
      <ex:nillableOptionalMiddleName>
        <ex:firstName>Paul</ex:firstName>
        <ex:middleName xsi:nil="true"/>
        <ex:lastName>Downey</ex:lastName>
      </ex:nillableOptionalMiddleName>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="UnionMemberTypes" pattern="UnionMemberTypes" element="ex:unionMemberTypes">
    <ex:typedef>
      <xs:simpleType name="UnionMemberTypes">
        <xs:union memberTypes="xs:int xs:string"/>
      </xs:simpleType>
      <xs:element name="unionMemberTypes" type="ex:UnionMemberTypes"/>
    </ex:typedef>
    <ex:instance xml:id="UnionMemberTypes01">
      <ex:unionMemberTypes>22</ex:unionMemberTypes>
    </ex:instance>
    <ex:instance xml:id="UnionMemberTypes02">
      <ex:unionMemberTypes>a string?</ex:unionMemberTypes>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="UnionDateString" pattern="UnionMemberTypes" element="ex:unionDateString">
    <ex:typedef>
      <xs:simpleType name="UnionDateString">
        <xs:union memberTypes="xs:date xs:string"/>
      </xs:simpleType>
      <xs:element name="unionDateString" type="ex:UnionDateString"/>
    </ex:typedef>
    <ex:instance xml:id="UnionDateString01">
      <ex:unionDateString>Tonight</ex:unionDateString>
    </ex:instance>
    <ex:instance xml:id="UnionDateString02">
      <ex:unionDateString>2006-06-06</ex:unionDateString>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="UnionSimpleDateString" pattern="UnionSimpleTypes"
    element="ex:unionSimpleDateString">
    <ex:typedef>
      <xs:simpleType name="UnionSimpleDateString">
        <xs:union>
          <xs:simpleType>
            <xs:restriction base="xs:date"/>
          </xs:simpleType>
          <xs:simpleType>
            <xs:restriction base="xs:string"/>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
      <xs:element name="unionSimpleDateString" type="ex:UnionSimpleDateString"/>
    </ex:typedef>
    <ex:instance xml:id="UnionSimpleDateString01">
      <ex:unionSimpleDateString>Monday Night</ex:unionSimpleDateString>
    </ex:instance>
    <ex:instance xml:id="UnionSimpleDateString02">
      <ex:unionSimpleDateString>2006-06-06</ex:unionSimpleDateString>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NullEnumerationType" element="ex:nullEnumerationType">
    <ex:typedef>
      <xs:element name="nullEnumerationType" type="ex:NullEnumerationType"/>
      <xs:simpleType name="NullEnumerationType">
        <xs:restriction base="xs:string">
          <xs:enumeration value=""/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="NullEnumerationType01">
      <ex:nullEnumerationType/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementEmptyComplexType" element="ex:elementEmptyComplexType">
    <ex:typedef>
      <xs:element name="elementEmptyComplexType">
        <xs:complexType/>
      </xs:element>
    </ex:typedef>
    <ex:instance xml:id="ElementEmptyComplexType01">
      <ex:elementEmptyComplexType/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementEmptySequence" element="ex:elementEmptySequence">
    <ex:typedef>
      <xs:element name="elementEmptySequence">
        <xs:complexType>
          <xs:sequence/>
        </xs:complexType>
      </xs:element>
    </ex:typedef>
    <ex:instance xml:id="ElementEmptySequence01">
      <ex:elementEmptySequence/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalElementSequence" element="ex:globalElementSequence">
    <ex:typedef>
      <xs:element name="globalElementSequence">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="foo" type="xs:string"/>
            <xs:element name="bar" type="xs:string"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </ex:typedef>
    <ex:instance xml:id="GlobalElementSequence01">
      <ex:globalElementSequence>
        <ex:foo>one</ex:foo>
        <ex:bar>two</ex:bar>
      </ex:globalElementSequence>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalElementAll" element="ex:globalElementAll">
    <ex:typedef>
      <xs:element name="globalElementAll">
        <xs:complexType>
          <xs:all>
            <xs:element name="globalElementAllA" type="xs:string"/>
            <xs:element name="globalElementAllB" type="xs:string"/>
          </xs:all>
        </xs:complexType>
      </xs:element>
    </ex:typedef>
    <ex:instance xml:id="GlobalElementAll01">
      <ex:globalElementAll>
        <ex:globalElementAllA>one</ex:globalElementAllA>
        <ex:globalElementAllB>42</ex:globalElementAllB>
      </ex:globalElementAll>
    </ex:instance>
    <ex:instance xml:id="GlobalElementAll02">
      <ex:globalElementAll>
        <ex:globalElementAllB>42</ex:globalElementAllB>
        <ex:globalElementAllA>douze</ex:globalElementAllA>
      </ex:globalElementAll>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalElementChoice" element="ex:globalElementChoice">
    <ex:typedef>
      <xs:element name="globalElementChoice">
        <xs:complexType>
          <xs:choice>
            <xs:element name="globalElementChoiceA" type="xs:string"/>
            <xs:element name="globalElementChoiceB" type="xs:string"/>
          </xs:choice>
        </xs:complexType>
      </xs:element>
    </ex:typedef>
    <ex:instance xml:id="GlobalElementChoice01">
      <ex:globalElementChoice>
        <ex:globalElementChoiceA>one</ex:globalElementChoiceA>
      </ex:globalElementChoice>
    </ex:instance>
    <ex:instance xml:id="GlobalElementChoice02">
      <ex:globalElementChoice>
        <ex:globalElementChoiceB>two</ex:globalElementChoiceB>
      </ex:globalElementChoice>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NestedSequenceElementList" pattern="ElementMinOccurs0MaxOccursUnbounded"
    element="ex:nestedSequenceElementList">
    <ex:typedef>
      <xs:element name="nestedSequenceElementList" type="ex:NestedSequenceElementList"/>
      <xs:complexType name="NestedItem">
        <xs:sequence>
          <xs:element name="item" minOccurs="0" maxOccurs="unbounded" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="NestedSequenceElementList">
        <xs:sequence>
          <xs:element name="nestedItem" minOccurs="0" maxOccurs="unbounded" type="ex:NestedItem"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="NestedSequenceElementList01">
      <ex:nestedSequenceElementList>
        <ex:nestedItem>
          <ex:item>item onexone</ex:item>
          <ex:item>item onextwo</ex:item>
          <ex:item>item onexthree</ex:item>
          <ex:item>item onexfour</ex:item>
        </ex:nestedItem>
        <ex:nestedItem>
          <ex:item>item twoxone</ex:item>
          <ex:item>item twoxtwo</ex:item>
          <ex:item>item twoxthree</ex:item>
          <ex:item>item twoxfour</ex:item>
        </ex:nestedItem>
      </ex:nestedSequenceElementList>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="MixedContentType" element="ex:mixedContentType">
    <ex:typedef>
      <xs:element name="mixedContentType" type="ex:MixedContentType"/>
      <xs:complexType name="MixedContentType" mixed="true">
        <xs:sequence>
          <xs:element name="elem1" type="xs:string"/>
          <xs:element name="elem2" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="MixedContentType01">
      <ex:mixedContentType>
        <ex:elem1>Tagged Value</ex:elem1> mixed value <ex:elem2>Tagged Value</ex:elem2>
      </ex:mixedContentType>
    </ex:instance>
    <ex:instance xml:id="MixedContentType02">
      <ex:mixedContentType> some text <ex:elem1>Tagged Value</ex:elem1> more text <ex:elem2>Tagged
          Value</ex:elem2>
      </ex:mixedContentType>
    </ex:instance>
    <ex:instance xml:id="MixedContentType03">
      <ex:mixedContentType>
        <ex:elem1>Tagged Value</ex:elem1> mixed text value <ex:elem2>Tagged Value</ex:elem2> mixed
        text value </ex:mixedContentType>
    </ex:instance>
    <ex:instance xml:id="MixedContentType04">
      <ex:mixedContentType> text mixed value <ex:elem1>Tagged Value</ex:elem1>
        <ex:elem2>Tagged Value</ex:elem2> some more text in a mixed value </ex:mixedContentType>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="StringSimpleTypePattern" element="ex:stringSimpleTypePattern">
    <ex:typedef>
      <xs:element name="stringSimpleTypePattern" type="ex:StringSimpleTypePattern"/>
      <xs:simpleType name="StringSimpleTypePattern">
        <xs:restriction base="xs:string">
          <xs:pattern value="\d{3}"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="StringSimpleTypePattern01">
      <ex:stringSimpleTypePattern>123</ex:stringSimpleTypePattern>
    </ex:instance>
    <ex:instance xml:id="StringSimpleTypePattern02">
      <ex:stringSimpleTypePattern>009</ex:stringSimpleTypePattern>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="IntSimpleTypePattern" element="ex:intSimpleTypePattern">
    <ex:typedef>
      <xs:element name="intSimpleTypePattern" type="ex:IntSimpleTypePattern"/>
      <xs:simpleType name="IntSimpleTypePattern">
        <xs:restriction base="xs:int">
          <xs:pattern value="\d{3}"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="IntSimpleTypePattern01">
      <ex:intSimpleTypePattern>123</ex:intSimpleTypePattern>
    </ex:instance>
    <ex:instance xml:id="IntSimpleTypePattern02">
      <ex:intSimpleTypePattern>009</ex:intSimpleTypePattern>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="IntegerSimpleTypePattern" element="ex:integerSimpleTypePattern">
    <ex:typedef>
      <xs:element name="integerSimpleTypePattern" type="ex:IntegerSimpleTypePattern"/>
      <xs:simpleType name="IntegerSimpleTypePattern">
        <xs:restriction base="xs:integer">
          <xs:pattern value="[+\-]?([1-9][0-9]*)|0"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="IntegerSimpleTypePattern01">
      <ex:integerSimpleTypePattern>123</ex:integerSimpleTypePattern>
    </ex:instance>
    <ex:instance xml:id="IntegerSimpleTypePattern02">
      <ex:integerSimpleTypePattern>9</ex:integerSimpleTypePattern>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="LongSimpleTypePattern" element="ex:longSimpleTypePattern">
    <ex:typedef>
      <xs:element name="longSimpleTypePattern" type="ex:LongSimpleTypePattern"/>
      <xs:simpleType name="LongSimpleTypePattern">
        <xs:restriction base="xs:long">
          <xs:pattern value="\d{3}"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="LongSimpleTypePattern01">
      <ex:longSimpleTypePattern>123</ex:longSimpleTypePattern>
    </ex:instance>
    <ex:instance xml:id="LongSimpleTypePattern02">
      <ex:longSimpleTypePattern>009</ex:longSimpleTypePattern>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="DecimalSimpleTypePattern" element="ex:decimalSimpleTypePattern">
    <ex:typedef>
      <xs:element name="decimalSimpleTypePattern" type="ex:DecimalSimpleTypePattern"/>
      <xs:simpleType name="DecimalSimpleTypePattern">
        <xs:restriction base="xs:decimal">
          <xs:pattern value="\d{4}\.\d{2}"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="DecimalSimpleTypePattern01">
      <ex:decimalSimpleTypePattern>1234.12</ex:decimalSimpleTypePattern>
    </ex:instance>
    <ex:instance xml:id="DecimalSimpleTypePattern02">
      <ex:decimalSimpleTypePattern>9898.00</ex:decimalSimpleTypePattern>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="FloatSimpleTypePattern" element="ex:floatSimpleTypePattern">
    <ex:typedef>
      <xs:element name="floatSimpleTypePattern" type="ex:FloatSimpleTypePattern"/>
      <xs:simpleType name="FloatSimpleTypePattern">
        <xs:restriction base="xs:float">
          <xs:pattern value="\d{3}"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="FloatSimpleTypePattern01">
      <ex:floatSimpleTypePattern>123</ex:floatSimpleTypePattern>
    </ex:instance>
    <ex:instance xml:id="FloatSimpleTypePattern02">
      <ex:floatSimpleTypePattern>009</ex:floatSimpleTypePattern>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="DoubleSimpleTypePattern" element="ex:doubleSimpleTypePattern">
    <ex:typedef>
      <xs:element name="doubleSimpleTypePattern" type="ex:DoubleSimpleTypePattern"/>
      <xs:simpleType name="DoubleSimpleTypePattern">
        <xs:restriction base="xs:double">
          <xs:pattern value="\d{3}"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="DoubleSimpleTypePattern01">
      <ex:doubleSimpleTypePattern>123</ex:doubleSimpleTypePattern>
    </ex:instance>
    <ex:instance xml:id="DoubleSimpleTypePattern02">
      <ex:doubleSimpleTypePattern>009</ex:doubleSimpleTypePattern>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="ShortSimpleTypePattern" element="ex:shortSimpleTypePattern">
    <ex:typedef>
      <xs:element name="shortSimpleTypePattern" type="ex:ShortSimpleTypePattern"/>
      <xs:simpleType name="ShortSimpleTypePattern">
        <xs:restriction base="xs:short">
          <xs:pattern value="\d{3}"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="ShortSimpleTypePattern01">
      <ex:shortSimpleTypePattern>123</ex:shortSimpleTypePattern>
    </ex:instance>
    <ex:instance xml:id="ShortSimpleTypePattern02">
      <ex:shortSimpleTypePattern>009</ex:shortSimpleTypePattern>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="NonNegativeIntegerSimpleTypePattern"
    element="ex:nonNegativeIntegerSimpleTypePattern">
    <ex:typedef>
      <xs:element name="nonNegativeIntegerSimpleTypePattern"
        type="ex:NonNegativeIntegerSimpleTypePattern"/>
      <xs:simpleType name="NonNegativeIntegerSimpleTypePattern">
        <xs:restriction base="xs:nonNegativeInteger">
          <xs:pattern value="\d{3}"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="NonNegativeIntegerSimpleTypePattern01">
      <ex:nonNegativeIntegerSimpleTypePattern>123</ex:nonNegativeIntegerSimpleTypePattern>
    </ex:instance>
    <ex:instance xml:id="NonNegativeIntegerSimpleTypePattern02">
      <ex:nonNegativeIntegerSimpleTypePattern>009</ex:nonNegativeIntegerSimpleTypePattern>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="PositiveIntegerSimpleTypePattern"
    element="ex:positiveIntegerSimpleTypePattern">
    <ex:typedef>
      <xs:element name="positiveIntegerSimpleTypePattern" type="ex:PositiveIntegerSimpleTypePattern"/>
      <xs:simpleType name="PositiveIntegerSimpleTypePattern">
        <xs:restriction base="xs:positiveInteger">
          <xs:pattern value="\d{3}"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="PositiveIntegerSimpleTypePattern01">
      <ex:positiveIntegerSimpleTypePattern>123</ex:positiveIntegerSimpleTypePattern>
    </ex:instance>
    <ex:instance xml:id="PositiveIntegerSimpleTypePattern02">
      <ex:positiveIntegerSimpleTypePattern>009</ex:positiveIntegerSimpleTypePattern>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="UnsignedLongSimpleTypePattern" element="ex:unsignedLongSimpleTypePattern">
    <ex:typedef>
      <xs:element name="unsignedLongSimpleTypePattern" type="ex:UnsignedLongSimpleTypePattern"/>
      <xs:simpleType name="UnsignedLongSimpleTypePattern">
        <xs:restriction base="xs:unsignedLong">
          <xs:pattern value="\d{3}"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="UnsignedLongSimpleTypePattern01">
      <ex:unsignedLongSimpleTypePattern>123</ex:unsignedLongSimpleTypePattern>
    </ex:instance>
    <ex:instance xml:id="UnsignedLongSimpleTypePattern02">
      <ex:unsignedLongSimpleTypePattern>009</ex:unsignedLongSimpleTypePattern>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="UnsignedIntSimpleTypePattern" element="ex:unsignedIntSimpleTypePattern">
    <ex:typedef>
      <xs:element name="unsignedIntSimpleTypePattern" type="ex:UnsignedIntSimpleTypePattern"/>
      <xs:simpleType name="UnsignedIntSimpleTypePattern">
        <xs:restriction base="xs:unsignedInt">
          <xs:pattern value="\d{3}"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="UnsignedIntSimpleTypePattern01">
      <ex:unsignedIntSimpleTypePattern>123</ex:unsignedIntSimpleTypePattern>
    </ex:instance>
    <ex:instance xml:id="UnsignedIntSimpleTypePattern02">
      <ex:unsignedIntSimpleTypePattern>009</ex:unsignedIntSimpleTypePattern>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="UnsignedShortSimpleTypePattern" element="ex:unsignedShortSimpleTypePattern">
    <ex:typedef>
      <xs:element name="unsignedShortSimpleTypePattern" type="ex:UnsignedShortSimpleTypePattern"/>
      <xs:simpleType name="UnsignedShortSimpleTypePattern">
        <xs:restriction base="xs:unsignedShort">
          <xs:pattern value="\d{3}"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="UnsignedShortSimpleTypePattern01">
      <ex:unsignedShortSimpleTypePattern>123</ex:unsignedShortSimpleTypePattern>
    </ex:instance>
    <ex:instance xml:id="UnsignedShortSimpleTypePattern02">
      <ex:unsignedShortSimpleTypePattern>009</ex:unsignedShortSimpleTypePattern>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="DateSimpleTypePattern" element="ex:dateSimpleTypePattern">
    <ex:typedef>
      <xs:element name="dateSimpleTypePattern" type="ex:DateSimpleTypePattern"/>
      <xs:simpleType name="DateSimpleTypePattern">
        <xs:restriction base="xs:date">
          <xs:pattern value="[^\-]{4}\-[^\-]{2}\-[^\-]{2}"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="DateSimpleTypePattern01">
      <ex:dateSimpleTypePattern>2006-12-18</ex:dateSimpleTypePattern>
    </ex:instance>
    <ex:instance xml:id="DateSimpleTypePattern02">
      <ex:dateSimpleTypePattern>2007-01-01</ex:dateSimpleTypePattern>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="RestrictedMinInclusive" element="ex:restrictedMinInclusive">
    <ex:typedef>
      <xs:element name="restrictedMinInclusive" type="ex:RestrictedMinInclusive"/>
      <xs:simpleType name="RestrictedMinInclusive">
        <xs:restriction base="xs:integer">
          <xs:minInclusive value="1"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="RestrictedMinInclusive01">
      <ex:restrictedMinInclusive>1</ex:restrictedMinInclusive>
    </ex:instance>
    <ex:instance xml:id="RestrictedMinInclusive02">
      <ex:restrictedMinInclusive>2</ex:restrictedMinInclusive>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="RestrictedMaxInclusive" element="ex:restrictedMaxInclusive">
    <ex:typedef>
      <xs:element name="restrictedMaxInclusive" type="ex:RestrictedMaxInclusive"/>
      <xs:simpleType name="RestrictedMaxInclusive">
        <xs:restriction base="xs:integer">
          <xs:maxInclusive value="3"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="RestrictedMaxInclusive01">
      <ex:restrictedMaxInclusive>1</ex:restrictedMaxInclusive>
    </ex:instance>
    <ex:instance xml:id="RestrictedMaxInclusive02">
      <ex:restrictedMaxInclusive>3</ex:restrictedMaxInclusive>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="RestrictedMinExclusive" element="ex:restrictedMinExclusive">
    <ex:typedef>
      <xs:element name="restrictedMinExclusive" type="ex:RestrictedMinExclusive"/>
      <xs:simpleType name="RestrictedMinExclusive">
        <xs:restriction base="xs:integer">
          <xs:minExclusive value="1"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="RestrictedMinExclusive01">
      <ex:restrictedMinExclusive>2</ex:restrictedMinExclusive>
    </ex:instance>
    <ex:instance xml:id="RestrictedMinExclusive02">
      <ex:restrictedMinExclusive>3</ex:restrictedMinExclusive>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="RestrictedMaxExclusive" element="ex:restrictedMaxExclusive">
    <ex:typedef>
      <xs:element name="restrictedMaxExclusive" type="ex:RestrictedMaxExclusive"/>
      <xs:simpleType name="RestrictedMaxExclusive">
        <xs:restriction base="xs:integer">
          <xs:maxExclusive value="3"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="RestrictedMaxExclusive01">
      <ex:restrictedMaxExclusive>1</ex:restrictedMaxExclusive>
    </ex:instance>
    <ex:instance xml:id="RestrictedMaxExclusive02">
      <ex:restrictedMaxExclusive>2</ex:restrictedMaxExclusive>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="RestrictedLength" element="ex:restrictedLength">
    <ex:typedef>
      <xs:element name="restrictedLength" type="ex:RestrictedLength"/>
      <xs:simpleType name="RestrictedLength">
        <xs:restriction base="xs:language">
          <xs:length value="2"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="RestrictedLength01">
      <ex:restrictedLength>en</ex:restrictedLength>
    </ex:instance>
    <ex:instance xml:id="RestrictedLength02">
      <ex:restrictedLength>FR</ex:restrictedLength>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="RestrictedMaxLength" element="ex:restrictedMaxLength">
    <ex:typedef>
      <xs:element name="restrictedMaxLength" type="ex:RestrictedMaxLength"/>
      <xs:simpleType name="RestrictedMaxLength">
        <xs:restriction base="xs:string">
          <xs:maxLength value="12"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="RestrictedMaxLength01">
      <ex:restrictedMaxLength>AUSTRALIA</ex:restrictedMaxLength>
    </ex:instance>
    <ex:instance xml:id="RestrictedMaxLength02">
      <ex:restrictedMaxLength>N AMERICA</ex:restrictedMaxLength>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="RestrictedMinLength" element="ex:restrictedMinLength">
    <ex:typedef>
      <xs:element name="restrictedMinLength" type="ex:RestrictedMinLength"/>
      <xs:simpleType name="RestrictedMinLength">
        <xs:restriction base="xs:string">
          <xs:minLength value="2"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="RestrictedMinLength01">
      <ex:restrictedMinLength>AUS</ex:restrictedMinLength>
    </ex:instance>
    <ex:instance xml:id="RestrictedMinLength02">
      <ex:restrictedMinLength>GB</ex:restrictedMinLength>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="AnyAttributeStrict" element="ex:anyAttributeStrict">
    <ex:typedef>
      <xs:element name="anyAttributeStrict" type="ex:AnyAttributeStrict"/>
      <xs:complexType name="AnyAttributeStrict">
        <xs:sequence>
          <xs:element name="firstName" type="xs:string"/>
          <xs:element name="lastName" type="xs:string"/>
        </xs:sequence>
        <xs:anyAttribute/>
      </xs:complexType>
      <xs:attribute name="eyeColor" type="xs:string"/>
      <xs:attribute name="hairColor" type="xs:string"/>
    </ex:typedef>
    <ex:instance xml:id="AnyAttributeStrict01">
      <ex:anyAttributeStrict ex:eyeColor="blue">
        <ex:firstName>Bobby</ex:firstName>
        <ex:lastName>Sox</ex:lastName>
      </ex:anyAttributeStrict>
    </ex:instance>
    <ex:instance xml:id="AnyAttributeStrict02">
      <ex:anyAttributeStrict ex:hairColor="green">
        <ex:firstName>Bobby</ex:firstName>
        <ex:lastName>Sox</ex:lastName>
      </ex:anyAttributeStrict>
    </ex:instance>
    <ex:instance xml:id="AnyAttributeStrict03">
      <ex:anyAttributeStrict ex:eyeColor="blue" ex:hairColor="green">
        <ex:firstName>Bobby</ex:firstName>
        <ex:lastName>Sox</ex:lastName>
      </ex:anyAttributeStrict>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="AnyAttributeSkip" element="ex:anyAttributeSkip">
    <ex:typedef>
      <xs:element name="anyAttributeSkip" type="ex:AnyAttributeSkip"/>
      <xs:complexType name="AnyAttributeSkip">
        <xs:sequence>
          <xs:element name="firstName" type="xs:string"/>
          <xs:element name="lastName" type="xs:string"/>
        </xs:sequence>
        <xs:anyAttribute processContents="skip"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="AnyAttributeSkip01">
      <ex:anyAttributeSkip eyeColor="blue">
        <ex:firstName>Bobby</ex:firstName>
        <ex:lastName>Sox</ex:lastName>
      </ex:anyAttributeSkip>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="AnyAttributeLax" element="ex:anyAttributeLax">
    <ex:typedef>
      <xs:element name="anyAttributeLax" type="ex:AnyAttributeLax"/>
      <xs:complexType name="AnyAttributeLax">
        <xs:sequence>
          <xs:element name="firstName" type="xs:string"/>
          <xs:element name="lastName" type="xs:string"/>
        </xs:sequence>
        <xs:anyAttribute processContents="lax"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="AnyAttributeLax01">
      <ex:anyAttributeLax eyeColor="blue">
        <ex:firstName>Bobby</ex:firstName>
        <ex:lastName>Sox</ex:lastName>
      </ex:anyAttributeLax>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementReference" element="ex:customerName">
    <ex:typedef>
      <xs:element name="customerName" type="ex:CustomerName"/>
      <xs:element name="firstName" type="xs:string"/>
      <xs:element name="lastName" type="xs:string"/>
      <xs:complexType name="CustomerName">
        <xs:sequence>
          <xs:element ref="ex:firstName"/>
          <xs:element ref="ex:lastName"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ElementReference01">
      <ex:customerName>
        <ex:firstName>Bobby</ex:firstName>
        <ex:lastName>Sox</ex:lastName>
      </ex:customerName>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AttributeReference" element="ex:clientName">
    <ex:typedef>
      <xs:element name="clientName" type="ex:ClientName"/>
      <xs:attribute name="phoneNumber" type="xs:string"/>
      <xs:complexType name="ClientName">
        <xs:sequence>
          <xs:element name="firstName" type="xs:string"/>
          <xs:element name="lastName" type="xs:string"/>
        </xs:sequence>
        <xs:attribute ref="ex:phoneNumber"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="AttributeReference01">
      <ex:clientName ex:phoneNumber="0123456789">
        <ex:firstName>Bobby</ex:firstName>
        <ex:lastName>Sox</ex:lastName>
      </ex:clientName>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AttributeElementNameClash" element="ex:clientDetails">
    <ex:typedef>
      <xs:element name="clientDetails" type="ex:ClientDetails"/>
      <xs:complexType name="ClientDetails">
        <xs:sequence>
          <xs:element name="forename" type="xs:string"/>
          <xs:element name="surname" type="xs:string"/>
          <xs:element name="title" type="xs:string"/>
        </xs:sequence>
        <xs:attribute name="phone" type="xs:string"/>
        <xs:attribute name="title" type="xs:int"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="AttributeElementNameClash01">
      <ex:clientDetails phone="+15556667788" title="1">
        <ex:forename>Bobby</ex:forename>
        <ex:surname>Sox</ex:surname>
        <ex:title>Mr</ex:title>
      </ex:clientDetails>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ExtendedSequenceStrict" element="ex:extendedSequenceStrict">
    <ex:typedef>
      <xs:element name="extendedSequenceStrict" type="ex:ExtendedSequenceStrict"/>
      <xs:complexType name="ExtendedSequenceStrict">
        <xs:sequence>
          <xs:element name="firstName" type="xs:string"/>
          <xs:element name="lastName" type="xs:string"/>
          <xs:element name="extension" type="ex:StrictExtension" minOccurs="0"/>
        </xs:sequence>
      </xs:complexType>
      <xs:element name="title" type="xs:string"/>
      <xs:element name="middleName" type="xs:string"/>
      <xs:complexType name="StrictExtension">
        <xs:sequence>
          <xs:any processContents="strict" minOccurs="0" maxOccurs="unbounded"
            namespace="##targetNamespace"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ExtendedSequenceStrict01">
      <ex:extendedSequenceStrict>
        <ex:firstName>Bobby</ex:firstName>
        <ex:lastName>Sox</ex:lastName>
      </ex:extendedSequenceStrict>
    </ex:instance>
    <ex:instance xml:id="ExtendedSequenceStrict02">
      <ex:extendedSequenceStrict>
        <ex:firstName>Bobby</ex:firstName>
        <ex:lastName>Sox</ex:lastName>
        <ex:extension>
          <ex:middleName>William</ex:middleName>
          <ex:title>Mr</ex:title>
        </ex:extension>
      </ex:extendedSequenceStrict>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ExtendedSequenceLax" element="ex:extendedSequenceLax">
    <ex:typedef>
      <xs:element name="extendedSequenceLax" type="ex:ExtendedSequenceLax"/>
      <xs:complexType name="ExtendedSequenceLax">
        <xs:sequence>
          <xs:element name="firstName" type="xs:string"/>
          <xs:element name="lastName" type="xs:string"/>
          <xs:element name="extension" type="ex:LaxExtension" minOccurs="0"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="LaxExtension">
        <xs:sequence>
          <xs:any processContents="lax" minOccurs="0" maxOccurs="unbounded"
            namespace="##targetNamespace"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ExtendedSequenceLax01">
      <ex:extendedSequenceLax>
        <ex:firstName>Bobby</ex:firstName>
        <ex:lastName>Sox</ex:lastName>
      </ex:extendedSequenceLax>
    </ex:instance>
    <ex:instance xml:id="ExtendedSequenceLax02">
      <ex:extendedSequenceLax>
        <ex:firstName>Bobby</ex:firstName>
        <ex:lastName>Sox</ex:lastName>
        <ex:extension>
          <ex:middleName>William</ex:middleName>
          <ex:title>Mr</ex:title>
        </ex:extension>
      </ex:extendedSequenceLax>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ExtendedSequenceSkip" element="ex:extendedSequenceSkip">
    <ex:typedef>
      <xs:element name="extendedSequenceSkip" type="ex:ExtendedSequenceSkip"/>
      <xs:complexType name="ExtendedSequenceSkip">
        <xs:sequence>
          <xs:element name="firstName" type="xs:string"/>
          <xs:element name="lastName" type="xs:string"/>
          <xs:element name="extension" type="ex:SkipExtension" minOccurs="0"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="SkipExtension">
        <xs:sequence>
          <xs:any processContents="skip" minOccurs="0" maxOccurs="unbounded"
            namespace="##targetNamespace"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ExtendedSequenceSkip01">
      <ex:extendedSequenceSkip>
        <ex:firstName>Bobby</ex:firstName>
        <ex:lastName>Sox</ex:lastName>
      </ex:extendedSequenceSkip>
    </ex:instance>
    <ex:instance xml:id="ExtendedSequenceSkip02">
      <ex:extendedSequenceSkip>
        <ex:firstName>Bobby</ex:firstName>
        <ex:lastName>Sox</ex:lastName>
        <ex:extension>
          <ex:middleName>William</ex:middleName>
          <ex:title>Mr</ex:title>
        </ex:extension>
      </ex:extendedSequenceSkip>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementTypeDefaultNamespace" element="ex:stringElementDefaultNamespace">
    <ex:typedef>
      <xs:element xmlns="http://www.w3.org/2001/XMLSchema" name="stringElementDefaultNamespace"
        type="string"/>
    </ex:typedef>
    <ex:instance xml:id="ElementTypeDefaultNamespace01">
      <ex:stringElementDefaultNamespace/>
    </ex:instance>
    <ex:instance xml:id="ElementTypeDefaultNamespace02">
      <ex:stringElementDefaultNamespace>This is a string!</ex:stringElementDefaultNamespace>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="RestrictedStringMinLength" element="ex:restrictedStringMinLength">
    <ex:typedef>
      <xs:element name="restrictedStringMinLength" type="ex:RestrictedStringMinLength"/>
      <xs:simpleType name="RestrictedStringMinLength">
        <xs:restriction base="xs:string">
          <xs:minLength value="1"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="RestrictedStringMinLength01">
      <ex:restrictedStringMinLength>String Value</ex:restrictedStringMinLength>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="RestrictedStringMaxLength" element="ex:restrictedStringMaxLength">
    <ex:typedef>
      <xs:element name="restrictedStringMaxLength" type="ex:RestrictedStringMaxLength"/>
      <xs:simpleType name="RestrictedStringMaxLength">
        <xs:restriction base="xs:string">
          <xs:maxLength value="12"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="RestrictedStringMaxLength01">
      <ex:restrictedStringMaxLength>String Value</ex:restrictedStringMaxLength>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="RestrictedStringMinMaxLength" element="ex:restrictedStringMinMaxLength">
    <ex:typedef>
      <xs:element name="restrictedStringMinMaxLength" type="ex:RestrictedStringMinMaxLength"/>
      <xs:simpleType name="RestrictedStringMinMaxLength">
        <xs:restriction base="xs:string">
          <xs:minLength value="12"/>
          <xs:maxLength value="15"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="RestrictedStringMinMaxLength01">
      <ex:restrictedStringMinMaxLength>String Value 2</ex:restrictedStringMinMaxLength>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="BareVector" element="ex:bareVector">
    <ex:typedef>
      <xs:element name="bareVector" type="ex:BareVector"/>
      <xs:complexType name="BareVector">
        <xs:sequence>
          <xs:element name="item1" minOccurs="0" maxOccurs="unbounded" type="xs:string"/>
          <xs:element name="item2" minOccurs="0" maxOccurs="unbounded" type="xs:string"/>
          <xs:element name="item3" minOccurs="0" maxOccurs="unbounded" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="BareVector01">
      <ex:bareVector>
        <ex:item1>item one</ex:item1>
        <ex:item1>item two</ex:item1>
        <ex:item2>item three</ex:item2>
        <ex:item2>item four</ex:item2>
        <ex:item3>item five</ex:item3>
        <ex:item3>item six</ex:item3>
      </ex:bareVector>
    </ex:instance>
    <ex:instance xml:id="BareVector02">
      <ex:bareVector>
        <ex:item1>item one</ex:item1>
        <ex:item1>item two</ex:item1>
        <ex:item3>item three</ex:item3>
        <ex:item3>item four</ex:item3>
      </ex:bareVector>
    </ex:instance>
    <ex:instance xml:id="BareVector03">
      <ex:bareVector>
        <ex:item2>item one</ex:item2>
        <ex:item2>item two</ex:item2>
        <ex:item2>item three</ex:item2>
        <ex:item2>item four</ex:item2>
        <ex:item3>item five</ex:item3>
        <ex:item3>item six</ex:item3>
      </ex:bareVector>
    </ex:instance>
    <ex:instance xml:id="BareVector04">
      <ex:bareVector>
        <ex:item1>item one</ex:item1>
        <ex:item1>item two</ex:item1>
        <ex:item2>item three</ex:item2>
        <ex:item2>item four</ex:item2>
      </ex:bareVector>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ComplexTypeSequenceExtension" element="ex:complexTypeSequenceExtension">
    <ex:typedef>
      <xs:element name="complexTypeSequenceExtension" type="ex:ComplexTypeSequenceExtension"/>
      <xs:complexType name="ComplexTypeSequenceBase">
        <xs:sequence>
          <xs:element name="name" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="ComplexTypeSequenceExtension">
        <xs:complexContent>
          <xs:extension base="ex:ComplexTypeSequenceBase">
            <xs:sequence>
              <xs:element name="description" type="xs:string"/>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ComplexTypeSequenceExtension01">
      <ex:complexTypeSequenceExtension>
        <ex:name>Mary</ex:name>
        <ex:description>tall</ex:description>
      </ex:complexTypeSequenceExtension>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="TypeSubstitutionUsingXsiType" element="ex:assembly">
    <ex:typedef>
      <xs:element name="assembly" type="ex:Assembly"/>
      <xs:complexType name="Assembly">
        <xs:sequence>
          <xs:element name="part" minOccurs="0" maxOccurs="unbounded" type="ex:Part"/>
        </xs:sequence>
      </xs:complexType>
      <xs:element name="part" type="ex:Part"/>
      <xs:complexType name="Part">
        <xs:sequence>
          <xs:element name="number" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="Part2">
        <xs:complexContent>
          <xs:extension base="ex:Part">
            <xs:sequence>
              <xs:element name="description" type="xs:string"/>
            </xs:sequence>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="TypeSubstitutionUsingXsiType01">
      <ex:assembly>
        <ex:part>
          <ex:number>p1</ex:number>
        </ex:part>
        <ex:part xsi:type="ex:Part2">
          <ex:number>p2</ex:number>
          <ex:description>extended part</ex:description>
        </ex:part>
      </ex:assembly>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="IncludeRelative" element="ex:includeRelative">
    <ex:typedef>
      <xs:include schemaLocation="../static/RelativeIncluded.xsd"/>
    </ex:typedef>
  </ex:example>

  <ex:example xml:id="Include" element="ex:include">
    <ex:typedef>
      <xs:include
        schemaLocation="http://www.w3.org/2002/ws/databinding/examples/6/09/static/Included.xsd"/>
    </ex:typedef>
  </ex:example>

  <ex:example xml:id="SimpleTypeAttributes" element="ex:simpleTypeAttributes">
    <ex:typedef>
      <xs:element name="simpleTypeAttributes" type="ex:SimpleTypeAttributes"/>
      <xs:complexType name="SimpleTypeAttributes">
        <xs:simpleContent>
          <xs:extension base="xs:string">
            <xs:attribute name="a1" type="xs:string"/>
            <xs:attribute name="a2" type="xs:string"/>
          </xs:extension>
        </xs:simpleContent>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="SimpleTypeAttributes01">
      <ex:simpleTypeAttributes a1="foo" a2="bar">hello</ex:simpleTypeAttributes>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ChameleonInclude" element="ex:chameleonInclude">
    <ex:typedef>
      <xs:include
        schemaLocation="http://www.w3.org/2002/ws/databinding/examples/6/09/static/ChameleonIncluded.xsd"
      />
    </ex:typedef>
    <ex:instance xml:id="ChameleonInclude01">
      <ex:chameleonInclude>a different color</ex:chameleonInclude>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="PrecisionDecimal" element="ex:precisionDecimal">
    <ex:typedef>
      <xs:element name="precisionDecimal" type="ex:PrecisionDecimal"/>
      <xs:simpleType name="PrecisionDecimal">
        <xs:union>
          <xs:simpleType>
            <xs:restriction base="xs:decimal">
              <xs:totalDigits value="16"/>
            </xs:restriction>
          </xs:simpleType>
          <xs:simpleType>
            <xs:restriction base="xs:double"/>
          </xs:simpleType>
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="NaN"/>
              <xs:enumeration value="-INF"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:union>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="PrecisionDecimal01">
      <ex:precisionDecimal>1000.20</ex:precisionDecimal>
    </ex:instance>
    <ex:instance xml:id="PrecisionDecimal02">
      <ex:precisionDecimal>NaN</ex:precisionDecimal>
    </ex:instance>
    <ex:instance xml:id="PrecisionDecimal03">
      <ex:precisionDecimal>-INF</ex:precisionDecimal>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ExtendedSimpleType" element="ex:extendedSimpleType">
    <ex:typedef>
      <xs:element name="extendedSimpleType" type="ex:ExtendedSimpleType"/>
      <xs:complexType name="ExtendedSimpleType">
        <xs:simpleContent>
          <xs:extension base="xs:string"/>
        </xs:simpleContent>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ExtendedSimpleType01">
      <ex:extendedSimpleType>hello</ex:extendedSimpleType>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="SOAPEncodedArray" element="ex:soapEncodedArray">
    <ex:types>
      <xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/"
        elementFormDefault="qualified">
        <xs:import namespace="http://schemas.xmlsoap.org/soap/encoding/"
          schemaLocation="http://schemas.xmlsoap.org/soap/encoding/"/>
        <xs:element name="soapEncodedArray" type="ex:SOAPEncodedArray"/>
        <xs:complexType name="SOAPEncodedArray">
          <xs:complexContent>
            <xs:restriction base="soap11enc:Array">
              <xs:attribute ref="soap11enc:arrayType" wsdl11:arrayType="string[]"/>
            </xs:restriction>
          </xs:complexContent>
        </xs:complexType>
      </xs:schema>
    </ex:types>
    <ex:instance xml:id="SOAPEncodedArray01">
      <ex:soapEncodedArray/>
    </ex:instance>
  </ex:example>

  <!--

      <s:simpleType name="guid">
        <s:restriction base="s:string">
          <s:pattern value="[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}" />
        </s:restriction>
      </s:simpleType>

      -->

  <!--

      GlobalElementComplexTypeEmptyExtension

      <s:element name="SendRebootRequestToDeviceResponse">
        <s:complexType>
          <s:complexContent mixed="false">
            <s:extension base="s4:BaseResponse" />
          </s:complexContent>
        </s:complexType>
      </s:element>

      <s:complexType name="AttributedURI">
        <s:simpleContent>
          <s:extension base="s:anyURI">
            <s:anyAttribute />
          </s:extension>
        </s:simpleContent>
      </s:complexType>


      -->

  <ex:example xml:id="SequenceMinOccurs1" element="ex:sequenceMinOccurs1">
    <ex:typedef>
      <xs:element name="sequenceMinOccurs1" type="ex:SequenceMinOccurs1"/>
      <xs:complexType name="SequenceMinOccurs1">
        <xs:sequence minOccurs="1">
          <xs:element name="sequenceMinOccurs1item" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="SequenceMinOccurs101">
      <ex:sequenceMinOccurs1>
        <ex:sequenceMinOccurs1item>item1</ex:sequenceMinOccurs1item>
      </ex:sequenceMinOccurs1>
    </ex:instance>
  </ex:example>


  <ex:example xml:id="SequenceMinOccursFinite" element="ex:articleColors">
    <ex:typedef>
      <xs:element name="articleColors" type="ex:ArticleColors"/>
      <xs:complexType name="ArticleColors">
        <xs:sequence minOccurs="2" maxOccurs="unbounded">
          <xs:element name="articleColor" type="xs:string"/>
          <xs:element name="articleContrast" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="SequenceMinOccursFinite01">
      <ex:articleColors>
        <ex:articleColor>Red</ex:articleColor>
        <ex:articleContrast>Bright</ex:articleContrast>
        <ex:articleColor>Black</ex:articleColor>
        <ex:articleContrast>Bright</ex:articleContrast>
        <ex:articleColor>White</ex:articleColor>
        <ex:articleContrast>Low</ex:articleContrast>
        <ex:articleColor>Yellow</ex:articleColor>
        <ex:articleContrast>Normal</ex:articleContrast>
      </ex:articleColors>
    </ex:instance>
    <ex:instance xml:id="SequenceMinOccursFinite02">
      <ex:articleColors>
        <ex:articleColor>Black</ex:articleColor>
        <ex:articleContrast>Normal</ex:articleContrast>
        <ex:articleColor>White</ex:articleColor>
        <ex:articleContrast>Bright</ex:articleContrast>
      </ex:articleColors>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="SequenceMaxOccurs1" element="ex:myAgeDetails">
    <ex:typedef>
      <xs:element name="myAgeDetails" type="ex:MyAgeDetails"/>
      <xs:complexType name="MyAgeDetails">
        <xs:sequence maxOccurs="1">
          <xs:element name="myAge" type="xs:short"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="SequenceMaxOccurs101">
      <ex:myAgeDetails>
        <ex:myAge>44</ex:myAge>
      </ex:myAgeDetails>
    </ex:instance>
    <ex:instance xml:id="SequenceMaxOccurs102">
      <ex:myAgeDetails>
        <ex:myAge>4</ex:myAge>
      </ex:myAgeDetails>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementMinOccurs0MaxOccursFinite" element="ex:colorList">
    <ex:typedef>
      <xs:element name="colorList" type="ex:ColorList"/>
      <xs:complexType name="ColorList">
        <xs:sequence>
          <xs:element name="colorValue" type="xs:string" minOccurs="0" maxOccurs="2"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ElementMinOccurs0MaxOccursFinite101">
      <ex:colorList/>
    </ex:instance>
    <ex:instance xml:id="ElementMinOccurs0MaxOccursFinite102">
      <ex:colorList>
        <ex:colorValue>red</ex:colorValue>
        <ex:colorValue>green</ex:colorValue>
      </ex:colorList>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementMinOccurs0MaxOccursUnbounded" element="ex:durationList">
    <ex:typedef>
      <xs:element name="durationList" type="ex:DurationList"/>
      <xs:complexType name="DurationList">
        <xs:sequence>
          <xs:element name="durationValue" type="xs:short" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ElementMinOccurs0MaxOccursUnbounded101">
      <ex:durationList/>
    </ex:instance>
    <ex:instance xml:id="ElementMinOccurs0MaxOccursUnbounded102">
      <ex:durationList>
        <ex:durationValue>24</ex:durationValue>
        <ex:durationValue>34</ex:durationValue>
        <ex:durationValue>44</ex:durationValue>
      </ex:durationList>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="SequenceMinOccurs0MaxOccursUnbounded" element="ex:durationListSequence">
    <ex:typedef>
      <xs:element name="durationListSequence" type="ex:DurationListSequence"/>
      <xs:complexType name="DurationListSequence">
        <xs:sequence minOccurs="0" maxOccurs="unbounded">
          <xs:element name="durationVal" type="xs:string"/>
          <xs:element name="durationPercentage" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="SequenceMinOccurs0MaxOccursUnbounded101">
      <ex:durationListSequence>
        <ex:durationVal>44</ex:durationVal>
        <ex:durationPercentage>33</ex:durationPercentage>
        <ex:durationVal>24</ex:durationVal>
        <ex:durationPercentage>45</ex:durationPercentage>
        <ex:durationVal>64</ex:durationVal>
        <ex:durationPercentage>22</ex:durationPercentage>
      </ex:durationListSequence>
    </ex:instance>
    <ex:instance xml:id="SequenceMinOccurs0MaxOccursUnbounded102">
      <ex:durationListSequence/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementMinOccurs1MaxOccursUnbounded" element="ex:ageList">
    <ex:typedef>
      <xs:element name="ageList" type="ex:AgeList"/>
      <xs:complexType name="AgeList">
        <xs:sequence>
          <xs:element name="ageValue" type="xs:short" minOccurs="1" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ElementMinOccurs1MaxOccursUnbounded101">
      <ex:ageList>
        <ex:ageValue>44</ex:ageValue>
      </ex:ageList>
    </ex:instance>
    <ex:instance xml:id="ElementMinOccurs1MaxOccursUnbounded102">
      <ex:ageList>
        <ex:ageValue>24</ex:ageValue>
        <ex:ageValue>34</ex:ageValue>
        <ex:ageValue>44</ex:ageValue>
      </ex:ageList>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="SequenceMinOccurs1MaxOccursUnbounded" element="ex:ageListSequence">
    <ex:typedef>
      <xs:element name="ageListSequence" type="ex:AgeListSequence"/>
      <xs:complexType name="AgeListSequence">
        <xs:sequence minOccurs="1" maxOccurs="unbounded">
          <xs:element name="ageVal" type="xs:string"/>
          <xs:element name="agePercentage" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="SequenceMinOccurs1MaxOccursUnbounded101">
      <ex:ageListSequence>
        <ex:ageVal>44</ex:ageVal>
        <ex:agePercentage>33</ex:agePercentage>
        <ex:ageVal>24</ex:ageVal>
        <ex:agePercentage>45</ex:agePercentage>
        <ex:ageVal>64</ex:ageVal>
        <ex:agePercentage>22</ex:agePercentage>
      </ex:ageListSequence>
    </ex:instance>
    <ex:instance xml:id="SequenceMinOccurs1MaxOccursUnbounded102">
      <ex:ageListSequence>
        <ex:ageVal>44</ex:ageVal>
        <ex:agePercentage>33</ex:agePercentage>
      </ex:ageListSequence>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="SequenceMaxOccursUnbounded" element="ex:bookPublications"
    pattern="SequenceMinOccurs1MaxOccursUnbounded">
    <ex:typedef>
      <xs:element name="bookPublications" type="ex:BookPublications"/>
      <xs:complexType name="BookPublications">
        <xs:sequence maxOccurs="unbounded">
          <xs:element name="pubDate" type="xs:string"/>
          <xs:element name="pubISBN" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="SequenceMaxOccursUnbounded01">
      <ex:bookPublications>
        <ex:pubDate>2002-09-24</ex:pubDate>
        <ex:pubISBN>1-55960-907-6</ex:pubISBN>
        <ex:pubDate>2003-04-14</ex:pubDate>
        <ex:pubISBN>1-25466-908-6</ex:pubISBN>
        <ex:pubDate>2004-03-31</ex:pubDate>
        <ex:pubISBN>1-35460-909-6</ex:pubISBN>
        <ex:pubDate>2005-06-04</ex:pubDate>
        <ex:pubISBN>1-54560-910-6</ex:pubISBN>
        <ex:pubDate>2006-07-03</ex:pubDate>
        <ex:pubISBN>1-74869-911-6</ex:pubISBN>
      </ex:bookPublications>
    </ex:instance>
    <ex:instance xml:id="SequenceMaxOccursUnbounded02">
      <ex:bookPublications>
        <ex:pubDate>2006-01-26</ex:pubDate>
        <ex:pubISBN>1-44795-912-6</ex:pubISBN>
      </ex:bookPublications>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="SequenceMaxOccursFinite" element="ex:winter">
    <ex:typedef>
      <xs:element name="winter" type="ex:Winter"/>
      <xs:complexType name="Winter">
        <xs:sequence maxOccurs="4">
          <xs:element name="mnth" type="xs:string"/>
          <xs:element name="weather" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="SequenceMaxOccursFinite01">
      <ex:winter>
        <ex:mnth>November</ex:mnth>
        <ex:weather>Rain</ex:weather>
        <ex:mnth>December</ex:mnth>
        <ex:weather>Snow</ex:weather>
        <ex:mnth>January</ex:mnth>
        <ex:weather>Snow</ex:weather>
        <ex:mnth>February</ex:mnth>
        <ex:weather>Rain</ex:weather>
      </ex:winter>
    </ex:instance>
    <ex:instance xml:id="SequenceMaxOccursFinite02">
      <ex:winter>
        <ex:mnth>December</ex:mnth>
        <ex:weather>Snow</ex:weather>
      </ex:winter>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="SequenceMinOccurs0" element="ex:sequenceMinOccurs0">
    <ex:typedef>
      <xs:element name="sequenceMinOccurs0" type="ex:SequenceMinOccurs0"/>
      <xs:complexType name="SequenceMinOccurs0">
        <xs:sequence minOccurs="0">
          <xs:element name="firstName" type="xs:string"/>
          <xs:element name="middleName" type="xs:string"/>
          <xs:element name="lastName" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="SequenceMinOccurs001">
      <ex:sequenceMinOccurs0>
        <ex:firstName>Paul</ex:firstName>
        <ex:middleName>Sumner</ex:middleName>
        <ex:lastName>Downey</ex:lastName>
      </ex:sequenceMinOccurs0>
    </ex:instance>
    <ex:instance xml:id="SequenceMinOccurs002">
      <ex:sequenceMinOccurs0/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="SequenceSequenceElement" element="ex:sequenceSequenceElement">
    <ex:typedef>
      <xs:element name="sequenceSequenceElement" type="ex:SequenceSequenceElement"/>
      <xs:complexType name="SequenceSequenceElement">
        <xs:sequence>
          <xs:element name="firstName" type="xs:string"/>
          <xs:sequence minOccurs="0">
            <xs:element name="middleName" type="xs:string"/>
            <xs:sequence minOccurs="0">
              <xs:element name="lastName" type="xs:string"/>
            </xs:sequence>
          </xs:sequence>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="SequenceSequenceElement01">
      <ex:sequenceSequenceElement>
        <ex:firstName>Paul</ex:firstName>
      </ex:sequenceSequenceElement>
    </ex:instance>
    <ex:instance xml:id="SequenceSequenceElement02">
      <ex:sequenceSequenceElement>
        <ex:firstName>Paul</ex:firstName>
        <ex:middleName>Sumner</ex:middleName>
      </ex:sequenceSequenceElement>
    </ex:instance>
    <ex:instance xml:id="SequenceSequenceElement03">
      <ex:sequenceSequenceElement>
        <ex:firstName>Paul</ex:firstName>
        <ex:middleName>Sumner</ex:middleName>
        <ex:lastName>Downey</ex:lastName>
      </ex:sequenceSequenceElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="DecimalSimpleTypeTotalDigits" element="ex:decimalSimpleTypeTotalDigits">
    <ex:typedef>
      <xs:element name="decimalSimpleTypeTotalDigits" type="ex:DecimalSimpleTypeTotalDigits"/>
      <xs:simpleType name="DecimalSimpleTypeTotalDigits">
        <xs:restriction base="xs:decimal">
          <xs:totalDigits value="5"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="DecimalSimpleTypeTotalDigits01">
      <ex:decimalSimpleTypeTotalDigits>1234</ex:decimalSimpleTypeTotalDigits>
    </ex:instance>
    <ex:instance xml:id="DecimalSimpleTypeTotalDigits02">
      <ex:decimalSimpleTypeTotalDigits>12345</ex:decimalSimpleTypeTotalDigits>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="DecimalSimpleTypeFractionDigits" element="ex:decimalSimpleTypeFractionDigits">
    <ex:typedef>
      <xs:element name="decimalSimpleTypeFractionDigits" type="ex:DecimalSimpleTypeFractionDigits"/>
      <xs:simpleType name="DecimalSimpleTypeFractionDigits">
        <xs:restriction base="xs:decimal">
          <xs:fractionDigits value="2"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="DecimalSimpleTypeFractionDigits01">
      <ex:decimalSimpleTypeFractionDigits>1234.00</ex:decimalSimpleTypeFractionDigits>
    </ex:instance>
    <ex:instance xml:id="DecimalSimpleTypeFractionDigits02">
      <ex:decimalSimpleTypeFractionDigits>1234</ex:decimalSimpleTypeFractionDigits>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AttributeTypeReference" element="ex:attributeTypeReference">
    <ex:typedef>
      <xs:element name="attributeTypeReference" type="ex:AttributeTypeReference"/>
      <xs:simpleType name="SimpleType">
        <xs:restriction base="xs:string">
          <xs:enumeration value="value1"/>
          <xs:enumeration value="value2"/>
        </xs:restriction>
      </xs:simpleType>
      <xs:complexType name="AttributeTypeReference">
        <xs:sequence>
          <xs:element name="element" type="xs:string"/>
        </xs:sequence>
        <xs:attribute name="attr" type="ex:SimpleType"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="AttributeTypeReference01">
      <ex:attributeTypeReference attr="value1">
        <ex:element>string</ex:element>
      </ex:attributeTypeReference>  
    </ex:instance>
    <ex:instance xml:id="AttributeTypeReference02">
      <ex:attributeTypeReference attr="value2">
        <ex:element>string</ex:element>
      </ex:attributeTypeReference>  
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementTypeReference" element="ex:elementTypeReference">
    <ex:typedef>
      <xs:element name="elementTypeReference" type="ex:ElementTypeReference"/>
      <xs:complexType name="ElementTypeReferenced">
        <xs:sequence>
          <xs:element name="referenced" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="ElementTypeReference">
        <xs:sequence>
          <xs:element name="text" type="ex:ElementTypeReferenced"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ElementTypeReference01">
      <ex:elementTypeReference>
        <ex:text>
          <ex:referenced>foo</ex:referenced>
        </ex:text>
      </ex:elementTypeReference>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="LocalElementComplexType" element="ex:localElementComplexType">
    <ex:typedef>
      <xs:element name="localElementComplexType" type="ex:LocalElementComplexType"/>
      <xs:complexType name="LocalElementComplexType">
        <xs:sequence>
          <xs:element name="name">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="firstName" type="xs:string"/>
                <xs:element name="lastName" type="xs:string"/>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="LocalElementComplexType01">
      <ex:localElementComplexType>
        <ex:name>
          <ex:firstName>Paul</ex:firstName>
          <ex:lastName>Paul</ex:lastName>
        </ex:name>
      </ex:localElementComplexType>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="Id" element="ex:idExample" pattern="Id">
    <ex:typedef>
      <xs:element name="idExample" type="ex:IdExample" id="node1"/>
      <xs:complexType name="IdExample" id="node2">
        <xs:sequence id="node3">
          <xs:element name="text" type="xs:string" minOccurs="0" id="node4"/>
        </xs:sequence>
        <xs:attribute name="string" type="xs:string" id="node5"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="IdExample01">
      <ex:idExample string="hello"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AttributeGroup" element="ex:attributeGroup">
    <ex:typedef>
      <xs:element name="attributeGroup" type="ex:AttributeGroup"/>
      <xs:complexType name="AttributeGroup">
        <xs:sequence>
          <xs:element name="contract" type="xs:string"/>
        </xs:sequence>
        <xs:attributeGroup ref="ex:CommonAttributes"/>
      </xs:complexType>
      <xs:attributeGroup name="CommonAttributes">
        <xs:attribute name="id" type="xs:ID" use="optional" form="unqualified"/>
      </xs:attributeGroup>
    </ex:typedef>
    <ex:instance xml:id="AttributeGroup01">
      <ex:attributeGroup id="AttributeGroup_contract_001">
        <ex:contract>12345678910</ex:contract>
      </ex:attributeGroup>
    </ex:instance>
    <ex:instance xml:id="AttributeGroup02">
      <ex:attributeGroup>
        <ex:contract>9876543210</ex:contract>
      </ex:attributeGroup>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementFormQualified" element="ex:elementFormQualified">
    <ex:typedef>
      <xs:element name="elementFormQualified" type="ex:ElementFormQualified"/>
      <xs:complexType name="ElementFormQualified">
        <xs:sequence>
          <xs:element name="premium" type="xs:string" form="qualified"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ElementFormQualified01">
      <ex:elementFormQualified>
        <ex:premium>1175</ex:premium>
      </ex:elementFormQualified>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NotNillableElement" element="ex:notNillableElement">
    <ex:typedef>
      <xs:element name="notNillableElement" type="ex:NotNillableElement"/>
      <xs:complexType name="NotNillableElement">
        <xs:sequence>
          <xs:element name="notNillableElement" type="xs:string" nillable="false"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="NotNillableElement01">
      <ex:notNillableElement>
        <ex:notNillableElement>Stuff</ex:notNillableElement>
      </ex:notNillableElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="NotMixed" element="ex:notMixed">
    <ex:typedef>
      <xs:element name="notMixed" type="ex:NotMixed"/>
      <xs:complexType name="NotMixed" mixed="false">
        <xs:sequence>
          <xs:element name="notMixedElement" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="NotMixedExample01">
      <ex:notMixed>
        <ex:notMixedElement>Stuff</ex:notMixedElement>
      </ex:notMixed>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AttributeFormUnqualified" element="ex:attributeFormUnqualified">
    <ex:typedef>
      <xs:element name="attributeFormUnqualified" type="ex:AttributeFormUnqualified"/>
      <xs:complexType name="AttributeFormUnqualified">
        <xs:sequence>
          <xs:element name="premium" type="xs:string"/>
        </xs:sequence>
        <xs:attribute name="id" type="xs:string" form="unqualified"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="AttributeFormUnqualifiedExample01">
      <ex:attributeFormUnqualified id="id01">
        <ex:premium>1175</ex:premium>
      </ex:attributeFormUnqualified>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ComplexTypeConcrete" element="ex:complexTypeConcrete">
    <ex:typedef>
      <xs:element name="complexTypeConcrete" type="ex:ComplexTypeConcrete"/>
      <xs:complexType name="ComplexTypeConcrete" abstract="false">
        <xs:sequence>
          <xs:element name="premium" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ComplexTypeConcreteExample01">
      <ex:complexTypeConcrete>
        <ex:premium>1175</ex:premium>
      </ex:complexTypeConcrete>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalComplexType" element="ex:globalComplexType">
    <ex:typedef>
      <xs:element name="globalComplexType" type="ex:GlobalComplexType"/>
      <xs:complexType name="GlobalComplexType">
        <xs:sequence>
          <xs:element name="premium" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="GlobalComplexTypeExample01">
      <ex:globalComplexType>
        <ex:premium>1175</ex:premium>
      </ex:globalComplexType>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalComplexTypeAbstract" element="ex:globalComplexTypeAbstract">
    <ex:typedef>
      <xs:element name="globalComplexTypeAbstract" type="ex:GlobalComplexTypeAbstract"/>
      <xs:complexType name="GlobalComplexTypeExtra" abstract="true">
        <xs:sequence>
          <xs:element name="premium" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="GlobalComplexTypeAbstract">
        <xs:complexContent>
          <xs:extension base="ex:GlobalComplexTypeExtra"/>
        </xs:complexContent>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="GlobalComplexTypeAbstractExample01">
      <ex:globalComplexTypeAbstract>
        <ex:premium>1175</ex:premium>
      </ex:globalComplexTypeAbstract>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalElementConcrete" element="ex:globalElementConcrete">
    <ex:typedef>
      <xs:element name="globalElementConcrete" type="xs:string" abstract="false"/>
    </ex:typedef>
    <ex:instance xml:id="GlobalElementConcreteExample01">
      <ex:globalElementConcrete>Stuff</ex:globalElementConcrete>
    </ex:instance>
  </ex:example>
  <ex:example xml:id="GlobalElementBlock" element="ex:globalElementBlock">
    <ex:typedef>
      <xs:element name="globalElementBlock" type="xs:string" block="#all"/>
    </ex:typedef>
    <ex:instance xml:id="GlobalElementBlockExample01">
      <ex:globalElementBlock>Stuff</ex:globalElementBlock>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalElementFinal" element="ex:globalElementFinal">
    <ex:typedef>
      <xs:element name="globalElementFinal" type="xs:string" final="#all"/>
    </ex:typedef>
    <ex:instance xml:id="GlobalElementFinalExample01">
      <ex:globalElementFinal>Stuff</ex:globalElementFinal>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalComplexTypeBlock" element="ex:globalComplexTypeBlock">
    <ex:typedef>
      <xs:element name="globalComplexTypeBlock" type="ex:BlockAll"/>
      <xs:complexType name="BlockAll" block="#all">
        <xs:sequence>
          <xs:element name="amount" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="GlobalComplexTypeBlockExample01">
      <ex:globalComplexTypeBlock>
        <ex:amount>1175</ex:amount>
      </ex:globalComplexTypeBlock>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ComplexTypeAttribute" element="ex:complexTypeAttribute">
    <ex:typedef>
      <xs:element name="complexTypeAttribute" type="ex:ComplexTypeAttribute"/>
      <xs:complexType name="ComplexTypeAttribute">
        <xs:sequence>
          <xs:element name="premium" type="xs:string"/>
        </xs:sequence>
        <xs:attribute name="id" type="xs:string"/>
        <xs:attribute name="currency" type="xs:string"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ComplexTypeAttribute01">
      <ex:complexTypeAttribute id="1711" currency="EUR">
        <ex:premium>a1250</ex:premium>
      </ex:complexTypeAttribute>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ComplexTypeAttributeExtension" element="ex:complexTypeAttributeExtension">
    <ex:typedef>
      <xs:element name="complexTypeAttributeExtension" type="ex:ComplexTypeAttributeExtension"/>
      <xs:complexType name="ComplexTypeAttributeBase">
        <xs:sequence>
          <xs:element name="name" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="ComplexTypeAttributeExtension">
        <xs:complexContent>
          <xs:extension base="ex:ComplexTypeAttributeBase">
            <xs:attribute name="gender" type="xs:string"/>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ComplexTypeAttributeExtension01">
      <ex:complexTypeAttributeExtension gender="female">
        <ex:name>Mary</ex:name>
      </ex:complexTypeAttributeExtension>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ByteSimpleTypePattern" element="ex:byteSimpleTypePattern">
    <ex:typedef>
      <xs:element name="byteSimpleTypePattern" type="ex:ByteSimpleTypePattern"/>
      <xs:simpleType name="ByteSimpleTypePattern">
        <xs:restriction base="xs:byte">
          <xs:pattern value="1"/>
          <xs:pattern value="2"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="ByteSimpleTypePattern01">
      <ex:byteSimpleTypePattern>1</ex:byteSimpleTypePattern>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ChoiceMaxOccursFinite" element="ex:choiceMaxOccursFinite">
    <ex:typedef>
      <xs:element name="choiceMaxOccursFinite" type="ex:ChoiceMaxOccursFinite"/>
      <xs:complexType name="ChoiceMaxOccursFinite">
        <xs:choice maxOccurs="2">
          <xs:element name="choiceA" type="xs:string"/>
          <xs:element name="choiceB" type="xs:string"/>
        </xs:choice>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ChoiceMaxOccursFinite01">
      <ex:choiceMaxOccursFinite>
        <ex:choiceA>first</ex:choiceA>
        <ex:choiceB>second</ex:choiceB>
      </ex:choiceMaxOccursFinite>
    </ex:instance>
    <ex:instance xml:id="ChoiceMaxOccursFinite02">
      <ex:choiceMaxOccursFinite>
        <ex:choiceA>first</ex:choiceA>
        <ex:choiceA>second</ex:choiceA>
      </ex:choiceMaxOccursFinite>
    </ex:instance>
    <ex:instance xml:id="ChoiceMaxOccursFinite03">
      <ex:choiceMaxOccursFinite>
        <ex:choiceA>only</ex:choiceA>
      </ex:choiceMaxOccursFinite>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ChoiceMaxOccursUnbounded" element="ex:choiceMaxOccursUnbounded">
    <ex:typedef>
      <xs:element name="choiceMaxOccursUnbounded" type="ex:ChoiceMaxOccursUnbounded"/>
      <xs:complexType name="ChoiceMaxOccursUnbounded">
        <xs:choice maxOccurs="unbounded">
          <xs:element name="choiceA" type="xs:string"/>
          <xs:element name="choiceB" type="xs:string"/>
        </xs:choice>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ChoiceMaxOccursUnbounded01">
      <ex:choiceMaxOccursUnbounded>
        <ex:choiceB>1st</ex:choiceB>
        <ex:choiceB>2nd</ex:choiceB>
        <ex:choiceB>3rd</ex:choiceB>
      </ex:choiceMaxOccursUnbounded>
    </ex:instance>
    <ex:instance xml:id="ChoiceMaxOccursUnbounded02">
      <ex:choiceMaxOccursUnbounded>
        <ex:choiceA>first</ex:choiceA>
        <ex:choiceA>second</ex:choiceA>
      </ex:choiceMaxOccursUnbounded>
    </ex:instance>
    <ex:instance xml:id="ChoiceMaxOccursUnbounded03">
      <ex:choiceMaxOccursUnbounded>
        <ex:choiceA>1st</ex:choiceA>
        <ex:choiceB>second</ex:choiceB>
        <ex:choiceA>3rd</ex:choiceA>
      </ex:choiceMaxOccursUnbounded>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ChoiceMinOccurs0" element="ex:choiceMinOccurs0">
    <ex:typedef>
      <xs:element name="choiceMinOccurs0" type="ex:ChoiceMinOccurs0"/>
      <xs:complexType name="ChoiceMinOccurs0">
        <xs:choice minOccurs="0">
          <xs:element name="AChoiceMinOccurs0" type="xs:string"/>
          <xs:element name="BChoiceMinOccurs0" type="xs:string"/>
        </xs:choice>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ChoiceMinOccurs001">
      <ex:choiceMinOccurs0>
        <ex:AChoiceMinOccurs0>A</ex:AChoiceMinOccurs0>
      </ex:choiceMinOccurs0>
    </ex:instance>
    <ex:instance xml:id="ChoiceMinOccurs002">
      <ex:choiceMinOccurs0>
        <ex:BChoiceMinOccurs0>B</ex:BChoiceMinOccurs0>
      </ex:choiceMinOccurs0>
    </ex:instance>
    <ex:instance xml:id="ChoiceMinOccurs003">
      <ex:choiceMinOccurs0/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ChoiceMinOccursFinite" element="ex:choiceMinOccursFinite">
    <ex:typedef>
      <xs:element name="choiceMinOccursFinite" type="ex:ChoiceMinOccursFinite"/>
      <xs:complexType name="ChoiceMinOccursFinite">
        <xs:choice minOccurs="2" maxOccurs="2">
          <xs:element name="AChoiceMinOccursFinite" type="xs:string"/>
          <xs:element name="BChoiceMinOccursFinite" type="xs:string"/>
        </xs:choice>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ChoiceMinOccursFinite01">
      <ex:choiceMinOccursFinite>
        <ex:AChoiceMinOccursFinite>A</ex:AChoiceMinOccursFinite>
        <ex:AChoiceMinOccursFinite>AA</ex:AChoiceMinOccursFinite>
      </ex:choiceMinOccursFinite>
    </ex:instance>
    <ex:instance xml:id="ChoiceMinOccursFinite02">
      <ex:choiceMinOccursFinite>
        <ex:BChoiceMinOccursFinite>B</ex:BChoiceMinOccursFinite>
        <ex:AChoiceMinOccursFinite>BA</ex:AChoiceMinOccursFinite>
      </ex:choiceMinOccursFinite>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ChoiceElement" element="ex:choiceElement">
    <ex:typedef>
      <xs:element name="choiceElement" type="ex:ChoiceElement"/>
      <xs:complexType name="ChoiceElement">
        <xs:choice>
          <xs:element name="AChoiceElement" type="xs:string"/>
          <xs:element name="BChoiceElement" type="xs:string"/>
        </xs:choice>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ChoiceElement01">
      <ex:choiceElement>
        <ex:AChoiceElement>A</ex:AChoiceElement>
      </ex:choiceElement>
    </ex:instance>
    <ex:instance xml:id="ChoiceElement02">
      <ex:choiceElement>
        <ex:BChoiceElement>B</ex:BChoiceElement>
      </ex:choiceElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ChoiceChoice" element="ex:choiceChoice">
    <ex:typedef>
      <xs:element name="choiceChoice" type="ex:ChoiceChoice"/>
      <xs:complexType name="ChoiceChoice">
        <xs:choice>
          <xs:element name="Avalue" type="xs:string"/>
          <xs:choice>
            <xs:element name="Bvalue" type="xs:string"/>
            <xs:element name="Cvalue" type="xs:string"/>
          </xs:choice>
        </xs:choice>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ChoiceChoice01">
      <ex:choiceChoice>
        <ex:Avalue>home</ex:Avalue>
      </ex:choiceChoice>
    </ex:instance>
    <ex:instance xml:id="ChoiceChoice02">
      <ex:choiceChoice>
        <ex:Bvalue>home</ex:Bvalue>
      </ex:choiceChoice>
    </ex:instance>
    <ex:instance xml:id="ChoiceChoice03">
      <ex:choiceChoice>
        <ex:Cvalue>home</ex:Cvalue>
      </ex:choiceChoice>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ChoiceSequence" element="ex:choiceSequence">
    <ex:typedef>
      <xs:element name="choiceSequence" type="ex:ChoiceSequenceType"/>
      <xs:complexType name="ChoiceSequenceType">
        <xs:choice>
          <xs:element name="Avalue" type="xs:string"/>
          <xs:sequence>
            <xs:element name="Bvalue" type="xs:string"/>
            <xs:element name="Cvalue" type="xs:string"/>
          </xs:sequence>
        </xs:choice>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ChoiceSequence01">
      <ex:choiceSequence>
        <ex:Avalue>home</ex:Avalue>
      </ex:choiceSequence>
    </ex:instance>
    <ex:instance xml:id="ChoiceSequence02">
      <ex:choiceSequence>
        <ex:Bvalue>home</ex:Bvalue>
        <ex:Cvalue>home</ex:Cvalue>
      </ex:choiceSequence>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="SequenceChoice" element="ex:sequenceChoice">
    <ex:typedef>
      <xs:element name="sequenceChoice" type="ex:SequenceChoiceType"/>
      <xs:complexType name="SequenceChoiceType">
        <xs:sequence>
          <xs:choice>
            <xs:element name="Avalue" type="xs:string"/>
            <xs:element name="Bvalue" type="xs:string"/>
          </xs:choice>
          <xs:element name="Cvalue" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="SequenceChoice01">
      <ex:sequenceChoice>
        <ex:Avalue>home</ex:Avalue>
        <ex:Cvalue>home</ex:Cvalue>
      </ex:sequenceChoice>
    </ex:instance>
    <ex:instance xml:id="SequenceChoice02">
      <ex:sequenceChoice>
        <ex:Bvalue>home</ex:Bvalue>
        <ex:Cvalue>home</ex:Cvalue>
      </ex:sequenceChoice>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementGroup" element="ex:elementGroup">
    <ex:typedef>
      <xs:element name="elementGroup" type="ex:ElementGroup"/>
      <xs:complexType name="ElementGroup">
        <xs:sequence>
          <xs:group ref="ex:ElementGroupGroup"/>
        </xs:sequence>
      </xs:complexType>
      <xs:group name="ElementGroupGroup">
        <xs:sequence>
          <xs:element name="value1" type="xs:string"/>
          <xs:element name="value2" type="xs:string"/>
        </xs:sequence>
      </xs:group>
    </ex:typedef>
    <ex:instance xml:id="ElementGroup01">
      <ex:elementGroup>
        <ex:value1>foo</ex:value1>
        <ex:value2>bar</ex:value2>
      </ex:elementGroup>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="Unique" element="ex:unique">
    <ex:typedef>
      <xs:element name="unique" type="ex:Unique">
        <xs:unique name="nameUniqueness">
          <xs:selector xpath="ex:character"/>
          <xs:field xpath="ex:name"/>
        </xs:unique>
      </xs:element>
      <xs:complexType name="Unique">
        <xs:sequence>
          <xs:element name="character" maxOccurs="unbounded">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="unbounded"/>
                <xs:element name="age" type="xs:string" minOccurs="0"/>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="Unique01">
      <ex:unique>
        <ex:character>
          <ex:name>String</ex:name>
          <ex:age>String</ex:age>
        </ex:character>
      </ex:unique>

    </ex:instance>
  </ex:example>

  <ex:example xml:id="TokenSimpleTypePattern" element="ex:tokenSimpleTypePattern">
    <ex:typedef>
      <xs:element name="tokenSimpleTypePattern" type="ex:TokenSimpleTypePattern"/>
      <xs:simpleType name="TokenSimpleTypePattern">
        <xs:restriction base="xs:token">
          <xs:pattern value="1"/>
          <xs:pattern value="2"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="TokenSimpleTypePattern01">
      <ex:tokenSimpleTypePattern>1</ex:tokenSimpleTypePattern>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AppinfoElement" element="ex:appinfoElement">
    <ex:typedef>
      <xs:element name="appinfoElement" type="xs:string">
        <xs:annotation>
          <xs:appinfo>This is some Appinfo</xs:appinfo>
        </xs:annotation>
      </xs:element>
    </ex:typedef>
    <ex:instance xml:id="AppinfoElement01">
      <ex:appinfoElement>some info</ex:appinfoElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ComplexTypeOnlyAttributeGroup" element="ex:complexTypeOnlyAttributeGroup">
    <ex:typedef>
      <xs:element name="complexTypeOnlyAttributeGroup" type="ex:ComplexTypeOnlyAttributeGroup"/>
      <xs:complexType name="ComplexTypeOnlyAttributeGroup">
        <xs:attributeGroup ref="ex:CommonOnlyAttributeGroup"/>
      </xs:complexType>
      <xs:attributeGroup name="CommonOnlyAttributeGroup">
        <xs:attribute name="id" type="xs:ID" use="optional" form="unqualified"/>
      </xs:attributeGroup>
    </ex:typedef>
    <ex:instance xml:id="ComplexTypeOnlyAttributeGroup01">
      <ex:complexTypeOnlyAttributeGroup id="AttributeGroup_contract_001"/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="SubstitutionGroup" element="ex:substitutionGroup">
    <ex:typedef>
      <xs:element name="substitutionGroup" type="xs:string"/>
      <xs:element name="substitutionElement" substitutionGroup="ex:substitutionGroup"/>
    </ex:typedef>
    <ex:instance xml:id="SubstitutionGroup01">
      <ex:substitutionElement>String</ex:substitutionElement>
    </ex:instance>
    <ex:instance xml:id="SubstitutionGroup02">
      <ex:substitutionGroup>String</ex:substitutionGroup>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="MaxOccurs1" element="ex:maxOccurs1">
    <ex:typedef>
      <xs:element name="maxOccurs1" type="ex:MaxOccurs1"/>
      <xs:complexType name="MaxOccurs1">
        <xs:sequence>
          <xs:element name="value" type="xs:string" maxOccurs="1"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="MaxOccurs01">
      <ex:maxOccurs1>
        <ex:value>44</ex:value>
      </ex:maxOccurs1>
    </ex:instance>
    <ex:instance xml:id="MaxOccurs02">
      <ex:maxOccurs1>
        <ex:value>4</ex:value>
      </ex:maxOccurs1>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="MinOccurs1" element="ex:minOccurs1">
    <ex:typedef>
      <xs:element name="minOccurs1" type="ex:MinOccurs1"/>
      <xs:complexType name="MinOccurs1">
        <xs:sequence>
          <xs:element name="value" type="xs:string" minOccurs="1"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="MinOccurs01">
      <ex:minOccurs1>
        <ex:value>44</ex:value>
      </ex:minOccurs1>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AllElement" element="ex:allElement">
    <ex:typedef>
      <xs:element name="allElement" type="ex:AllElement"/>
      <xs:complexType name="AllElement">
        <xs:all>
          <xs:element name="element1" type="xs:string"/>
          <xs:element name="element2" type="xs:string"/>
          <xs:element name="element3" type="xs:string"/>
          <xs:element name="element4" type="xs:string"/>
          <xs:element name="element5" type="xs:string"/>
        </xs:all>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="AllElement01">
      <ex:allElement>
        <ex:element1>element1</ex:element1>
        <ex:element2>element2</ex:element2>
        <ex:element3>element3</ex:element3>
        <ex:element4>element4</ex:element4>
        <ex:element5>element5</ex:element5>
      </ex:allElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementDefault" element="ex:elementDefault">
    <ex:typedef>
      <xs:element name="elementDefault" type="ex:ElementDefault"/>
      <xs:complexType name="ElementDefault">
        <xs:sequence>
          <xs:element name="element" type="xs:string" default="default"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ElementDefault01">
      <ex:elementDefault>
        <ex:element>default</ex:element>
      </ex:elementDefault>
    </ex:instance>
    <ex:instance xml:id="ElementDefault02">
      <ex:elementDefault>
        <ex:element>wrong value</ex:element>
      </ex:elementDefault>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="List" element="ex:list">
    <ex:typedef>
      <xs:element name="list" type="ex:List"/>
      <xs:simpleType name="List">
        <xs:list itemType="xs:string"/>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="List01">
      <ex:list>This is a list of strings</ex:list>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="SequenceElement" element="ex:sequenceElement">
    <ex:typedef>
      <xs:element name="sequenceElement" type="ex:SequenceElement"/>
      <xs:complexType name="SequenceElement">
        <xs:sequence>
          <xs:element name="element1" type="xs:string"/>
          <xs:element name="element2" type="xs:string"/>
          <xs:element name="element3" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="SequenceElement01">
      <ex:sequenceElement>
        <ex:element1>element1</ex:element1>
        <ex:element2>element2</ex:element2>
        <ex:element3>element3</ex:element3>
      </ex:sequenceElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="SequenceSingleRepeatedElement" element="ex:sequenceSingleRepeatedElement">
    <ex:typedef>
      <xs:element name="sequenceSingleRepeatedElement" type="ex:SequenceSingleRepeatedElement"/>
      <xs:complexType name="SequenceSingleRepeatedElement">
        <xs:sequence>
          <xs:element name="element" type="xs:string" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="SequenceSingleRepeatedElement01">
      <ex:sequenceSingleRepeatedElement>
        <ex:element>element</ex:element>
        <ex:element>element</ex:element>
        <ex:element>element</ex:element>
        <ex:element>element</ex:element>
        <ex:element>element</ex:element>
      </ex:sequenceSingleRepeatedElement>
    </ex:instance>
    <ex:instance xml:id="SequenceSingleRepeatedElement02">
      <ex:sequenceSingleRepeatedElement>
        <ex:element>element</ex:element>
      </ex:sequenceSingleRepeatedElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AnyAttributeOtherStrict" element="ex:anyAttributeOtherStrict">
    <ex:typedef>
      <xs:import namespace="http://www.w3.org/2002/ws/databinding/examples/6/09/strict/" schemaLocation="../strict.xsd"/>
      <xs:element name="anyAttributeOtherStrict" type="ex:AnyAttributeOtherStrict"/>
      <xs:complexType name="AnyAttributeOtherStrict">
        <xs:sequence>
          <xs:element name="firstElement" type="xs:string"/>
          <xs:element name="lastElement" type="xs:string"/>
        </xs:sequence>
        <xs:anyAttribute processContents="strict" namespace="##other"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="AnyAttributeOtherStrict01">
      <ex:anyAttributeOtherStrict xmlns:ex2="http://www.w3.org/2002/ws/databinding/examples/6/09/strict/" ex2:strictAttribute="value1">
        <ex:firstElement>String</ex:firstElement>
        <ex:lastElement>String</ex:lastElement>
      </ex:anyAttributeOtherStrict>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AnyAttributeOtherLax" element="ex:anyAttributeOtherLax">
    <ex:typedef>
      <xs:element name="anyAttributeOtherLax" type="ex:AnyAttributeOtherLax"/>
      <xs:complexType name="AnyAttributeOtherLax">
        <xs:sequence>
          <xs:element name="firstElement" type="xs:string"/>
          <xs:element name="lastElement" type="xs:string"/>
        </xs:sequence>
        <xs:anyAttribute processContents="lax" namespace="##other"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="AnyAttributeOtherLax01">
      <ex:anyAttributeOtherLax xmlns:ex2="http://example2.example.com" ex2:otherAttribute="text">
        <ex:firstElement>String</ex:firstElement>
        <ex:lastElement>String</ex:lastElement>
      </ex:anyAttributeOtherLax>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AnyAttributeOtherSkip" element="ex:anyAttributeOtherSkip">
    <ex:typedef>
      <xs:element name="anyAttributeOtherSkip" type="ex:AnyAttributeOtherSkip"/>
      <xs:complexType name="AnyAttributeOtherSkip">
        <xs:sequence>
          <xs:element name="firstElement" type="xs:string"/>
          <xs:element name="lastElement" type="xs:string"/>
        </xs:sequence>
        <xs:anyAttribute processContents="skip" namespace="##other"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="AnyAttributeOtherSkip01">
      <ex:anyAttributeOtherSkip xmlns:ex2="http://example2.example.com" ex2:otherAttribute="text">
        <ex:firstElement>String</ex:firstElement>
        <ex:lastElement>String</ex:lastElement>
      </ex:anyAttributeOtherSkip>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalElementAbstract" element="ex:globalElementAbstract">
    <ex:typedef>
      <xs:element name="globalElementAbstract" type="ex:GlobalElementAbstract"/>
      <xs:complexType name="GlobalElementAbstract">
        <xs:sequence>
          <xs:element ref="ex:globalElementAbstractSubHead"/>
        </xs:sequence>
      </xs:complexType>
      <xs:element name="globalElementAbstractSubHead" abstract="true"/>
      <xs:element name="globalElementAbstractSub"
        substitutionGroup="ex:globalElementAbstractSubHead"/>
    </ex:typedef>
    <ex:instance xml:id="GlobalElementAbstract01">
      <ex:globalElementAbstract>
        <ex:globalElementAbstractSub>String</ex:globalElementAbstractSub>
      </ex:globalElementAbstract>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="SimpleTypeEnumerationType" element="ex:simpleTypeEnumerationType">
    <ex:typedef>
      <xs:element name="simpleTypeEnumerationType" type="ex:SimpleTypeEnumerationType"/>
      <xs:simpleType name="SimpleTypeEnumerationType">
        <xs:restriction base="ex:SimpleTypeEnumerationTypeBase">
          <xs:enumeration value="One"/>
          <xs:enumeration value="Two"/>
        </xs:restriction>
      </xs:simpleType>
      <xs:simpleType name="SimpleTypeEnumerationTypeBase">
        <xs:restriction base="xs:string">
          <xs:enumeration value="One"/>
          <xs:enumeration value="Two"/>
          <xs:enumeration value="Three"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="SimpleTypeEnumerationType01">
      <ex:simpleTypeEnumerationType>One</ex:simpleTypeEnumerationType>
    </ex:instance>
    <ex:instance xml:id="SimpleTypeEnumerationType02">
      <ex:simpleTypeEnumerationType>Two</ex:simpleTypeEnumerationType>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="LanguageEnumerationType" element="ex:languageEnumerationType">
    <ex:typedef>
      <xs:element name="languageEnumerationType" type="ex:LanguageEnumerationType"/>
      <xs:simpleType name="LanguageEnumerationType">
        <xs:restriction base="xs:language">
          <xs:enumeration value="en"/>
          <xs:enumeration value="en-US"/>
          <xs:enumeration value="fr"/>
          <xs:enumeration value="de"/>
          <xs:enumeration value="it"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="LanguageEnumerationType01">
      <ex:languageEnumerationType>en</ex:languageEnumerationType>
    </ex:instance>
    <ex:instance xml:id="LanguageEnumerationType02">
      <ex:languageEnumerationType>it</ex:languageEnumerationType>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementReferenceUnqualified" element="ex:elementReferenceUnqualified">
    <ex:typedef>
      <xs:element name="elementReferenceUnqualified" type="ex:ElementReferenceUnqualified"/>
      <xs:element name="elementReferenceUnqualifiedElement1" type="xs:string"/>
      <xs:element name="elementReferenceUnqualifiedElement2" type="xs:string"/>
      <xs:complexType name="ElementReferenceUnqualified">
        <xs:sequence>
          <xs:element ref="elementReferenceUnqualifiedElement1"/>
          <xs:element ref="elementReferenceUnqualifiedElement2"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ElementReferenceUnqualified01">
      <ex:elementReferenceUnqualified>
        <ex:elementReferenceUnqualifiedElement1>String</ex:elementReferenceUnqualifiedElement1>
        <ex:elementReferenceUnqualifiedElement2>String</ex:elementReferenceUnqualifiedElement2>
      </ex:elementReferenceUnqualified>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementTypeReferenceUnqualified" element="ex:elementTypeReferenceUnqualified">
    <ex:typedef>
      <xs:element name="elementTypeReferenceUnqualified" type="ex:ElementTypeReferenceUnqualified"/>
      <xs:complexType name="ElementTypeReferenceUnqualifiedRef">
        <xs:sequence>
          <xs:element name="referenced" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="ElementTypeReferenceUnqualified">
        <xs:sequence>
          <xs:element name="text" type="ElementTypeReferenceUnqualifiedRef"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ElementTypeReferenceUnqualified01">
      <ex:elementTypeReferenceUnqualified>
        <ex:text>
          <ex:referenced>String</ex:referenced>
        </ex:text>
      </ex:elementTypeReferenceUnqualified>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AttributeReferenceUnqualified" element="ex:attributeReferenceUnqualified">
    <ex:typedef>
      <xs:element name="attributeReferenceUnqualified" type="ex:AttributeReferenceUnqualified"/>
      <xs:attribute name="attributeReferenceUnqualifiedAtt" type="xs:string"/>
      <xs:complexType name="AttributeReferenceUnqualified">
        <xs:sequence>
          <xs:element name="firstElement" type="xs:string"/>
          <xs:element name="lastElement" type="xs:string"/>
        </xs:sequence>
        <xs:attribute ref="attributeReferenceUnqualifiedAtt"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="AttributeReferenceUnqualified01">
      <ex:attributeReferenceUnqualified ex:attributeReferenceUnqualifiedAtt="String">
        <ex:firstElement>String</ex:firstElement>
        <ex:lastElement>String</ex:lastElement>
      </ex:attributeReferenceUnqualified>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AttributeTypeReferenceUnqualified"
    element="ex:attributeTypeReferenceUnqualified">
    <ex:typedef>
      <xs:element name="attributeTypeReferenceUnqualified"
        type="ex:AttributeTypeReferenceUnqualified"/>
      <xs:simpleType name="AttributeTypeReferenceUnqualifiedType">
        <xs:restriction base="xs:decimal">
          <xs:totalDigits value="3"/>
        </xs:restriction>
      </xs:simpleType>
      <xs:complexType name="AttributeTypeReferenceUnqualified">
        <xs:sequence>
          <xs:element name="firstElement" type="xs:string"/>
        </xs:sequence>
        <xs:attribute name="localAttribute" type="AttributeTypeReferenceUnqualifiedType"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="AttributeTypeReferenceUnqualified01">
      <ex:attributeTypeReferenceUnqualified localAttribute="123">
        <ex:firstElement>String</ex:firstElement>
      </ex:attributeTypeReferenceUnqualified>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalAttribute" element="ex:globalAttribute" pattern="GlobalAttribute">
    <ex:typedef>
      <xs:attribute name="globalAttributeAttr" type="xs:string"/>
      <xs:complexType name="GlobalAttribute">
        <xs:sequence>
          <xs:element name="globalAttributeElement" type="xs:string"/>
        </xs:sequence>
        <xs:attribute ref="ex:globalAttributeAttr"/>
      </xs:complexType>
      <xs:element name="globalAttribute" type="ex:GlobalAttribute"/>
    </ex:typedef>
    <ex:instance xml:id="GlobalAttribute01">
      <ex:globalAttribute ex:globalAttributeAttr="string">
        <ex:globalAttributeElement>another string</ex:globalAttributeElement>
      </ex:globalAttribute>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalAttributeSimpleType" element="ex:globalAttributeSimpleType">
    <ex:typedef>
      <xs:attribute name="globalAttributeSimpleTypeAttr">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="value1"/>
            <xs:enumeration value="value2"/>
            <xs:enumeration value="value3"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:complexType name="globalAttributeSimpleTypeComplexType">
        <xs:sequence>
          <xs:element name="globalAttributeSimpleTypeElement" type="xs:string"/>
        </xs:sequence>
        <xs:attribute ref="ex:globalAttributeSimpleTypeAttr"/>
      </xs:complexType>
      <xs:element name="globalAttributeSimpleType" type="ex:globalAttributeSimpleTypeComplexType"/>
    </ex:typedef>
    <ex:instance xml:id="GlobalAttributeSimpleType01">
      <ex:globalAttributeSimpleType ex:globalAttributeSimpleTypeAttr="value1">
        <ex:globalAttributeSimpleTypeElement>string</ex:globalAttributeSimpleTypeElement>
      </ex:globalAttributeSimpleType>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalAttributeUnqualifiedType" element="ex:globalAttributeUnqualifiedType">
    <ex:typedef>
      <xs:attribute name="globalAttributeUnqualifiedTypeAttr"
        type="GlobalAttributeUnqualifiedTypeSimpleType"/>
      <xs:simpleType name="GlobalAttributeUnqualifiedTypeSimpleType">
        <xs:restriction base="xs:string">
          <xs:enumeration value="value1"/>
          <xs:enumeration value="value2"/>
        </xs:restriction>
      </xs:simpleType>
      <xs:complexType name="GlobalAttributeUnqualifiedType">
        <xs:sequence>
          <xs:element name="globalAttributeUnqualifiedTypeElement" type="xs:string"/>
        </xs:sequence>
        <xs:attribute ref="ex:globalAttributeUnqualifiedTypeAttr"/>
      </xs:complexType>
      <xs:element name="globalAttributeUnqualifiedType" type="ex:GlobalAttributeUnqualifiedType"/>
    </ex:typedef>
    <ex:instance xml:id="GlobalAttributeUnqualifiedType01">
      <ex:globalAttributeUnqualifiedType ex:globalAttributeUnqualifiedTypeAttr="value1">
        <ex:globalAttributeUnqualifiedTypeElement>another string</ex:globalAttributeUnqualifiedTypeElement>
      </ex:globalAttributeUnqualifiedType>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalComplexTypeEmptyExtension" element="ex:globalComplexTypeEmptyExtension">
    <ex:typedef>
      <xs:complexType name="GlobalComplexTypeEmptyExtension">
        <xs:complexContent>
          <xs:extension base="xs:anyType"/>
        </xs:complexContent>
      </xs:complexType>
      <xs:element name="globalComplexTypeEmptyExtension" type="ex:GlobalComplexTypeEmptyExtension"/>
    </ex:typedef>
    <ex:instance xml:id="GlobalComplexTypeEmptyExtension01">
      <ex:globalComplexTypeEmptyExtension/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalElementComplexTypeEmptyExtension"
    element="ex:globalElementComplexTypeEmptyExtension">
    <ex:typedef>
      <xs:element name="globalElementComplexTypeEmptyExtension">
        <xs:complexType>
          <xs:complexContent>
            <xs:extension base="xs:anyType"/>
          </xs:complexContent>
        </xs:complexType>
      </xs:element>
    </ex:typedef>
    <ex:instance xml:id="GlobalElementComplexTypeEmptyExtension01">
      <ex:globalElementComplexTypeEmptyExtension/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalElementComplexTypeSequenceExtension"
    element="ex:globalElementComplexTypeSequenceExtension">
    <ex:typedef>
      <xs:element name="globalElementComplexTypeSequenceExtension">
        <xs:complexType>
          <xs:complexContent>
            <xs:extension base="xs:anyType">
              <xs:sequence/>
            </xs:extension>
          </xs:complexContent>
        </xs:complexType>
      </xs:element>
    </ex:typedef>
    <ex:instance xml:id="GlobalElementComplexTypeSequenceExtension01">
      <ex:globalElementComplexTypeSequenceExtension>
        <ex:data> some data </ex:data>
      </ex:globalElementComplexTypeSequenceExtension>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalElementSequenceAny" element="ex:globalElementSequenceAny">
    <ex:typedef>
      <xs:element name="globalElementSequenceAny">
        <xs:complexType>
          <xs:sequence>
            <xs:any processContents="skip"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </ex:typedef>
    <ex:instance xml:id="GlobalElementSequenceAny01">
      <ex:globalElementSequenceAny>
        <ex:data> some data </ex:data>
      </ex:globalElementSequenceAny>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalElementSimpleType" element="ex:globalElementSimpleType">
    <ex:typedef>
      <xs:element name="globalElementSimpleType">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="value1"/>
            <xs:enumeration value="value2"/>
            <xs:enumeration value="value3"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:element>
    </ex:typedef>
    <ex:instance xml:id="GlobalElementSimpleType01">
      <ex:globalElementSimpleType>value1</ex:globalElementSimpleType>
    </ex:instance>
    <ex:instance xml:id="GlobalElementSimpleType02">
      <ex:globalElementSimpleType>value2</ex:globalElementSimpleType>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GlobalElementUnqualifiedType" element="ex:globalElementUnqualifiedType">
    <ex:typedef>
      <xs:element name="globalElementUnqualifiedType" type="GlobalElementUnqualifiedType"/>
      <xs:complexType name="GlobalElementUnqualifiedType">
        <xs:sequence>
          <xs:element name="element1" type="xs:string"/>
          <xs:element name="element2" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="GlobalElementUnqualifiedType01">
      <ex:globalElementUnqualifiedType>
        <ex:element1>string1</ex:element1>
        <ex:element2>string2</ex:element2>
      </ex:globalElementUnqualifiedType>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GYearSimpleTypePattern" element="ex:gYearSimpleTypePattern">
    <ex:typedef>
      <xs:element name="gYearSimpleTypePattern" type="ex:GYearSimpleTypePattern"/>
      <xs:simpleType name="GYearSimpleTypePattern">
        <xs:restriction base="xs:gYear">
          <xs:pattern value="2008|2009|2010"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="GYearSimpleTypePattern01">
      <ex:gYearSimpleTypePattern>2009</ex:gYearSimpleTypePattern>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GMonthSimpleTypePattern" element="ex:gMonthSimpleTypePattern">
    <ex:typedef>
      <xs:element name="gMonthSimpleTypePattern" type="ex:GMonthSimpleTypePattern"/>
      <xs:simpleType name="GMonthSimpleTypePattern">
        <xs:restriction base="xs:gMonth">
          <xs:pattern value="--10|--11|--12"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="GMonthSimpleTypePattern01">
      <ex:gMonthSimpleTypePattern>--11</ex:gMonthSimpleTypePattern>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GDaySimpleTypePattern" element="ex:gDaySimpleTypePattern">
    <ex:typedef>
      <xs:element name="gDaySimpleTypePattern" type="ex:GDaySimpleTypePattern"/>
      <xs:simpleType name="GDaySimpleTypePattern">
        <xs:restriction base="xs:gDay">
          <xs:pattern value="---01|---11|---31"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="GDaySimpleTypePattern01">
      <ex:gDaySimpleTypePattern>---01</ex:gDaySimpleTypePattern>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GYearMonthSimpleTypePattern" element="ex:gYearMonthSimpleTypePattern">
    <ex:typedef>
      <xs:element name="gYearMonthSimpleTypePattern" type="ex:GYearMonthSimpleTypePattern"/>
      <xs:simpleType name="GYearMonthSimpleTypePattern">
        <xs:restriction base="xs:gYearMonth">
          <xs:pattern value="2001-12|2002-12|2003-12"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="GYearMonthSimpleTypePattern01">
      <ex:gYearMonthSimpleTypePattern>2001-12</ex:gYearMonthSimpleTypePattern>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="GMonthDaySimpleTypePattern" element="ex:gMonthDaySimpleTypePattern">
    <ex:typedef>
      <xs:element name="gMonthDaySimpleTypePattern" type="ex:GMonthDaySimpleTypePattern"/>
      <xs:simpleType name="GMonthDaySimpleTypePattern">
        <xs:restriction base="xs:gMonthDay">
          <xs:pattern value="--12-01|--11-01|--10-01"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="GMonthDaySimpleTypePattern01">
      <ex:gMonthDaySimpleTypePattern>--12-01</ex:gMonthDaySimpleTypePattern>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="SimpleTypeRenamed" element="ex:simpleTypeRenamed">
    <ex:typedef>
      <xs:element name="simpleTypeRenamed" type="ex:SimpleTypeRenamed"/>
      <xs:simpleType name="SimpleTypeRenamed">
        <xs:restriction base="xs:string"/>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="SimpleTypeRenamed01">
      <ex:simpleTypeRenamed>String</ex:simpleTypeRenamed>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="LocalElementSimpleType" element="ex:localElementSimpleType">
    <ex:typedef>
      <xs:element name="localElementSimpleType" type="ex:LocalElementSimpleType"/>
      <xs:complexType name="LocalElementSimpleType">
        <xs:sequence>
          <xs:element name="localElement">
            <xs:simpleType>
              <xs:restriction base="xs:string">
                <xs:enumeration value="First"/>
                <xs:enumeration value="Second"/>
                <xs:enumeration value="Third"/>
              </xs:restriction>
            </xs:simpleType>
          </xs:element>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="LocalElementSimpleType01">
      <ex:localElementSimpleType>
        <ex:localElement>First</ex:localElement>
      </ex:localElementSimpleType>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="LocalAttributeSimpleType" element="ex:localAttributeSimpleType">
    <ex:typedef>
      <xs:element name="localAttributeSimpleType" type="ex:LocalAttributeSimpleType"/>
      <xs:complexType name="LocalAttributeSimpleType">
        <xs:sequence>
          <xs:element name="localElement1" type="xs:string"/>
          <xs:element name="localElement2" type="xs:string"/>
        </xs:sequence>
        <xs:attribute name="localAttribute">
          <xs:simpleType>
            <xs:restriction base="xs:string">
              <xs:enumeration value="First"/>
              <xs:enumeration value="Second"/>
              <xs:enumeration value="Third"/>
            </xs:restriction>
          </xs:simpleType>
        </xs:attribute>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="LocalAttributeSimpleType01">
      <ex:localAttributeSimpleType localAttribute="First">
        <ex:localElement1>String</ex:localElement1>
        <ex:localElement2>String</ex:localElement2>
      </ex:localAttributeSimpleType>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="ExtendedSequenceStrictAny" element="ex:extendedSequenceStrictAny">
    <ex:typedef>
      <xs:element name="extendedSequenceStrictAny" type="ex:ExtendedSequenceStrictAny"/>
      <xs:element name="extendedSequenceStrictAnyElement" type="xs:string"/>
      <xs:complexType name="ExtendedSequenceStrictAny">
        <xs:sequence>
          <xs:element name="firstElement" type="xs:string"/>
          <xs:element name="lastElement" type="xs:string"/>
          <xs:element name="extension" type="ex:ExtendedSequenceStrictAnyExtension" minOccurs="0"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="ExtendedSequenceStrictAnyExtension">
        <xs:sequence>
          <xs:any namespace="##any" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ExtendedSequenceStrictAny01">
      <ex:extendedSequenceStrictAny>
        <ex:firstElement>String</ex:firstElement>
        <ex:lastElement>String</ex:lastElement>
        <ex:extension>
          <ex:extendedSequenceStrictAnyElement>Stuff</ex:extendedSequenceStrictAnyElement>
        </ex:extension>
      </ex:extendedSequenceStrictAny>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="ExtendedSequenceLaxAny" element="ex:extendedSequenceLaxAny">
    <ex:typedef>
      <xs:element name="extendedSequenceLaxAny" type="ex:ExtendedSequenceLaxAny"/>
      <xs:complexType name="ExtendedSequenceLaxAny">
        <xs:sequence>
          <xs:element name="firstElement" type="xs:string"/>
          <xs:element name="lastElement" type="xs:string"/>
          <xs:element name="extension" type="ex:ExtendedSequenceLaxAnyExtension" minOccurs="0"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="ExtendedSequenceLaxAnyExtension">
        <xs:sequence>
          <xs:any namespace="##any" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ExtendedSequenceLaxAny01">
      <ex:extendedSequenceLaxAny  xmlns:ex2="http://example2.example.com" >
        <ex:firstElement>String</ex:firstElement>
        <ex:lastElement>String</ex:lastElement>
        <ex:extension>
          <ex2:anyElement>Stuff</ex2:anyElement>
        </ex:extension>
      </ex:extendedSequenceLaxAny>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="ExtendedSequenceSkipAny" element="ex:extendedSequenceSkipAny">
    <ex:typedef>
      <xs:element name="extendedSequenceSkipAny" type="ex:ExtendedSequenceSkipAny"/>
      <xs:complexType name="ExtendedSequenceSkipAny">
        <xs:sequence>
          <xs:element name="firstElement" type="xs:string"/>
          <xs:element name="lastElement" type="xs:string"/>
          <xs:element name="extension" type="ex:ExtendedSequenceSkipAnyExtension" minOccurs="0"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="ExtendedSequenceSkipAnyExtension">
        <xs:sequence>
          <xs:any namespace="##any" processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ExtendedSequenceSkipAny01">
      <ex:extendedSequenceSkipAny  xmlns:ex2="http://example2.example.com">
        <ex:firstElement>String</ex:firstElement>
        <ex:lastElement>String</ex:lastElement>
        <ex:extension>
          <ex2:anyElement>Stuff</ex2:anyElement>
        </ex:extension>
      </ex:extendedSequenceSkipAny>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="ExtendedSequenceSkipOther" element="ex:extendedSequenceSkipOther">
    <ex:typedef>
      <xs:element name="extendedSequenceSkipOther" type="ex:ExtendedSequenceSkipOther"/>
      <xs:complexType name="ExtendedSequenceSkipOther">
        <xs:sequence>
          <xs:element name="firstElement" type="xs:string"/>
          <xs:element name="lastElement" type="xs:string"/>
          <xs:element name="extension" type="ex:ExtendedSequenceSkipOtherExtension" minOccurs="0"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="ExtendedSequenceSkipOtherExtension">
        <xs:sequence>
          <xs:any namespace="##other" processContents="skip" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ExtendedSequenceSkipOther01">
      <ex:extendedSequenceSkipOther  xmlns:ex2="http://example2.example.com">
        <ex:firstElement>String</ex:firstElement>
        <ex:lastElement>String</ex:lastElement>
        <ex:extension>
          <ex2:anyElement>Stuff</ex2:anyElement>
        </ex:extension>
      </ex:extendedSequenceSkipOther>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="ExtendedSequenceLaxOther" element="ex:extendedSequenceLaxOther">
    <ex:typedef>
      <xs:element name="extendedSequenceLaxOther" type="ex:ExtendedSequenceLaxOther"/>
      <xs:complexType name="ExtendedSequenceLaxOther">
        <xs:sequence>
          <xs:element name="firstElement" type="xs:string"/>
          <xs:element name="lastElement" type="xs:string"/>
          <xs:element name="extension" type="ex:ExtendedSequenceLaxOtherExtension" minOccurs="0"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="ExtendedSequenceLaxOtherExtension">
        <xs:sequence>
          <xs:any namespace="##other" processContents="lax" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ExtendedSequenceLaxOther01">
      <ex:extendedSequenceLaxOther  xmlns:ex2="http://example2.example.com">
        <ex:firstElement>String</ex:firstElement>
        <ex:lastElement>String</ex:lastElement>
        <ex:extension>
          <ex2:anyElement>Stuff</ex2:anyElement>
        </ex:extension>
      </ex:extendedSequenceLaxOther>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="ExtendedSequenceStrictOther" element="ex:extendedSequenceStrictOther">
    <ex:typedef>
      <xs:import namespace="http://www.w3.org/2002/ws/databinding/examples/6/09/strict/" schemaLocation="../strict.xsd"/>
      <xs:element name="extendedSequenceStrictOther" type="ex:ExtendedSequenceStrictOther"/>
      <xs:complexType name="ExtendedSequenceStrictOther">
        <xs:sequence>
          <xs:element name="element1" type="xs:string"/>
          <xs:element name="element2" type="xs:string"/>
          <xs:element name="extension" type="ex:ExtendedSequenceStrictOtherExtension" minOccurs="0"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="ExtendedSequenceStrictOtherExtension">
        <xs:sequence>
          <xs:any namespace="##other" processContents="strict" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ExtendedSequenceStrictOther01">
      <ex:extendedSequenceStrictOther>
        <ex:element1>firstElement</ex:element1>
        <ex:element2>lastElement</ex:element2>
        <ex:extension>
          <strictElement xmlns="http://www.w3.org/2002/ws/databinding/examples/6/09/strict/">strictElement</strictElement>
        </ex:extension>
      </ex:extendedSequenceStrictOther>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="AttributeFormQualified" element="ex:attributeFormQualified">
    <ex:typedef>
      <xs:element name="attributeFormQualified" type="ex:AttributeFormQualified"/>
      <xs:complexType name="AttributeFormQualified">
        <xs:sequence>
          <xs:element name="element1" type="xs:string"/>
          <xs:element name="element2" type="xs:string"/>
        </xs:sequence>
        <xs:attribute name="attribute" form="qualified" type="xs:string"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="AttributeFormQualified01">
      <ex:attributeFormQualified ex:attribute="string">
        <ex:element1>string</ex:element1>
        <ex:element2>string</ex:element2>
      </ex:attributeFormQualified>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ComplexTypeAnyAttribute" element="ex:complexTypeAnyAttribute">
    <ex:typedef>
      <xs:element name="complexTypeAnyAttribute" type="ex:ComplexTypeAnyAttribute"/>
      <xs:complexType name="ComplexTypeAnyAttribute">
        <xs:sequence>
          <xs:element name="element1" type="xs:string"/>
          <xs:element name="element2" type="xs:string"/>
        </xs:sequence>
        <xs:anyAttribute processContents="skip"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ComplexTypeAnyAttribute01">
      <ex:complexTypeAnyAttribute anyattr="string">
        <ex:element1>string</ex:element1>
        <ex:element2>string</ex:element2>
      </ex:complexTypeAnyAttribute>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="SimpleContentAnyAttributeSkip" element="ex:simpleContentAnyAttributeSkip">
    <ex:typedef>
      <xs:element name="simpleContentAnyAttributeSkip" type="ex:SimpleContentAnyAttributeSkip"/>
      <xs:complexType name="SimpleContentAnyAttributeSkip">
        <xs:simpleContent>
          <xs:extension base="xs:string">
            <xs:anyAttribute processContents="skip"/>
          </xs:extension>
        </xs:simpleContent>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="SimpleContentAnyAttributeSkip01">
      <ex:simpleContentAnyAttributeSkip skipAttribute="string">string</ex:simpleContentAnyAttributeSkip>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="SimpleContentAnyAttributeLax" element="ex:simpleContentAnyAttributeLax">
    <ex:typedef>
      <xs:element name="simpleContentAnyAttributeLax" type="ex:SimpleContentAnyAttributeLax"/>
      <xs:complexType name="SimpleContentAnyAttributeLax">
        <xs:simpleContent>
          <xs:extension base="xs:string">
            <xs:anyAttribute processContents="lax" namespace="##other"/>
          </xs:extension>
        </xs:simpleContent>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="SimpleContentAnyAttributeLax01">
      <ex:simpleContentAnyAttributeLax ex2:laxAttribute="string"
        xmlns:ex2="http://www.w3.org/2002/ws/databinding/examples/6/09/lax/">some data</ex:simpleContentAnyAttributeLax>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="SimpleContentAnyAttributeStrict" element="ex:simpleContentAnyAttributeStrict">
    <ex:typedef>
      <xs:import namespace="http://www.w3.org/2002/ws/databinding/examples/6/09/strict/" schemaLocation="../strict.xsd"/>
      <xs:element name="simpleContentAnyAttributeStrict" type="ex:SimpleContentAnyAttributeStrict"/>
      <xs:complexType name="SimpleContentAnyAttributeStrict">
        <xs:simpleContent>
          <xs:extension base="xs:string">
            <xs:anyAttribute processContents="strict" namespace="##other"/>
          </xs:extension>
        </xs:simpleContent>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="SimpleContentAnyAttributeStrict01">
      <ex:simpleContentAnyAttributeStrict ex2:strictAttribute="value1" 
        xmlns:ex2="http://www.w3.org/2002/ws/databinding/examples/6/09/strict/">some data</ex:simpleContentAnyAttributeStrict>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="MixedComplexContent" element="ex:mixedComplexContent">
    <ex:typedef>
      <xs:element name="mixedComplexContent" type="ex:MixedComplexContent"/>
      <xs:complexType name="MixedComplexContent">
        <xs:complexContent mixed="true">
          <xs:restriction base="xs:anyType">
            <xs:sequence>
              <xs:element name="element1" type="xs:string"/>
              <xs:element name="element2" type="xs:string"/>
              <xs:element name="element3" type="xs:string"/>
            </xs:sequence>
          </xs:restriction>
        </xs:complexContent>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="MixedComplexContent01">
      <ex:mixedComplexContent>
        <ex:element1>string</ex:element1>
        mixed content
        <ex:element2>string</ex:element2>
        mixed content
        <ex:element3>string</ex:element3>
        mixed content
      </ex:mixedComplexContent>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementFormUnqualified" element="ex:elementFormUnqualified">
    <ex:typedef>
      <xs:element name="elementFormUnqualified" type="ex:ElementFormUnqualified"/>
      <xs:complexType name="ElementFormUnqualified">
        <xs:sequence>
          <xs:element name="element" type="xs:string" form="unqualified"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ElementFormUnqualified01">
      <ex:elementFormUnqualified>
        <element>string</element>
      </ex:elementFormUnqualified>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="ExtendedSimpleContent" element="ex:extendedSimpleContent">
    <ex:typedef>
      <xs:element name="extendedSimpleContent" type="ex:ExtendedSimpleContent"/>
      <xs:complexType name="ExtendedSimpleContent">
        <xs:simpleContent>
          <xs:extension base="xs:string">
            <xs:attribute name="attribute"/>
          </xs:extension>
        </xs:simpleContent>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ExtendedSimpleContent01">
      <ex:extendedSimpleContent attribute="string">string</ex:extendedSimpleContent>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="QualifiedLocalAttributes" element="ex:qualifiedLocalAttributes">
    <ex:types>
      <xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/"
        attributeFormDefault="qualified">
        <xs:element name="qualifiedLocalAttributes" type="xs:string"/>
      </xs:schema>
    </ex:types>
    <ex:instance xml:id="QualifiedLocalAttributes01">
      <ex:qualifiedLocalAttributes>string</ex:qualifiedLocalAttributes>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="UnqualifiedLocalElements" element="ex:unqualifiedLocalElements">
    <ex:types>
      <xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/"
        elementFormDefault="unqualified">
        <xs:element name="unqualifiedLocalElements" type="xs:string"/>
      </xs:schema>
    </ex:types>
    <ex:instance xml:id="UnqualifiedLocalElements01">
      <unqualifiedLocalElements 
        xmlns="http://www.w3.org/2002/ws/databinding/examples/6/09/">some data</unqualifiedLocalElements>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="SequenceAnyStrict" element="ex:sequenceAnyStrict">
    <ex:typedef>
      <xs:element name="sequenceAnyStrict" type="ex:SequenceAnyStrict"/>
      <xs:complexType name="SequenceAnyStrict">
        <xs:sequence>
          <xs:element name="element1" type="xs:string"/>
          <xs:any processContents="strict" namespace="##any" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="SequenceAnyStrict01">
      <ex:sequenceAnyStrict>
        <ex:element1>string</ex:element1>
      </ex:sequenceAnyStrict>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="UnionSimpleAndMemberTypes" element="ex:unionSimpleAndMemberTypes">
    <ex:typedef>
      <xs:element name="unionSimpleAndMemberTypes" type="ex:UnionSimpleAndMemberTypes"/>
      <xs:simpleType name="UnionSimpleAndMemberTypes">
        <xs:union memberTypes="xs:string">
          <xs:simpleType>
            <xs:restriction base="xs:date"/>
          </xs:simpleType>
        </xs:union>    
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="UnionSimpleAndMemberTypes01">
      <ex:unionSimpleAndMemberTypes>string</ex:unionSimpleAndMemberTypes>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="ElementFixed" element="ex:elementFixed">
    <ex:typedef>
      <xs:element name="elementFixed" type="xs:string" fixed="yes"/>
    </ex:typedef>
    <ex:instance xml:id="ElementFixed01">
      <ex:elementFixed>yes</ex:elementFixed>
    </ex:instance>
  </ex:example>

<!-- EXAMPLES ADDED FOR PATTERNS ADDED FROM ANALYSIS OF COLLECTIONS -->
<ex:example xml:id="GlobalElementComplexType" element="ex:globalElementComplexType">
  <ex:typedef>
    <xs:element name="globalElementComplexType">
      <xs:complexType>
        <xs:sequence>
          <xs:element name="name">
            <xs:complexType>
              <xs:sequence>
                <xs:element name="firstName" type="xs:string"/>
                <xs:element name="lastName" type="xs:string"/>
              </xs:sequence>
            </xs:complexType>
          </xs:element>
        </xs:sequence>
      </xs:complexType>
    </xs:element>  
  </ex:typedef>
  <ex:instance xml:id="GlobalElementComplexType01">
    <ex:globalElementComplexType>
      <ex:name>
        <ex:firstName>Paul</ex:firstName>
        <ex:lastName>Paul</ex:lastName>
      </ex:name>
    </ex:globalElementComplexType>
  </ex:instance>
</ex:example>

<ex:example xml:id="RestrictedPattern" element="ex:restrictedPattern">
  <ex:typedef>
    <xs:element name="restrictedPattern" type="ex:RestrictedPattern"/>
    <xs:simpleType name="RestrictedPattern">
      <xs:restriction base="xs:string">
        <xs:minLength value="1"/>
        <xs:maxLength value="6"/>
        <xs:pattern value="[0-9]{1,6}"/>
      </xs:restriction>
    </xs:simpleType>
  </ex:typedef>
  <ex:instance xml:id="RestrictedPattern01">
    <ex:restrictedPattern>123456</ex:restrictedPattern>
  </ex:instance>
  <ex:instance xml:id="RestrictedPattern02">
    <ex:restrictedPattern>1234</ex:restrictedPattern>
  </ex:instance>
</ex:example>    
  
<ex:example xml:id="RestrictedSimpleContent" element="ex:restrictedSimpleContent">
   <ex:typedef>
     <xs:element name="restrictedSimpleContent" type="ex:RestrictedSimpleContent"/>
     <xs:complexType name='RestrictedSimpleContent'>
       <xs:simpleContent>
         <xs:restriction base='ex:SomeSimpleContent'>
           <xs:minInclusive value='1'/>
           <xs:maxInclusive value='99'/>
         </xs:restriction>
       </xs:simpleContent>
     </xs:complexType>
     <xs:complexType name='SomeSimpleContent'>
       <xs:simpleContent>
         <xs:extension base='ex:SimpleType'>
           <xs:attribute name='Currency' type='xs:string'/>
         </xs:extension>
       </xs:simpleContent>
     </xs:complexType>
     <xs:simpleType name='SimpleType'>
       <xs:restriction base='xs:int'>
         <xs:minExclusive value="0"/>
         <xs:maxExclusive value="100"/>
       </xs:restriction>
     </xs:simpleType>
  </ex:typedef>
  <ex:instance xml:id="RestrictedSimpleContent01">
    <ex:restrictedSimpleContent>1</ex:restrictedSimpleContent>
  </ex:instance>
  <ex:instance xml:id="RestrictedSimpleContent02">
    <ex:restrictedSimpleContent>99</ex:restrictedSimpleContent>
  </ex:instance>
</ex:example>    

<ex:example xml:id="AttributeProhibited" element="ex:attributeProhibited">
  <ex:typedef>
    <xs:element name="attributeProhibited" type="ex:AttributeProhibited"/>
    <xs:complexType name="AttributeProhibited">
      <xs:sequence>
        <xs:element name="element1" type="xs:string"/>
        <xs:element name="element2" type="xs:string"/>
      </xs:sequence>
      <xs:attribute name="prohibitedAttribute" use="prohibited" type="xs:string"/>
    </xs:complexType>
  </ex:typedef>
  <ex:instance xml:id="AttributeProhibited01">
    <ex:attributeProhibited>
      <ex:element1>element1</ex:element1>
      <ex:element2>element2</ex:element2>
    </ex:attributeProhibited>
  </ex:instance>
</ex:example>   
  
  <ex:example xml:id="ComplexTypeChoiceExtension" element="ex:complexTypeChoiceExtension">
    <ex:typedef>
      <xs:element name="complexTypeChoiceExtension" type="ex:ComplexTypeChoiceExtension"/>
      <xs:complexType name="ComplexTypeChoiceBase">
        <xs:sequence>
          <xs:element name="element1" type="xs:string"/>
          <xs:element name="element2" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="ComplexTypeChoiceExtension">
        <xs:complexContent>
          <xs:extension base="ex:ComplexTypeChoiceBase">
            <xs:choice>
              <xs:element name="element3" type="xs:string"/>
              <xs:element name="element4" type="xs:string"/>
            </xs:choice>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ComplexTypeChoiceExtension01">
      <ex:complexTypeChoiceExtension>
        <ex:element1>element1</ex:element1>
        <ex:element2>element2</ex:element2>
        <ex:element3>element3</ex:element3>
      </ex:complexTypeChoiceExtension>
    </ex:instance>
    <ex:instance xml:id="ComplexTypeChoiceExtension02">
      <ex:complexTypeChoiceExtension>
        <ex:element1>element1</ex:element1>
        <ex:element2>element2</ex:element2>
        <ex:element4>element4</ex:element4>
      </ex:complexTypeChoiceExtension>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="ComplexTypeAttributeGroupExtension" element="ex:complexTypeAttributeGroupExtension">
    <ex:typedef>
      <xs:element name="complexTypeAttributeGroupExtension" type="ex:ComplexTypeAttributeGroupExtension"/>
      <xs:complexType name="ComplexTypeAttributeGroupBase">
        <xs:sequence>
          <xs:element name="element1" type="xs:string"/>
          <xs:element name="element2" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="ComplexTypeAttributeGroupExtension">
        <xs:complexContent>
          <xs:extension base="ex:ComplexTypeAttributeGroupBase">
            <xs:attributeGroup ref="ex:CommonAttributes"></xs:attributeGroup>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:attributeGroup name="CommonAttributes">
        <xs:attribute name="id" type="xs:ID" use="optional" form="unqualified"/>
      </xs:attributeGroup>
    </ex:typedef>  
    <ex:instance xml:id="ComplexTypeAttributeGroupExtension01">
      <ex:complexTypeAttributeGroupExtension id="ComplexTypeAttributeGroupExtension_01">
        <ex:element1>element1</ex:element1>
        <ex:element2>element2</ex:element2>
      </ex:complexTypeAttributeGroupExtension>  
    </ex:instance>
</ex:example>  
        
  <ex:example xml:id="RestrictedWhitespacePreserve" element="ex:restrictedWhitespacePreserve">
    <ex:typedef>
      <xs:element name="restrictedWhitespacePreserve" type="ex:RestrictedWhitespacePreserve"/>
      <xs:simpleType name="RestrictedWhitespacePreserve">
        <xs:restriction base="xs:string">
          <xs:whiteSpace value="preserve"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="RestrictedWhitespacePreserve01">
      <ex:restrictedWhitespacePreserve>restricted  whitespace  preserve</ex:restrictedWhitespacePreserve>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="RestrictedWhitespaceCollapse" element="ex:restrictedWhitespaceCollapse">
    <ex:typedef>
      <xs:element name="restrictedWhitespaceCollapse" type="ex:RestrictedWhitespaceCollapse"/>
      <xs:simpleType name="RestrictedWhitespaceCollapse">
        <xs:restriction base="xs:string">
          <xs:whiteSpace value="collapse"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="RestrictedWhitespaceCollapse01">
      <ex:restrictedWhitespaceCollapse>restricted  whitespace  collapse</ex:restrictedWhitespaceCollapse>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="RestrictedWhitespaceReplace" element="ex:restrictedWhitespaceReplace">
    <ex:typedef>
      <xs:element name="restrictedWhitespaceReplace" type="ex:RestrictedWhitespaceReplace"/>
      <xs:simpleType name="RestrictedWhitespaceReplace">
        <xs:restriction base="xs:string">
          <xs:whiteSpace value="replace"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>
    <ex:instance xml:id="RestrictedWhitespaceReplace01">
      <ex:restrictedWhitespaceReplace>restricted  whitespace  replace</ex:restrictedWhitespaceReplace>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="XmlLang" element="ex:xmlLang">
    <ex:types>
      <xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/"
        elementFormDefault="qualified"
        xml:lang="en">
        <xs:element name="xmlLang" type="xs:string"/>
      </xs:schema>
    </ex:types>
    <ex:instance xml:id="XmlLang01">
      <ex:xmlLang>foo</ex:xmlLang>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="ComplexTypeAttributeRestriction" element="ex:complexTypeAttributeRestriction">
    <ex:typedef>
      <xs:element name="complexTypeAttributeRestriction" type="ex:ComplexTypeAttributeRestriction"/>
      <xs:complexType name="ComplexTypeAttributeRestrictionBase">
        <xs:sequence>
          <xs:element name="element1" type="xs:string"/>
        </xs:sequence>
        <xs:attribute name="attrRestriction" type="xs:string"/>
      </xs:complexType>        
      <xs:complexType name="ComplexTypeAttributeRestriction">
        <xs:complexContent>
          <xs:restriction base="ex:ComplexTypeAttributeRestrictionBase">
            <xs:sequence>
              <xs:element name="element1" type="xs:string"/>
            </xs:sequence>
            <xs:attribute name="attrRestriction" type="xs:string" use="required"/>
          </xs:restriction>
        </xs:complexContent>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ComplexTypeAttributeRestriction01">
      <ex:complexTypeAttributeRestriction attrRestriction="value">
        <ex:element1>string</ex:element1>
      </ex:complexTypeAttributeRestriction>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="ComplexTypeSequenceRestriction" element="ex:complexTypeSequenceRestriction">
    <ex:typedef>
      <xs:element name="complexTypeSequenceRestriction" type="ex:ComplexTypeSequenceRestriction"/>
      <xs:complexType name="ComplexTypeSequenceRestrictionBase">
        <xs:sequence>
          <xs:element name="element1" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:complexType>        
      <xs:complexType name="ComplexTypeSequenceRestriction">
        <xs:complexContent>
          <xs:restriction base="ex:ComplexTypeSequenceRestrictionBase">
            <xs:sequence>
              <xs:element name="element1" type="xs:string"/>
            </xs:sequence>
          </xs:restriction>
        </xs:complexContent>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ComplexTypeSequenceRestriction01">
      <ex:complexTypeSequenceRestriction>
        <ex:element1>string</ex:element1>
      </ex:complexTypeSequenceRestriction>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="LocalElementComplexTypeEmptyExtension" element="ex:localElementComplexTypeEmptyExtension">
    <ex:typedef>
      <xs:element name="localElementComplexTypeEmptyExtension">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="extensionElement">
              <xs:complexType>
                <xs:complexContent>
                  <xs:extension base="ex:ExtensionType"/>
                </xs:complexContent>
              </xs:complexType>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:complexType name="ExtensionType">
        <xs:sequence>
          <xs:element name="element1" type="xs:string"/>
          <xs:element name="element2" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
   </ex:typedef>
    <ex:instance xml:id="LocalElementComplexTypeEmptyExtension01">
      <ex:localElementComplexTypeEmptyExtension>
        <ex:extensionElement>
          <ex:element1>string</ex:element1>
          <ex:element2>string</ex:element2>
        </ex:extensionElement>
      </ex:localElementComplexTypeEmptyExtension> 
    </ex:instance>
   </ex:example>   

  <ex:example xml:id="SequenceSequenceGroup" element="ex:sequenceSequenceGroup">
    <ex:typedef>
      <xs:element name="sequenceSequenceGroup" type="ex:SequenceSequenceGroup"/>
      <xs:complexType name="SequenceSequenceGroup">
        <xs:sequence>
          <xs:sequence>
            <xs:group ref="ex:SeqSeqGroup"/>
          </xs:sequence>
        </xs:sequence>
      </xs:complexType>
      <xs:group name="SeqSeqGroup">
        <xs:sequence>
          <xs:element name="element1" type="xs:string"/>
          <xs:element name="element2" type="xs:string"/>
        </xs:sequence>
      </xs:group>
    </ex:typedef>
    <ex:instance xml:id="SequenceSequenceGroup01">
      <ex:sequenceSequenceGroup>
        <ex:element1>string1</ex:element1>
        <ex:element2>string2</ex:element2>
      </ex:sequenceSequenceGroup>
    </ex:instance>  
  </ex:example>      

  <ex:example xml:id="MaxOccurs0" element="ex:maxOccurs0">
    <ex:typedef>
      <xs:element name="maxOccurs0" type="ex:MaxOccurs0"/>
      <xs:complexType name="MaxOccurs0">
        <xs:sequence>
          <xs:element name="element1" type="xs:string"/>
          <xs:element name="element2" type="xs:string" maxOccurs="0" minOccurs="0"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="MaxOccurs001">
      <ex:maxOccurs0>
        <ex:element1>string1</ex:element1>
      </ex:maxOccurs0>
    </ex:instance>  
  </ex:example>      

  <ex:example xml:id="AttributeGroupAnyAttribute" element="ex:attributeGroupAnyAttribute">
    <ex:typedef>
      <xs:element name="attributeGroupAnyAttribute" type="ex:AttributeGroupAnyAttribute"/>
      <xs:complexType name="AttributeGroupAnyAttribute">
        <xs:attributeGroup ref="ex:CommonAttributes"/>
      </xs:complexType>
      <xs:attributeGroup name="CommonAttributes">
        <xs:attribute name="id" type="xs:ID" use="optional" form="unqualified"/>
        <xs:anyAttribute processContents="skip"/>
      </xs:attributeGroup>
    </ex:typedef>  
    <ex:instance xml:id="AttributeGroupAnyAttribute01">
      <ex:attributeGroupAnyAttribute id="id1" ex:anyattr="value1"/>
    </ex:instance>
  </ex:example>  
  
  <ex:example xml:id="ElementKey" element="ex:elementKey">
    <ex:typedef>
      <xs:element name="elementKey" type="ex:ElementKey">
        <xs:key name="key">
          <xs:selector xpath=".//item"/>
          <xs:field xpath="number"/>
        </xs:key>
      </xs:element>
      <xs:complexType name="ElementKey">
        <xs:sequence>
          <xs:element name="item" type="ex:itemType" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:complexType>
      <xs:complexType name="itemType">
        <xs:sequence>
          <xs:element name="number" type="xs:integer"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>  
    <ex:instance xml:id="ElementKey01">
      <ex:elementKey>
        <ex:item>
          <ex:number>1234</ex:number>
        </ex:item>
      </ex:elementKey>
    </ex:instance>
  </ex:example>  

  <ex:example xml:id="AnyAttributeNamespacedFinite" element="ex:anyAttributeNamespacedFinite">
    <ex:typedef>
      <xs:element name="anyAttributeNamespacedFinite" type="ex:AnyAttributeNamespacedFinite"/>
      <xs:complexType name="AnyAttributeNamespacedFinite">
        <xs:sequence>
          <xs:element name="firstElement" type="xs:string"/>
          <xs:element name="lastElement" type="xs:string"/>
        </xs:sequence>
        <xs:anyAttribute processContents="lax" namespace="http://www.w3.org/2002/ws/databinding/examples/6/09/"/>
      </xs:complexType>
      <xs:attribute name="otherAttribute">
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="value1"/>
            <xs:enumeration value="value2"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </ex:typedef>  
    <ex:instance xml:id="AnyAttributeNamespacedFinite01">
      <ex:anyAttributeNamespacedFinite ex:otherAttribute="value1">
        <ex:firstElement>element1</ex:firstElement>
        <ex:lastElement>element2</ex:lastElement>
      </ex:anyAttributeNamespacedFinite>
    </ex:instance>
  </ex:example>  

  <ex:example xml:id="AnyURIEnumerationType" element="ex:anyURIEnumerationType">
    <ex:typedef>
      <xs:element name="anyURIEnumerationType" type="ex:URISimpleType"/>
      <xs:simpleType name="URISimpleType">
        <xs:restriction base="xs:anyURI">
          <xs:enumeration value="http://www.w3.org/2005/08/addressing/reply"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>  
    <ex:instance xml:id="AnyURIEnumerationType01">
      <ex:anyURIEnumerationType>http://www.w3.org/2005/08/addressing/reply</ex:anyURIEnumerationType>
    </ex:instance>
  </ex:example>  

  <ex:example xml:id="QNameEnumerationType" element="ex:qNameEnumerationType">
    <ex:typedef>
      <xs:element name="qNameEnumerationType" type="ex:QNameSimpleType"/>
      <xs:simpleType name="QNameSimpleType">
        <xs:restriction base="xs:QName">
          <xs:enumeration value="ex:firstQName"/>
          <xs:enumeration value="ex:secondQName"/>
        </xs:restriction>
      </xs:simpleType>
    </ex:typedef>  
    <ex:instance xml:id="QNameEnumerationType01">
      <ex:qNameEnumerationType>ex:firstQName</ex:qNameEnumerationType>
    </ex:instance>
  </ex:example> 

  <ex:example xml:id="ComplexTypeSequenceChoiceAny" element="ex:complexTypeSequenceChoiceAny">
    <ex:typedef>
      <xs:element name="complexTypeSequenceChoiceAny" type="ex:ComplexTypeSequenceChoiceAny"/>
      <xs:complexType name="ComplexTypeSequenceChoiceAny">
        <xs:sequence>
          <xs:choice>
            <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##any" processContents="lax"/>
          </xs:choice>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ComplexTypeSequenceChoiceAny01">
      <ex:complexTypeSequenceChoiceAny>
        <ex:anyElement>any data</ex:anyElement>
      </ex:complexTypeSequenceChoiceAny>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="ComplexTypeExtensionAnnotationOnly" element="ex:complexTypeExtensionAnnotationOnly">
    <ex:typedef>
      <xs:element name="complexTypeExtensionAnnotationOnly" type="ex:ComplexTypeExtensionAnnotationOnly"/>
      <xs:complexType name="ComplexTypeExtensionAnnotationOnly">
        <xs:complexContent>
          <xs:extension base="ex:ComplexTypeExtension">
            <xs:annotation>
              <xs:documentation>Elements that extend ex:ComplexTypeExtension</xs:documentation>
            </xs:annotation>  
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:complexType name="ComplexTypeExtension">
        <xs:sequence>
          <xs:element name="element1" type="xs:string"/>
          <xs:element name="element2" type="xs:string"/>
        </xs:sequence>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ComplexTypeExtensionAnnotationOnly01">
      <ex:complexTypeExtensionAnnotationOnly>
        <ex:element1>string</ex:element1>
        <ex:element2>string</ex:element2>
      </ex:complexTypeExtensionAnnotationOnly>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="ComplexTypeFinal" element="ex:complexTypeFinal">
    <ex:typedef>
      <xs:element name="complexTypeFinal" type="ex:ComplexTypeFinal"/>
      <xs:complexType name="ComplexTypeFinal" final="#all">
        <xs:sequence>
          <xs:element name="element1" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
        </xs:sequence>
      </xs:complexType>        
    </ex:typedef>
    <ex:instance xml:id="ComplexTypeFinal01">
      <ex:complexTypeFinal>
        <ex:element1>value1</ex:element1>
        <ex:element1>value2</ex:element1>
        <ex:element1>value3</ex:element1>
      </ex:complexTypeFinal>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ComplexTypeChoiceAny" element="ex:complexTypeChoiceAny">
    <ex:typedef>
      <xs:element name="complexTypeChoiceAny" type="ex:ComplexTypeChoiceAny"/>
      <xs:complexType name="ComplexTypeChoiceAny">
          <xs:choice>
            <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##any" processContents="lax"/>
          </xs:choice>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ComplexTypeChoiceAny01">
      <ex:complexTypeChoiceAny>
        <ex:anything>
          <ex:element>any data</ex:element>
        </ex:anything>
      </ex:complexTypeChoiceAny>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="ComplexContentRestrictionAnyAttribute" element="ex:complexContentRestrictionAnyAttribute">
    <ex:typedef>
      <xs:element name="complexContentRestrictionAnyAttribute" type="ex:ComplexContentRestrictionAnyAttribute"/>
      <xs:complexType name="ComplexContentRestrictionAnyAttribute">
        <xs:complexContent>
          <xs:restriction base="ex:ComplexTypeToBeRestricted">
            <xs:sequence>
              <xs:element name="element1" type="xs:string"/>
              <xs:element name="element2" type="xs:string"/>
            </xs:sequence>
            <xs:anyAttribute processContents="skip"/>
          </xs:restriction>
        </xs:complexContent>
      </xs:complexType>
      <xs:complexType name="ComplexTypeToBeRestricted">    
        <xs:sequence>
          <xs:element name="element1" type="xs:string" minOccurs="0"/>
          <xs:element name="element2" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:anyAttribute processContents="skip"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ComplexContentRestrictionAnyAttribute01">
      <ex:complexContentRestrictionAnyAttribute>
        <ex:element1>value1</ex:element1>
        <ex:element2>value2</ex:element2>
      </ex:complexContentRestrictionAnyAttribute>
    </ex:instance>
  </ex:example>
  
  <ex:example xml:id="ComplexContentExtensionAnyAttribute" element="ex:complexContentExtensionAnyAttribute">
    <ex:typedef>
      <xs:element name="complexContentExtensionAnyAttribute" type="ex:ComplexContentExtensionAnyAttribute"/>
      <xs:complexType name="ComplexContentExtensionAnyAttribute">
        <xs:complexContent>
          <xs:extension base="ex:ComplexTypeToBeExtended">
            <xs:sequence>
              <xs:element name="element3" type="xs:string" minOccurs="0"/>
              <xs:element name="element4" type="xs:string" minOccurs="0"/>
            </xs:sequence>
            <xs:anyAttribute processContents="skip"/>
          </xs:extension>
        </xs:complexContent>
      </xs:complexType>
      <xs:complexType name="ComplexTypeToBeExtended">    
        <xs:sequence>
          <xs:element name="element1" type="xs:string"/>
          <xs:element name="element2" type="xs:string"/>
        </xs:sequence>
        <xs:anyAttribute processContents="skip"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="ComplexContentExtensionAnyAttribute01">
      <ex:complexContentExtensionAnyAttribute>
        <ex:element1>value1</ex:element1>
        <ex:element2>value2</ex:element2>
      </ex:complexContentExtensionAnyAttribute>
    </ex:instance>
    <ex:instance xml:id="ComplexContentExtensionAnyAttribute02">
      <ex:complexContentExtensionAnyAttribute>
        <ex:element1>value1</ex:element1>
        <ex:element2>value2</ex:element2>
        <ex:element3>value3</ex:element3>
        <ex:element4>value4</ex:element4>
      </ex:complexContentExtensionAnyAttribute>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ElementDefaultAnyType" element="ex:elementDefaultAnyType">
    <ex:typedef>
      <xs:element name="elementDefaultAnyType"/>
    </ex:typedef>
    <ex:instance xml:id="ElementDefaultAnyType01">
      <ex:elementDefaultAnyType/>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="ExtendedSequenceNamespacedFinite" element="ex:extendedSequenceNamespacedFinite">
    <ex:typedef>
      <xs:element name="extendedSequenceNamespacedFinite" type="ex:ExtendedSequenceNamespacedFinite"/>
      <xs:complexType name="ExtendedSequenceNamespacedFinite">
        <xs:sequence>
          <xs:any maxOccurs="2" processContents="lax" namespace="http://www.w3.org/2002/ws/databinding/examples/6/09/"/>
        </xs:sequence>  
      </xs:complexType>
    </ex:typedef>  
    <ex:instance xml:id="ExtendedSequenceNamespacedFinite01">
      <ex:extendedSequenceNamespacedFinite>
        <ex:anyElement>any data</ex:anyElement>
      </ex:extendedSequenceNamespacedFinite>
    </ex:instance>
  </ex:example>  
  
  <ex:example xml:id="Redefine" element="ex:redefine">
    <ex:typedef>
      <xs:redefine schemaLocation="../redefineschema.xsd">
        <xs:complexType name="RedefineType">
          <xs:complexContent>
            <xs:extension base="ex:RedefineType">
              <xs:sequence>
                <xs:element name="element3" type="xs:string"/>
              </xs:sequence>
            </xs:extension>
          </xs:complexContent>
        </xs:complexType>
      </xs:redefine>    
      <xs:element name="redefined" type="ex:RedefineType"/>
    </ex:typedef>  
    <ex:instance xml:id="Redefine01">
      <ex:redefined>
        <ex:element1>value1</ex:element1>
        <ex:element2>value2</ex:element2>
        <ex:element3>value3</ex:element3>
      </ex:redefined>
    </ex:instance>
  </ex:example>  
  
</ex:examples>

