<?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.162 2008/03/26 16:24:43 ylafon 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 xmlns="">foo</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-15: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="xs:IDREF"/>
    </ex:typedef>
    <ex:instance xml:id="IDREFElement01">
      <ex:IDREFElement>foo</ex:IDREFElement>
    </ex:instance>
  </ex:example>

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

  <ex:example xml:id="IDREFSElement" element="ex:IDREFSElement">
    <ex:typedef>
      <xs:element name="IDREFSElement" type="xs:IDREFS"/>
    </ex:typedef>
    <ex:instance xml:id="IDREFSElement01">
      <ex:IDREFSElement>foo</ex:IDREFSElement>
    </ex:instance>
  </ex:example>

  <ex:example xml:id="IDREFSAttribute" element="ex:IDREFSAttribute">
    <ex:typedef>
      <xs:element name="IDREFSAttribute" type="ex:IDREFSAttribute"/>
      <xs:complexType name="IDREFSAttribute">
        <xs:sequence>
          <xs:element name="text" type="xs:string" minOccurs="0"/>
        </xs:sequence>
        <xs:attribute name="IDREFS" type="xs:IDREFS"/>
      </xs:complexType>
    </ex:typedef>
    <ex:instance xml:id="IDREFSAttribute01">
      <ex:IDREFSAttribute IDREFS="hello"/>
    </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:eyeColor="blue">
        <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" maxO