<?xml version="1.0" encoding="UTF-8"?>
<ex:examples xmlns:pat="http://www.w3.org/2002/ws/databinding/patterns/6/09/"
       xmlns:ex="http://www.w3.org/2002/ws/databinding/examples/6/09/"
       xmlns:soap11enc="http://schemas.xmlsoap.org/soap/encoding/"
       xmlns:wsdl11="http://schemas.xmlsoap.org/wsdl/"
       xmlns:xs="http://www.w3.org/2001/XMLSchema"
       xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       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:example xml:id="TargetNamespace" pattern="TargetNamespace">
<pat:xpath>.[@targetNamespace]/
		(., @targetNamespace)</pat:xpath>
<ex:types>
&lt;<b>xs:schema</b> 
   <b> targetNamespace</b>="http://www.w3.org/2002/ws/databinding/examples/6/09/" elementFormDefault="qualified"&gt;
  &lt;xs:element name="targetNamespace" type="xs:string" /&gt;
&lt;/<b>xs:schema</b>&gt;
    </ex:types>
<ex:instance xml:id="TargetNamespace01">
   <ex:targetNamespace>foo</ex:targetNamespace>
</ex:instance>
   </ex:example>
   <ex:example xml:id="NoTargetNamespace" pattern="NoTargetNamespace">
<pat:xpath>.[not(@targetNamespace)]/
		(.)</pat:xpath>
<ex:types>
&lt;<b>xs:schema</b>&gt;
  &lt;xs:element name="noTargetNamespace" type="xs:string" /&gt;
&lt;/<b>xs:schema</b>&gt;
    </ex:types>
<ex:instance xml:id="NoTargetNamespace01">
   <noTargetNamespace xsi:noNamespaceSchemaLocation="NoTargetNamespace.xsd">some data</noTargetNamespace>
</ex:instance>
   </ex:example>
   <ex:example xml:id="QualifiedLocalElements" pattern="QualifiedLocalElements">
<pat:xpath>.[@elementFormDefault = 'qualified']/
		(@elementFormDefault)</pat:xpath>
<ex:types>
&lt;xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/" <b> elementFormDefault</b>="qualified"&gt;
  &lt;xs:element name="qualifiedLocalElements"&gt;
    &lt;xs:complexType&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element name="element1" type="xs:string" /&gt;
        &lt;xs:element name="element2" type="xs:string" /&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:complexType&gt;
  &lt;/xs:element&gt;
&lt;/xs:schema&gt;
    </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="UnqualifiedLocalElements" pattern="UnqualifiedLocalElements">
<pat:xpath>.[not(@elementFormDefault) or @elementFormDefault = 'unqualified']/
		(., @elementFormDefault)</pat:xpath>
<ex:types>
&lt;<b>xs:schema</b> targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/" <b> elementFormDefault</b>="unqualified"&gt;
  &lt;xs:element name="unqualifiedLocalElements" type="xs:string" /&gt;
&lt;/<b>xs:schema</b>&gt;
    </ex:types>
<ex:instance xml:id="UnqualifiedLocalElements01">
   <unqualifiedLocalElements xmlns="http://www.w3.org/2002/ws/databinding/examples/6/09/">some data</unqualifiedLocalElements>
</ex:instance>
   </ex:example>
   <ex:example xml:id="QualifiedLocalAttributes" pattern="QualifiedLocalAttributes">
<pat:xpath>.[@attributeFormDefault = 'qualified']/
		(@attributeFormDefault)</pat:xpath>
<ex:types>
&lt;xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/" <b> attributeFormDefault</b>="qualified"&gt;
  &lt;xs:element name="qualifiedLocalAttributes" type="xs:string" /&gt;
&lt;/xs:schema&gt;
    </ex:types>
<ex:instance xml:id="QualifiedLocalAttributes01">
   <ex:qualifiedLocalAttributes>string</ex:qualifiedLocalAttributes>
</ex:instance>
   </ex:example>
   <ex:example xml:id="UnqualifiedLocalAttributes" pattern="UnqualifiedLocalAttributes">
<pat:xpath>.[not(@attributeFormDefault) or @attributeFormDefault = 'unqualified']/
		(., @attributeFormDefault)</pat:xpath>
<ex:types>
&lt;<b>xs:schema</b> targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/" <b> attributeFormDefault</b>="unqualified" elementFormDefault="qualified"&gt;
  &lt;xs:element name="unqualifiedLocalAttributes" type="xs:string" /&gt;
&lt;/<b>xs:schema</b>&gt;
    </ex:types>
<ex:instance xml:id="UnqualifiedLocalAttributes01">
   <ex:unqualifiedLocalAttributes>foo</ex:unqualifiedLocalAttributes>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SchemaVersion" pattern="SchemaVersion">
<pat:xpath>./@version</pat:xpath>
<ex:types>
&lt;xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/" elementFormDefault="qualified" <b> version</b>="this is version 42"&gt;
  &lt;xs:element name="schemaVersion" type="xs:string" /&gt;
&lt;/xs:schema&gt;
    </ex:types>
<ex:instance xml:id="SchemaVersion01">
   <ex:schemaVersion>foo</ex:schemaVersion>
</ex:instance>
   </ex:example>
   <ex:example xml:id="FinalDefault" pattern="FinalDefault">
<pat:xpath>./@finalDefault</pat:xpath>
<ex:types>
&lt;xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/" elementFormDefault="qualified" <b> finalDefault</b>="#all"&gt;
  &lt;xs:element name="finalDefault" type="xs:string" /&gt;
&lt;/xs:schema&gt;
    </ex:types>
<ex:instance xml:id="FinalDefault01">
   <ex:finalDefault>foo</ex:finalDefault>
</ex:instance>
   </ex:example>
   <ex:example xml:id="BlockDefault" pattern="BlockDefault">
<pat:xpath>./@blockDefault</pat:xpath>
<ex:types>
&lt;xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/" elementFormDefault="qualified" <b> blockDefault</b>="#all"&gt;
  &lt;xs:element name="blockDefault" type="xs:string" /&gt;
&lt;/xs:schema&gt;
    </ex:types>
<ex:instance xml:id="BlockDefault01">
   <ex:blockDefault>foo</ex:blockDefault>
</ex:instance>
   </ex:example>
   <ex:example xml:id="DocumentationElement" pattern="DocumentationElement">
<pat:xpath>.//xs:annotation/xs:documentation/
		(.., ., .//*, .//@*)</pat:xpath>
<ex:typedef>
&lt;<b>xs:annotation</b>&gt;
  &lt;<b>xs:documentation</b> 
   <b> xml:lang</b>="en" /&gt;
&lt;/<b>xs:annotation</b>&gt;
&lt;xs:element name="documentationElement" type="xs:string"&gt;
  &lt;<b>xs:annotation</b>&gt;
    &lt;<b>xs:documentation</b> 
   <b> xml:lang</b>="en" /&gt;
  &lt;/<b>xs:annotation</b>&gt;
&lt;/xs:element&gt;
    </ex:typedef>
<ex:instance xml:id="DocumentationElement01">
   <ex:documentationElement>hello world</ex:documentationElement>
</ex:instance>
   </ex:example>
   <ex:example xml:id="AppinfoElement" pattern="AppinfoElement">
<pat:xpath>.//xs:annotation/xs:appinfo/
		(.., ., .//*, .//@*)</pat:xpath>
<ex:typedef>
&lt;xs:element name="appinfoElement" type="xs:string"&gt;
  &lt;<b>xs:annotation</b>&gt;
    &lt;<b>xs:appinfo</b> /&gt;
  &lt;/<b>xs:annotation</b>&gt;
&lt;/xs:element&gt;
    </ex:typedef>
<ex:instance xml:id="AppinfoElement01">
   <ex:appinfoElement>some info</ex:appinfoElement>
</ex:instance>
   </ex:example>
   <ex:example xml:id="IdentifierName" pattern="IdentifierName">
<pat:xpath>.//.[matches(@name, "^[A-Za-z_]([A-Za-z0-9_]{0,31})$")]/
		(@name)</pat:xpath>
<ex:typedef>
&lt;xs:element <b> name</b>="identifierName" type="xs:string" /&gt;
    </ex:typedef>
<ex:instance xml:id="IdentifierName02">
   <ex:identifierName>Hello</ex:identifierName>
</ex:instance>
   </ex:example>
   <ex:example xml:id="NonIdentifierName" pattern="NonIdentifierName">
<pat:xpath>.//.[@name and not(matches(@name, "^[A-Za-z_]([A-Za-z0-9_]{0,31})$"))]/
		(@name)</pat:xpath>
<ex:typedef>
&lt;xs:element <b> name</b>="non-Identifier-Name" type="xs:string" /&gt;
    </ex:typedef>
<ex:instance xml:id="NonIdentifierName02">
   <ex:non-Identifier-Name>Hello</ex:non-Identifier-Name>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ImportTypesNamespace" pattern="ImportTypesNamespace">
<pat:xpath>.//xs:import[@namespace
		and not(@schemaLocation) 
		and (@namespace = ../../xs:schema/@targetNamespace)]/ 
		(., @namespace)</pat:xpath>
<ex:typedef>
&lt;wsdl&gt;
  &lt;xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/static/1" elementFormDefault="qualified"&gt;
    &lt;xs:element name="importTypesNamespace" type="xs:string" /&gt;
  &lt;/xs:schema&gt;
  &lt;xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/static/2" elementFormDefault="qualified"&gt;
    &lt;<b>xs:import</b> 
   <b> namespace</b>="http://www.w3.org/2002/ws/databinding/examples/6/09/static/1" /&gt;
  &lt;/xs:schema&gt;
&lt;/wsdl&gt;
    </ex:typedef>
   </ex:example>
   <ex:example xml:id="ImportNamespace" pattern="ImportNamespace">
<pat:xpath>./xs:import[@namespace and not(@schemaLocation)
		and not(@namespace = 'http://www.w3.org/2001/XMLSchema')]/
		(., @namespace)</pat:xpath>
<ex:typedef>
&lt;<b>xs:import</b> 
   <b> namespace</b>="http://example.com/a/namespace" /&gt;
    </ex:typedef>
   </ex:example>
   <ex:example xml:id="ImportSchema" pattern="ImportSchema">
<pat:xpath>./xs:import[@namespace and @schemaLocation]/
		(., @namespace, @schemaLocation)</pat:xpath>
<ex:typedef>
&lt;<b>xs:import</b> 
   <b> namespace</b>="http://example.com/a/namespace" <b> schemaLocation</b>="http://www.w3.org/2002/ws/databinding/examples/6/09/static/Imported.xsd" /&gt;
    </ex:typedef>
   </ex:example>
   <ex:example xml:id="ImportSchemaNamespace" pattern="ImportSchemaNamespace">
<pat:xpath>./xs:import[not(@schemaLocation)
		and @namespace = 'http://www.w3.org/2001/XMLSchema']/
		(., @namespace)</pat:xpath>
<ex:typedef>
&lt;<b>xs:import</b> 
   <b> namespace</b>="http://www.w3.org/2001/XMLSchema" /&gt;
    </ex:typedef>
   </ex:example>
   <ex:example xml:id="Include" pattern="Include">
<pat:xpath>./xs:include[@schemaLocation]/
		(., @schemaLocation)</pat:xpath>
<ex:typedef>
&lt;<b>xs:include</b> 
   <b> schemaLocation</b>="http://www.w3.org/2002/ws/databinding/examples/6/09/static/Included.xsd" /&gt;
    </ex:typedef>
   </ex:example>
   <ex:example xml:id="GlobalElement" pattern="GlobalElement">
<pat:xpath>./xs:element[@name 
		and @type and contains(@type, ':')]/
		(., @name, @type)</pat:xpath>
<ex:typedef>
&lt;<b>xs:element</b> 
   <b> name</b>="globalElement" <b> type</b>="xs:string" /&gt;
    </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="GlobalElementUnqualifiedType" pattern="GlobalElementUnqualifiedType">
<pat:xpath>./xs:element[@name 
		and @type and not(contains(@type, ':'))]/
		(., @name, @type)</pat:xpath>
<ex:typedef>
&lt;<b>xs:element</b> 
   <b> name</b>="globalElementUnqualifiedType" <b> type</b>="GlobalElementUnqualifiedType" /&gt;
&lt;xs:complexType name="GlobalElementUnqualifiedType"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element1" type="xs:string" /&gt;
    &lt;xs:element name="element2" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="GlobalElementUnqualifiedType01">
   <ex:globalElementUnqualifiedType>
      <ex:element1>string1</ex:element1>
      <ex:element2>string2</ex:element2>
   </ex:globalElementUnqualifiedType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GlobalAttribute" pattern="GlobalAttribute">
<pat:xpath>./xs:attribute[@name and @type and contains(@type, ":")]/
		(., @name, @type)</pat:xpath>
<ex:typedef>
&lt;<b>xs:attribute</b> 
   <b> name</b>="globalAttributeAttr" <b> type</b>="xs:string" /&gt;
&lt;xs:complexType name="GlobalAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="globalAttributeElement" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute ref="ex:globalAttributeAttr" /&gt;
&lt;/xs:complexType&gt;
&lt;xs:element name="globalAttribute" type="ex:GlobalAttribute" /&gt;
    </ex:typedef>
<ex:instance xml:id="GlobalAttribute01">
   <ex:globalAttribute ex:globalAttributeAttr="string">
      <ex:globalAttributeElement>another string</ex:globalAttributeElement>
   </ex:globalAttribute>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GlobalAttributeUnqualifiedType"
         pattern="GlobalAttributeUnqualifiedType">
<pat:xpath>./xs:attribute[@name and @type and not(contains(@type, ':'))]/
		(., @name, @type)</pat:xpath>
<ex:typedef>
&lt;<b>xs:attribute</b> 
   <b> name</b>="globalAttributeUnqualifiedTypeAttr" <b> type</b>="GlobalAttributeUnqualifiedTypeSimpleType" /&gt;
&lt;xs:simpleType name="GlobalAttributeUnqualifiedTypeSimpleType"&gt;
  &lt;xs:restriction base="xs:string"&gt;
    &lt;xs:enumeration value="value1" /&gt;
    &lt;xs:enumeration value="value2" /&gt;
  &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;xs:complexType name="GlobalAttributeUnqualifiedType"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="globalAttributeUnqualifiedTypeElement" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute ref="ex:globalAttributeUnqualifiedTypeAttr" /&gt;
&lt;/xs:complexType&gt;
&lt;xs:element name="globalAttributeUnqualifiedType" type="ex:GlobalAttributeUnqualifiedType" /&gt;
    </ex:typedef>
<ex:instance xml:id="GlobalAttributeUnqualifiedType01">
   <ex:globalAttributeUnqualifiedType ex:globalAttributeUnqualifiedTypeAttr="value1">
      <ex:globalAttributeUnqualifiedTypeElement>another string</ex:globalAttributeUnqualifiedTypeElement>
   </ex:globalAttributeUnqualifiedType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ElementTypeDefaultNamespace" pattern="ElementTypeDefaultNamespace">
<pat:xpath>.//xs:element[@name and @type and not(contains(@type, ':'))]/
		(@name, @type)</pat:xpath>
<ex:typedef>
&lt;xs:element <b> name</b>="stringElementDefaultNamespace" <b> type</b>="string" /&gt;
    </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="NotMixed" pattern="NotMixed">
<pat:xpath>.//.[@mixed = 'false']/
		(@mixed)</pat:xpath>
<ex:typedef>
&lt;xs:element name="notMixed" type="ex:NotMixed" /&gt;
&lt;xs:complexType name="NotMixed" <b> mixed</b>="false"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="notMixedElement" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="NotMixedExample01">
   <ex:notMixed>
      <ex:notMixedElement>Stuff</ex:notMixedElement>
   </ex:notMixed>
</ex:instance>
   </ex:example>
   <ex:example xml:id="MixedComplexContent" pattern="MixedComplexContent">
<pat:xpath>.//xs:complexContent[@mixed = 'true']/
		(@mixed)</pat:xpath>
<ex:typedef>
&lt;xs:element name="mixedComplexContent" type="ex:MixedComplexContent" /&gt;
&lt;xs:complexType name="MixedComplexContent"&gt;
  &lt;xs:complexContent <b> mixed</b>="true"&gt;
    &lt;xs:restriction base="xs:anyType"&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element name="element1" type="xs:string" /&gt;
        &lt;xs:element name="element2" type="xs:string" /&gt;
        &lt;xs:element name="element3" type="xs:string" /&gt;
      &lt;/xs:sequence&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="MixedComplexContent01">
   <ex:mixedComplexContent>
      <ex:element1>string</ex:element1>
  mixed content
  <ex:element2>string</ex:element2>
  mixed content
  <ex:element3>string</ex:element3>
  mixed content
</ex:mixedComplexContent>
</ex:instance>
   </ex:example>
   <ex:example xml:id="MixedContentType" pattern="MixedContentType">
<pat:xpath>.//xs:complexType[@mixed = 'true']/
		(@mixed)</pat:xpath>
<ex:typedef>
&lt;xs:element name="mixedContentType" type="ex:MixedContentType" /&gt;
&lt;xs:complexType name="MixedContentType" <b> mixed</b>="true"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="elem1" type="xs:string" /&gt;
    &lt;xs:element name="elem2" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </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="MinOccurs1" pattern="MinOccurs1">
<pat:xpath>.//.[@minOccurs = '1']/
		(@minOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="minOccurs1" type="ex:MinOccurs1" /&gt;
&lt;xs:complexType name="MinOccurs1"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="value" type="xs:string" <b> minOccurs</b>="1" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="MinOccurs01">
   <ex:minOccurs1>
      <ex:value>44</ex:value>
   </ex:minOccurs1>
</ex:instance>
   </ex:example>
   <ex:example xml:id="MaxOccurs1" pattern="MaxOccurs1">
<pat:xpath>.//.[@maxOccurs = '1']/
		(@maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="maxOccurs1" type="ex:MaxOccurs1" /&gt;
&lt;xs:complexType name="MaxOccurs1"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="value" type="xs:string" <b> maxOccurs</b>="1" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="MaxOccurs01">
   <ex:maxOccurs1>
      <ex:value>44</ex:value>
   </ex:maxOccurs1>
</ex:instance>
<ex:instance xml:id="MaxOccurs02">
   <ex:maxOccurs1>
      <ex:value>4</ex:value>
   </ex:maxOccurs1>
</ex:instance>
   </ex:example>
   <ex:example xml:id="Id" pattern="Id">
<pat:xpath>.//@id</pat:xpath>
<ex:typedef>
&lt;xs:element name="idExample" type="ex:IdExample" <b> id</b>="node1" /&gt;
&lt;xs:complexType name="IdExample" <b> id</b>="node2"&gt;
  &lt;xs:sequence <b> id</b>="node3"&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" <b> id</b>="node4" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="string" type="xs:string" <b> id</b>="node5" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="IdExample01">
   <ex:idExample string="hello"/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ElementMinOccurs0" pattern="ElementMinOccurs0">
<pat:xpath>.//xs:element[@minOccurs = '0' and (not(@maxOccurs) or @maxOccurs = '1')]/
		(@minOccurs, @maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="elementMinOccurs0" type="ex:ElementMinOccurs0" /&gt;
&lt;xs:complexType name="ElementMinOccurs0"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstName" type="xs:string" /&gt;
    &lt;xs:element name="middleName" type="xs:string" <b> minOccurs</b>="0" /&gt;
    &lt;xs:element name="lastName" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </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="ElementMinOccurs1" pattern="ElementMinOccurs1">
<pat:xpath>.//xs:element[@minOccurs = '1' and (not(@maxOccurs) or @maxOccurs = '1')]/
		(@minOccurs, @maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="elementMinOccurs1" type="ex:ElementMinOccurs1" /&gt;
&lt;xs:complexType name="ElementMinOccurs1"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="elementMinOccurs1item" type="xs:string" <b> minOccurs</b>="1" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ElementMinOccurs101">
   <ex:elementMinOccurs1>
      <ex:elementMinOccurs1item>item1</ex:elementMinOccurs1item>
   </ex:elementMinOccurs1>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ElementMaxOccurs1" pattern="ElementMaxOccurs1">
<pat:xpath>.//xs:element[(not(@minOccurs) or @minOccurs = '1') and @maxOccurs = '1']/
		(@minOccurs, @maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="elementMaxOccurs1" type="ex:ElementMaxOccurs1" /&gt;
&lt;xs:complexType name="ElementMaxOccurs1"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="value" type="xs:string" <b> minOccurs</b>="1" <b> maxOccurs</b>="1" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </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="NestedSequenceElementList"
         pattern="ElementMinOccurs0MaxOccursUnbounded">
<pat:xpath>.//xs:element[@minOccurs = '0' and @maxOccurs = 'unbounded']/
		(@minOccurs, @maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="nestedSequenceElementList" type="ex:NestedSequenceElementList" /&gt;
&lt;xs:complexType name="NestedItem"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="item" <b> minOccurs</b>="0" <b> maxOccurs</b>="unbounded" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="NestedSequenceElementList"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="nestedItem" <b> minOccurs</b>="0" <b> maxOccurs</b>="unbounded" type="ex:NestedItem" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </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="ElementMinOccurs0MaxOccursUnbounded"
         pattern="ElementMinOccurs0MaxOccursUnbounded">
<pat:xpath>.//xs:element[@minOccurs = '0' and @maxOccurs = 'unbounded']/
		(@minOccurs, @maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="durationList" type="ex:DurationList" /&gt;
&lt;xs:complexType name="DurationList"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="durationValue" type="xs:short" <b> minOccurs</b>="0" <b> maxOccurs</b>="unbounded" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ElementMinOccurs0MaxOccursUnbounded101">
   <ex:durationList/>
</ex:instance>
<ex:instance xml:id="ElementMinOccurs0MaxOccursUnbounded102">
   <ex:durationList>
      <ex:durationValue>24</ex:durationValue>
      <ex:durationValue>34</ex:durationValue>
      <ex:durationValue>44</ex:durationValue>
   </ex:durationList>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ElementMaxOccursUnbounded"
         pattern="ElementMinOccurs1MaxOccursUnbounded">
<pat:xpath>.//xs:element[(not(@minOccurs) or @minOccurs = '1') and @maxOccurs = 'unbounded']/
		(@minOccurs, @maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="publications" type="ex:Publications" /&gt;
&lt;xs:complexType name="Publications"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="day" type="xs:string" <b> maxOccurs</b>="unbounded" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </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="ElementMinOccurs1MaxOccursUnbounded"
         pattern="ElementMinOccurs1MaxOccursUnbounded">
<pat:xpath>.//xs:element[(not(@minOccurs) or @minOccurs = '1') and @maxOccurs = 'unbounded']/
		(@minOccurs, @maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="ageList" type="ex:AgeList" /&gt;
&lt;xs:complexType name="AgeList"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="ageValue" type="xs:short" <b> minOccurs</b>="1" <b> maxOccurs</b>="unbounded" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ElementMinOccurs1MaxOccursUnbounded101">
   <ex:ageList>
      <ex:ageValue>44</ex:ageValue>
   </ex:ageList>
</ex:instance>
<ex:instance xml:id="ElementMinOccurs1MaxOccursUnbounded102">
   <ex:ageList>
      <ex:ageValue>24</ex:ageValue>
      <ex:ageValue>34</ex:ageValue>
      <ex:ageValue>44</ex:ageValue>
   </ex:ageList>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ElementMinOccursFinite" pattern="ElementMinOccursFinite">
<pat:xpath>.//xs:element[xs:integer(@minOccurs) gt 1]/
		(@minOccurs, @maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="elementMinOccursFinite" type="ex:ElementMinOccursFinite" /&gt;
&lt;xs:complexType name="ElementMinOccursFinite"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="elementMinOccursFiniteitem" type="xs:string" <b> minOccurs</b>="3" <b> maxOccurs</b>="3" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </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">
<pat:xpath>.//xs:element[xs:integer(@minOccurs) gt 1]/
		(@minOccurs, @maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="itemColors2" type="ex:ItemColors2" /&gt;
&lt;xs:complexType name="ItemColors2"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="itemColor" type="xs:string" <b> minOccurs</b>="2" <b> maxOccurs</b>="2" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </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">
<pat:xpath>.//xs:element[xs:integer(@minOccurs) gt 1]/
		(@minOccurs, @maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="itemColors" type="ex:ItemColors" /&gt;
&lt;xs:complexType name="ItemColors"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="itemColor" type="xs:string" <b> minOccurs</b>="2" <b> maxOccurs</b>="unbounded" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </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="ElementMinOccurs0MaxOccursFinite"
         pattern="ElementMinOccurs0MaxOccursFinite">
<pat:xpath>.//xs:element[@minOccurs = '0' and @maxOccurs and not(@maxOccurs = '0' or @maxOccurs = '1' or @maxOccurs = 'unbounded')]/
		(@minOccurs, @maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="colorList" type="ex:ColorList" /&gt;
&lt;xs:complexType name="ColorList"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="colorValue" type="xs:string" <b> minOccurs</b>="0" <b> maxOccurs</b>="2" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ElementMinOccurs0MaxOccursFinite101">
   <ex:colorList/>
</ex:instance>
<ex:instance xml:id="ElementMinOccurs0MaxOccursFinite102">
   <ex:colorList>
      <ex:colorValue>red</ex:colorValue>
      <ex:colorValue>green</ex:colorValue>
   </ex:colorList>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ElementMaxOccursFinite" pattern="ElementMaxOccursFinite">
<pat:xpath>.//xs:element[@maxOccurs and not(@maxOccurs = '0' or @maxOccurs = '1' or @maxOccurs = 'unbounded')]/
		(@maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="summer" type="ex:Summer" /&gt;
&lt;xs:complexType name="Summer"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="mnth" type="xs:string" <b> maxOccurs</b>="4" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </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="ElementFormQualified" pattern="ElementFormQualified">
<pat:xpath>.//xs:element[@form='qualified']/
		(@form)</pat:xpath>
<ex:typedef>
&lt;xs:element name="elementFormQualified" type="ex:ElementFormQualified" /&gt;
&lt;xs:complexType name="ElementFormQualified"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="premium" type="xs:string" <b> form</b>="qualified" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ElementFormQualified01">
   <ex:elementFormQualified>
      <ex:premium>1175</ex:premium>
   </ex:elementFormQualified>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ElementFormUnqualified" pattern="ElementFormUnqualified">
<pat:xpath>.//xs:element[@form='unqualified']/
		(@form)</pat:xpath>
<ex:typedef>
&lt;xs:element name="elementFormUnqualified" type="ex:ElementFormUnqualified" /&gt;
&lt;xs:complexType name="ElementFormUnqualified"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element" type="xs:string" <b> form</b>="unqualified" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ElementFormUnqualified01">
   <ex:elementFormUnqualified>
      <element>string</element>
   </ex:elementFormUnqualified>
</ex:instance>
   </ex:example>
   <ex:example xml:id="AttributeFormQualified" pattern="AttributeFormQualified">
<pat:xpath>.//xs:attribute[@form='qualified']/
		(@form)</pat:xpath>
<ex:typedef>
&lt;xs:element name="attributeFormQualified" type="ex:AttributeFormQualified" /&gt;
&lt;xs:complexType name="AttributeFormQualified"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element1" type="xs:string" /&gt;
    &lt;xs:element name="element2" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="attribute" <b> form</b>="qualified" type="xs:string" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="AttributeFormQualified01">
   <ex:attributeFormQualified ex:attribute="string">
      <ex:element1>string</ex:element1>
      <ex:element2>string</ex:element2>
   </ex:attributeFormQualified>
</ex:instance>
   </ex:example>
   <ex:example xml:id="AttributeFormUnqualified" pattern="AttributeFormUnqualified">
<pat:xpath>.//xs:attribute[@form='unqualified']/
		(@form)</pat:xpath>
<ex:typedef>
&lt;xs:element name="attributeFormUnqualified" type="ex:AttributeFormUnqualified" /&gt;
&lt;xs:complexType name="AttributeFormUnqualified"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="premium" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="id" type="xs:string" <b> form</b>="unqualified" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="AttributeFormUnqualifiedExample01">
   <ex:attributeFormUnqualified id="id01">
      <ex:premium>1175</ex:premium>
   </ex:attributeFormUnqualified>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GlobalElementDefault" pattern="ElementDefault">
<pat:xpath>.//xs:element/
		(@default)</pat:xpath>
<ex:typedef>
&lt;xs:element name="globalElementDefault" type="xs:string" <b> default</b>="theDefaultValue" /&gt;
    </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="ElementDefault" pattern="ElementDefault">
<pat:xpath>.//xs:element/
		(@default)</pat:xpath>
<ex:typedef>
&lt;xs:element name="elementDefault" type="ex:ElementDefault" /&gt;
&lt;xs:complexType name="ElementDefault"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element" type="xs:string" <b> default</b>="default" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ElementDefault01">
   <ex:elementDefault>
      <ex:element>default</ex:element>
   </ex:elementDefault>
</ex:instance>
<ex:instance xml:id="ElementDefault02">
   <ex:elementDefault>
      <ex:element>wrong value</ex:element>
   </ex:elementDefault>
</ex:instance>
   </ex:example>
   <ex:example xml:id="AttributeOptional" pattern="AttributeOptional">
<pat:xpath>.//xs:attribute[@use = 'optional']/ 
		(@use)</pat:xpath>
<ex:typedef>
&lt;xs:element name="attributeOptional" type="ex:AttributeOptional" /&gt;
&lt;xs:complexType name="AttributeOptional"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="amount" type="xs:long" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="id" type="xs:string" /&gt;
  &lt;xs:attribute name="currency" type="xs:string" <b> use</b>="optional" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="AttributeRequired">
<pat:xpath>.//xs:attribute[@use = 'required']/ 
		(@use)</pat:xpath>
<ex:typedef>
&lt;xs:element name="attributeRequired" type="ex:AttributeRequired" /&gt;
&lt;xs:complexType name="AttributeRequired"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="percentage" type="xs:int" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="id" type="xs:string" /&gt;
  &lt;xs:attribute name="seasonal" type="xs:string" <b> use</b>="required" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="AttributeFixed">
<pat:xpath>.//xs:attribute[@fixed] / 
		(@fixed)</pat:xpath>
<ex:typedef>
&lt;xs:element name="attributeFixed" type="ex:AttributeFixed" /&gt;
&lt;xs:complexType name="AttributeFixed"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="fee" type="xs:int" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="id" type="xs:string" /&gt;
  &lt;xs:attribute name="currency" type="xs:string" <b> fixed</b>="GBP" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="AttributeDefault">
<pat:xpath>.//xs:attribute[@default] / 
		(@default)</pat:xpath>
<ex:typedef>
&lt;xs:element name="attributeDefault" type="ex:AttributeDefault" /&gt;
&lt;xs:complexType name="AttributeDefault"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="defaultedValue" type="xs:string" <b> default</b>="theDefaultValue" /&gt;
&lt;/xs:complexType&gt;
    </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="GlobalSimpleType" pattern="GlobalSimpleType">
<pat:xpath>./xs:simpleType[@name]/
		(., @name)</pat:xpath>
<ex:typedef>
&lt;xs:element name="globalSimpleType" type="ex:GlobalSimpleType" /&gt;
&lt;<b>xs:simpleType</b> 
   <b> name</b>="GlobalSimpleType"&gt;
  &lt;xs:restriction base="xs:string"&gt;
    &lt;xs:enumeration value="foo" /&gt;
  &lt;/xs:restriction&gt;
&lt;/<b>xs:simpleType</b>&gt;
    </ex:typedef>
<ex:instance xml:id="GlobalSimpleType01">
   <ex:globalSimpleType>foo</ex:globalSimpleType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GlobalComplexType" pattern="GlobalComplexType">
<pat:xpath>./xs:complexType[@name]/
		(., @name)</pat:xpath>
<ex:typedef>
&lt;xs:element name="globalComplexType" type="ex:GlobalComplexType" /&gt;
&lt;<b>xs:complexType</b> 
   <b> name</b>="GlobalComplexType"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="premium" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/<b>xs:complexType</b>&gt;
    </ex:typedef>
<ex:instance xml:id="GlobalComplexTypeExample01">
   <ex:globalComplexType>
      <ex:premium>1175</ex:premium>
   </ex:globalComplexType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GlobalComplexTypeAbstract" pattern="GlobalComplexTypeAbstract">
<pat:xpath>./xs:complexType[@abstract='true']/
		(@abstract)</pat:xpath>
<ex:typedef>
&lt;xs:element name="globalComplexTypeAbstract" type="ex:GlobalComplexTypeAbstract" /&gt;
&lt;xs:complexType name="GlobalComplexTypeExtra" <b> abstract</b>="true"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="premium" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="GlobalComplexTypeAbstract"&gt;
  &lt;xs:complexContent&gt;
    &lt;xs:extension base="ex:GlobalComplexTypeExtra" /&gt;
  &lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="GlobalComplexTypeAbstractExample01">
   <ex:globalComplexTypeAbstract>
      <ex:premium>1175</ex:premium>
   </ex:globalComplexTypeAbstract>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ComplexTypeConcrete" pattern="ComplexTypeConcrete">
<pat:xpath>.//xs:complexType[@abstract='false']/
		(@abstract)</pat:xpath>
<ex:typedef>
&lt;xs:element name="complexTypeConcrete" type="ex:ComplexTypeConcrete" /&gt;
&lt;xs:complexType name="ComplexTypeConcrete" <b> abstract</b>="false"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="premium" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ComplexTypeConcreteExample01">
   <ex:complexTypeConcrete>
      <ex:premium>1175</ex:premium>
   </ex:complexTypeConcrete>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GlobalElementAbstract" pattern="GlobalElementAbstract">
<pat:xpath>./xs:element[@abstract='true']/
		(@abstract)</pat:xpath>
<ex:typedef>
&lt;xs:element name="globalElementAbstract" type="ex:GlobalElementAbstract" /&gt;
&lt;xs:complexType name="GlobalElementAbstract"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element ref="ex:globalElementAbstractSubHead" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:element name="globalElementAbstractSubHead" <b> abstract</b>="true" /&gt;
&lt;xs:element name="globalElementAbstractSub" substitutionGroup="ex:globalElementAbstractSubHead" /&gt;
    </ex:typedef>
<ex:instance xml:id="GlobalElementAbstract01">
   <ex:globalElementAbstract>
      <ex:globalElementAbstractSub>String</ex:globalElementAbstractSub>
   </ex:globalElementAbstract>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GlobalElementConcrete" pattern="GlobalElementConcrete">
<pat:xpath>./xs:element[@abstract='false']/
		(@abstract)</pat:xpath>
<ex:typedef>
&lt;xs:element name="globalElementConcrete" type="xs:string" <b> abstract</b>="false" /&gt;
    </ex:typedef>
<ex:instance xml:id="GlobalElementConcreteExample01">
   <ex:globalElementConcrete>Stuff</ex:globalElementConcrete>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GlobalElementBlock" pattern="GlobalElementBlock">
<pat:xpath>./xs:element/
		(@block)</pat:xpath>
<ex:typedef>
&lt;xs:element name="globalElementBlock" type="xs:string" <b> block</b>="#all" /&gt;
    </ex:typedef>
<ex:instance xml:id="GlobalElementBlockExample01">
   <ex:globalElementBlock>Stuff</ex:globalElementBlock>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GlobalElementFinal" pattern="GlobalElementFinal">
<pat:xpath>./xs:element/
		(@final)</pat:xpath>
<ex:typedef>
&lt;xs:element name="globalElementFinal" type="xs:string" <b> final</b>="#all" /&gt;
    </ex:typedef>
<ex:instance xml:id="GlobalElementFinalExample01">
   <ex:globalElementFinal>Stuff</ex:globalElementFinal>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GlobalComplexTypeBlock" pattern="GlobalComplexTypeBlock">
<pat:xpath>./xs:complexType/ 
		(@block)</pat:xpath>
<ex:typedef>
&lt;xs:element name="globalComplexTypeBlock" type="ex:BlockAll" /&gt;
&lt;xs:complexType name="BlockAll" <b> block</b>="#all"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="amount" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="GlobalComplexTypeBlockExample01">
   <ex:globalComplexTypeBlock>
      <ex:amount>1175</ex:amount>
   </ex:globalComplexTypeBlock>
</ex:instance>
   </ex:example>
   <ex:example xml:id="StringEnumerationType" pattern="StringEnumerationType">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:string') and xs:enumeration]/
		(., @base, xs:enumeration/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="beatle" type="ex:Beatle" /&gt;
&lt;xs:simpleType name="Beatle"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:string"&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="John" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="Paul" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="George" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="Stuart" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="Pete" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="Ringo" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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" pattern="NMTOKENEnumerationType">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:NMTOKEN') and xs:enumeration]/
		(., @base, xs:enumeration/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="nMTOKENEnumerationType" type="ex:NMTOKENEnumerationType" /&gt;
&lt;xs:simpleType name="NMTOKENEnumerationType"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:NMTOKEN"&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="token1" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="token2" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="token3" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="NMTOKENEnumerationType01">
   <ex:nMTOKENEnumerationType>token1</ex:nMTOKENEnumerationType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="IntEnumerationType" pattern="IntEnumerationType">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:int') and xs:enumeration]/
		(., @base, xs:enumeration/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="intEnumerationType" type="ex:IntEnumerationType" /&gt;
&lt;xs:simpleType name="IntEnumerationType"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:int"&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="2" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="3" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="5" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="7" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="IntEnumerationType01">
   <ex:intEnumerationType>2</ex:intEnumerationType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ShortEnumerationType" pattern="ShortEnumerationType">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:short') and xs:enumeration]/
		(., @base, xs:enumeration/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="shortEnumerationType" type="ex:ShortEnumerationType" /&gt;
&lt;xs:simpleType name="ShortEnumerationType"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:short"&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="7" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="11" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="13" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="ShortEnumerationType01">
   <ex:shortEnumerationType>11</ex:shortEnumerationType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="LongEnumerationType" pattern="LongEnumerationType">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:long') and xs:enumeration]/
		(., @base, xs:enumeration/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="longEnumerationType" type="ex:LongEnumerationType" /&gt;
&lt;xs:simpleType name="LongEnumerationType"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:long"&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="9152052" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="7816230" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="7235733" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="LongEnumerationType01">
   <ex:longEnumerationType>9152052</ex:longEnumerationType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="DoubleEnumerationType" pattern="DoubleEnumerationType">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:double') and xs:enumeration]/
		(., @base, xs:enumeration/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="doubleEnumerationType" type="ex:DoubleEnumerationType" /&gt;
&lt;xs:simpleType name="DoubleEnumerationType"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:double"&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="1267.43233E12" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="7234.34541E12" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="5733.65565E12" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="DoubleEnumerationType01">
   <ex:doubleEnumerationType>1267.43233E12</ex:doubleEnumerationType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="IntegerEnumerationType" pattern="IntegerEnumerationType">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:integer') and xs:enumeration]/
		(., @base, xs:enumeration/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="integerEnumerationType" type="ex:IntegerEnumerationType" /&gt;
&lt;xs:simpleType name="IntegerEnumerationType"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:integer"&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="4000000" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="5000000" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="6000000" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="IntegerEnumerationType01">
   <ex:integerEnumerationType>4000000</ex:integerEnumerationType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="DecimalEnumerationType" pattern="DecimalEnumerationType">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:decimal') and xs:enumeration]/
		(., @base, xs:enumeration/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="decimalEnumerationType" type="ex:DecimalEnumerationType" /&gt;
&lt;xs:simpleType name="DecimalEnumerationType"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:decimal"&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="+1000.0001" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="-1000.0001" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="1000.0002" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="DecimalEnumerationType01">
   <ex:decimalEnumerationType>1000.0002</ex:decimalEnumerationType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="FloatEnumerationType" pattern="FloatEnumerationType">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:float') and xs:enumeration]/
		(., @base, xs:enumeration/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="floatEnumerationType" type="ex:FloatEnumerationType" /&gt;
&lt;xs:simpleType name="FloatEnumerationType"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:float"&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="1267.43233E12" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="7234.34541E12" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="5733.65565E12" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="FloatEnumerationType01">
   <ex:floatEnumerationType>1267.43233E12</ex:floatEnumerationType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="NonNegativeIntegerEnumerationType"
         pattern="NonNegativeIntegerEnumerationType">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:nonNegativeInteger') and xs:enumeration]/
		(., @base, xs:enumeration/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="nonNegativeIntegerEnumerationType" type="ex:NonNegativeIntegerEnumerationType" /&gt;
&lt;xs:simpleType name="NonNegativeIntegerEnumerationType"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:nonNegativeInteger"&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="12" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="24" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="33" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="NonNegativeIntegerEnumerationType01">
   <ex:nonNegativeIntegerEnumerationType>12</ex:nonNegativeIntegerEnumerationType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="PositiveIntegerEnumerationType"
         pattern="PositiveIntegerEnumerationType">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:positiveInteger')
		and xs:enumeration]/
		(., @base, xs:enumeration/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="positiveIntegerEnumerationType" type="ex:PositiveIntegerEnumerationType" /&gt;
&lt;xs:simpleType name="PositiveIntegerEnumerationType"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:positiveInteger"&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="12" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="24" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="33" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="PositiveIntegerEnumerationType01">
   <ex:positiveIntegerEnumerationType>12</ex:positiveIntegerEnumerationType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="UnsignedIntEnumerationType" pattern="UnsignedIntEnumerationType">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:unsignedInt') and xs:enumeration]/
		(., @base, xs:enumeration/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="unsignedIntEnumerationType" type="ex:UnsignedIntEnumerationType" /&gt;
&lt;xs:simpleType name="UnsignedIntEnumerationType"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:unsignedInt"&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="1111111111" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="2222222222" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="3333333333" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="UnsignedIntEnumerationType01">
   <ex:unsignedIntEnumerationType>3333333333</ex:unsignedIntEnumerationType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="UnsignedLongEnumerationType" pattern="UnsignedLongEnumerationType">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:unsignedLong') and xs:enumeration]/
		(., @base, xs:enumeration/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="unsignedLongEnumerationType" type="ex:UnsignedLongEnumerationType" /&gt;
&lt;xs:simpleType name="UnsignedLongEnumerationType"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:unsignedLong"&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="11111111111111" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="22222222222222" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="33333333333333" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="UnsignedLongEnumerationType01">
   <ex:unsignedLongEnumerationType>33333333333333</ex:unsignedLongEnumerationType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="UnsignedShortEnumerationType" pattern="UnsignedShortEnumerationType">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:unsignedShort') and xs:enumeration]/
		(., @base, xs:enumeration/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="unsignedShortEnumerationType" type="ex:UnsignedShortEnumerationType" /&gt;
&lt;xs:simpleType name="UnsignedShortEnumerationType"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:unsignedShort"&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="1111" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="2222" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="3333" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="UnsignedShortEnumerationType01">
   <ex:unsignedShortEnumerationType>3333</ex:unsignedShortEnumerationType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="TokenEnumerationType" pattern="TokenEnumerationType">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:token') and xs:enumeration]/
   (., @base, xs:enumeration/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="tokenEnumerationType" type="ex:TokenEnumerationType" /&gt;
&lt;xs:simpleType name="TokenEnumerationType"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:token"&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="1" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="2" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="3" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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="LanguageEnumerationType" pattern="LanguageEnumerationType">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:language') and xs:enumeration]/
   (., @base, xs:enumeration/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="languageEnumerationType" type="ex:LanguageEnumerationType" /&gt;
&lt;xs:simpleType name="LanguageEnumerationType"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:language"&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="en" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="en-US" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="fr" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="de" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="it" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="LanguageEnumerationType01">
   <ex:languageEnumerationType>en</ex:languageEnumerationType>
</ex:instance>
<ex:instance xml:id="LanguageEnumerationType02">
   <ex:languageEnumerationType>it</ex:languageEnumerationType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SimpleTypeEnumerationType" pattern="SimpleTypeEnumerationType">
<pat:xpath>.//xs:simpleType/xs:restriction[@base and
	    namespace-uri-from-QName(resolve-QName(@base,.)) != 'http://www.w3.org/2001/XMLSchema' ]/
		(., @base, xs:enumeration/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="simpleTypeEnumerationType" type="ex:SimpleTypeEnumerationType" /&gt;
&lt;xs:simpleType name="SimpleTypeEnumerationType"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="ex:SimpleTypeEnumerationTypeBase"&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="One" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="Two" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
&lt;xs:simpleType name="SimpleTypeEnumerationTypeBase"&gt;
  &lt;xs:restriction base="xs:string"&gt;
    &lt;xs:enumeration value="One" /&gt;
    &lt;xs:enumeration value="Two" /&gt;
    &lt;xs:enumeration value="Three" /&gt;
  &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="SimpleTypeEnumerationType01">
   <ex:simpleTypeEnumerationType>One</ex:simpleTypeEnumerationType>
</ex:instance>
<ex:instance xml:id="SimpleTypeEnumerationType02">
   <ex:simpleTypeEnumerationType>Two</ex:simpleTypeEnumerationType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ComplexTypeAll" pattern="ComplexTypeAll">
<pat:xpath>.//xs:complexType/xs:all/
		(., xs:element/(., @name))</pat:xpath>
<ex:typedef>
&lt;xs:element name="complexTypeAll" type="ex:ComplexTypeAll" /&gt;
&lt;xs:complexType name="ComplexTypeAll"&gt;
  &lt;<b>xs:all</b>&gt;
    &lt;<b>xs:element</b> 
   <b> name</b>="name" type="xs:string" /&gt;
    &lt;<b>xs:element</b> 
   <b> name</b>="shade" type="xs:string" /&gt;
    &lt;<b>xs:element</b> 
   <b> name</b>="length" type="xs:int" /&gt;
  &lt;/<b>xs:all</b>&gt;
  &lt;xs:attribute name="id" type="xs:string" /&gt;
  &lt;xs:attribute name="inStock" type="xs:int" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="ComplexTypeChoice">
<pat:xpath>.//xs:complexType/xs:choice/
		(., xs:element/(., @name))</pat:xpath>
<ex:typedef>
&lt;xs:element name="fruit" type="ex:Fruit" /&gt;
&lt;xs:complexType name="Fruit"&gt;
  &lt;<b>xs:choice</b>&gt;
    &lt;<b>xs:element</b> 
   <b> name</b>="apple" type="xs:int" /&gt;
    &lt;<b>xs:element</b> 
   <b> name</b>="orange" type="xs:string" /&gt;
    &lt;<b>xs:element</b> 
   <b> name</b>="banana" type="xs:int" /&gt;
  &lt;/<b>xs:choice</b>&gt;
&lt;/xs:complexType&gt;
    </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" pattern="ComplexTypeSequenceChoice">
<pat:xpath>.//xs:complexType/xs:sequence/xs:choice/
   (., xs:element/(., @name))</pat:xpath>
<ex:typedef>
&lt;xs:element name="mortgage" type="ex:Mortgage" /&gt;
&lt;xs:complexType name="Mortgage"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="amount" type="xs:int" /&gt;
    &lt;<b>xs:choice</b>&gt;
      &lt;<b>xs:element</b> 
   <b> name</b>="repayment" type="ex:Repayment" /&gt;
      &lt;<b>xs:element</b> 
   <b> name</b>="interestonly" type="ex:InterestOnly" /&gt;
    &lt;/<b>xs:choice</b>&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="Repayment"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="years" type="xs:int" /&gt;
    &lt;xs:element name="months" type="xs:int" /&gt;
    &lt;xs:element name="rate" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="InterestOnly"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="years" type="xs:int" /&gt;
    &lt;xs:element name="rate" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </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="ComplexTypeAttribute" pattern="ComplexTypeAttribute">
<pat:xpath>.//xs:complexType/xs:attribute[@name]/
		(., @name)</pat:xpath>
<ex:typedef>
&lt;xs:element name="complexTypeAttribute" type="ex:ComplexTypeAttribute" /&gt;
&lt;xs:complexType name="ComplexTypeAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="premium" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;<b>xs:attribute</b> 
   <b> name</b>="id" type="xs:string" /&gt;
  &lt;<b>xs:attribute</b> 
   <b> name</b>="currency" type="xs:string" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ComplexTypeAttribute01">
   <ex:complexTypeAttribute id="1711" currency="EUR">
      <ex:premium>a1250</ex:premium>
   </ex:complexTypeAttribute>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ComplexTypeOnlyAttributes" pattern="ComplexTypeOnlyAttributes">
<pat:xpath>.//xs:complexType/xs:attribute[../not(xs:choice or xs:sequence or xs:all or xs:anyAttribute or xs:group 
   or xs:attributeGroup or xs:simpleContent or xs:complexContent)]/
   (., ..,@use)</pat:xpath>
<ex:typedef>
&lt;xs:element name="complexTypeOnlyAttributes" type="ex:ComplexTypeOnlyAttributes" /&gt;
&lt;<b>xs:complexType</b> name="ComplexTypeOnlyAttributes"&gt;
  &lt;<b>xs:attribute</b> name="a1" type="xs:string" /&gt;
  &lt;<b>xs:attribute</b> name="a2" type="xs:int" /&gt;
&lt;/<b>xs:complexType</b>&gt;
    </ex:typedef>
<ex:instance xml:id="ComplexTypeOnlyAttributes01">
   <ex:complexTypeOnlyAttributes a1="11226026" a2="223232"/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ComplexTypeOnlyAttributeGroup" pattern="ComplexTypeOnlyAttributeGroup">
<pat:xpath>.//xs:complexType/xs:attributeGroup[../not(xs:choice or xs:sequence or xs:all or xs:anyAttribute 
   or xs:group or xs:simpleContent or xs:complexContent)]/(., ..,@ref)</pat:xpath>
<ex:typedef>
&lt;xs:element name="complexTypeOnlyAttributeGroup" type="ex:ComplexTypeOnlyAttributeGroup" /&gt;
&lt;<b>xs:complexType</b> name="ComplexTypeOnlyAttributeGroup"&gt;
  &lt;<b>xs:attributeGroup</b> 
   <b> ref</b>="ex:CommonOnlyAttributeGroup" /&gt;
&lt;/<b>xs:complexType</b>&gt;
&lt;xs:attributeGroup name="CommonOnlyAttributeGroup"&gt;
  &lt;xs:attribute name="id" type="xs:ID" use="optional" form="unqualified" /&gt;
&lt;/xs:attributeGroup&gt;
    </ex:typedef>
<ex:instance xml:id="ComplexTypeOnlyAttributeGroup01">
   <ex:complexTypeOnlyAttributeGroup id="AttributeGroup_contract_001"/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ComplexTypeSequence" pattern="ComplexTypeSequence">
<pat:xpath>.//xs:complexType/xs:sequence/
		(., xs:element/(., @name))</pat:xpath>
<ex:typedef>
&lt;xs:element name="complexTypeSequence" type="ex:ComplexTypeSequence" /&gt;
&lt;xs:complexType name="ComplexTypeSequence"&gt;
  &lt;<b>xs:sequence</b>&gt;
    &lt;<b>xs:element</b> 
   <b> name</b>="name" type="xs:string" /&gt;
    &lt;<b>xs:element</b> 
   <b> name</b>="shade" type="xs:string" /&gt;
    &lt;<b>xs:element</b> 
   <b> name</b>="length" type="xs:int" /&gt;
  &lt;/<b>xs:sequence</b>&gt;
  &lt;xs:attribute name="id" type="xs:string" /&gt;
  &lt;xs:attribute name="inStock" type="xs:int" /&gt;
&lt;/xs:complexType&gt;
    </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="SequenceSequenceElement" pattern="SequenceSequenceElement">
<pat:xpath>.//xs:sequence/xs:sequence/xs:element/
		(., ..)</pat:xpath>
<ex:typedef>
&lt;xs:element name="sequenceSequenceElement" type="ex:SequenceSequenceElement" /&gt;
&lt;xs:complexType name="SequenceSequenceElement"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstName" type="xs:string" /&gt;
    &lt;<b>xs:sequence</b> minOccurs="0"&gt;
      &lt;<b>xs:element</b> name="middleName" type="xs:string" /&gt;
      &lt;<b>xs:sequence</b> minOccurs="0"&gt;
        &lt;<b>xs:element</b> name="lastName" type="xs:string" /&gt;
      &lt;/<b>xs:sequence</b>&gt;
    &lt;/<b>xs:sequence</b>&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="SequenceSequenceElement01">
   <ex:sequenceSequenceElement>
      <ex:firstName>Paul</ex:firstName>
   </ex:sequenceSequenceElement>
</ex:instance>
<ex:instance xml:id="SequenceSequenceElement02">
   <ex:sequenceSequenceElement>
      <ex:firstName>Paul</ex:firstName>
      <ex:middleName>Sumner</ex:middleName>
   </ex:sequenceSequenceElement>
</ex:instance>
<ex:instance xml:id="SequenceSequenceElement03">
   <ex:sequenceSequenceElement>
      <ex:firstName>Paul</ex:firstName>
      <ex:middleName>Sumner</ex:middleName>
      <ex:lastName>Downey</ex:lastName>
   </ex:sequenceSequenceElement>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SequenceMinOccurs0" pattern="SequenceMinOccurs0">
<pat:xpath>.//xs:sequence[@minOccurs = '0' and (not(@maxOccurs) or @maxOccurs = '1')]/
		 (@minOccurs, @maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="sequenceMinOccurs0" type="ex:SequenceMinOccurs0" /&gt;
&lt;xs:complexType name="SequenceMinOccurs0"&gt;
  &lt;xs:sequence <b> minOccurs</b>="0"&gt;
    &lt;xs:element name="firstName" type="xs:string" /&gt;
    &lt;xs:element name="middleName" type="xs:string" /&gt;
    &lt;xs:element name="lastName" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="SequenceMinOccurs001">
   <ex:sequenceMinOccurs0>
      <ex:firstName>Paul</ex:firstName>
      <ex:middleName>Sumner</ex:middleName>
      <ex:lastName>Downey</ex:lastName>
   </ex:sequenceMinOccurs0>
</ex:instance>
<ex:instance xml:id="SequenceMinOccurs002">
   <ex:sequenceMinOccurs0/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SequenceMinOccurs1" pattern="SequenceMinOccurs1">
<pat:xpath>.//xs:sequence[@minOccurs = '1' and (not(@maxOccurs) or @maxOccurs = '1')]/
		 (@minOccurs, @maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="sequenceMinOccurs1" type="ex:SequenceMinOccurs1" /&gt;
&lt;xs:complexType name="SequenceMinOccurs1"&gt;
  &lt;xs:sequence <b> minOccurs</b>="1"&gt;
    &lt;xs:element name="sequenceMinOccurs1item" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="SequenceMinOccurs101">
   <ex:sequenceMinOccurs1>
      <ex:sequenceMinOccurs1item>item1</ex:sequenceMinOccurs1item>
   </ex:sequenceMinOccurs1>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SequenceMaxOccurs1" pattern="SequenceMaxOccurs1">
<pat:xpath>.//xs:sequence[(not(@minOccurs) or @minOccurs = '1') and @maxOccurs = '1']/
		 (@minOccurs, @maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="myAgeDetails" type="ex:MyAgeDetails" /&gt;
&lt;xs:complexType name="MyAgeDetails"&gt;
  &lt;xs:sequence <b> maxOccurs</b>="1"&gt;
    &lt;xs:element name="myAge" type="xs:short" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="SequenceMaxOccurs101">
   <ex:myAgeDetails>
      <ex:myAge>44</ex:myAge>
   </ex:myAgeDetails>
</ex:instance>
<ex:instance xml:id="SequenceMaxOccurs102">
   <ex:myAgeDetails>
      <ex:myAge>4</ex:myAge>
   </ex:myAgeDetails>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SequenceMinOccurs0MaxOccursUnbounded"
         pattern="SequenceMinOccurs0MaxOccursUnbounded">
<pat:xpath>.//xs:sequence[@minOccurs = '0' and @maxOccurs = 'unbounded']/
		 (@minOccurs, @maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="durationListSequence" type="ex:DurationListSequence" /&gt;
&lt;xs:complexType name="DurationListSequence"&gt;
  &lt;xs:sequence <b> minOccurs</b>="0" <b> maxOccurs</b>="unbounded"&gt;
    &lt;xs:element name="durationVal" type="xs:string" /&gt;
    &lt;xs:element name="durationPercentage" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="SequenceMinOccurs0MaxOccursUnbounded101">
   <ex:durationListSequence>
      <ex:durationVal>44</ex:durationVal>
      <ex:durationPercentage>33</ex:durationPercentage>
      <ex:durationVal>24</ex:durationVal>
      <ex:durationPercentage>45</ex:durationPercentage>
      <ex:durationVal>64</ex:durationVal>
      <ex:durationPercentage>22</ex:durationPercentage>
   </ex:durationListSequence>
</ex:instance>
<ex:instance xml:id="SequenceMinOccurs0MaxOccursUnbounded102">
   <ex:durationListSequence/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SequenceMinOccurs1MaxOccursUnbounded"
         pattern="SequenceMinOccurs1MaxOccursUnbounded">
<pat:xpath>.//xs:sequence[(not(@minOccurs) or @minOccurs = '1') and @maxOccurs = 'unbounded']/
		 (@minOccurs, @maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="ageListSequence" type="ex:AgeListSequence" /&gt;
&lt;xs:complexType name="AgeListSequence"&gt;
  &lt;xs:sequence <b> minOccurs</b>="1" <b> maxOccurs</b>="unbounded"&gt;
    &lt;xs:element name="ageVal" type="xs:string" /&gt;
    &lt;xs:element name="agePercentage" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="SequenceMinOccurs1MaxOccursUnbounded101">
   <ex:ageListSequence>
      <ex:ageVal>44</ex:ageVal>
      <ex:agePercentage>33</ex:agePercentage>
      <ex:ageVal>24</ex:ageVal>
      <ex:agePercentage>45</ex:agePercentage>
      <ex:ageVal>64</ex:ageVal>
      <ex:agePercentage>22</ex:agePercentage>
   </ex:ageListSequence>
</ex:instance>
<ex:instance xml:id="SequenceMinOccurs1MaxOccursUnbounded102">
   <ex:ageListSequence>
      <ex:ageVal>44</ex:ageVal>
      <ex:agePercentage>33</ex:agePercentage>
   </ex:ageListSequence>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SequenceMaxOccursUnbounded"
         pattern="SequenceMinOccurs1MaxOccursUnbounded">
<pat:xpath>.//xs:sequence[(not(@minOccurs) or @minOccurs = '1') and @maxOccurs = 'unbounded']/
		 (@minOccurs, @maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="bookPublications" type="ex:BookPublications" /&gt;
&lt;xs:complexType name="BookPublications"&gt;
  &lt;xs:sequence <b> maxOccurs</b>="unbounded"&gt;
    &lt;xs:element name="pubDate" type="xs:string" /&gt;
    &lt;xs:element name="pubISBN" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="SequenceMaxOccursUnbounded01">
   <ex:bookPublications>
      <ex:pubDate>2002-09-24</ex:pubDate>
      <ex:pubISBN>1-55960-907-6</ex:pubISBN>
      <ex:pubDate>2003-04-14</ex:pubDate>
      <ex:pubISBN>1-25466-908-6</ex:pubISBN>
      <ex:pubDate>2004-03-31</ex:pubDate>
      <ex:pubISBN>1-35460-909-6</ex:pubISBN>
      <ex:pubDate>2005-06-04</ex:pubDate>
      <ex:pubISBN>1-54560-910-6</ex:pubISBN>
      <ex:pubDate>2006-07-03</ex:pubDate>
      <ex:pubISBN>1-74869-911-6</ex:pubISBN>
   </ex:bookPublications>
</ex:instance>
<ex:instance xml:id="SequenceMaxOccursUnbounded02">
   <ex:bookPublications>
      <ex:pubDate>2006-01-26</ex:pubDate>
      <ex:pubISBN>1-44795-912-6</ex:pubISBN>
   </ex:bookPublications>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SequenceMinOccursFinite" pattern="SequenceMinOccursFinite">
<pat:xpath>.//xs:sequence[xs:integer(@minOccurs) gt 1]/
		 (@minOccurs, @maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="articleColors" type="ex:ArticleColors" /&gt;
&lt;xs:complexType name="ArticleColors"&gt;
  &lt;xs:sequence <b> minOccurs</b>="2" <b> maxOccurs</b>="unbounded"&gt;
    &lt;xs:element name="articleColor" type="xs:string" /&gt;
    &lt;xs:element name="articleContrast" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="SequenceMinOccursFinite01">
   <ex:articleColors>
      <ex:articleColor>Red</ex:articleColor>
      <ex:articleContrast>Bright</ex:articleContrast>
      <ex:articleColor>Black</ex:articleColor>
      <ex:articleContrast>Bright</ex:articleContrast>
      <ex:articleColor>White</ex:articleColor>
      <ex:articleContrast>Low</ex:articleContrast>
      <ex:articleColor>Yellow</ex:articleColor>
      <ex:articleContrast>Normal</ex:articleContrast>
   </ex:articleColors>
</ex:instance>
<ex:instance xml:id="SequenceMinOccursFinite02">
   <ex:articleColors>
      <ex:articleColor>Black</ex:articleColor>
      <ex:articleContrast>Normal</ex:articleContrast>
      <ex:articleColor>White</ex:articleColor>
      <ex:articleContrast>Bright</ex:articleContrast>
   </ex:articleColors>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SequenceMaxOccursFinite" pattern="SequenceMaxOccursFinite">
<pat:xpath>.//xs:sequence[@maxOccurs and not(@maxOccurs = '0' or @maxOccurs = '1' or @maxOccurs = 'unbounded')]/
		 (@maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="winter" type="ex:Winter" /&gt;
&lt;xs:complexType name="Winter"&gt;
  &lt;xs:sequence <b> maxOccurs</b>="4"&gt;
    &lt;xs:element name="mnth" type="xs:string" /&gt;
    &lt;xs:element name="weather" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="SequenceMaxOccursFinite01">
   <ex:winter>
      <ex:mnth>November</ex:mnth>
      <ex:weather>Rain</ex:weather>
      <ex:mnth>December</ex:mnth>
      <ex:weather>Snow</ex:weather>
      <ex:mnth>January</ex:mnth>
      <ex:weather>Snow</ex:weather>
      <ex:mnth>February</ex:mnth>
      <ex:weather>Rain</ex:weather>
   </ex:winter>
</ex:instance>
<ex:instance xml:id="SequenceMaxOccursFinite02">
   <ex:winter>
      <ex:mnth>December</ex:mnth>
      <ex:weather>Snow</ex:weather>
   </ex:winter>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GlobalElementSequence" pattern="GlobalElementSequence">
<pat:xpath>./xs:element[@name]/xs:complexType/xs:sequence[xs:element]/
		(../../(., @name), .., ., xs:element/(., @name))</pat:xpath>
<ex:typedef>
&lt;<b>xs:element</b> 
   <b> name</b>="globalElementSequence"&gt;
  &lt;<b>xs:complexType</b>&gt;
    &lt;<b>xs:sequence</b>&gt;
      &lt;<b>xs:element</b> 
   <b> name</b>="foo" type="xs:string" /&gt;
      &lt;<b>xs:element</b> 
   <b> name</b>="bar" type="xs:string" /&gt;
    &lt;/<b>xs:sequence</b>&gt;
  &lt;/<b>xs:complexType</b>&gt;
&lt;/<b>xs:element</b>&gt;
    </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" pattern="GlobalElementAll">
<pat:xpath>./xs:element[@name]/xs:complexType/xs:all[xs:element]/
		(../../(., @name), .., ., xs:element/(., @name))</pat:xpath>
<ex:typedef>
&lt;<b>xs:element</b> 
   <b> name</b>="globalElementAll"&gt;
  &lt;<b>xs:complexType</b>&gt;
    &lt;<b>xs:all</b>&gt;
      &lt;<b>xs:element</b> 
   <b> name</b>="globalElementAllA" type="xs:string" /&gt;
      &lt;<b>xs:element</b> 
   <b> name</b>="globalElementAllB" type="xs:string" /&gt;
    &lt;/<b>xs:all</b>&gt;
  &lt;/<b>xs:complexType</b>&gt;
&lt;/<b>xs:element</b>&gt;
    </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" pattern="GlobalElementChoice">
<pat:xpath>./xs:element[@name]/xs:complexType/xs:choice[xs:element]/
		(../../(., @name), .., ., xs:element/(., @name))</pat:xpath>
<ex:typedef>
&lt;<b>xs:element</b> 
   <b> name</b>="globalElementChoice"&gt;
  &lt;<b>xs:complexType</b>&gt;
    &lt;<b>xs:choice</b>&gt;
      &lt;<b>xs:element</b> 
   <b> name</b>="globalElementChoiceA" type="xs:string" /&gt;
      &lt;<b>xs:element</b> 
   <b> name</b>="globalElementChoiceB" type="xs:string" /&gt;
    &lt;/<b>xs:choice</b>&gt;
  &lt;/<b>xs:complexType</b>&gt;
&lt;/<b>xs:element</b>&gt;
    </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="GlobalElementSimpleType" pattern="GlobalElementSimpleType">
<pat:xpath>./xs:element[@name]/xs:simpleType/
		(../(., @name), .)</pat:xpath>
<ex:typedef>
&lt;<b>xs:element</b> 
   <b> name</b>="globalElementSimpleType"&gt;
  &lt;<b>xs:simpleType</b>&gt;
    &lt;xs:restriction base="xs:string"&gt;
      &lt;xs:enumeration value="value1" /&gt;
      &lt;xs:enumeration value="value2" /&gt;
      &lt;xs:enumeration value="value3" /&gt;
    &lt;/xs:restriction&gt;
  &lt;/<b>xs:simpleType</b>&gt;
&lt;/<b>xs:element</b>&gt;
    </ex:typedef>
<ex:instance xml:id="GlobalElementSimpleType01">
   <ex:globalElementSimpleType>value1</ex:globalElementSimpleType>
</ex:instance>
<ex:instance xml:id="GlobalElementSimpleType02">
   <ex:globalElementSimpleType>value2</ex:globalElementSimpleType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GlobalElementSequenceAny" pattern="GlobalElementSequenceAny">
<pat:xpath>./xs:element[@name]/xs:complexType/xs:sequence[xs:any and not(xs:element)]/
		(../../(., @name))</pat:xpath>
<ex:typedef>
&lt;<b>xs:element</b> 
   <b> name</b>="globalElementSequenceAny"&gt;
  &lt;xs:complexType&gt;
    &lt;xs:sequence&gt;
      &lt;xs:any processContents="skip" /&gt;
    &lt;/xs:sequence&gt;
  &lt;/xs:complexType&gt;
&lt;/<b>xs:element</b>&gt;
    </ex:typedef>
<ex:instance xml:id="GlobalElementSequenceAny01">
   <ex:globalElementSequenceAny>
      <ex:data> some data </ex:data>
   </ex:globalElementSequenceAny>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ComplexTypeAnyAttribute" pattern="ComplexTypeAnyAttribute">
<pat:xpath>.//xs:complexType/xs:anyAttribute</pat:xpath>
<ex:typedef>
&lt;xs:element name="complexTypeAnyAttribute" type="ex:ComplexTypeAnyAttribute" /&gt;
&lt;xs:complexType name="ComplexTypeAnyAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element1" type="xs:string" /&gt;
    &lt;xs:element name="element2" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;<b>xs:anyAttribute</b> processContents="skip" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ComplexTypeAnyAttribute01">
   <ex:complexTypeAnyAttribute anyattr="string">
      <ex:element1>string</ex:element1>
      <ex:element2>string</ex:element2>
   </ex:complexTypeAnyAttribute>
</ex:instance>
   </ex:example>
   <ex:example xml:id="AnyAttributeStrict" pattern="AnyAttributeStrict">
<pat:xpath>.//xs:complexType/xs:anyAttribute[(not(@processContents) or @processContents = 'strict')
	    and (not(@namespace) or @namespace = '##any')]/
	    (., @processContents, @namespace)</pat:xpath>
<ex:typedef>
&lt;xs:element name="anyAttributeStrict" type="ex:AnyAttributeStrict" /&gt;
&lt;xs:complexType name="AnyAttributeStrict"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstName" type="xs:string" /&gt;
    &lt;xs:element name="lastName" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;<b>xs:anyAttribute</b> /&gt;
&lt;/xs:complexType&gt;
&lt;xs:attribute name="eyeColor" type="xs:string" /&gt;
&lt;xs:attribute name="hairColor" type="xs:string" /&gt;
    </ex:typedef>
<ex:instance xml:id="AnyAttributeStrict01">
   <ex:anyAttributeStrict ex:eyeColor="blue">
      <ex:firstName>Bobby</ex:firstName>
      <ex:lastName>Sox</ex:lastName>
   </ex:anyAttributeStrict>
</ex:instance>
<ex:instance xml:id="AnyAttributeStrict02">
   <ex:anyAttributeStrict ex:hairColor="green">
      <ex:firstName>Bobby</ex:firstName>
      <ex:lastName>Sox</ex:lastName>
   </ex:anyAttributeStrict>
</ex:instance>
<ex:instance xml:id="AnyAttributeStrict03">
   <ex:anyAttributeStrict ex:eyeColor="blue" ex:hairColor="green">
      <ex:firstName>Bobby</ex:firstName>
      <ex:lastName>Sox</ex:lastName>
   </ex:anyAttributeStrict>
</ex:instance>
   </ex:example>
   <ex:example xml:id="AnyAttributeLax" pattern="AnyAttributeLax">
<pat:xpath>.//xs:complexType/xs:anyAttribute[(@processContents = 'lax')
	    and (not(@namespace) or @namespace = '##any')]/
	    (., @processContents, @namespace)</pat:xpath>
<ex:typedef>
&lt;xs:element name="anyAttributeLax" type="ex:AnyAttributeLax" /&gt;
&lt;xs:complexType name="AnyAttributeLax"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstName" type="xs:string" /&gt;
    &lt;xs:element name="lastName" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;<b>xs:anyAttribute</b> 
   <b> processContents</b>="lax" /&gt;
&lt;/xs:complexType&gt;
    </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="AnyAttributeSkip" pattern="AnyAttributeSkip">
<pat:xpath>.//xs:complexType/xs:anyAttribute[(@processContents = 'skip')
	    and (not(@namespace) or @namespace = '##any')]/
	    (., @processContents, @namespace)</pat:xpath>
<ex:typedef>
&lt;xs:element name="anyAttributeSkip" type="ex:AnyAttributeSkip" /&gt;
&lt;xs:complexType name="AnyAttributeSkip"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstName" type="xs:string" /&gt;
    &lt;xs:element name="lastName" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;<b>xs:anyAttribute</b> 
   <b> processContents</b>="skip" /&gt;
&lt;/xs:complexType&gt;
    </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="AnyAttributeOtherStrict" pattern="AnyAttributeOtherStrict">
<pat:xpath>.//xs:complexType/xs:anyAttribute[(not(@processContents) or @processContents = 'strict')
	    and (@namespace = '##other')]/
	    (., @processContents, @namespace)</pat:xpath>
<ex:typedef>
&lt;xs:import namespace="http://www.w3.org/2002/ws/databinding/examples/6/09/strict/" schemaLocation="../strict.xsd" /&gt;
&lt;xs:element name="anyAttributeOtherStrict" type="ex:AnyAttributeOtherStrict" /&gt;
&lt;xs:complexType name="AnyAttributeOtherStrict"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstElement" type="xs:string" /&gt;
    &lt;xs:element name="lastElement" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;<b>xs:anyAttribute</b> 
   <b> processContents</b>="strict" <b> namespace</b>="##other" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="AnyAttributeOtherStrict01">
   <ex:anyAttributeOtherStrict xmlns:ex2="http://www.w3.org/2002/ws/databinding/examples/6/09/strict/"
                               ex2:strictAttribute="value1">
      <ex:firstElement>String</ex:firstElement>
      <ex:lastElement>String</ex:lastElement>
   </ex:anyAttributeOtherStrict>
</ex:instance>
   </ex:example>
   <ex:example xml:id="AnyAttributeOtherLax" pattern="AnyAttributeOtherLax">
<pat:xpath>.//xs:complexType/xs:anyAttribute[(@processContents = 'lax')
	    and (@namespace = '##other')]/
	    (., @processContents, @namespace)</pat:xpath>
<ex:typedef>
&lt;xs:element name="anyAttributeOtherLax" type="ex:AnyAttributeOtherLax" /&gt;
&lt;xs:complexType name="AnyAttributeOtherLax"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstElement" type="xs:string" /&gt;
    &lt;xs:element name="lastElement" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;<b>xs:anyAttribute</b> 
   <b> processContents</b>="lax" <b> namespace</b>="##other" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="AnyAttributeOtherLax01">
   <ex:anyAttributeOtherLax xmlns:ex2="http://example2.example.com" ex2:otherAttribute="text">
      <ex:firstElement>String</ex:firstElement>
      <ex:lastElement>String</ex:lastElement>
   </ex:anyAttributeOtherLax>
</ex:instance>
   </ex:example>
   <ex:example xml:id="AnyAttributeOtherSkip" pattern="AnyAttributeOtherSkip">
<pat:xpath>.//xs:complexType/xs:anyAttribute[(@processContents = 'skip')
	    and (@namespace = '##other')]/
	    (., @processContents, @namespace)</pat:xpath>
<ex:typedef>
&lt;xs:element name="anyAttributeOtherSkip" type="ex:AnyAttributeOtherSkip" /&gt;
&lt;xs:complexType name="AnyAttributeOtherSkip"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstElement" type="xs:string" /&gt;
    &lt;xs:element name="lastElement" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;<b>xs:anyAttribute</b> 
   <b> processContents</b>="skip" <b> namespace</b>="##other" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="AnyAttributeOtherSkip01">
   <ex:anyAttributeOtherSkip xmlns:ex2="http://example2.example.com" ex2:otherAttribute="text">
      <ex:firstElement>String</ex:firstElement>
      <ex:lastElement>String</ex:lastElement>
   </ex:anyAttributeOtherSkip>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ExtendedSequenceStrict" pattern="ExtendedSequenceStrict">
<pat:xpath>.//xs:sequence/xs:any[(not(@processContents) or @processContents = 'strict')
	    and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')
	    and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded')
	    and @namespace = '##targetNamespace']/
	    (., @processContents, @minOccurs, @maxOccurs, @namespace)</pat:xpath>
<ex:typedef>
&lt;xs:element name="extendedSequenceStrict" type="ex:ExtendedSequenceStrict" /&gt;
&lt;xs:complexType name="ExtendedSequenceStrict"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstName" type="xs:string" /&gt;
    &lt;xs:element name="lastName" type="xs:string" /&gt;
    &lt;xs:element name="extension" type="ex:StrictExtension" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:element name="title" type="xs:string" /&gt;
&lt;xs:element name="middleName" type="xs:string" /&gt;
&lt;xs:complexType name="StrictExtension"&gt;
  &lt;xs:sequence&gt;
    &lt;<b>xs:any</b> 
   <b> processContents</b>="strict" <b> minOccurs</b>="0" <b> maxOccurs</b>="unbounded" <b> namespace</b>="##targetNamespace" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </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" pattern="ExtendedSequenceLax">
<pat:xpath>.//xs:sequence/xs:any[@processContents = 'lax'
	    and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')
	    and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded')
	    and @namespace = '##targetNamespace']/
	    (., @processContents, @minOccurs, @maxOccurs, @namespace)</pat:xpath>
<ex:typedef>
&lt;xs:element name="extendedSequenceLax" type="ex:ExtendedSequenceLax" /&gt;
&lt;xs:complexType name="ExtendedSequenceLax"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstName" type="xs:string" /&gt;
    &lt;xs:element name="lastName" type="xs:string" /&gt;
    &lt;xs:element name="extension" type="ex:LaxExtension" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="LaxExtension"&gt;
  &lt;xs:sequence&gt;
    &lt;<b>xs:any</b> 
   <b> processContents</b>="lax" <b> minOccurs</b>="0" <b> maxOccurs</b>="unbounded" <b> namespace</b>="##targetNamespace" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </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" pattern="ExtendedSequenceSkip">
<pat:xpath>.//xs:sequence/xs:any[@processContents = 'skip'
	    and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')
	    and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded')
	    and @namespace = '##targetNamespace']/
	    (., @processContents, @minOccurs, @maxOccurs, @namespace)</pat:xpath>
<ex:typedef>
&lt;xs:element name="extendedSequenceSkip" type="ex:ExtendedSequenceSkip" /&gt;
&lt;xs:complexType name="ExtendedSequenceSkip"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstName" type="xs:string" /&gt;
    &lt;xs:element name="lastName" type="xs:string" /&gt;
    &lt;xs:element name="extension" type="ex:SkipExtension" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="SkipExtension"&gt;
  &lt;xs:sequence&gt;
    &lt;<b>xs:any</b> 
   <b> processContents</b>="skip" <b> minOccurs</b>="0" <b> maxOccurs</b>="unbounded" <b> namespace</b>="##targetNamespace" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </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="ExtendedSequenceStrictAny" pattern="ExtendedSequenceStrictAny">
<pat:xpath>.//xs:sequence/xs:any[(not(@processContents) or @processContents = 'strict')
	    and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')
	    and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded')
	    and (not(@namespace) or @namespace = '##any')]/
	    (., @processContents, @minOccurs, @maxOccurs, @namespace)</pat:xpath>
<ex:typedef>
&lt;xs:element name="extendedSequenceStrictAny" type="ex:ExtendedSequenceStrictAny" /&gt;
&lt;xs:element name="extendedSequenceStrictAnyElement" type="xs:string" /&gt;
&lt;xs:complexType name="ExtendedSequenceStrictAny"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstElement" type="xs:string" /&gt;
    &lt;xs:element name="lastElement" type="xs:string" /&gt;
    &lt;xs:element name="extension" type="ex:ExtendedSequenceStrictAnyExtension" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="ExtendedSequenceStrictAnyExtension"&gt;
  &lt;xs:sequence&gt;
    &lt;<b>xs:any</b> 
   <b> namespace</b>="##any" <b> processContents</b>="strict" <b> minOccurs</b>="0" <b> maxOccurs</b>="unbounded" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ExtendedSequenceStrictAny01">
   <ex:extendedSequenceStrictAny>
      <ex:firstElement>String</ex:firstElement>
      <ex:lastElement>String</ex:lastElement>
      <ex:extension>
         <ex:extendedSequenceStrictAnyElement>Stuff</ex:extendedSequenceStrictAnyElement>
      </ex:extension>
   </ex:extendedSequenceStrictAny>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ExtendedSequenceLaxAny" pattern="ExtendedSequenceLaxAny">
<pat:xpath>.//xs:sequence/xs:any[@processContents = 'lax'
	    and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')
	    and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded')
	    and (not(@namespace) or @namespace = '##any')]/
	    (., @processContents, @minOccurs, @maxOccurs, @namespace)</pat:xpath>
<ex:typedef>
&lt;xs:element name="extendedSequenceLaxAny" type="ex:ExtendedSequenceLaxAny" /&gt;
&lt;xs:complexType name="ExtendedSequenceLaxAny"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstElement" type="xs:string" /&gt;
    &lt;xs:element name="lastElement" type="xs:string" /&gt;
    &lt;xs:element name="extension" type="ex:ExtendedSequenceLaxAnyExtension" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="ExtendedSequenceLaxAnyExtension"&gt;
  &lt;xs:sequence&gt;
    &lt;<b>xs:any</b> 
   <b> namespace</b>="##any" <b> processContents</b>="lax" <b> minOccurs</b>="0" <b> maxOccurs</b>="unbounded" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ExtendedSequenceLaxAny01">
   <ex:extendedSequenceLaxAny xmlns:ex2="http://example2.example.com">
      <ex:firstElement>String</ex:firstElement>
      <ex:lastElement>String</ex:lastElement>
      <ex:extension>
         <ex2:anyElement>Stuff</ex2:anyElement>
      </ex:extension>
   </ex:extendedSequenceLaxAny>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ExtendedSequenceSkipAny" pattern="ExtendedSequenceSkipAny">
<pat:xpath>.//xs:sequence/xs:any[@processContents = 'skip'
	    and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')
	    and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded')
	    and (not(@namespace) or @namespace = '##any')]/
	    (., @processContents, @minOccurs, @maxOccurs, @namespace)</pat:xpath>
<ex:typedef>
&lt;xs:element name="extendedSequenceSkipAny" type="ex:ExtendedSequenceSkipAny" /&gt;
&lt;xs:complexType name="ExtendedSequenceSkipAny"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstElement" type="xs:string" /&gt;
    &lt;xs:element name="lastElement" type="xs:string" /&gt;
    &lt;xs:element name="extension" type="ex:ExtendedSequenceSkipAnyExtension" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="ExtendedSequenceSkipAnyExtension"&gt;
  &lt;xs:sequence&gt;
    &lt;<b>xs:any</b> 
   <b> namespace</b>="##any" <b> processContents</b>="skip" <b> minOccurs</b>="0" <b> maxOccurs</b>="unbounded" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ExtendedSequenceSkipAny01">
   <ex:extendedSequenceSkipAny xmlns:ex2="http://example2.example.com">
      <ex:firstElement>String</ex:firstElement>
      <ex:lastElement>String</ex:lastElement>
      <ex:extension>
         <ex2:anyElement>Stuff</ex2:anyElement>
      </ex:extension>
   </ex:extendedSequenceSkipAny>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ExtendedSequenceStrictOther" pattern="ExtendedSequenceStrictOther">
<pat:xpath>.//xs:sequence/xs:any[(not(@processContents) or @processContents = 'strict')
	    and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')
	    and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded')
	    and @namespace = '##other']/
	    (., @processContents, @minOccurs, @maxOccurs, @namespace)</pat:xpath>
<ex:typedef>
&lt;xs:import namespace="http://www.w3.org/2002/ws/databinding/examples/6/09/strict/" schemaLocation="../strict.xsd" /&gt;
&lt;xs:element name="extendedSequenceStrictOther" type="ex:ExtendedSequenceStrictOther" /&gt;
&lt;xs:complexType name="ExtendedSequenceStrictOther"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element1" type="xs:string" /&gt;
    &lt;xs:element name="element2" type="xs:string" /&gt;
    &lt;xs:element name="extension" type="ex:ExtendedSequenceStrictOtherExtension" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="ExtendedSequenceStrictOtherExtension"&gt;
  &lt;xs:sequence&gt;
    &lt;<b>xs:any</b> 
   <b> namespace</b>="##other" <b> processContents</b>="strict" <b> minOccurs</b>="0" <b> maxOccurs</b>="unbounded" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ExtendedSequenceStrictOther01">
   <ex:extendedSequenceStrictOther>
      <ex:element1>firstElement</ex:element1>
      <ex:element2>lastElement</ex:element2>
      <ex:extension>
         <strictElement xmlns="http://www.w3.org/2002/ws/databinding/examples/6/09/strict/">strictElement</strictElement>
      </ex:extension>
   </ex:extendedSequenceStrictOther>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ExtendedSequenceLaxOther" pattern="ExtendedSequenceLaxOther">
<pat:xpath>.//xs:sequence/xs:any[@processContents = 'lax'
	    and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')
	    and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded')
	    and @namespace = '##other']/
	    (., @processContents, @minOccurs, @maxOccurs, @namespace)</pat:xpath>
<ex:typedef>
&lt;xs:element name="extendedSequenceLaxOther" type="ex:ExtendedSequenceLaxOther" /&gt;
&lt;xs:complexType name="ExtendedSequenceLaxOther"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstElement" type="xs:string" /&gt;
    &lt;xs:element name="lastElement" type="xs:string" /&gt;
    &lt;xs:element name="extension" type="ex:ExtendedSequenceLaxOtherExtension" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="ExtendedSequenceLaxOtherExtension"&gt;
  &lt;xs:sequence&gt;
    &lt;<b>xs:any</b> 
   <b> namespace</b>="##other" <b> processContents</b>="lax" <b> minOccurs</b>="0" <b> maxOccurs</b>="unbounded" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ExtendedSequenceLaxOther01">
   <ex:extendedSequenceLaxOther xmlns:ex2="http://example2.example.com">
      <ex:firstElement>String</ex:firstElement>
      <ex:lastElement>String</ex:lastElement>
      <ex:extension>
         <ex2:anyElement>Stuff</ex2:anyElement>
      </ex:extension>
   </ex:extendedSequenceLaxOther>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ExtendedSequenceSkipOther" pattern="ExtendedSequenceSkipOther">
<pat:xpath>.//xs:sequence/xs:any[@processContents = 'skip'
	    and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')
	    and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded')
	    and @namespace = '##other']/
	    (., @processContents, @minOccurs, @maxOccurs, @namespace)</pat:xpath>
<ex:typedef>
&lt;xs:element name="extendedSequenceSkipOther" type="ex:ExtendedSequenceSkipOther" /&gt;
&lt;xs:complexType name="ExtendedSequenceSkipOther"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstElement" type="xs:string" /&gt;
    &lt;xs:element name="lastElement" type="xs:string" /&gt;
    &lt;xs:element name="extension" type="ex:ExtendedSequenceSkipOtherExtension" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="ExtendedSequenceSkipOtherExtension"&gt;
  &lt;xs:sequence&gt;
    &lt;<b>xs:any</b> 
   <b> namespace</b>="##other" <b> processContents</b>="skip" <b> minOccurs</b>="0" <b> maxOccurs</b>="unbounded" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ExtendedSequenceSkipOther01">
   <ex:extendedSequenceSkipOther xmlns:ex2="http://example2.example.com">
      <ex:firstElement>String</ex:firstElement>
      <ex:lastElement>String</ex:lastElement>
      <ex:extension>
         <ex2:anyElement>Stuff</ex2:anyElement>
      </ex:extension>
   </ex:extendedSequenceSkipOther>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SequenceAnyStrict" pattern="SequenceAnyStrict">
<pat:xpath>.//xs:sequence/xs:any[(not(@processContents) or @processContents = 'strict')
	    and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')
	    and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded')
	    and (not (@namespace) or @namespace = '##any')]/
	(., @processContents, @minOccurs, @maxOccurs, @namespace)</pat:xpath>
<ex:typedef>
&lt;xs:element name="sequenceAnyStrict" type="ex:SequenceAnyStrict" /&gt;
&lt;xs:complexType name="SequenceAnyStrict"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element1" type="xs:string" /&gt;
    &lt;<b>xs:any</b> 
   <b> processContents</b>="strict" <b> namespace</b>="##any" <b> minOccurs</b>="0" <b> maxOccurs</b>="unbounded" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="SequenceAnyStrict01">
   <ex:sequenceAnyStrict>
      <ex:element1>string</ex:element1>
   </ex:sequenceAnyStrict>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ExtendedSimpleContent" pattern="ExtendedSimpleContent">
<pat:xpath>.//xs:complexType/xs:simpleContent/xs:extension[@base]/
	    (.., ., ./@base, xs:attribute/
		(., @name))</pat:xpath>
<ex:typedef>
&lt;xs:element name="extendedSimpleContent" type="ex:ExtendedSimpleContent" /&gt;
&lt;xs:complexType name="ExtendedSimpleContent"&gt;
  &lt;<b>xs:simpleContent</b>&gt;
    &lt;<b>xs:extension</b> 
   <b> base</b>="xs:string"&gt;
      &lt;<b>xs:attribute</b> 
   <b> name</b>="attribute" /&gt;
    &lt;/<b>xs:extension</b>&gt;
  &lt;/<b>xs:simpleContent</b>&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ExtendedSimpleContent01">
   <ex:extendedSimpleContent attribute="string">string</ex:extendedSimpleContent>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ChoiceSequence" pattern="ChoiceSequence">
<pat:xpath>.//xs:choice/xs:sequence/(.)</pat:xpath>
<ex:typedef>
&lt;xs:element name="choiceSequence" type="ex:ChoiceSequenceType" /&gt;
&lt;xs:complexType name="ChoiceSequenceType"&gt;
  &lt;xs:choice&gt;
    &lt;xs:element name="Avalue" type="xs:string" /&gt;
    &lt;<b>xs:sequence</b>&gt;
      &lt;xs:element name="Bvalue" type="xs:string" /&gt;
      &lt;xs:element name="Cvalue" type="xs:string" /&gt;
    &lt;/<b>xs:sequence</b>&gt;
  &lt;/xs:choice&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ChoiceSequence01">
   <ex:choiceSequence>
      <ex:Avalue>home</ex:Avalue>
   </ex:choiceSequence>
</ex:instance>
<ex:instance xml:id="ChoiceSequence02">
   <ex:choiceSequence>
      <ex:Bvalue>home</ex:Bvalue>
      <ex:Cvalue>home</ex:Cvalue>
   </ex:choiceSequence>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SequenceChoice" pattern="SequenceChoice">
<pat:xpath>.//xs:sequence/xs:choice/(.)</pat:xpath>
<ex:typedef>
&lt;xs:element name="sequenceChoice" type="ex:SequenceChoiceType" /&gt;
&lt;xs:complexType name="SequenceChoiceType"&gt;
  &lt;xs:sequence&gt;
    &lt;<b>xs:choice</b>&gt;
      &lt;xs:element name="Avalue" type="xs:string" /&gt;
      &lt;xs:element name="Bvalue" type="xs:string" /&gt;
    &lt;/<b>xs:choice</b>&gt;
    &lt;xs:element name="Cvalue" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="SequenceChoice01">
   <ex:sequenceChoice>
      <ex:Avalue>home</ex:Avalue>
      <ex:Cvalue>home</ex:Cvalue>
   </ex:sequenceChoice>
</ex:instance>
<ex:instance xml:id="SequenceChoice02">
   <ex:sequenceChoice>
      <ex:Bvalue>home</ex:Bvalue>
      <ex:Cvalue>home</ex:Cvalue>
   </ex:sequenceChoice>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ChoiceChoice" pattern="ChoiceChoice">
<pat:xpath>.//xs:choice/xs:choice/(.)</pat:xpath>
<ex:typedef>
&lt;xs:element name="choiceChoice" type="ex:ChoiceChoice" /&gt;
&lt;xs:complexType name="ChoiceChoice"&gt;
  &lt;xs:choice&gt;
    &lt;xs:element name="Avalue" type="xs:string" /&gt;
    &lt;<b>xs:choice</b>&gt;
      &lt;xs:element name="Bvalue" type="xs:string" /&gt;
      &lt;xs:element name="Cvalue" type="xs:string" /&gt;
    &lt;/<b>xs:choice</b>&gt;
  &lt;/xs:choice&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ChoiceChoice01">
   <ex:choiceChoice>
      <ex:Avalue>home</ex:Avalue>
   </ex:choiceChoice>
</ex:instance>
<ex:instance xml:id="ChoiceChoice02">
   <ex:choiceChoice>
      <ex:Bvalue>home</ex:Bvalue>
   </ex:choiceChoice>
</ex:instance>
<ex:instance xml:id="ChoiceChoice03">
   <ex:choiceChoice>
      <ex:Cvalue>home</ex:Cvalue>
   </ex:choiceChoice>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ChoiceElement" pattern="ChoiceElement">
<pat:xpath>.//xs:choice/xs:element/(.)</pat:xpath>
<ex:typedef>
&lt;xs:element name="choiceElement" type="ex:ChoiceElement" /&gt;
&lt;xs:complexType name="ChoiceElement"&gt;
  &lt;xs:choice&gt;
    &lt;<b>xs:element</b> name="AChoiceElement" type="xs:string" /&gt;
    &lt;<b>xs:element</b> name="BChoiceElement" type="xs:string" /&gt;
  &lt;/xs:choice&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ChoiceElement01">
   <ex:choiceElement>
      <ex:AChoiceElement>A</ex:AChoiceElement>
   </ex:choiceElement>
</ex:instance>
<ex:instance xml:id="ChoiceElement02">
   <ex:choiceElement>
      <ex:BChoiceElement>B</ex:BChoiceElement>
   </ex:choiceElement>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SequenceElement" pattern="SequenceElement">
<pat:xpath>.//xs:sequence/xs:element/(.)</pat:xpath>
<ex:typedef>
&lt;xs:element name="sequenceElement" type="ex:SequenceElement" /&gt;
&lt;xs:complexType name="SequenceElement"&gt;
  &lt;xs:sequence&gt;
    &lt;<b>xs:element</b> name="element1" type="xs:string" /&gt;
    &lt;<b>xs:element</b> name="element2" type="xs:string" /&gt;
    &lt;<b>xs:element</b> name="element3" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="SequenceElement01">
   <ex:sequenceElement>
      <ex:element1>element1</ex:element1>
      <ex:element2>element2</ex:element2>
      <ex:element3>element3</ex:element3>
   </ex:sequenceElement>
</ex:instance>
   </ex:example>
   <ex:example xml:id="AllElement" pattern="AllElement">
<pat:xpath>.//xs:all/xs:element/(.)</pat:xpath>
<ex:typedef>
&lt;xs:element name="allElement" type="ex:AllElement" /&gt;
&lt;xs:complexType name="AllElement"&gt;
  &lt;xs:all&gt;
    &lt;<b>xs:element</b> name="element1" type="xs:string" /&gt;
    &lt;<b>xs:element</b> name="element2" type="xs:string" /&gt;
    &lt;<b>xs:element</b> name="element3" type="xs:string" /&gt;
    &lt;<b>xs:element</b> name="element4" type="xs:string" /&gt;
    &lt;<b>xs:element</b> name="element5" type="xs:string" /&gt;
  &lt;/xs:all&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="AllElement01">
   <ex:allElement>
      <ex:element1>element1</ex:element1>
      <ex:element2>element2</ex:element2>
      <ex:element3>element3</ex:element3>
      <ex:element4>element4</ex:element4>
      <ex:element5>element5</ex:element5>
   </ex:allElement>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SequenceSingleRepeatedElement" pattern="SequenceSingleRepeatedElement">
<pat:xpath>.//xs:sequence[count(xs:element) = 1]/xs:element[@maxOccurs = 'unbounded']/
		(., @maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="sequenceSingleRepeatedElement" type="ex:SequenceSingleRepeatedElement" /&gt;
&lt;xs:complexType name="SequenceSingleRepeatedElement"&gt;
  &lt;xs:sequence&gt;
    &lt;<b>xs:element</b> name="element" type="xs:string" <b> maxOccurs</b>="unbounded" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="SequenceSingleRepeatedElement01">
   <ex:sequenceSingleRepeatedElement>
      <ex:element>element</ex:element>
      <ex:element>element</ex:element>
      <ex:element>element</ex:element>
      <ex:element>element</ex:element>
      <ex:element>element</ex:element>
   </ex:sequenceSingleRepeatedElement>
</ex:instance>
<ex:instance xml:id="SequenceSingleRepeatedElement02">
   <ex:sequenceSingleRepeatedElement>
      <ex:element>element</ex:element>
   </ex:sequenceSingleRepeatedElement>
</ex:instance>
   </ex:example>
   <ex:example xml:id="NullEnumerationType" pattern="NullEnumerationType">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:string') 
		and count(xs:enumeration) le 1 and xs:enumeration = '']/
		(@base, xs:enumeration/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="nullEnumerationType" type="ex:NullEnumerationType" /&gt;
&lt;xs:simpleType name="NullEnumerationType"&gt;
  &lt;xs:restriction <b> base</b>="xs:string"&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="" /&gt;
  &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="NullEnumerationType01">
   <ex:nullEnumerationType/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ElementFixed" pattern="ElementFixed">
<pat:xpath>.//xs:element[@fixed] / 
   (@fixed)</pat:xpath>
<ex:typedef>
&lt;xs:element name="elementFixed" type="xs:string" <b> fixed</b>="yes" /&gt;
    </ex:typedef>
<ex:instance xml:id="ElementFixed01">
   <ex:elementFixed>yes</ex:elementFixed>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ElementEmptySequence" pattern="ElementEmptySequence">
<pat:xpath>.//xs:element[@name]/xs:complexType/xs:sequence[not(node())]/
	    (., .., ../.., ../../@name)</pat:xpath>
<ex:typedef>
&lt;<b>xs:element</b> 
   <b> name</b>="elementEmptySequence"&gt;
  &lt;<b>xs:complexType</b>&gt;
    &lt;<b>xs:sequence</b> /&gt;
  &lt;/<b>xs:complexType</b>&gt;
&lt;/<b>xs:element</b>&gt;
    </ex:typedef>
<ex:instance xml:id="ElementEmptySequence01">
   <ex:elementEmptySequence/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ElementEmptyComplexType" pattern="ElementEmptyComplexType">
<pat:xpath>.//xs:element[@name]/xs:complexType[not(node())]/
	    (., .., ../@name)</pat:xpath>
<ex:typedef>
&lt;<b>xs:element</b> 
   <b> name</b>="elementEmptyComplexType"&gt;
  &lt;<b>xs:complexType</b> /&gt;
&lt;/<b>xs:element</b>&gt;
    </ex:typedef>
<ex:instance xml:id="ElementEmptyComplexType01">
   <ex:elementEmptyComplexType/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="AttributeElementNameClash" pattern="AttributeElementNameClash">
<pat:xpath>.//xs:complexType/xs:sequence/xs:element[@name = ../../xs:attribute/@name]/
	    (@name)</pat:xpath>
<ex:typedef>
&lt;xs:element name="clientDetails" type="ex:ClientDetails" /&gt;
&lt;xs:complexType name="ClientDetails"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="forename" type="xs:string" /&gt;
    &lt;xs:element name="surname" type="xs:string" /&gt;
    &lt;xs:element <b> name</b>="title" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="phone" type="xs:string" /&gt;
  &lt;xs:attribute name="title" type="xs:int" /&gt;
&lt;/xs:complexType&gt;
    </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="NillableElement" pattern="NillableElement">
<pat:xpath>.//xs:element[@nillable = 'true' and not(@minOccurs = '0')]/
	    (@nillable)</pat:xpath>
<ex:typedef>
&lt;xs:element name="nillableMiddleName" type="ex:NillableMiddleName" /&gt;
&lt;xs:complexType name="NillableMiddleName"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstName" type="xs:string" /&gt;
    &lt;xs:element name="middleName" type="xs:string" <b> nillable</b>="true" /&gt;
    &lt;xs:element name="lastName" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </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" pattern="NillableOptionalElement">
<pat:xpath>.//xs:element[@nillable = 'true' and @minOccurs = '0']/
	    (@nillable, @minOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="nillableOptionalMiddleName" type="ex:NillableOptionalMiddleName" /&gt;
&lt;xs:complexType name="NillableOptionalMiddleName"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstName" type="xs:string" /&gt;
    &lt;xs:element name="middleName" type="xs:string" <b> minOccurs</b>="0" <b> nillable</b>="true" /&gt;
    &lt;xs:element name="lastName" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </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="NotNillableElement" pattern="NotNillableElement">
<pat:xpath>.//xs:element[@nillable = 'false']/
	    (@nillable)</pat:xpath>
<ex:typedef>
&lt;xs:element name="notNillableElement" type="ex:NotNillableElement" /&gt;
&lt;xs:complexType name="NotNillableElement"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="notNillableElement" type="xs:string" <b> nillable</b>="false" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="NotNillableElement01">
   <ex:notNillableElement>
      <ex:notNillableElement>Stuff</ex:notNillableElement>
   </ex:notNillableElement>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ElementTypeReference" pattern="ElementTypeReference">
<pat:xpath>.//xs:element[@name and @type 
	    and namespace-uri-from-QName(resolve-QName(@type,.)) != 'http://www.w3.org/2001/XMLSchema' 
	    and contains(@type, ':')]/
	    (., @name, @type)</pat:xpath>
<ex:typedef>
&lt;<b>xs:element</b> 
   <b> name</b>="elementTypeReference" <b> type</b>="ex:ElementTypeReference" /&gt;
&lt;xs:complexType name="ElementTypeReferenced"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="referenced" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="ElementTypeReference"&gt;
  &lt;xs:sequence&gt;
    &lt;<b>xs:element</b> 
   <b> name</b>="text" <b> type</b>="ex:ElementTypeReferenced" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ElementTypeReference01">
   <ex:elementTypeReference>
      <ex:text>
         <ex:referenced>foo</ex:referenced>
      </ex:text>
   </ex:elementTypeReference>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ElementTypeReferenceUnqualified"
         pattern="ElementTypeReferenceUnqualified">
<pat:xpath>.//xs:element[@name and @type 
	    and namespace-uri-from-QName(resolve-QName(@type,.)) != 'http://www.w3.org/2001/XMLSchema' 
	    and not(contains(@type, ':'))]/
	    (., @name, @type)</pat:xpath>
<ex:typedef>
&lt;xs:element name="elementTypeReferenceUnqualified" type="ex:ElementTypeReferenceUnqualified" /&gt;
&lt;xs:complexType name="ElementTypeReferenceUnqualifiedRef"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="referenced" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="ElementTypeReferenceUnqualified"&gt;
  &lt;xs:sequence&gt;
    &lt;<b>xs:element</b> 
   <b> name</b>="text" <b> type</b>="ElementTypeReferenceUnqualifiedRef" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ElementTypeReferenceUnqualified01">
   <ex:elementTypeReferenceUnqualified>
      <ex:text>
         <ex:referenced>String</ex:referenced>
      </ex:text>
   </ex:elementTypeReferenceUnqualified>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ElementReference" pattern="ElementReference">
<pat:xpath>.//xs:element[@ref and contains(@ref, ':')]/
	    (., @ref)</pat:xpath>
<ex:typedef>
&lt;xs:element name="customerName" type="ex:CustomerName" /&gt;
&lt;xs:element name="firstName" type="xs:string" /&gt;
&lt;xs:element name="lastName" type="xs:string" /&gt;
&lt;xs:complexType name="CustomerName"&gt;
  &lt;xs:sequence&gt;
    &lt;<b>xs:element</b> 
   <b> ref</b>="ex:firstName" /&gt;
    &lt;<b>xs:element</b> 
   <b> ref</b>="ex:lastName" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </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="ElementReferenceUnqualified" pattern="ElementReferenceUnqualified">
<pat:xpath>.//xs:element[@ref and not(contains(@ref, ':'))]/
	    (., @ref)</pat:xpath>
<ex:typedef>
&lt;xs:element name="elementReferenceUnqualified" type="ex:ElementReferenceUnqualified" /&gt;
&lt;xs:element name="elementReferenceUnqualifiedElement1" type="xs:string" /&gt;
&lt;xs:element name="elementReferenceUnqualifiedElement2" type="xs:string" /&gt;
&lt;xs:complexType name="ElementReferenceUnqualified"&gt;
  &lt;xs:sequence&gt;
    &lt;<b>xs:element</b> 
   <b> ref</b>="elementReferenceUnqualifiedElement1" /&gt;
    &lt;<b>xs:element</b> 
   <b> ref</b>="elementReferenceUnqualifiedElement2" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ElementReferenceUnqualified01">
   <ex:elementReferenceUnqualified>
      <ex:elementReferenceUnqualifiedElement1>String</ex:elementReferenceUnqualifiedElement1>
      <ex:elementReferenceUnqualifiedElement2>String</ex:elementReferenceUnqualifiedElement2>
   </ex:elementReferenceUnqualified>
</ex:instance>
   </ex:example>
   <ex:example xml:id="AttributeReference" pattern="AttributeReference">
<pat:xpath>.//xs:attribute[@ref and contains(@ref, ":")]/
	    (., @ref)</pat:xpath>
<ex:typedef>
&lt;xs:element name="clientName" type="ex:ClientName" /&gt;
&lt;xs:attribute name="phoneNumber" type="xs:string" /&gt;
&lt;xs:complexType name="ClientName"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstName" type="xs:string" /&gt;
    &lt;xs:element name="lastName" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;<b>xs:attribute</b> 
   <b> ref</b>="ex:phoneNumber" /&gt;
&lt;/xs:complexType&gt;
    </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="AttributeReferenceUnqualified" pattern="AttributeReferenceUnqualified">
<pat:xpath>.//xs:attribute[@ref and not(contains(@ref, ':'))]/
	    (., @ref)</pat:xpath>
<ex:typedef>
&lt;xs:element name="attributeReferenceUnqualified" type="ex:AttributeReferenceUnqualified" /&gt;
&lt;xs:attribute name="attributeReferenceUnqualifiedAtt" type="xs:string" /&gt;
&lt;xs:complexType name="AttributeReferenceUnqualified"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstElement" type="xs:string" /&gt;
    &lt;xs:element name="lastElement" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;<b>xs:attribute</b> 
   <b> ref</b>="attributeReferenceUnqualifiedAtt" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="AttributeReferenceUnqualified01">
   <ex:attributeReferenceUnqualified ex:attributeReferenceUnqualifiedAtt="String">
      <ex:firstElement>String</ex:firstElement>
      <ex:lastElement>String</ex:lastElement>
   </ex:attributeReferenceUnqualified>
</ex:instance>
   </ex:example>
   <ex:example xml:id="AttributeTypeReference" pattern="AttributeTypeReference">
<pat:xpath>.//xs:attribute[@name and @type 
	    and namespace-uri-from-QName(resolve-QName(@type,.)) != 'http://www.w3.org/2001/XMLSchema' 
	    and contains(@type, ':')]/
	    (., @name, @type)</pat:xpath>
<ex:typedef>
&lt;xs:element name="attributeTypeReference" type="ex:AttributeTypeReference" /&gt;
&lt;xs:simpleType name="SimpleType"&gt;
  &lt;xs:restriction base="xs:string"&gt;
    &lt;xs:enumeration value="value1" /&gt;
    &lt;xs:enumeration value="value2" /&gt;
  &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;xs:complexType name="AttributeTypeReference"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;<b>xs:attribute</b> 
   <b> name</b>="attr" <b> type</b>="ex:SimpleType" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="AttributeTypeReference01">
   <ex:attributeTypeReference attr="value1">
      <ex:element>string</ex:element>
   </ex:attributeTypeReference>
</ex:instance>
<ex:instance xml:id="AttributeTypeReference02">
   <ex:attributeTypeReference attr="value2">
      <ex:element>string</ex:element>
   </ex:attributeTypeReference>
</ex:instance>
   </ex:example>
   <ex:example xml:id="AttributeTypeReferenceUnqualified"
         pattern="AttributeTypeReferenceUnqualified">
<pat:xpath>.//xs:attribute[@name and @type 
	    and namespace-uri-from-QName(resolve-QName(@type,.)) != 'http://www.w3.org/2001/XMLSchema' 
	    and not(contains(@type, ':'))]/
		(., @name, @type)</pat:xpath>
<ex:typedef>
&lt;xs:element name="attributeTypeReferenceUnqualified" type="ex:AttributeTypeReferenceUnqualified" /&gt;
&lt;xs:simpleType name="AttributeTypeReferenceUnqualifiedType"&gt;
  &lt;xs:restriction base="xs:decimal"&gt;
    &lt;xs:totalDigits value="3" /&gt;
  &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
&lt;xs:complexType name="AttributeTypeReferenceUnqualified"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstElement" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;<b>xs:attribute</b> 
   <b> name</b>="localAttribute" <b> type</b>="AttributeTypeReferenceUnqualifiedType" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="AttributeTypeReferenceUnqualified01">
   <ex:attributeTypeReferenceUnqualified localAttribute="123">
      <ex:firstElement>String</ex:firstElement>
   </ex:attributeTypeReferenceUnqualified>
</ex:instance>
   </ex:example>
   <ex:example xml:id="UnionMemberTypes" pattern="UnionMemberTypes">
<pat:xpath>.//xs:simpleType/xs:union[@memberTypes and not(xs:simpleType)]/
		(., @memberTypes)</pat:xpath>
<ex:typedef>
&lt;xs:simpleType name="UnionMemberTypes"&gt;
  &lt;<b>xs:union</b> 
   <b> memberTypes</b>="xs:int xs:string" /&gt;
&lt;/xs:simpleType&gt;
&lt;xs:element name="unionMemberTypes" type="ex:UnionMemberTypes" /&gt;
    </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">
<pat:xpath>.//xs:simpleType/xs:union[@memberTypes and not(xs:simpleType)]/
		(., @memberTypes)</pat:xpath>
<ex:typedef>
&lt;xs:simpleType name="UnionDateString"&gt;
  &lt;<b>xs:union</b> 
   <b> memberTypes</b>="xs:date xs:string" /&gt;
&lt;/xs:simpleType&gt;
&lt;xs:element name="unionDateString" type="ex:UnionDateString" /&gt;
    </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">
<pat:xpath>.//xs:simpleType/xs:union[not(@memberTypes)]/xs:simpleType/
		(.., .)</pat:xpath>
<ex:typedef>
&lt;xs:simpleType name="UnionSimpleDateString"&gt;
  &lt;<b>xs:union</b>&gt;
    &lt;<b>xs:simpleType</b>&gt;
      &lt;xs:restriction base="xs:date" /&gt;
    &lt;/<b>xs:simpleType</b>&gt;
    &lt;<b>xs:simpleType</b>&gt;
      &lt;xs:restriction base="xs:string" /&gt;
    &lt;/<b>xs:simpleType</b>&gt;
  &lt;/<b>xs:union</b>&gt;
&lt;/xs:simpleType&gt;
&lt;xs:element name="unionSimpleDateString" type="ex:UnionSimpleDateString" /&gt;
    </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="UnionSimpleAndMemberTypes" pattern="UnionSimpleAndMemberTypes">
<pat:xpath>.//xs:simpleType/xs:union[@memberTypes and xs:simpleType]/
		(., @memberTypes, xs:simpleType)</pat:xpath>
<ex:typedef>
&lt;xs:element name="unionSimpleAndMemberTypes" type="ex:UnionSimpleAndMemberTypes" /&gt;
&lt;xs:simpleType name="UnionSimpleAndMemberTypes"&gt;
  &lt;<b>xs:union</b> 
   <b> memberTypes</b>="xs:string"&gt;
    &lt;<b>xs:simpleType</b>&gt;
      &lt;xs:restriction base="xs:date" /&gt;
    &lt;/<b>xs:simpleType</b>&gt;
  &lt;/<b>xs:union</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="UnionSimpleAndMemberTypes01">
   <ex:unionSimpleAndMemberTypes>string</ex:unionSimpleAndMemberTypes>
</ex:instance>
   </ex:example>
   <ex:example xml:id="List" pattern="List">
<pat:xpath>.//xs:list[@itemType]/
		(., @itemType)</pat:xpath>
<ex:typedef>
&lt;xs:element name="list" type="ex:List" /&gt;
&lt;xs:simpleType name="List"&gt;
  &lt;<b>xs:list</b> 
   <b> itemType</b>="xs:string" /&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="List01">
   <ex:list>This is a list of strings</ex:list>
</ex:instance>
   </ex:example>
   <ex:example xml:id="AnySimpleTypeElement" pattern="AnySimpleTypeElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:anySimpleType')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="anySimpleTypeElement" <b> type</b>="xs:anySimpleType" /&gt;
    </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="AnySimpleTypeAttribute" pattern="AnySimpleTypeAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:anySimpleType')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="anySimpleTypeAttribute" type="ex:AnySimpleTypeAttribute" /&gt;
&lt;xs:complexType name="AnySimpleTypeAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="anySimpleType" <b> type</b>="xs:anySimpleType" /&gt;
&lt;/xs:complexType&gt;
    </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="AnyTypeElement" pattern="AnyTypeElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:anyType')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="anyTypeElement" <b> type</b>="xs:anyType" /&gt;
    </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="StringElement" pattern="StringElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:string')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="stringElement" <b> type</b>="xs:string" /&gt;
    </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" pattern="StringAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:string')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="stringAttribute" type="ex:StringAttribute" /&gt;
&lt;xs:complexType name="StringAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="string" <b> type</b>="xs:string" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="BooleanElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:boolean')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="booleanElement" <b> type</b>="xs:boolean" /&gt;
    </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" pattern="BooleanAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:boolean')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="booleanAttribute" type="ex:BooleanAttribute" /&gt;
&lt;xs:complexType name="BooleanAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="boolean" <b> type</b>="xs:boolean" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="DecimalElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:decimal')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="decimalElement" <b> type</b>="xs:decimal" /&gt;
    </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" pattern="DecimalAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:decimal')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="decimalAttribute" type="ex:DecimalAttribute" /&gt;
&lt;xs:complexType name="DecimalAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="decimal" <b> type</b>="xs:decimal" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="DecimalAttribute01">
   <ex:decimalAttribute decimal="+10000000999829292922093443563.32423442"/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="FloatElement" pattern="FloatElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:float')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="floatElement" <b> type</b>="xs:float" /&gt;
    </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" pattern="FloatAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:float')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="floatAttribute" type="ex:FloatAttribute" /&gt;
&lt;xs:complexType name="FloatAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="float" <b> type</b>="xs:float" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="FloatAttribute01">
   <ex:floatAttribute float="-7446.445E5"/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="DoubleElement" pattern="DoubleElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:double')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="doubleElement" <b> type</b>="xs:double" /&gt;
    </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" pattern="DoubleAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:double')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="doubleAttribute" type="ex:DoubleAttribute" /&gt;
&lt;xs:complexType name="DoubleAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="double" <b> type</b>="xs:double" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="DoubleAttribute01">
   <ex:doubleAttribute double="12.334"/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="DurationElement" pattern="DurationElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:duration')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="durationElement" <b> type</b>="xs:duration" /&gt;
    </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" pattern="DurationAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:duration')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="durationAttribute" type="ex:DurationAttribute" /&gt;
&lt;xs:complexType name="DurationAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="duration" <b> type</b>="xs:duration" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="DurationAttribute01">
   <ex:durationAttribute duration="P1M"/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="DateTimeElement" pattern="DateTimeElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:dateTime')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="dateTimeElement" <b> type</b>="xs:dateTime" /&gt;
    </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" pattern="DateTimeAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:dateTime')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="dateTimeAttribute" type="ex:DateTimeAttribute" /&gt;
&lt;xs:complexType name="DateTimeAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="dateTime" <b> type</b>="xs:dateTime" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="TimeElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:time')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="timeElement" <b> type</b>="xs:time" /&gt;
    </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" pattern="TimeAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:time')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="timeAttribute" type="ex:TimeAttribute" /&gt;
&lt;xs:complexType name="TimeAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="time" <b> type</b>="xs:time" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="DateElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:date')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="dateElement" <b> type</b>="xs:date" /&gt;
    </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" pattern="DateAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:date')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="dateAttribute" type="ex:DateAttribute" /&gt;
&lt;xs:complexType name="DateAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="date" <b> type</b>="xs:date" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="GYearMonthElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gYearMonth')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="gYearMonthElement" <b> type</b>="xs:gYearMonth" /&gt;
    </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" pattern="GYearMonthAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gYearMonth')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="gYearMonthAttribute" type="ex:GYearMonthAttribute" /&gt;
&lt;xs:complexType name="GYearMonthAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="gYearMonth" <b> type</b>="xs:gYearMonth" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="GYearElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gYear')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="gYearElement" <b> type</b>="xs:gYear" /&gt;
    </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" pattern="GYearAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gYear')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="gYearAttribute" type="ex:GYearAttribute" /&gt;
&lt;xs:complexType name="GYearAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="gYear" <b> type</b>="xs:gYear" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="GMonthDayElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gMonthDay')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="gMonthDayElement" <b> type</b>="xs:gMonthDay" /&gt;
    </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" pattern="GMonthDayAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gMonthDay')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="gMonthDayAttribute" type="ex:GMonthDayAttribute" /&gt;
&lt;xs:complexType name="GMonthDayAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="gMonthDay" <b> type</b>="xs:gMonthDay" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="GDayElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gDay')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="gDayElement" <b> type</b>="xs:gDay" /&gt;
    </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" pattern="GDayAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gDay')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="gDayAttribute" type="ex:GDayAttribute" /&gt;
&lt;xs:complexType name="GDayAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="gDay" <b> type</b>="xs:gDay" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="GMonthElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gMonth')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="gMonthElement" <b> type</b>="xs:gMonth" /&gt;
    </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" pattern="GMonthAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gMonth')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="gMonthAttribute" type="ex:GMonthAttribute" /&gt;
&lt;xs:complexType name="GMonthAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="gMonth" <b> type</b>="xs:gMonth" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="GMonthAttribute01">
   <ex:gMonthAttribute gMonth="--04--"/>
</ex:instance>
<ex:instance xml:id="GMonthAttribute02">
   <ex:gMonthAttribute gMonth="--04Z"/>
</ex:instance>
<ex:instance xml:id="GMonthAttribute03">
   <ex:gMonthAttribute gMonth="--12+02:00"/>
</ex:instance>
<ex:instance xml:id="GMonthAttribute04">
   <ex:gMonthAttribute gMonth="--04-10:00"/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="HexBinaryElement" pattern="HexBinaryElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:hexBinary')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="hexBinaryElement" <b> type</b>="xs:hexBinary" /&gt;
    </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" pattern="HexBinaryAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:hexBinary')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="hexBinaryAttribute" type="ex:HexBinaryAttribute" /&gt;
&lt;xs:complexType name="HexBinaryAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="hexBinary" <b> type</b>="xs:hexBinary" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="HexBinaryAttribute01">
   <ex:hexBinaryAttribute hexBinary="77696f"/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="Base64BinaryElement" pattern="Base64BinaryElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:base64Binary')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="base64BinaryElement" <b> type</b>="xs:base64Binary" /&gt;
    </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" pattern="Base64BinaryAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:base64Binary')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="base64BinaryAttribute" type="ex:Base64BinaryAttribute" /&gt;
&lt;xs:complexType name="Base64BinaryAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="base64Binary" <b> type</b>="xs:base64Binary" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="Base64BinaryAttribute01">
   <ex:base64BinaryAttribute base64Binary="cnRjbGNyZW9scg=="/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="AnyURIElement" pattern="AnyURIElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:anyURI')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="anyURIElement" <b> type</b>="xs:anyURI" /&gt;
    </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" pattern="AnyURIAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:anyURI')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="anyURIAttribute" type="ex:AnyURIAttribute" /&gt;
&lt;xs:complexType name="AnyURIAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="anyURI" <b> type</b>="xs:anyURI" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="QNameElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:QName')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="QNameElement" <b> type</b>="xs:QName" /&gt;
    </ex:typedef>
<ex:instance xml:id="QNameElement01">
   <ex:QNameElement>ex:QNameElement</ex:QNameElement>
</ex:instance>
   </ex:example>
   <ex:example xml:id="QNameAttribute" pattern="QNameAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:QName')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="QNameAttribute" type="ex:QNameAttribute" /&gt;
&lt;xs:complexType name="QNameAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="QName" <b> type</b>="xs:QName" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="QNameAttribute01">
   <ex:QNameAttribute QName="ex:QNameAttribute"/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="NormalizedStringElement" pattern="NormalizedStringElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:normalizedString')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="normalizedStringElement" <b> type</b>="xs:normalizedString" /&gt;
    </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" pattern="NormalizedStringAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:normalizedString')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="normalizedStringAttribute" type="ex:NormalizedStringAttribute" /&gt;
&lt;xs:complexType name="NormalizedStringAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="normalizedString" <b> type</b>="xs:normalizedString" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="NormalizedStringAttribute01">
   <ex:normalizedStringAttribute normalizedString="Hello Paris"/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="TokenElement" pattern="TokenElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:token')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="tokenElement" <b> type</b>="xs:token" /&gt;
    </ex:typedef>
<ex:instance xml:id="TokenElement01">
   <ex:tokenElement>tokenElement</ex:tokenElement>
</ex:instance>
   </ex:example>
   <ex:example xml:id="TokenAttribute" pattern="TokenAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:token')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="tokenAttribute" type="ex:TokenAttribute" /&gt;
&lt;xs:complexType name="TokenAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="token" <b> type</b>="xs:token" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="TokenAttribute01">
   <ex:tokenAttribute token="hello"/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="LanguageElement" pattern="LanguageElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:language')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="languageElement" <b> type</b>="xs:language" /&gt;
    </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" pattern="LanguageAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:language')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="languageAttribute" type="ex:LanguageAttribute" /&gt;
&lt;xs:complexType name="LanguageAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="language" <b> type</b>="xs:language" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="LanguageAttribute01">
   <ex:languageAttribute language="en"/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="NMTOKENElement" pattern="NMTOKENElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:NMTOKEN')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="NMTOKENElement" <b> type</b>="xs:NMTOKEN" /&gt;
    </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" pattern="NMTOKENAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:NMTOKEN')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="NMTOKENAttribute" type="ex:NMTOKENAttribute" /&gt;
&lt;xs:complexType name="NMTOKENAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="NMTOKEN" <b> type</b>="xs:NMTOKEN" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="NMTOKENAttribute01">
   <ex:NMTOKENAttribute NMTOKEN="id"/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="NMTOKENSElement" pattern="NMTOKENSElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:NMTOKENS')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="NMTOKENSElement" <b> type</b>="xs:NMTOKENS" /&gt;
    </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" pattern="NMTOKENSAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:NMTOKENS')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="NMTOKENSAttribute" type="ex:NMTOKENSAttribute" /&gt;
&lt;xs:complexType name="NMTOKENSAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="NMTOKENS" <b> type</b>="xs:NMTOKENS" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="NameElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:Name')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="NameElement" <b> type</b>="xs:Name" /&gt;
    </ex:typedef>
<ex:instance xml:id="NameElement01">
   <ex:NameElement>foo</ex:NameElement>
</ex:instance>
   </ex:example>
   <ex:example xml:id="NameAttribute" pattern="NameAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:Name')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="nameAttribute" type="ex:NameAttribute" /&gt;
&lt;xs:complexType name="NameAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="name" <b> type</b>="xs:Name" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="NameAttribute01">
   <ex:nameAttribute name="foo"/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="NCNameElement" pattern="NCNameElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:NCName')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="NCNameElement" <b> type</b>="xs:NCName" /&gt;
    </ex:typedef>
<ex:instance xml:id="NCNameElement01">
   <ex:NCNameElement>foo</ex:NCNameElement>
</ex:instance>
   </ex:example>
   <ex:example xml:id="NCNameAttribute" pattern="NCNameAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:NCName')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="NCNameAttribute" type="ex:NCNameAttribute" /&gt;
&lt;xs:complexType name="NCNameAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="NCName" <b> type</b>="xs:NCName" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="NCNameAttribute01">
   <ex:NCNameAttribute NCName="bar"/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="IDElement" pattern="IDElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:ID')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="IDElement" <b> type</b>="xs:ID" /&gt;
    </ex:typedef>
<ex:instance xml:id="IDElement01">
   <ex:IDElement>foo</ex:IDElement>
</ex:instance>
   </ex:example>
   <ex:example xml:id="IDAttribute" pattern="IDAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:ID')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="IDAttribute" type="ex:IDAttribute" /&gt;
&lt;xs:complexType name="IDAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="ID" <b> type</b>="xs:ID" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="IDAttribute01">
   <ex:IDAttribute ID="bar"/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="IDREFElement" pattern="IDREFElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:IDREF')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="IDREFElement" type="ex:IDREFElementComplextType" /&gt;
&lt;xs:complexType name="IDREFElementComplextType"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element" <b> type</b>="xs:IDREF" /&gt;
    &lt;xs:element name="id" type="xs:ID" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="IDREFElement01">
   <ex:IDREFElement>
      <ex:element>idref</ex:element>
      <ex:id>idref</ex:id>
   </ex:IDREFElement>
</ex:instance>
   </ex:example>
   <ex:example xml:id="IDREFAttribute" pattern="IDREFAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:IDREF')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="IDREFAttribute" type="ex:IDREFAttributeComplexType" /&gt;
&lt;xs:complexType name="IDREFAttributeComplexType"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="id" type="xs:ID" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="IDREF" <b> type</b>="xs:IDREF" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="IDREFAttribute01">
   <ex:IDREFAttribute IDREF="id1">
      <ex:id>id1</ex:id>
   </ex:IDREFAttribute>
</ex:instance>
   </ex:example>
   <ex:example xml:id="IDREFSElement" pattern="IDREFSElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:IDREFS')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="IDREFSElement" type="ex:IDREFSElementComplextType" /&gt;
&lt;xs:complexType name="IDREFSElementComplextType"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element" <b> type</b>="xs:IDREFS" /&gt;
    &lt;xs:element name="id1" type="xs:ID" /&gt;
    &lt;xs:element name="id2" type="xs:ID" /&gt;
    &lt;xs:element name="id3" type="xs:ID" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="IDREFSElement01">
   <ex:IDREFSElement>
      <ex:element>id1 id2 id3</ex:element>
      <ex:id1>id1</ex:id1>
      <ex:id2>id2</ex:id2>
      <ex:id3>id3</ex:id3>
   </ex:IDREFSElement>
</ex:instance>
   </ex:example>
   <ex:example xml:id="IDREFSAttribute" pattern="IDREFSAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:IDREFS')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="IDREFSAttribute" type="ex:IDREFSAttributeComplexType" /&gt;
&lt;xs:complexType name="IDREFSAttributeComplexType"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="id1" type="xs:ID" /&gt;
    &lt;xs:element name="id2" type="xs:ID" /&gt;
    &lt;xs:element name="id3" type="xs:ID" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="IDREFS" <b> type</b>="xs:IDREFS" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="IDREFSAttribute01">
   <ex:IDREFSAttribute IDREFS="id1 id2 id3">
      <ex:id1>id1</ex:id1>
      <ex:id2>id2</ex:id2>
      <ex:id3>id3</ex:id3>
   </ex:IDREFSAttribute>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ENTITYElement" pattern="ENTITYElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:ENTITY')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="ENTITYElement" <b> type</b>="xs:ENTITY" /&gt;
    </ex:typedef>
<ex:instance xml:id="ENTITYElement01">
   <ex:ENTITYElement>lt</ex:ENTITYElement>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ENTITYAttribute" pattern="ENTITYAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:ENTITY')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="ENTITYAttribute" type="ex:ENTITYAttribute" /&gt;
&lt;xs:complexType name="ENTITYAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="ENTITY" <b> type</b>="xs:ENTITY" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ENTITYAttribute01">
   <ex:ENTITYAttribute ENTITY="lt"/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ENTITIESElement" pattern="ENTITIESElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:ENTITIES')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="ENTITIESElement" <b> type</b>="xs:ENTITIES" /&gt;
    </ex:typedef>
<ex:instance xml:id="ENTITIESElement01">
   <ex:ENTITIESElement>lt gt apos quot</ex:ENTITIESElement>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ENTITIESAttribute" pattern="ENTITIESAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:ENTITIES')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="ENTITIESAttribute" type="ex:ENTITIESAttribute" /&gt;
&lt;xs:complexType name="ENTITIESAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="ENTITIES" <b> type</b>="xs:ENTITIES" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ENTITIESAttribute01">
   <ex:ENTITIESAttribute ENTITIES="lt gt"/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="IntegerElement" pattern="IntegerElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:integer')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="integerElement" <b> type</b>="xs:integer" /&gt;
    </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" pattern="IntegerAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:integer')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="integerAttribute" type="ex:IntegerAttribute" /&gt;
&lt;xs:complexType name="IntegerAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="integer" <b> type</b>="xs:integer" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="NonPositiveIntegerElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:nonPositiveInteger')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="nonPositiveIntegerElement" <b> type</b>="xs:nonPositiveInteger" /&gt;
    </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" pattern="NonPositiveIntegerAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:nonPositiveInteger')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="nonPositiveIntegerAttribute" type="ex:NonPositiveIntegerAttribute" /&gt;
&lt;xs:complexType name="NonPositiveIntegerAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="nonPositiveInteger" <b> type</b>="xs:nonPositiveInteger" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="NegativeIntegerElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:negativeInteger')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="negativeIntegerElement" <b> type</b>="xs:negativeInteger" /&gt;
    </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" pattern="NegativeIntegerAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:negativeInteger')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="negativeIntegerAttribute" type="ex:NegativeIntegerAttribute" /&gt;
&lt;xs:complexType name="NegativeIntegerAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="negativeInteger" <b> type</b>="xs:negativeInteger" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="LongElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:long')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="longElement" <b> type</b>="xs:long" /&gt;
    </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" pattern="LongAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:long')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="longAttribute" type="ex:LongAttribute" /&gt;
&lt;xs:complexType name="LongAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="long" <b> type</b>="xs:long" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="IntElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:int')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="intElement" <b> type</b>="xs:int" /&gt;
    </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" pattern="IntAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:int')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="intAttribute" type="ex:IntAttribute" /&gt;
&lt;xs:complexType name="IntAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="int" <b> type</b>="xs:int" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="ShortElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:short')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="shortElement" <b> type</b>="xs:short" /&gt;
    </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" pattern="ShortAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:short')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="shortAttribute" type="ex:ShortAttribute" /&gt;
&lt;xs:complexType name="ShortAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="short" <b> type</b>="xs:short" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="ByteElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:byte')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="byteElement" <b> type</b>="xs:byte" /&gt;
    </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" pattern="ByteAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:byte')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="byteAttribute" type="ex:ByteAttribute" /&gt;
&lt;xs:complexType name="ByteAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="byte" <b> type</b>="xs:byte" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="NonNegativeIntegerElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:nonNegativeInteger')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="nonNegativeIntegerElement" <b> type</b>="xs:nonNegativeInteger" /&gt;
    </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" pattern="NonNegativeIntegerAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:nonNegativeInteger')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="nonNegativeIntegerAttribute" type="ex:NonNegativeIntegerAttribute" /&gt;
&lt;xs:complexType name="NonNegativeIntegerAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="nonNegativeInteger" <b> type</b>="xs:nonNegativeInteger" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="UnsignedLongElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:unsignedLong')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="unsignedLongElement" <b> type</b>="xs:unsignedLong" /&gt;
    </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" pattern="UnsignedLongAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:unsignedLong')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="unsignedLongAttribute" type="ex:UnsignedLongAttribute" /&gt;
&lt;xs:complexType name="UnsignedLongAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="unsignedLong" <b> type</b>="xs:unsignedLong" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="UnsignedIntElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:unsignedInt')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="unsignedIntElement" <b> type</b>="xs:unsignedInt" /&gt;
    </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" pattern="UnsignedIntAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:unsignedInt')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="unsignedIntAttribute" type="ex:UnsignedIntAttribute" /&gt;
&lt;xs:complexType name="UnsignedIntAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="unsignedInt" <b> type</b>="xs:unsignedInt" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="UnsignedShortElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:unsignedShort')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="unsignedShortElement" <b> type</b>="xs:unsignedShort" /&gt;
    </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" pattern="UnsignedShortAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:unsignedShort')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="unsignedShortAttribute" type="ex:UnsignedShortAttribute" /&gt;
&lt;xs:complexType name="UnsignedShortAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="unsignedShort" <b> type</b>="xs:unsignedShort" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="UnsignedByteElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:unsignedByte')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="unsignedByteElement" <b> type</b>="xs:unsignedByte" /&gt;
    </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" pattern="UnsignedByteAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:unsignedByte')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="unsignedByteAttribute" type="ex:UnsignedByteAttribute" /&gt;
&lt;xs:complexType name="UnsignedByteAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="unsignedByte" <b> type</b>="xs:unsignedByte" /&gt;
&lt;/xs:complexType&gt;
    </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" pattern="PositiveIntegerElement">
<pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:positiveInteger')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="positiveIntegerElement" <b> type</b>="xs:positiveInteger" /&gt;
    </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" pattern="PositiveIntegerAttribute">
<pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:positiveInteger')]</pat:xpath>
<ex:typedef>
&lt;xs:element name="positiveIntegerAttribute" type="ex:PositiveIntegerAttribute" /&gt;
&lt;xs:complexType name="PositiveIntegerAttribute"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="text" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="positiveInteger" <b> type</b>="xs:positiveInteger" /&gt;
&lt;/xs:complexType&gt;
    </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="StringSimpleTypePattern" pattern="StringSimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:string')]/xs:pattern[@value]/
		(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="stringSimpleTypePattern" type="ex:StringSimpleTypePattern" /&gt;
&lt;xs:simpleType name="StringSimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:string"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="\d{3}" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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" pattern="IntSimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:int')]/xs:pattern[@value]/
		(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="intSimpleTypePattern" type="ex:IntSimpleTypePattern" /&gt;
&lt;xs:simpleType name="IntSimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:int"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="\d{3}" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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" pattern="IntegerSimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:integer')]/xs:pattern[@value]/
		(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="integerSimpleTypePattern" type="ex:IntegerSimpleTypePattern" /&gt;
&lt;xs:simpleType name="IntegerSimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:integer"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="[+\-]?([1-9][0-9]*)|0" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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" pattern="LongSimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:long')]/xs:pattern[@value]/
		(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="longSimpleTypePattern" type="ex:LongSimpleTypePattern" /&gt;
&lt;xs:simpleType name="LongSimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:long"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="\d{3}" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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" pattern="DecimalSimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:decimal')]/xs:pattern[@value]/
		(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="decimalSimpleTypePattern" type="ex:DecimalSimpleTypePattern" /&gt;
&lt;xs:simpleType name="DecimalSimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:decimal"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="\d{4}\.\d{2}" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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" pattern="FloatSimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:float')]/xs:pattern[@value]/
		(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="floatSimpleTypePattern" type="ex:FloatSimpleTypePattern" /&gt;
&lt;xs:simpleType name="FloatSimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:float"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="\d{3}" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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" pattern="DoubleSimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:double')]/xs:pattern[@value]/
		(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="doubleSimpleTypePattern" type="ex:DoubleSimpleTypePattern" /&gt;
&lt;xs:simpleType name="DoubleSimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:double"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="\d{3}" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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" pattern="ShortSimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:short')]/xs:pattern[@value]/
		(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="shortSimpleTypePattern" type="ex:ShortSimpleTypePattern" /&gt;
&lt;xs:simpleType name="ShortSimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:short"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="\d{3}" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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="ByteSimpleTypePattern" pattern="ByteSimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:byte')]/xs:pattern[@value]/
   (.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="byteSimpleTypePattern" type="ex:ByteSimpleTypePattern" /&gt;
&lt;xs:simpleType name="ByteSimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:byte"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="1" /&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="2" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="ByteSimpleTypePattern01">
   <ex:byteSimpleTypePattern>1</ex:byteSimpleTypePattern>
</ex:instance>
   </ex:example>
   <ex:example xml:id="NonNegativeIntegerSimpleTypePattern"
         pattern="NonNegativeIntegerSimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:nonNegativeInteger')]/xs:pattern[@value]/
		(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="nonNegativeIntegerSimpleTypePattern" type="ex:NonNegativeIntegerSimpleTypePattern" /&gt;
&lt;xs:simpleType name="NonNegativeIntegerSimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:nonNegativeInteger"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="\d{3}" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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"
         pattern="PositiveIntegerSimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:positiveInteger')]/xs:pattern[@value]/
		(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="positiveIntegerSimpleTypePattern" type="ex:PositiveIntegerSimpleTypePattern" /&gt;
&lt;xs:simpleType name="PositiveIntegerSimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:positiveInteger"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="\d{3}" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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" pattern="UnsignedLongSimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:unsignedLong')]/xs:pattern[@value]/
		(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="unsignedLongSimpleTypePattern" type="ex:UnsignedLongSimpleTypePattern" /&gt;
&lt;xs:simpleType name="UnsignedLongSimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:unsignedLong"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="\d{3}" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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" pattern="UnsignedIntSimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:unsignedInt')]/xs:pattern[@value]/
		(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="unsignedIntSimpleTypePattern" type="ex:UnsignedIntSimpleTypePattern" /&gt;
&lt;xs:simpleType name="UnsignedIntSimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:unsignedInt"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="\d{3}" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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"
         pattern="UnsignedShortSimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:unsignedShort')]/xs:pattern[@value]/
		(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="unsignedShortSimpleTypePattern" type="ex:UnsignedShortSimpleTypePattern" /&gt;
&lt;xs:simpleType name="UnsignedShortSimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:unsignedShort"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="\d{3}" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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" pattern="DateSimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:date')]/xs:pattern[@value]/
   (.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="dateSimpleTypePattern" type="ex:DateSimpleTypePattern" /&gt;
&lt;xs:simpleType name="DateSimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:date"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="[^\-]{4}\-[^\-]{2}\-[^\-]{2}" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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="GYearSimpleTypePattern" pattern="GYearSimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:gYear')]/xs:pattern[@value]/
		(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="gYearSimpleTypePattern" type="ex:GYearSimpleTypePattern" /&gt;
&lt;xs:simpleType name="GYearSimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:gYear"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="2008|2009|2010" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="GYearSimpleTypePattern01">
   <ex:gYearSimpleTypePattern>2009</ex:gYearSimpleTypePattern>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GMonthSimpleTypePattern" pattern="GMonthSimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:gMonth')]/xs:pattern[@value]/
		(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="gMonthSimpleTypePattern" type="ex:GMonthSimpleTypePattern" /&gt;
&lt;xs:simpleType name="GMonthSimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:gMonth"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="--10|--11|--12" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="GMonthSimpleTypePattern01">
   <ex:gMonthSimpleTypePattern>--11</ex:gMonthSimpleTypePattern>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GDaySimpleTypePattern" pattern="GDaySimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:gDay')]/xs:pattern[@value]/
		(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="gDaySimpleTypePattern" type="ex:GDaySimpleTypePattern" /&gt;
&lt;xs:simpleType name="GDaySimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:gDay"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="---01|---11|---31" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="GDaySimpleTypePattern01">
   <ex:gDaySimpleTypePattern>---01</ex:gDaySimpleTypePattern>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GYearMonthSimpleTypePattern" pattern="GYearMonthSimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:gYearMonth')]/xs:pattern[@value]/
		(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="gYearMonthSimpleTypePattern" type="ex:GYearMonthSimpleTypePattern" /&gt;
&lt;xs:simpleType name="GYearMonthSimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:gYearMonth"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="2001-12|2002-12|2003-12" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="GYearMonthSimpleTypePattern01">
   <ex:gYearMonthSimpleTypePattern>2001-12</ex:gYearMonthSimpleTypePattern>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GMonthDaySimpleTypePattern" pattern="GMonthDaySimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:gMonthDay')]/xs:pattern[@value]/
		(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="gMonthDaySimpleTypePattern" type="ex:GMonthDaySimpleTypePattern" /&gt;
&lt;xs:simpleType name="GMonthDaySimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:gMonthDay"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="--12-01|--11-01|--10-01" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="GMonthDaySimpleTypePattern01">
   <ex:gMonthDaySimpleTypePattern>--12-01</ex:gMonthDaySimpleTypePattern>
</ex:instance>
   </ex:example>
   <ex:example xml:id="TokenSimpleTypePattern" pattern="TokenSimpleTypePattern">
<pat:xpath>.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:token')]/xs:pattern[@value]/
   (.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="tokenSimpleTypePattern" type="ex:TokenSimpleTypePattern" /&gt;
&lt;xs:simpleType name="TokenSimpleTypePattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:token"&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="1" /&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="2" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="TokenSimpleTypePattern01">
   <ex:tokenSimpleTypePattern>1</ex:tokenSimpleTypePattern>
</ex:instance>
   </ex:example>
   <ex:example xml:id="RestrictedStringMinLength" pattern="RestrictedStringMinLength">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:string')]/xs:minLength[@value]/
		(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="restrictedStringMinLength" type="ex:RestrictedStringMinLength" /&gt;
&lt;xs:simpleType name="RestrictedStringMinLength"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:string"&gt;
    &lt;<b>xs:minLength</b> 
   <b> value</b>="1" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="RestrictedStringMinLength01">
   <ex:restrictedStringMinLength>String Value</ex:restrictedStringMinLength>
</ex:instance>
   </ex:example>
   <ex:example xml:id="RestrictedStringMaxLength" pattern="RestrictedStringMaxLength">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:string')]/xs:maxLength[@value]/
		(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="restrictedStringMaxLength" type="ex:RestrictedStringMaxLength" /&gt;
&lt;xs:simpleType name="RestrictedStringMaxLength"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:string"&gt;
    &lt;<b>xs:maxLength</b> 
   <b> value</b>="12" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="RestrictedStringMaxLength01">
   <ex:restrictedStringMaxLength>String Value</ex:restrictedStringMaxLength>
</ex:instance>
   </ex:example>
   <ex:example xml:id="RestrictedStringMinMaxLength" pattern="RestrictedStringMinMaxLength">
<pat:xpath>
	.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:string') 
		and xs:minLength/@value
		and xs:maxLength/@value]/
		(., @base, xs:minLength/(., @value), xs:maxLength/(., @value))
	</pat:xpath>
<ex:typedef>
&lt;xs:element name="restrictedStringMinMaxLength" type="ex:RestrictedStringMinMaxLength" /&gt;
&lt;xs:simpleType name="RestrictedStringMinMaxLength"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:string"&gt;
    &lt;<b>xs:minLength</b> 
   <b> value</b>="12" /&gt;
    &lt;<b>xs:maxLength</b> 
   <b> value</b>="15" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="RestrictedStringMinMaxLength01">
   <ex:restrictedStringMinMaxLength>String Value 2</ex:restrictedStringMinMaxLength>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SimpleTypeRenamed" pattern="SimpleTypeRenamed">
<pat:xpath>.//xs:simpleType/xs:restriction[@base and count(./*) = 0]/
		(., @base)</pat:xpath>
<ex:typedef>
&lt;xs:element name="simpleTypeRenamed" type="ex:SimpleTypeRenamed" /&gt;
&lt;xs:simpleType name="SimpleTypeRenamed"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:string" /&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="SimpleTypeRenamed01">
   <ex:simpleTypeRenamed>String</ex:simpleTypeRenamed>
</ex:instance>
   </ex:example>
   <ex:example xml:id="RestrictedMinInclusive" pattern="RestrictedMinInclusive">
<pat:xpath>.//xs:simpleType/xs:restriction/xs:minInclusive[@value]/(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="restrictedMinInclusive" type="ex:RestrictedMinInclusive" /&gt;
&lt;xs:simpleType name="RestrictedMinInclusive"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:integer"&gt;
    &lt;<b>xs:minInclusive</b> 
   <b> value</b>="1" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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" pattern="RestrictedMaxInclusive">
<pat:xpath>.//xs:simpleType/xs:restriction/xs:maxInclusive[@value]/(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="restrictedMaxInclusive" type="ex:RestrictedMaxInclusive" /&gt;
&lt;xs:simpleType name="RestrictedMaxInclusive"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:integer"&gt;
    &lt;<b>xs:maxInclusive</b> 
   <b> value</b>="3" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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" pattern="RestrictedMinExclusive">
<pat:xpath>.//xs:simpleType/xs:restriction/xs:minExclusive[@value]/(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="restrictedMinExclusive" type="ex:RestrictedMinExclusive" /&gt;
&lt;xs:simpleType name="RestrictedMinExclusive"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:integer"&gt;
    &lt;<b>xs:minExclusive</b> 
   <b> value</b>="1" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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" pattern="RestrictedMaxExclusive">
<pat:xpath>.//xs:simpleType/xs:restriction/xs:maxExclusive[@value]/(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="restrictedMaxExclusive" type="ex:RestrictedMaxExclusive" /&gt;
&lt;xs:simpleType name="RestrictedMaxExclusive"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:integer"&gt;
    &lt;<b>xs:maxExclusive</b> 
   <b> value</b>="3" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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" pattern="RestrictedLength">
<pat:xpath>.//xs:simpleType/xs:restriction/xs:length[@value]/(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="restrictedLength" type="ex:RestrictedLength" /&gt;
&lt;xs:simpleType name="RestrictedLength"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:language"&gt;
    &lt;<b>xs:length</b> 
   <b> value</b>="2" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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" pattern="RestrictedMaxLength">
<pat:xpath>.//xs:simpleType/xs:restriction/xs:maxLength[@value]/(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="restrictedMaxLength" type="ex:RestrictedMaxLength" /&gt;
&lt;xs:simpleType name="RestrictedMaxLength"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:string"&gt;
    &lt;<b>xs:maxLength</b> 
   <b> value</b>="12" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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" pattern="RestrictedMinLength">
<pat:xpath>.//xs:simpleType/xs:restriction/xs:minLength[@value]/(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="restrictedMinLength" type="ex:RestrictedMinLength" /&gt;
&lt;xs:simpleType name="RestrictedMinLength"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:string"&gt;
    &lt;<b>xs:minLength</b> 
   <b> value</b>="2" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </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="ComplexTypeAttributeExtension" pattern="ComplexTypeAttributeExtension">
<pat:xpath>.//xs:complexType/xs:complexContent[xs:extension[@base]/xs:attribute]/
		(., xs:extension/(., @base, xs:attribute/(., @name)))</pat:xpath>
<ex:typedef>
&lt;xs:element name="complexTypeAttributeExtension" type="ex:ComplexTypeAttributeExtension" /&gt;
&lt;xs:complexType name="ComplexTypeAttributeBase"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="name" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="ComplexTypeAttributeExtension"&gt;
  &lt;<b>xs:complexContent</b>&gt;
    &lt;<b>xs:extension</b> 
   <b> base</b>="ex:ComplexTypeAttributeBase"&gt;
      &lt;<b>xs:attribute</b> 
   <b> name</b>="gender" type="xs:string" /&gt;
    &lt;/<b>xs:extension</b>&gt;
  &lt;/<b>xs:complexContent</b>&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ComplexTypeAttributeExtension01">
   <ex:complexTypeAttributeExtension gender="female">
      <ex:name>Mary</ex:name>
   </ex:complexTypeAttributeExtension>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ComplexTypeSequenceExtension" pattern="ComplexTypeSequenceExtension">
<pat:xpath>.//xs:complexType/xs:complexContent[xs:extension[@base]/xs:sequence]/
		(., xs:extension/
		(., @base, xs:sequence/(., xs:element/(., @name))))</pat:xpath>
<ex:typedef>
&lt;xs:element name="complexTypeSequenceExtension" type="ex:ComplexTypeSequenceExtension" /&gt;
&lt;xs:complexType name="ComplexTypeSequenceBase"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="name" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="ComplexTypeSequenceExtension"&gt;
  &lt;<b>xs:complexContent</b>&gt;
    &lt;<b>xs:extension</b> 
   <b> base</b>="ex:ComplexTypeSequenceBase"&gt;
      &lt;<b>xs:sequence</b>&gt;
        &lt;<b>xs:element</b> 
   <b> name</b>="description" type="xs:string" /&gt;
      &lt;/<b>xs:sequence</b>&gt;
    &lt;/<b>xs:extension</b>&gt;
  &lt;/<b>xs:complexContent</b>&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ComplexTypeSequenceExtension01">
   <ex:complexTypeSequenceExtension>
      <ex:name>Mary</ex:name>
      <ex:description>tall</ex:description>
   </ex:complexTypeSequenceExtension>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GlobalElementComplexTypeSequenceExtension"
         pattern="GlobalElementComplexTypeSequenceExtension">
<pat:xpath>./xs:element[@name]/xs:complexType/xs:complexContent[xs:extension[@base]/xs:sequence]/
		(../../(., @name), 
		.., ., 
		xs:extension/(., @base, 
		xs:sequence/(., xs:element/(., @name), 
		xs:attribute/(., @name))))</pat:xpath>
<ex:typedef>
&lt;<b>xs:element</b> 
   <b> name</b>="globalElementComplexTypeSequenceExtension"&gt;
  &lt;<b>xs:complexType</b>&gt;
    &lt;<b>xs:complexContent</b>&gt;
      &lt;<b>xs:extension</b> 
   <b> base</b>="xs:anyType"&gt;
        &lt;<b>xs:sequence</b> /&gt;
      &lt;/<b>xs:extension</b>&gt;
    &lt;/<b>xs:complexContent</b>&gt;
  &lt;/<b>xs:complexType</b>&gt;
&lt;/<b>xs:element</b>&gt;
    </ex:typedef>
<ex:instance xml:id="GlobalElementComplexTypeSequenceExtension01">
   <ex:globalElementComplexTypeSequenceExtension>
      <ex:data> some data </ex:data>
   </ex:globalElementComplexTypeSequenceExtension>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GlobalElementComplexTypeEmptyExtension"
         pattern="GlobalElementComplexTypeEmptyExtension">
<pat:xpath>./xs:element[@name]/xs:complexType/xs:complexContent[xs:extension[@base]/not(*)]/
		(../../(., @name), .., ., xs:extension/(., @base))</pat:xpath>
<ex:typedef>
&lt;<b>xs:element</b> 
   <b> name</b>="globalElementComplexTypeEmptyExtension"&gt;
  &lt;<b>xs:complexType</b>&gt;
    &lt;<b>xs:complexContent</b>&gt;
      &lt;<b>xs:extension</b> 
   <b> base</b>="xs:anyType" /&gt;
    &lt;/<b>xs:complexContent</b>&gt;
  &lt;/<b>xs:complexType</b>&gt;
&lt;/<b>xs:element</b>&gt;
    </ex:typedef>
<ex:instance xml:id="GlobalElementComplexTypeEmptyExtension01">
   <ex:globalElementComplexTypeEmptyExtension/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GlobalComplexTypeEmptyExtension"
         pattern="GlobalComplexTypeEmptyExtension">
<pat:xpath>./xs:complexType[@name]/xs:complexContent[xs:extension[@base]/not(*)]/
		(../../(., @name), .., ., xs:extension/(., @base))</pat:xpath>
<ex:typedef>
&lt;<b>xs:complexType</b> name="GlobalComplexTypeEmptyExtension"&gt;
  &lt;<b>xs:complexContent</b>&gt;
    &lt;<b>xs:extension</b> 
   <b> base</b>="xs:anyType" /&gt;
  &lt;/<b>xs:complexContent</b>&gt;
&lt;/<b>xs:complexType</b>&gt;
&lt;xs:element name="globalComplexTypeEmptyExtension" type="ex:GlobalComplexTypeEmptyExtension" /&gt;
    </ex:typedef>
<ex:instance xml:id="GlobalComplexTypeEmptyExtension01">
   <ex:globalComplexTypeEmptyExtension/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="PrecisionDecimal" pattern="PrecisionDecimal">
<pat:xpath>.//xs:simpleType/xs:union[
	    xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:decimal')]/xs:totalDigits[@value ='16']
	    and xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:double')]
	    and xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:string') 
		    and xs:enumeration/@value='NaN' and xs:enumeration/@value='-INF' and not(xs:enumeration[3])]
	    and not(xs:simpleType[4] | xs:simpleType[@*])
	]/(., xs:simpleType/(., xs:restriction/(., @base, xs:totalDigits/(., @value), xs:enumeration/(., @value))))
</pat:xpath>
<ex:typedef>
&lt;xs:element name="precisionDecimal" type="ex:PrecisionDecimal" /&gt;
&lt;xs:simpleType name="PrecisionDecimal"&gt;
  &lt;<b>xs:union</b>&gt;
    &lt;<b>xs:simpleType</b>&gt;
      &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:decimal"&gt;
        &lt;<b>xs:totalDigits</b> 
   <b> value</b>="16" /&gt;
      &lt;/<b>xs:restriction</b>&gt;
    &lt;/<b>xs:simpleType</b>&gt;
    &lt;<b>xs:simpleType</b>&gt;
      &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:double" /&gt;
    &lt;/<b>xs:simpleType</b>&gt;
    &lt;<b>xs:simpleType</b>&gt;
      &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:string"&gt;
        &lt;<b>xs:enumeration</b> 
   <b> value</b>="NaN" /&gt;
        &lt;<b>xs:enumeration</b> 
   <b> value</b>="-INF" /&gt;
      &lt;/<b>xs:restriction</b>&gt;
    &lt;/<b>xs:simpleType</b>&gt;
  &lt;/<b>xs:union</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="PrecisionDecimal01">
   <ex:precisionDecimal>1000.20</ex:precisionDecimal>
</ex:instance>
<ex:instance xml:id="PrecisionDecimal02">
   <ex:precisionDecimal>NaN</ex:precisionDecimal>
</ex:instance>
<ex:instance xml:id="PrecisionDecimal03">
   <ex:precisionDecimal>-INF</ex:precisionDecimal>
</ex:instance>
   </ex:example>
   <ex:example xml:id="LocalElementSimpleType" pattern="LocalElementSimpleType">
<pat:xpath>.//xs:element[not(parent::xs:schema)]/xs:simpleType</pat:xpath>
<ex:typedef>
&lt;xs:element name="localElementSimpleType" type="ex:LocalElementSimpleType" /&gt;
&lt;xs:complexType name="LocalElementSimpleType"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="localElement"&gt;
      &lt;<b>xs:simpleType</b>&gt;
        &lt;xs:restriction base="xs:string"&gt;
          &lt;xs:enumeration value="First" /&gt;
          &lt;xs:enumeration value="Second" /&gt;
          &lt;xs:enumeration value="Third" /&gt;
        &lt;/xs:restriction&gt;
      &lt;/<b>xs:simpleType</b>&gt;
    &lt;/xs:element&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="LocalElementSimpleType01">
   <ex:localElementSimpleType>
      <ex:localElement>First</ex:localElement>
   </ex:localElementSimpleType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="LocalElementComplexType" pattern="LocalElementComplexType">
<pat:xpath>.//xs:element[not(parent::xs:schema)]/xs:complexType</pat:xpath>
<ex:typedef>
&lt;xs:element name="localElementComplexType" type="ex:LocalElementComplexType" /&gt;
&lt;xs:complexType name="LocalElementComplexType"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="name"&gt;
      &lt;<b>xs:complexType</b>&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element name="firstName" type="xs:string" /&gt;
          &lt;xs:element name="lastName" type="xs:string" /&gt;
        &lt;/xs:sequence&gt;
      &lt;/<b>xs:complexType</b>&gt;
    &lt;/xs:element&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="LocalElementComplexType01">
   <ex:localElementComplexType>
      <ex:name>
         <ex:firstName>Paul</ex:firstName>
         <ex:lastName>Paul</ex:lastName>
      </ex:name>
   </ex:localElementComplexType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ChoiceMaxOccursUnbounded" pattern="ChoiceMaxOccursUnbounded">
<pat:xpath>.//xs:choice[@maxOccurs = 'unbounded']/
		(@maxOccurs) </pat:xpath>
<ex:typedef>
&lt;xs:element name="choiceMaxOccursUnbounded" type="ex:ChoiceMaxOccursUnbounded" /&gt;
&lt;xs:complexType name="ChoiceMaxOccursUnbounded"&gt;
  &lt;xs:choice <b> maxOccurs</b>="unbounded"&gt;
    &lt;xs:element name="choiceA" type="xs:string" /&gt;
    &lt;xs:element name="choiceB" type="xs:string" /&gt;
  &lt;/xs:choice&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ChoiceMaxOccursUnbounded01">
   <ex:choiceMaxOccursUnbounded>
      <ex:choiceB>1st</ex:choiceB>
      <ex:choiceB>2nd</ex:choiceB>
      <ex:choiceB>3rd</ex:choiceB>
   </ex:choiceMaxOccursUnbounded>
</ex:instance>
<ex:instance xml:id="ChoiceMaxOccursUnbounded02">
   <ex:choiceMaxOccursUnbounded>
      <ex:choiceA>first</ex:choiceA>
      <ex:choiceA>second</ex:choiceA>
   </ex:choiceMaxOccursUnbounded>
</ex:instance>
<ex:instance xml:id="ChoiceMaxOccursUnbounded03">
   <ex:choiceMaxOccursUnbounded>
      <ex:choiceA>1st</ex:choiceA>
      <ex:choiceB>second</ex:choiceB>
      <ex:choiceA>3rd</ex:choiceA>
   </ex:choiceMaxOccursUnbounded>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ChoiceMaxOccursFinite" pattern="ChoiceMaxOccursFinite">
<pat:xpath>.//xs:choice[@maxOccurs and not(@maxOccurs = '0' or @maxOccurs = '1' or @maxOccurs = 'unbounded')]/
   (@maxOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="choiceMaxOccursFinite" type="ex:ChoiceMaxOccursFinite" /&gt;
&lt;xs:complexType name="ChoiceMaxOccursFinite"&gt;
  &lt;xs:choice <b> maxOccurs</b>="2"&gt;
    &lt;xs:element name="choiceA" type="xs:string" /&gt;
    &lt;xs:element name="choiceB" type="xs:string" /&gt;
  &lt;/xs:choice&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ChoiceMaxOccursFinite01">
   <ex:choiceMaxOccursFinite>
      <ex:choiceA>first</ex:choiceA>
      <ex:choiceB>second</ex:choiceB>
   </ex:choiceMaxOccursFinite>
</ex:instance>
<ex:instance xml:id="ChoiceMaxOccursFinite02">
   <ex:choiceMaxOccursFinite>
      <ex:choiceA>first</ex:choiceA>
      <ex:choiceA>second</ex:choiceA>
   </ex:choiceMaxOccursFinite>
</ex:instance>
<ex:instance xml:id="ChoiceMaxOccursFinite03">
   <ex:choiceMaxOccursFinite>
      <ex:choiceA>only</ex:choiceA>
   </ex:choiceMaxOccursFinite>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ChoiceMinOccurs0" pattern="ChoiceMinOccurs0">
<pat:xpath>.//xs:choice[@minOccurs='0']/
   (@minOccurs) </pat:xpath>
<ex:typedef>
&lt;xs:element name="choiceMinOccurs0" type="ex:ChoiceMinOccurs0" /&gt;
&lt;xs:complexType name="ChoiceMinOccurs0"&gt;
  &lt;xs:choice <b> minOccurs</b>="0"&gt;
    &lt;xs:element name="AChoiceMinOccurs0" type="xs:string" /&gt;
    &lt;xs:element name="BChoiceMinOccurs0" type="xs:string" /&gt;
  &lt;/xs:choice&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ChoiceMinOccurs001">
   <ex:choiceMinOccurs0>
      <ex:AChoiceMinOccurs0>A</ex:AChoiceMinOccurs0>
   </ex:choiceMinOccurs0>
</ex:instance>
<ex:instance xml:id="ChoiceMinOccurs002">
   <ex:choiceMinOccurs0>
      <ex:BChoiceMinOccurs0>B</ex:BChoiceMinOccurs0>
   </ex:choiceMinOccurs0>
</ex:instance>
<ex:instance xml:id="ChoiceMinOccurs003">
   <ex:choiceMinOccurs0/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ChoiceMinOccursFinite" pattern="ChoiceMinOccursFinite">
<pat:xpath>.//xs:choice[@minOccurs and not(@minOccurs = '0' or @minOccurs = '1')]/
   (@minOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="choiceMinOccursFinite" type="ex:ChoiceMinOccursFinite" /&gt;
&lt;xs:complexType name="ChoiceMinOccursFinite"&gt;
  &lt;xs:choice <b> minOccurs</b>="2" maxOccurs="2"&gt;
    &lt;xs:element name="AChoiceMinOccursFinite" type="xs:string" /&gt;
    &lt;xs:element name="BChoiceMinOccursFinite" type="xs:string" /&gt;
  &lt;/xs:choice&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ChoiceMinOccursFinite01">
   <ex:choiceMinOccursFinite>
      <ex:AChoiceMinOccursFinite>A</ex:AChoiceMinOccursFinite>
      <ex:AChoiceMinOccursFinite>AA</ex:AChoiceMinOccursFinite>
   </ex:choiceMinOccursFinite>
</ex:instance>
<ex:instance xml:id="ChoiceMinOccursFinite02">
   <ex:choiceMinOccursFinite>
      <ex:BChoiceMinOccursFinite>B</ex:BChoiceMinOccursFinite>
      <ex:AChoiceMinOccursFinite>BA</ex:AChoiceMinOccursFinite>
   </ex:choiceMinOccursFinite>
</ex:instance>
   </ex:example>
   <ex:example xml:id="LocalAttributeSimpleType" pattern="LocalAttributeSimpleType">
<pat:xpath>.//xs:attribute[not(parent::xs:schema)]/xs:simpleType</pat:xpath>
<ex:typedef>
&lt;xs:element name="localAttributeSimpleType" type="ex:LocalAttributeSimpleType" /&gt;
&lt;xs:complexType name="LocalAttributeSimpleType"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="localElement1" type="xs:string" /&gt;
    &lt;xs:element name="localElement2" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="localAttribute"&gt;
    &lt;<b>xs:simpleType</b>&gt;
      &lt;xs:restriction base="xs:string"&gt;
        &lt;xs:enumeration value="First" /&gt;
        &lt;xs:enumeration value="Second" /&gt;
        &lt;xs:enumeration value="Third" /&gt;
      &lt;/xs:restriction&gt;
    &lt;/<b>xs:simpleType</b>&gt;
  &lt;/xs:attribute&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="LocalAttributeSimpleType01">
   <ex:localAttributeSimpleType localAttribute="First">
      <ex:localElement1>String</ex:localElement1>
      <ex:localElement2>String</ex:localElement2>
   </ex:localAttributeSimpleType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SOAPEncodedArray" pattern="SOAPEncodedArray">
<pat:xpath>./xs:complexType[@name]/xs:complexContent/xs:restriction[
	    @base/resolve-QName(.,..) = xs:QName('soap11enc:Array')]/
	    xs:attribute[(@ref/resolve-QName(.,..) = xs:QName('soap11enc:arrayType')) 
	    and @wsdl11:arrayType]/
	    (../.., ../(., @base), ., @ref, @wsdl11:arrayType)</pat:xpath>
<ex:types>
&lt;xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/" elementFormDefault="qualified"&gt;
  &lt;xs:import namespace="http://schemas.xmlsoap.org/soap/encoding/" schemaLocation="http://schemas.xmlsoap.org/soap/encoding/" /&gt;
  &lt;xs:element name="soapEncodedArray" type="ex:SOAPEncodedArray" /&gt;
  &lt;xs:complexType name="SOAPEncodedArray"&gt;
    &lt;<b>xs:complexContent</b>&gt;
      &lt;<b>xs:restriction</b> 
   <b> base</b>="soap11enc:Array"&gt;
        &lt;<b>xs:attribute</b> 
   <b> ref</b>="soap11enc:arrayType" <b> wsdl11:arrayType</b>="string[]" /&gt;
      &lt;/<b>xs:restriction</b>&gt;
    &lt;/<b>xs:complexContent</b>&gt;
  &lt;/xs:complexType&gt;
&lt;/xs:schema&gt;
    </ex:types>
<ex:instance xml:id="SOAPEncodedArray01">
   <ex:soapEncodedArray/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="DecimalSimpleTypeTotalDigits" pattern="DecimalSimpleTypeTotalDigits">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:decimal') and xs:totalDigits/@value]/
	    (., @base, xs:totalDigits/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="decimalSimpleTypeTotalDigits" type="ex:DecimalSimpleTypeTotalDigits" /&gt;
&lt;xs:simpleType name="DecimalSimpleTypeTotalDigits"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:decimal"&gt;
    &lt;<b>xs:totalDigits</b> 
   <b> value</b>="5" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="DecimalSimpleTypeTotalDigits01">
   <ex:decimalSimpleTypeTotalDigits>1234</ex:decimalSimpleTypeTotalDigits>
</ex:instance>
<ex:instance xml:id="DecimalSimpleTypeTotalDigits02">
   <ex:decimalSimpleTypeTotalDigits>12345</ex:decimalSimpleTypeTotalDigits>
</ex:instance>
   </ex:example>
   <ex:example xml:id="DecimalSimpleTypeFractionDigits"
         pattern="DecimalSimpleTypeFractionDigits">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:decimal') and xs:fractionDigits/@value]/
   (., @base, xs:fractionDigits/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="decimalSimpleTypeFractionDigits" type="ex:DecimalSimpleTypeFractionDigits" /&gt;
&lt;xs:simpleType name="DecimalSimpleTypeFractionDigits"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:decimal"&gt;
    &lt;<b>xs:fractionDigits</b> 
   <b> value</b>="2" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="DecimalSimpleTypeFractionDigits01">
   <ex:decimalSimpleTypeFractionDigits>1234.00</ex:decimalSimpleTypeFractionDigits>
</ex:instance>
<ex:instance xml:id="DecimalSimpleTypeFractionDigits02">
   <ex:decimalSimpleTypeFractionDigits>1234</ex:decimalSimpleTypeFractionDigits>
</ex:instance>
   </ex:example>
   <ex:example xml:id="AttributeGroup" pattern="AttributeGroup">
<pat:xpath>.//xs:attributeGroup/(.,@name,@ref,xs:attribute)</pat:xpath>
<ex:typedef>
&lt;xs:element name="attributeGroup" type="ex:AttributeGroup" /&gt;
&lt;xs:complexType name="AttributeGroup"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="contract" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;<b>xs:attributeGroup</b> 
   <b> ref</b>="ex:CommonAttributes" /&gt;
&lt;/xs:complexType&gt;
&lt;<b>xs:attributeGroup</b> 
   <b> name</b>="CommonAttributes"&gt;
  &lt;<b>xs:attribute</b> name="id" type="xs:ID" use="optional" form="unqualified" /&gt;
&lt;/<b>xs:attributeGroup</b>&gt;
    </ex:typedef>
<ex:instance xml:id="AttributeGroup01">
   <ex:attributeGroup id="AttributeGroup_contract_001">
      <ex:contract>12345678910</ex:contract>
   </ex:attributeGroup>
</ex:instance>
<ex:instance xml:id="AttributeGroup02">
   <ex:attributeGroup>
      <ex:contract>9876543210</ex:contract>
   </ex:attributeGroup>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SubstitutionGroup" pattern="SubstitutionGroup">
<pat:xpath>.//xs:element[@substitutionGroup]/(.,@name,@substitutionGroup)</pat:xpath>
<ex:typedef>
&lt;xs:element name="substitutionGroup" type="xs:string" /&gt;
&lt;<b>xs:element</b> 
   <b> name</b>="substitutionElement" <b> substitutionGroup</b>="ex:substitutionGroup" /&gt;
    </ex:typedef>
<ex:instance xml:id="SubstitutionGroup01">
   <ex:substitutionElement>String</ex:substitutionElement>
</ex:instance>
<ex:instance xml:id="SubstitutionGroup02">
   <ex:substitutionGroup>String</ex:substitutionGroup>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GlobalElementComplexType" pattern="GlobalElementComplexType">
<pat:xpath>.//xs:element[parent::xs:schema]/xs:complexType / (.,..)</pat:xpath>
<ex:typedef>
&lt;xs:element name="globalElementComplexType"&gt;
  &lt;xs:complexType&gt;
    &lt;xs:sequence&gt;
      &lt;xs:element name="name"&gt;
        &lt;xs:complexType&gt;
          &lt;xs:sequence&gt;
            &lt;xs:element name="firstName" type="xs:string" /&gt;
            &lt;xs:element name="lastName" type="xs:string" /&gt;
          &lt;/xs:sequence&gt;
        &lt;/xs:complexType&gt;
      &lt;/xs:element&gt;
    &lt;/xs:sequence&gt;
  &lt;/xs:complexType&gt;
&lt;/xs:element&gt;
    </ex:typedef>
<ex:instance xml:id="GlobalElementComplexType01">
   <ex:globalElementComplexType>
      <ex:name>
         <ex:firstName>Paul</ex:firstName>
         <ex:lastName>Paul</ex:lastName>
      </ex:name>
   </ex:globalElementComplexType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="RestrictedPattern" pattern="RestrictedPattern">
<pat:xpath>.//xs:simpleType/xs:restriction/xs:pattern[@value]/(.., ../@base, ., @value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="restrictedPattern" type="ex:RestrictedPattern" /&gt;
&lt;xs:simpleType name="RestrictedPattern"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:string"&gt;
    &lt;xs:minLength value="1" /&gt;
    &lt;xs:maxLength value="6" /&gt;
    &lt;<b>xs:pattern</b> 
   <b> value</b>="[0-9]{1,6}" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="RestrictedPattern01">
   <ex:restrictedPattern>123456</ex:restrictedPattern>
</ex:instance>
<ex:instance xml:id="RestrictedPattern02">
   <ex:restrictedPattern>1234</ex:restrictedPattern>
</ex:instance>
   </ex:example>
   <ex:example xml:id="RestrictedSimpleContent" pattern="RestrictedSimpleContent">
<pat:xpath>.//xs:complexType/xs:simpleContent/xs:restriction[@base]/(.., ., @base, child::*, child::*/@value)</pat:xpath>
<ex:typedef>
&lt;xs:element name="restrictedSimpleContent" type="ex:RestrictedSimpleContent" /&gt;
&lt;xs:complexType name="RestrictedSimpleContent"&gt;
  &lt;<b>xs:simpleContent</b>&gt;
    &lt;<b>xs:restriction</b> 
   <b> base</b>="ex:SomeSimpleContent"&gt;
      &lt;<b>xs:minInclusive</b> 
   <b> value</b>="1" /&gt;
      &lt;<b>xs:maxInclusive</b> 
   <b> value</b>="99" /&gt;
    &lt;/<b>xs:restriction</b>&gt;
  &lt;/<b>xs:simpleContent</b>&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="SomeSimpleContent"&gt;
  &lt;xs:simpleContent&gt;
    &lt;xs:extension base="ex:SimpleType"&gt;
      &lt;xs:attribute name="Currency" type="xs:string" /&gt;
    &lt;/xs:extension&gt;
  &lt;/xs:simpleContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:simpleType name="SimpleType"&gt;
  &lt;xs:restriction base="xs:int"&gt;
    &lt;xs:minExclusive value="0" /&gt;
    &lt;xs:maxExclusive value="100" /&gt;
  &lt;/xs:restriction&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="RestrictedSimpleContent01">
   <ex:restrictedSimpleContent>1</ex:restrictedSimpleContent>
</ex:instance>
<ex:instance xml:id="RestrictedSimpleContent02">
   <ex:restrictedSimpleContent>99</ex:restrictedSimpleContent>
</ex:instance>
   </ex:example>
   <ex:example xml:id="AttributeProhibited" pattern="AttributeProhibited">
<pat:xpath>.//xs:attribute[@use = 'prohibited']/ 
   (@use)</pat:xpath>
<ex:typedef>
&lt;xs:element name="attributeProhibited" type="ex:AttributeProhibited" /&gt;
&lt;xs:complexType name="AttributeProhibited"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element1" type="xs:string" /&gt;
    &lt;xs:element name="element2" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="prohibitedAttribute" <b> use</b>="prohibited" type="xs:string" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="AttributeProhibited01">
   <ex:attributeProhibited>
      <ex:element1>element1</ex:element1>
      <ex:element2>element2</ex:element2>
   </ex:attributeProhibited>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ExtendedSequenceNamespacedFinite"
         pattern="ExtendedSequenceNamespacedFinite">
<pat:xpath>.//xs:sequence/xs:any[@processContents
   and @namespace
   and @maxOccurs
   and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')
   and (not (@maxOccurs = '1') )
   and (not (@maxOccurs='unbounded'))
   and (not (@namespace = '##targetNamespace'))
   and (not (@namespace = '##any'))
   and (not (@namespace = '##local'))
   and (not (@namespace = '##other'))]/
   (., @processContents, @minOccurs, @maxOccurs, @namespace)</pat:xpath>
<ex:typedef>
&lt;xs:element name="extendedSequenceNamespacedFinite" type="ex:ExtendedSequenceNamespacedFinite" /&gt;
&lt;xs:complexType name="ExtendedSequenceNamespacedFinite"&gt;
  &lt;xs:sequence&gt;
    &lt;<b>xs:any</b> 
   <b> maxOccurs</b>="2" <b> processContents</b>="lax" <b> namespace</b>="http://www.w3.org/2002/ws/databinding/examples/6/09/" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ExtendedSequenceNamespacedFinite01">
   <ex:extendedSequenceNamespacedFinite>
      <ex:anyElement>any data</ex:anyElement>
   </ex:extendedSequenceNamespacedFinite>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ComplexTypeChoiceExtension" pattern="ComplexTypeChoiceExtension">
<pat:xpath>.//xs:complexType/xs:complexContent[xs:extension[@base]/xs:choice]/
   (., xs:extension/
   (., @base, xs:choice/(., xs:element/(., @name))))</pat:xpath>
<ex:typedef>
&lt;xs:element name="complexTypeChoiceExtension" type="ex:ComplexTypeChoiceExtension" /&gt;
&lt;xs:complexType name="ComplexTypeChoiceBase"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element1" type="xs:string" /&gt;
    &lt;xs:element name="element2" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="ComplexTypeChoiceExtension"&gt;
  &lt;<b>xs:complexContent</b>&gt;
    &lt;<b>xs:extension</b> 
   <b> base</b>="ex:ComplexTypeChoiceBase"&gt;
      &lt;<b>xs:choice</b>&gt;
        &lt;<b>xs:element</b> 
   <b> name</b>="element3" type="xs:string" /&gt;
        &lt;<b>xs:element</b> 
   <b> name</b>="element4" type="xs:string" /&gt;
      &lt;/<b>xs:choice</b>&gt;
    &lt;/<b>xs:extension</b>&gt;
  &lt;/<b>xs:complexContent</b>&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ComplexTypeChoiceExtension01">
   <ex:complexTypeChoiceExtension>
      <ex:element1>element1</ex:element1>
      <ex:element2>element2</ex:element2>
      <ex:element3>element3</ex:element3>
   </ex:complexTypeChoiceExtension>
</ex:instance>
<ex:instance xml:id="ComplexTypeChoiceExtension02">
   <ex:complexTypeChoiceExtension>
      <ex:element1>element1</ex:element1>
      <ex:element2>element2</ex:element2>
      <ex:element4>element4</ex:element4>
   </ex:complexTypeChoiceExtension>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ComplexTypeAttributeGroupExtension"
         pattern="ComplexTypeAttributeGroupExtension">
<pat:xpath>.//xs:complexType/xs:complexContent[xs:extension[@base]/xs:attributeGroup]/
   (., xs:extension/
   (., @base, xs:attributeGroup))</pat:xpath>
<ex:typedef>
&lt;xs:element name="complexTypeAttributeGroupExtension" type="ex:ComplexTypeAttributeGroupExtension" /&gt;
&lt;xs:complexType name="ComplexTypeAttributeGroupBase"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element1" type="xs:string" /&gt;
    &lt;xs:element name="element2" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="ComplexTypeAttributeGroupExtension"&gt;
  &lt;<b>xs:complexContent</b>&gt;
    &lt;<b>xs:extension</b> 
   <b> base</b>="ex:ComplexTypeAttributeGroupBase"&gt;
      &lt;<b>xs:attributeGroup</b> ref="ex:CommonAttributes" /&gt;
    &lt;/<b>xs:extension</b>&gt;
  &lt;/<b>xs:complexContent</b>&gt;
&lt;/xs:complexType&gt;
&lt;xs:attributeGroup name="CommonAttributes"&gt;
  &lt;xs:attribute name="id" type="xs:ID" use="optional" form="unqualified" /&gt;
&lt;/xs:attributeGroup&gt;
    </ex:typedef>
<ex:instance xml:id="ComplexTypeAttributeGroupExtension01">
   <ex:complexTypeAttributeGroupExtension id="ComplexTypeAttributeGroupExtension_01">
      <ex:element1>element1</ex:element1>
      <ex:element2>element2</ex:element2>
   </ex:complexTypeAttributeGroupExtension>
</ex:instance>
   </ex:example>
   <ex:example xml:id="RestrictedWhitespacePreserve" pattern="RestrictedWhitespacePreserve">
<pat:xpath>.//xs:simpleType/xs:restriction/xs:whiteSpace[@value='preserve']/(.., ../@base, ., @value, @fixed)</pat:xpath>
<ex:typedef>
&lt;xs:element name="restrictedWhitespacePreserve" type="ex:RestrictedWhitespacePreserve" /&gt;
&lt;xs:simpleType name="RestrictedWhitespacePreserve"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:string"&gt;
    &lt;<b>xs:whiteSpace</b> 
   <b> value</b>="preserve" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="RestrictedWhitespacePreserve01">
   <ex:restrictedWhitespacePreserve>restricted  whitespace  preserve</ex:restrictedWhitespacePreserve>
</ex:instance>
   </ex:example>
   <ex:example xml:id="RestrictedWhitespaceCollapse" pattern="RestrictedWhitespaceCollapse">
<pat:xpath>.//xs:simpleType/xs:restriction/xs:whiteSpace[@value='collapse']/(.., ../@base, ., @value, @fixed)</pat:xpath>
<ex:typedef>
&lt;xs:element name="restrictedWhitespaceCollapse" type="ex:RestrictedWhitespaceCollapse" /&gt;
&lt;xs:simpleType name="RestrictedWhitespaceCollapse"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:string"&gt;
    &lt;<b>xs:whiteSpace</b> 
   <b> value</b>="collapse" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="RestrictedWhitespaceCollapse01">
   <ex:restrictedWhitespaceCollapse>restricted  whitespace  collapse</ex:restrictedWhitespaceCollapse>
</ex:instance>
   </ex:example>
   <ex:example xml:id="RestrictedWhitespaceReplace" pattern="RestrictedWhitespaceReplace">
<pat:xpath>.//xs:simpleType/xs:restriction/xs:whiteSpace[@value='replace']/(.., ../@base, ., @value, @fixed)</pat:xpath>
<ex:typedef>
&lt;xs:element name="restrictedWhitespaceReplace" type="ex:RestrictedWhitespaceReplace" /&gt;
&lt;xs:simpleType name="RestrictedWhitespaceReplace"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:string"&gt;
    &lt;<b>xs:whiteSpace</b> 
   <b> value</b>="replace" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="RestrictedWhitespaceReplace01">
   <ex:restrictedWhitespaceReplace>restricted  whitespace  replace</ex:restrictedWhitespaceReplace>
</ex:instance>
   </ex:example>
   <ex:example xml:id="XmlLang" pattern="XmlLang">
<pat:xpath>.[@xml:lang] / (@xml:lang)</pat:xpath>
<ex:types>
&lt;xs:schema targetNamespace="http://www.w3.org/2002/ws/databinding/examples/6/09/" elementFormDefault="qualified" <b> xml:lang</b>="en"&gt;
  &lt;xs:element name="xmlLang" type="xs:string" /&gt;
&lt;/xs:schema&gt;
    </ex:types>
<ex:instance xml:id="XmlLang01">
   <ex:xmlLang>foo</ex:xmlLang>
</ex:instance>
   </ex:example>
   <ex:example xml:id="Redefine" pattern="Redefine">
<pat:xpath>.//xs:redefine[@schemaLocation] / (., @schemaLocation, child::*, child::*/@name, child::*/@base)</pat:xpath>
<ex:typedef>
&lt;<b>xs:redefine</b> 
   <b> schemaLocation</b>="../redefineschema.xsd"&gt;
  &lt;<b>xs:complexType</b> 
   <b> name</b>="RedefineType"&gt;
    &lt;xs:complexContent&gt;
      &lt;xs:extension base="ex:RedefineType"&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element name="element3" type="xs:string" /&gt;
        &lt;/xs:sequence&gt;
      &lt;/xs:extension&gt;
    &lt;/xs:complexContent&gt;
  &lt;/<b>xs:complexType</b>&gt;
&lt;/<b>xs:redefine</b>&gt;
&lt;xs:element name="redefined" type="ex:RedefineType" /&gt;
    </ex:typedef>
<ex:instance xml:id="Redefine01">
   <ex:redefined>
      <ex:element1>value1</ex:element1>
      <ex:element2>value2</ex:element2>
      <ex:element3>value3</ex:element3>
   </ex:redefined>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ElementGroup" pattern="ElementGroup">
<pat:xpath>.//xs:group/(.,@name,@ref,@minOccurs,@maxOccurs,xs:sequence,xs:all,xs:choice)</pat:xpath>
<ex:typedef>
&lt;xs:element name="elementGroup" type="ex:ElementGroup" /&gt;
&lt;xs:complexType name="ElementGroup"&gt;
  &lt;xs:sequence&gt;
    &lt;<b>xs:group</b> 
   <b> ref</b>="ex:ElementGroupGroup" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;<b>xs:group</b> 
   <b> name</b>="ElementGroupGroup"&gt;
  &lt;<b>xs:sequence</b>&gt;
    &lt;xs:element name="value1" type="xs:string" /&gt;
    &lt;xs:element name="value2" type="xs:string" /&gt;
  &lt;/<b>xs:sequence</b>&gt;
&lt;/<b>xs:group</b>&gt;
    </ex:typedef>
<ex:instance xml:id="ElementGroup01">
   <ex:elementGroup>
      <ex:value1>foo</ex:value1>
      <ex:value2>bar</ex:value2>
   </ex:elementGroup>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ComplexTypeAttributeRestriction"
         pattern="ComplexTypeAttributeRestriction">
<pat:xpath>.//xs:complexType/xs:complexContent[xs:restriction[@base]/xs:attribute]/
   (., xs:restriction/(., @base, xs:attribute/(., @name)))</pat:xpath>
<ex:typedef>
&lt;xs:element name="complexTypeAttributeRestriction" type="ex:ComplexTypeAttributeRestriction" /&gt;
&lt;xs:complexType name="ComplexTypeAttributeRestrictionBase"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element1" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute name="attrRestriction" type="xs:string" /&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="ComplexTypeAttributeRestriction"&gt;
  &lt;<b>xs:complexContent</b>&gt;
    &lt;<b>xs:restriction</b> 
   <b> base</b>="ex:ComplexTypeAttributeRestrictionBase"&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element name="element1" type="xs:string" /&gt;
      &lt;/xs:sequence&gt;
      &lt;<b>xs:attribute</b> 
   <b> name</b>="attrRestriction" type="xs:string" use="required" /&gt;
    &lt;/<b>xs:restriction</b>&gt;
  &lt;/<b>xs:complexContent</b>&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ComplexTypeAttributeRestriction01">
   <ex:complexTypeAttributeRestriction attrRestriction="value">
      <ex:element1>string</ex:element1>
   </ex:complexTypeAttributeRestriction>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ComplexTypeSequenceRestriction"
         pattern="ComplexTypeSequenceRestriction">
<pat:xpath>.//xs:complexType/xs:complexContent[xs:restriction[@base]/xs:sequence]/
   (., xs:restriction/(., @base, xs:sequence))</pat:xpath>
<ex:typedef>
&lt;xs:element name="complexTypeSequenceRestriction" type="ex:ComplexTypeSequenceRestriction" /&gt;
&lt;xs:complexType name="ComplexTypeSequenceRestrictionBase"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element1" type="xs:string" minOccurs="0" maxOccurs="unbounded" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="ComplexTypeSequenceRestriction"&gt;
  &lt;<b>xs:complexContent</b>&gt;
    &lt;<b>xs:restriction</b> 
   <b> base</b>="ex:ComplexTypeSequenceRestrictionBase"&gt;
      &lt;<b>xs:sequence</b>&gt;
        &lt;xs:element name="element1" type="xs:string" /&gt;
      &lt;/<b>xs:sequence</b>&gt;
    &lt;/<b>xs:restriction</b>&gt;
  &lt;/<b>xs:complexContent</b>&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ComplexTypeSequenceRestriction01">
   <ex:complexTypeSequenceRestriction>
      <ex:element1>string</ex:element1>
   </ex:complexTypeSequenceRestriction>
</ex:instance>
   </ex:example>
   <ex:example xml:id="Unique" pattern="Unique">
<pat:xpath>.//xs:element/xs:unique/(.., .,xs:selector,xs:selector/@xpath,xs:field,xs:field/@xpath)</pat:xpath>
<ex:typedef>
&lt;<b>xs:element</b> name="unique" type="ex:Unique"&gt;
  &lt;<b>xs:unique</b> name="nameUniqueness"&gt;
    &lt;<b>xs:selector</b> 
   <b> xpath</b>="ex:character" /&gt;
    &lt;<b>xs:field</b> 
   <b> xpath</b>="ex:name" /&gt;
  &lt;/<b>xs:unique</b>&gt;
&lt;/<b>xs:element</b>&gt;
&lt;xs:complexType name="Unique"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="character" maxOccurs="unbounded"&gt;
      &lt;xs:complexType&gt;
        &lt;xs:sequence&gt;
          &lt;xs:element name="name" type="xs:string" minOccurs="1" maxOccurs="unbounded" /&gt;
          &lt;xs:element name="age" type="xs:string" minOccurs="0" /&gt;
        &lt;/xs:sequence&gt;
      &lt;/xs:complexType&gt;
    &lt;/xs:element&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="Unique01">
   <ex:unique>
      <ex:character>
         <ex:name>String</ex:name>
         <ex:age>String</ex:age>
      </ex:character>
   </ex:unique>
</ex:instance>
   </ex:example>
   <ex:example xml:id="LocalElementComplexTypeEmptyExtension"
         pattern="LocalElementComplexTypeEmptyExtension">
<pat:xpath>.//xs:element[not(parent::xs:schema)]/xs:complexType[not(@name)]/xs:complexContent[xs:extension[@base]/not(*)]/
   (../../(., @name), .., ., xs:extension/(., @base))</pat:xpath>
<ex:typedef>
&lt;xs:element name="localElementComplexTypeEmptyExtension"&gt;
  &lt;xs:complexType&gt;
    &lt;xs:sequence&gt;
      &lt;<b>xs:element</b> 
   <b> name</b>="extensionElement"&gt;
        &lt;<b>xs:complexType</b>&gt;
          &lt;<b>xs:complexContent</b>&gt;
            &lt;<b>xs:extension</b> 
   <b> base</b>="ex:ExtensionType" /&gt;
          &lt;/<b>xs:complexContent</b>&gt;
        &lt;/<b>xs:complexType</b>&gt;
      &lt;/<b>xs:element</b>&gt;
    &lt;/xs:sequence&gt;
  &lt;/xs:complexType&gt;
&lt;/xs:element&gt;
&lt;xs:complexType name="ExtensionType"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element1" type="xs:string" /&gt;
    &lt;xs:element name="element2" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="LocalElementComplexTypeEmptyExtension01">
   <ex:localElementComplexTypeEmptyExtension>
      <ex:extensionElement>
         <ex:element1>string</ex:element1>
         <ex:element2>string</ex:element2>
      </ex:extensionElement>
   </ex:localElementComplexTypeEmptyExtension>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SequenceSequenceGroup" pattern="SequenceSequenceGroup">
<pat:xpath>.//xs:sequence/xs:sequence/xs:group/(., ..)</pat:xpath>
<ex:typedef>
&lt;xs:element name="sequenceSequenceGroup" type="ex:SequenceSequenceGroup" /&gt;
&lt;xs:complexType name="SequenceSequenceGroup"&gt;
  &lt;xs:sequence&gt;
    &lt;<b>xs:sequence</b>&gt;
      &lt;<b>xs:group</b> ref="ex:SeqSeqGroup" /&gt;
    &lt;/<b>xs:sequence</b>&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:group name="SeqSeqGroup"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element1" type="xs:string" /&gt;
    &lt;xs:element name="element2" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:group&gt;
    </ex:typedef>
<ex:instance xml:id="SequenceSequenceGroup01">
   <ex:sequenceSequenceGroup>
      <ex:element1>string1</ex:element1>
      <ex:element2>string2</ex:element2>
   </ex:sequenceSequenceGroup>
</ex:instance>
   </ex:example>
   <ex:example xml:id="GlobalAttributeSimpleType" pattern="GlobalAttributeSimpleType">
<pat:xpath>./xs:attribute/xs:simpleType/(../(., @name), .., ., descendant::*, descendant::*/@value, descendant::*/@base)</pat:xpath>
<ex:typedef>
&lt;<b>xs:attribute</b> 
   <b> name</b>="globalAttributeSimpleTypeAttr"&gt;
  &lt;<b>xs:simpleType</b>&gt;
    &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:string"&gt;
      &lt;<b>xs:enumeration</b> 
   <b> value</b>="value1" /&gt;
      &lt;<b>xs:enumeration</b> 
   <b> value</b>="value2" /&gt;
      &lt;<b>xs:enumeration</b> 
   <b> value</b>="value3" /&gt;
    &lt;/<b>xs:restriction</b>&gt;
  &lt;/<b>xs:simpleType</b>&gt;
&lt;/<b>xs:attribute</b>&gt;
&lt;xs:complexType name="globalAttributeSimpleTypeComplexType"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="globalAttributeSimpleTypeElement" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:attribute ref="ex:globalAttributeSimpleTypeAttr" /&gt;
&lt;/xs:complexType&gt;
&lt;xs:element name="globalAttributeSimpleType" type="ex:globalAttributeSimpleTypeComplexType" /&gt;
    </ex:typedef>
<ex:instance xml:id="GlobalAttributeSimpleType01">
   <ex:globalAttributeSimpleType ex:globalAttributeSimpleTypeAttr="value1">
      <ex:globalAttributeSimpleTypeElement>string</ex:globalAttributeSimpleTypeElement>
   </ex:globalAttributeSimpleType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ElementDefaultAnyType" pattern="ElementDefaultAnyType">
<pat:xpath>.//xs:element[@name and not(@type) and ./not(xs:simpleType or xs:complexType or xs:unique or xs:key or xs:keyref)]/(.)</pat:xpath>
<ex:typedef>
&lt;<b>xs:element</b> name="elementDefaultAnyType" /&gt;
    </ex:typedef>
<ex:instance xml:id="ElementDefaultAnyType01">
   <ex:elementDefaultAnyType/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ComplexContentRestrictionAnyAttribute"
         pattern="ComplexContentRestrictionAnyAttribute">
<pat:xpath>.//xs:complexType/xs:complexContent/xs:restriction/xs:anyAttribute/(., @namespace, @processContents)</pat:xpath>
<ex:typedef>
&lt;xs:element name="complexContentRestrictionAnyAttribute" type="ex:ComplexContentRestrictionAnyAttribute" /&gt;
&lt;xs:complexType name="ComplexContentRestrictionAnyAttribute"&gt;
  &lt;xs:complexContent&gt;
    &lt;xs:restriction base="ex:ComplexTypeToBeRestricted"&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element name="element1" type="xs:string" /&gt;
        &lt;xs:element name="element2" type="xs:string" /&gt;
      &lt;/xs:sequence&gt;
      &lt;<b>xs:anyAttribute</b> 
   <b> processContents</b>="skip" /&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="ComplexTypeToBeRestricted"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element1" type="xs:string" minOccurs="0" /&gt;
    &lt;xs:element name="element2" type="xs:string" minOccurs="0" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:anyAttribute processContents="skip" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ComplexContentRestrictionAnyAttribute01">
   <ex:complexContentRestrictionAnyAttribute>
      <ex:element1>value1</ex:element1>
      <ex:element2>value2</ex:element2>
   </ex:complexContentRestrictionAnyAttribute>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ComplexContentExtensionAnyAttribute"
         pattern="ComplexContentExtensionAnyAttribute">
<pat:xpath>.//xs:complexType/xs:complexContent/xs:extension/xs:anyAttribute/(., @namespace, @processContents)</pat:xpath>
<ex:typedef>
&lt;xs:element name="complexContentExtensionAnyAttribute" type="ex:ComplexContentExtensionAnyAttribute" /&gt;
&lt;xs:complexType name="ComplexContentExtensionAnyAttribute"&gt;
  &lt;xs:complexContent&gt;
    &lt;xs:extension base="ex:ComplexTypeToBeExtended"&gt;
      &lt;xs:sequence&gt;
        &lt;xs:element name="element3" type="xs:string" minOccurs="0" /&gt;
        &lt;xs:element name="element4" type="xs:string" minOccurs="0" /&gt;
      &lt;/xs:sequence&gt;
      &lt;<b>xs:anyAttribute</b> 
   <b> processContents</b>="skip" /&gt;
    &lt;/xs:extension&gt;
  &lt;/xs:complexContent&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="ComplexTypeToBeExtended"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element1" type="xs:string" /&gt;
    &lt;xs:element name="element2" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;xs:anyAttribute processContents="skip" /&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ComplexContentExtensionAnyAttribute01">
   <ex:complexContentExtensionAnyAttribute>
      <ex:element1>value1</ex:element1>
      <ex:element2>value2</ex:element2>
   </ex:complexContentExtensionAnyAttribute>
</ex:instance>
<ex:instance xml:id="ComplexContentExtensionAnyAttribute02">
   <ex:complexContentExtensionAnyAttribute>
      <ex:element1>value1</ex:element1>
      <ex:element2>value2</ex:element2>
      <ex:element3>value3</ex:element3>
      <ex:element4>value4</ex:element4>
   </ex:complexContentExtensionAnyAttribute>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ComplexTypeChoiceAny" pattern="ComplexTypeChoiceAny">
<pat:xpath>.//xs:complexType/xs:choice/xs:any/(., @namespace, @processContents, @maxOccurs, @minOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="complexTypeChoiceAny" type="ex:ComplexTypeChoiceAny" /&gt;
&lt;xs:complexType name="ComplexTypeChoiceAny"&gt;
  &lt;xs:choice&gt;
    &lt;<b>xs:any</b> 
   <b> minOccurs</b>="0" <b> maxOccurs</b>="unbounded" <b> namespace</b>="##any" <b> processContents</b>="lax" /&gt;
  &lt;/xs:choice&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ComplexTypeChoiceAny01">
   <ex:complexTypeChoiceAny>
      <ex:anything>
         <ex:element>any data</ex:element>
      </ex:anything>
   </ex:complexTypeChoiceAny>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ComplexTypeFinal" pattern="ComplexTypeFinal">
<pat:xpath>.//xs:complexType[@final]/(., @final)</pat:xpath>
<ex:typedef>
&lt;xs:element name="complexTypeFinal" type="ex:ComplexTypeFinal" /&gt;
&lt;<b>xs:complexType</b> name="ComplexTypeFinal" <b> final</b>="#all"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element1" type="xs:string" minOccurs="0" maxOccurs="unbounded" /&gt;
  &lt;/xs:sequence&gt;
&lt;/<b>xs:complexType</b>&gt;
    </ex:typedef>
<ex:instance xml:id="ComplexTypeFinal01">
   <ex:complexTypeFinal>
      <ex:element1>value1</ex:element1>
      <ex:element1>value2</ex:element1>
      <ex:element1>value3</ex:element1>
   </ex:complexTypeFinal>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ComplexTypeExtensionAnnotationOnly"
         pattern="ComplexTypeExtensionAnnotationOnly">
<pat:xpath>.//xs:complexType/xs:complexContent/xs:extension[@base]/xs:annotation[not(preceding-sibling::*) and not(following-sibling::*)]/
   (../(., @base), ../../(.))</pat:xpath>
<ex:typedef>
&lt;xs:element name="complexTypeExtensionAnnotationOnly" type="ex:ComplexTypeExtensionAnnotationOnly" /&gt;
&lt;xs:complexType name="ComplexTypeExtensionAnnotationOnly"&gt;
  &lt;<b>xs:complexContent</b>&gt;
    &lt;<b>xs:extension</b> 
   <b> base</b>="ex:ComplexTypeExtension"&gt;
      &lt;xs:annotation&gt;
        &lt;xs:documentation /&gt;
      &lt;/xs:annotation&gt;
    &lt;/<b>xs:extension</b>&gt;
  &lt;/<b>xs:complexContent</b>&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="ComplexTypeExtension"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element1" type="xs:string" /&gt;
    &lt;xs:element name="element2" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ComplexTypeExtensionAnnotationOnly01">
   <ex:complexTypeExtensionAnnotationOnly>
      <ex:element1>string</ex:element1>
      <ex:element2>string</ex:element2>
   </ex:complexTypeExtensionAnnotationOnly>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ComplexTypeSequenceChoiceAny" pattern="ComplexTypeSequenceChoiceAny">
<pat:xpath>.//xs:complexType/xs:sequence/xs:choice/xs:any/(., @namespace, @processContents, @maxOccurs, @minOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="complexTypeSequenceChoiceAny" type="ex:ComplexTypeSequenceChoiceAny" /&gt;
&lt;xs:complexType name="ComplexTypeSequenceChoiceAny"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:choice&gt;
      &lt;<b>xs:any</b> 
   <b> minOccurs</b>="0" <b> maxOccurs</b>="unbounded" <b> namespace</b>="##any" <b> processContents</b>="lax" /&gt;
    &lt;/xs:choice&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ComplexTypeSequenceChoiceAny01">
   <ex:complexTypeSequenceChoiceAny>
      <ex:anyElement>any data</ex:anyElement>
   </ex:complexTypeSequenceChoiceAny>
</ex:instance>
   </ex:example>
   <ex:example xml:id="QNameEnumerationType" pattern="QNameEnumerationType">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:QName') and xs:enumeration]/
   (., @base, xs:enumeration/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="qNameEnumerationType" type="ex:QNameSimpleType" /&gt;
&lt;xs:simpleType name="QNameSimpleType"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:QName"&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="ex:firstQName" /&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="ex:secondQName" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="QNameEnumerationType01">
   <ex:qNameEnumerationType>ex:firstQName</ex:qNameEnumerationType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="AnyURIEnumerationType" pattern="AnyURIEnumerationType">
<pat:xpath>.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:anyURI') and xs:enumeration]/
   (., @base, xs:enumeration/(., @value))</pat:xpath>
<ex:typedef>
&lt;xs:element name="anyURIEnumerationType" type="ex:URISimpleType" /&gt;
&lt;xs:simpleType name="URISimpleType"&gt;
  &lt;<b>xs:restriction</b> 
   <b> base</b>="xs:anyURI"&gt;
    &lt;<b>xs:enumeration</b> 
   <b> value</b>="http://www.w3.org/2005/08/addressing/reply" /&gt;
  &lt;/<b>xs:restriction</b>&gt;
&lt;/xs:simpleType&gt;
    </ex:typedef>
<ex:instance xml:id="AnyURIEnumerationType01">
   <ex:anyURIEnumerationType>http://www.w3.org/2005/08/addressing/reply</ex:anyURIEnumerationType>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SimpleContentAnyAttributeSkip" pattern="SimpleContentAnyAttributeSkip">
<pat:xpath>.//xs:complexType/xs:simpleContent/xs:extension/xs:anyAttribute[(@processContents = 'skip')]/
      (., @processContents)</pat:xpath>
<ex:typedef>
&lt;xs:element name="simpleContentAnyAttributeSkip" type="ex:SimpleContentAnyAttributeSkip" /&gt;
&lt;xs:complexType name="SimpleContentAnyAttributeSkip"&gt;
  &lt;xs:simpleContent&gt;
    &lt;xs:extension base="xs:string"&gt;
      &lt;<b>xs:anyAttribute</b> 
   <b> processContents</b>="skip" /&gt;
    &lt;/xs:extension&gt;
  &lt;/xs:simpleContent&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="SimpleContentAnyAttributeSkip01">
   <ex:simpleContentAnyAttributeSkip skipAttribute="string">string</ex:simpleContentAnyAttributeSkip>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SimpleContentAnyAttributeLax" pattern="SimpleContentAnyAttributeLax">
<pat:xpath>.//xs:complexType/xs:simpleContent/xs:extension/xs:anyAttribute[(@processContents = 'lax')
   and (@namespace = '##other')]/
   (., @processContents, @namespace)</pat:xpath>
<ex:typedef>
&lt;xs:element name="simpleContentAnyAttributeLax" type="ex:SimpleContentAnyAttributeLax" /&gt;
&lt;xs:complexType name="SimpleContentAnyAttributeLax"&gt;
  &lt;xs:simpleContent&gt;
    &lt;xs:extension base="xs:string"&gt;
      &lt;<b>xs:anyAttribute</b> 
   <b> processContents</b>="lax" <b> namespace</b>="##other" /&gt;
    &lt;/xs:extension&gt;
  &lt;/xs:simpleContent&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="SimpleContentAnyAttributeLax01">
   <ex:simpleContentAnyAttributeLax xmlns:ex2="http://www.w3.org/2002/ws/databinding/examples/6/09/lax/"
                                    ex2:laxAttribute="string">some data</ex:simpleContentAnyAttributeLax>
</ex:instance>
   </ex:example>
   <ex:example xml:id="SimpleContentAnyAttributeStrict"
         pattern="SimpleContentAnyAttributeStrict">
<pat:xpath>.//xs:complexType/xs:simpleContent/xs:extension/xs:anyAttribute[not(@processContents) or (@processContents = 'strict')
   and (@namespace = '##other')]/
   (., @processContents, @namespace)</pat:xpath>
<ex:typedef>
&lt;xs:import namespace="http://www.w3.org/2002/ws/databinding/examples/6/09/strict/" schemaLocation="../strict.xsd" /&gt;
&lt;xs:element name="simpleContentAnyAttributeStrict" type="ex:SimpleContentAnyAttributeStrict" /&gt;
&lt;xs:complexType name="SimpleContentAnyAttributeStrict"&gt;
  &lt;xs:simpleContent&gt;
    &lt;xs:extension base="xs:string"&gt;
      &lt;<b>xs:anyAttribute</b> 
   <b> processContents</b>="strict" <b> namespace</b>="##other" /&gt;
    &lt;/xs:extension&gt;
  &lt;/xs:simpleContent&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="SimpleContentAnyAttributeStrict01">
   <ex:simpleContentAnyAttributeStrict xmlns:ex2="http://www.w3.org/2002/ws/databinding/examples/6/09/strict/"
                                       ex2:strictAttribute="value1">some data</ex:simpleContentAnyAttributeStrict>
</ex:instance>
   </ex:example>
   <ex:example xml:id="AnyAttributeNamespacedFinite" pattern="AnyAttributeNamespacedFinite">
<pat:xpath>.//xs:complexType/xs:anyAttribute[@processContents
   and @namespace
   and (not (@namespace = '##targetNamespace'))
   and (not (@namespace = '##any'))
   and (not (@namespace = '##local'))
   and (not (@namespace = '##other'))]/
   (., @processContents, @namespace)</pat:xpath>
<ex:typedef>
&lt;xs:element name="anyAttributeNamespacedFinite" type="ex:AnyAttributeNamespacedFinite" /&gt;
&lt;xs:complexType name="AnyAttributeNamespacedFinite"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="firstElement" type="xs:string" /&gt;
    &lt;xs:element name="lastElement" type="xs:string" /&gt;
  &lt;/xs:sequence&gt;
  &lt;<b>xs:anyAttribute</b> 
   <b> processContents</b>="lax" <b> namespace</b>="http://www.w3.org/2002/ws/databinding/examples/6/09/" /&gt;
&lt;/xs:complexType&gt;
&lt;xs:attribute name="otherAttribute"&gt;
  &lt;xs:simpleType&gt;
    &lt;xs:restriction base="xs:string"&gt;
      &lt;xs:enumeration value="value1" /&gt;
      &lt;xs:enumeration value="value2" /&gt;
    &lt;/xs:restriction&gt;
  &lt;/xs:simpleType&gt;
&lt;/xs:attribute&gt;
    </ex:typedef>
<ex:instance xml:id="AnyAttributeNamespacedFinite01">
   <ex:anyAttributeNamespacedFinite ex:otherAttribute="value1">
      <ex:firstElement>element1</ex:firstElement>
      <ex:lastElement>element2</ex:lastElement>
   </ex:anyAttributeNamespacedFinite>
</ex:instance>
   </ex:example>
   <ex:example xml:id="AttributeGroupAnyAttribute" pattern="AttributeGroupAnyAttribute">
<pat:xpath>.//xs:attributeGroup/xs:anyAttribute/(.,@namespace,@processContents)</pat:xpath>
<ex:typedef>
&lt;xs:element name="attributeGroupAnyAttribute" type="ex:AttributeGroupAnyAttribute" /&gt;
&lt;xs:complexType name="AttributeGroupAnyAttribute"&gt;
  &lt;xs:attributeGroup ref="ex:CommonAttributes" /&gt;
&lt;/xs:complexType&gt;
&lt;xs:attributeGroup name="CommonAttributes"&gt;
  &lt;xs:attribute name="id" type="xs:ID" use="optional" form="unqualified" /&gt;
  &lt;<b>xs:anyAttribute</b> 
   <b> processContents</b>="skip" /&gt;
&lt;/xs:attributeGroup&gt;
    </ex:typedef>
<ex:instance xml:id="AttributeGroupAnyAttribute01">
   <ex:attributeGroupAnyAttribute id="id1" ex:anyattr="value1"/>
</ex:instance>
   </ex:example>
   <ex:example xml:id="ElementKey" pattern="ElementKey">
<pat:xpath>.//xs:element/xs:key[xs:selector and xs:field]/(., xs:selector, xs:selector/(@xpath), xs:field, xs:field/(@xpath))</pat:xpath>
<ex:typedef>
&lt;xs:element name="elementKey" type="ex:ElementKey"&gt;
  &lt;<b>xs:key</b> name="key"&gt;
    &lt;<b>xs:selector</b> 
   <b> xpath</b>=".//item" /&gt;
    &lt;<b>xs:field</b> 
   <b> xpath</b>="number" /&gt;
  &lt;/<b>xs:key</b>&gt;
&lt;/xs:element&gt;
&lt;xs:complexType name="ElementKey"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="item" type="ex:itemType" maxOccurs="unbounded" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
&lt;xs:complexType name="itemType"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="number" type="xs:integer" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="ElementKey01">
   <ex:elementKey>
      <ex:item>
         <ex:number>1234</ex:number>
      </ex:item>
   </ex:elementKey>
</ex:instance>
   </ex:example>
   <ex:example xml:id="MaxOccurs0" pattern="MaxOccurs0">
<pat:xpath>.//xs:element[@maxOccurs='0']/(., @maxOccurs, @minOccurs)</pat:xpath>
<ex:typedef>
&lt;xs:element name="maxOccurs0" type="ex:MaxOccurs0" /&gt;
&lt;xs:complexType name="MaxOccurs0"&gt;
  &lt;xs:sequence&gt;
    &lt;xs:element name="element1" type="xs:string" /&gt;
    &lt;<b>xs:element</b> name="element2" type="xs:string" <b> maxOccurs</b>="0" <b> minOccurs</b>="0" /&gt;
  &lt;/xs:sequence&gt;
&lt;/xs:complexType&gt;
    </ex:typedef>
<ex:instance xml:id="MaxOccurs001">
   <ex:maxOccurs0>
      <ex:element1>string1</ex:element1>
   </ex:maxOccurs0>
</ex:instance>
   </ex:example>
</ex:examples>

