<?xml version="1.0"?>
<axsl:stylesheet xmlns:axsl="http://www.w3.org/1999/XSL/Transform" xmlns:xs="http://www.w3.org/2001/XMLSchema" 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:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wsdl11="http://schemas.xmlsoap.org/wsdl/" version="2.0">
  <axsl:import href="../common/example-to-html.xsl"/>
  <axsl:preserve-space elements="axsl:text"/>
  <axsl:output method="xml" indent="yes"/>
  <axsl:template match="/">
    <ex:examples 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/"/>
      <!--*generated*-->
      <ex:example xml:id="TargetNamespace" pattern="TargetNamespace">
        <pat:xpath>.[@targetNamespace]/
		(., @targetNamespace)</pat:xpath>
        <ex:types>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='TargetNamespace']/ex:types"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='TargetNamespace']/ex:types//xs:schema/.[@targetNamespace]/&#10;&#9;&#9;(., @targetNamespace)"/>
          </axsl:call-template>
        </ex:types>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='TargetNamespace']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NoTargetNamespace" pattern="NoTargetNamespace">
        <pat:xpath>.[not(@targetNamespace)]/
		(.)</pat:xpath>
        <ex:types>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NoTargetNamespace']/ex:types"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NoTargetNamespace']/ex:types//xs:schema/.[not(@targetNamespace)]/&#10;&#9;&#9;(.)"/>
          </axsl:call-template>
        </ex:types>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NoTargetNamespace']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="QualifiedLocalElements" pattern="QualifiedLocalElements">
        <pat:xpath>.[@elementFormDefault = 'qualified']/
		(@elementFormDefault)</pat:xpath>
        <ex:types>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='QualifiedLocalElements']/ex:types"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='QualifiedLocalElements']/ex:types//xs:schema/.[@elementFormDefault = 'qualified']/&#10;&#9;&#9;(@elementFormDefault)"/>
          </axsl:call-template>
        </ex:types>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='QualifiedLocalElements']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="UnqualifiedLocalElements" pattern="UnqualifiedLocalElements">
        <pat:xpath>.[not(@elementFormDefault) or @elementFormDefault = 'unqualified']/
		(., @elementFormDefault)</pat:xpath>
        <ex:types>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='UnqualifiedLocalElements']/ex:types"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='UnqualifiedLocalElements']/ex:types//xs:schema/.[not(@elementFormDefault) or @elementFormDefault = 'unqualified']/&#10;&#9;&#9;(., @elementFormDefault)"/>
          </axsl:call-template>
        </ex:types>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='UnqualifiedLocalElements']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="QualifiedLocalAttributes" pattern="QualifiedLocalAttributes">
        <pat:xpath>.[@attributeFormDefault = 'qualified']/
		(@attributeFormDefault)</pat:xpath>
        <ex:types>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='QualifiedLocalAttributes']/ex:types"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='QualifiedLocalAttributes']/ex:types//xs:schema/.[@attributeFormDefault = 'qualified']/&#10;&#9;&#9;(@attributeFormDefault)"/>
          </axsl:call-template>
        </ex:types>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='QualifiedLocalAttributes']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="UnqualifiedLocalAttributes" pattern="UnqualifiedLocalAttributes">
        <pat:xpath>.[not(@attributeFormDefault) or @attributeFormDefault = 'unqualified']/
		(., @attributeFormDefault)</pat:xpath>
        <ex:types>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='UnqualifiedLocalAttributes']/ex:types"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='UnqualifiedLocalAttributes']/ex:types//xs:schema/.[not(@attributeFormDefault) or @attributeFormDefault = 'unqualified']/&#10;&#9;&#9;(., @attributeFormDefault)"/>
          </axsl:call-template>
        </ex:types>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='UnqualifiedLocalAttributes']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="SchemaVersion" pattern="SchemaVersion">
        <pat:xpath>./@version</pat:xpath>
        <ex:types>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SchemaVersion']/ex:types"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SchemaVersion']/ex:types//xs:schema/./@version"/>
          </axsl:call-template>
        </ex:types>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SchemaVersion']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="FinalDefault" pattern="FinalDefault">
        <pat:xpath>./@finalDefault</pat:xpath>
        <ex:types>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='FinalDefault']/ex:types"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='FinalDefault']/ex:types//xs:schema/./@finalDefault"/>
          </axsl:call-template>
        </ex:types>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='FinalDefault']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="BlockDefault" pattern="BlockDefault">
        <pat:xpath>./@blockDefault</pat:xpath>
        <ex:types>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='BlockDefault']/ex:types"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='BlockDefault']/ex:types//xs:schema/./@blockDefault"/>
          </axsl:call-template>
        </ex:types>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='BlockDefault']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="DocumentationElement" pattern="DocumentationElement">
        <pat:xpath>.//xs:annotation/xs:documentation/
		(.., ., .//*, .//@*)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='DocumentationElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='DocumentationElement']/ex:typedef/.//xs:annotation/xs:documentation/&#10;&#9;&#9;(.., ., .//*, .//@*)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='DocumentationElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="AppinfoElement" pattern="AppinfoElement">
        <pat:xpath>.//xs:annotation/xs:appinfo/
		(.., ., .//*, .//@*)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AppinfoElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AppinfoElement']/ex:typedef/.//xs:annotation/xs:appinfo/&#10;&#9;&#9;(.., ., .//*, .//@*)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AppinfoElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='IdentifierName']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='IdentifierName']/ex:typedef/.//.[matches(@name, &quot;^[A-Za-z_]([A-Za-z0-9_]{0,31})$&quot;)]/&#10;&#9;&#9;(@name)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='IdentifierName']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NonIdentifierName']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NonIdentifierName']/ex:typedef/.//.[@name and not(matches(@name, &quot;^[A-Za-z_]([A-Za-z0-9_]{0,31})$&quot;))]/&#10;&#9;&#9;(@name)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NonIdentifierName']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ImportTypesNamespace']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ImportTypesNamespace']/ex:typedef/.//xs:import[@namespace&#10;&#9;&#9;and not(@schemaLocation) &#10;&#9;&#9;and (@namespace = ../../xs:schema/@targetNamespace)]/ &#10;&#9;&#9;(., @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ImportTypesNamespace']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ImportNamespace']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ImportNamespace']/ex:typedef/./xs:import[@namespace and not(@schemaLocation)&#10;&#9;&#9;and not(@namespace = 'http://www.w3.org/2001/XMLSchema')]/&#10;&#9;&#9;(., @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ImportNamespace']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ImportSchema" pattern="ImportSchema">
        <pat:xpath>./xs:import[@namespace and @schemaLocation]/
		(., @namespace, @schemaLocation)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ImportSchema']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ImportSchema']/ex:typedef/./xs:import[@namespace and @schemaLocation]/&#10;&#9;&#9;(., @namespace, @schemaLocation)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ImportSchema']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ImportSchemaNamespace']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ImportSchemaNamespace']/ex:typedef/./xs:import[not(@schemaLocation)&#10;&#9;&#9;and @namespace = 'http://www.w3.org/2001/XMLSchema']/&#10;&#9;&#9;(., @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ImportSchemaNamespace']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="Include" pattern="Include">
        <pat:xpath>./xs:include[@schemaLocation]/
		(., @schemaLocation)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='Include']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='Include']/ex:typedef/./xs:include[@schemaLocation]/&#10;&#9;&#9;(., @schemaLocation)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='Include']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalElement']/ex:typedef/./xs:element[@name &#10;&#9;&#9;and @type and contains(@type, ':')]/&#10;&#9;&#9;(., @name, @type)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalElementUnqualifiedType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalElementUnqualifiedType']/ex:typedef/./xs:element[@name &#10;&#9;&#9;and @type and not(contains(@type, ':'))]/&#10;&#9;&#9;(., @name, @type)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalElementUnqualifiedType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalAttribute']/ex:typedef/./xs:attribute[@name and @type and contains(@type, &quot;:&quot;)]/&#10;&#9;&#9;(., @name, @type)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalAttributeUnqualifiedType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalAttributeUnqualifiedType']/ex:typedef/./xs:attribute[@name and @type and not(contains(@type, ':'))]/&#10;&#9;&#9;(., @name, @type)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalAttributeUnqualifiedType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementTypeDefaultNamespace']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementTypeDefaultNamespace']/ex:typedef/.//xs:element[@name and @type and not(contains(@type, ':'))]/&#10;&#9;&#9;(@name, @type)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementTypeDefaultNamespace']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NotMixed" pattern="NotMixed">
        <pat:xpath>.//.[@mixed = 'false']/
		(@mixed)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NotMixed']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NotMixed']/ex:typedef/.//.[@mixed = 'false']/&#10;&#9;&#9;(@mixed)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NotMixed']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="MixedComplexContent" pattern="MixedComplexContent">
        <pat:xpath>.//xs:complexContent[@mixed = 'true']/
		(@mixed)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='MixedComplexContent']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='MixedComplexContent']/ex:typedef/.//xs:complexContent[@mixed = 'true']/&#10;&#9;&#9;(@mixed)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='MixedComplexContent']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="MixedContentType" pattern="MixedContentType">
        <pat:xpath>.//xs:complexType[@mixed = 'true']/
		(@mixed)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='MixedContentType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='MixedContentType']/ex:typedef/.//xs:complexType[@mixed = 'true']/&#10;&#9;&#9;(@mixed)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='MixedContentType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="MinOccurs1" pattern="MinOccurs1">
        <pat:xpath>.//.[@minOccurs = '1']/
		(@minOccurs)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='MinOccurs1']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='MinOccurs1']/ex:typedef/.//.[@minOccurs = '1']/&#10;&#9;&#9;(@minOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='MinOccurs1']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="MaxOccurs1" pattern="MaxOccurs1">
        <pat:xpath>.//.[@maxOccurs = '1']/
		(@maxOccurs)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='MaxOccurs1']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='MaxOccurs1']/ex:typedef/.//.[@maxOccurs = '1']/&#10;&#9;&#9;(@maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='MaxOccurs1']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="Id" pattern="Id">
        <pat:xpath>.//@id</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='Id']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='Id']/ex:typedef/.//@id"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='Id']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementMinOccurs0']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementMinOccurs0']/ex:typedef/.//xs:element[@minOccurs = '0' and (not(@maxOccurs) or @maxOccurs = '1')]/&#10;&#9;&#9;(@minOccurs, @maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementMinOccurs0']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementMinOccurs1']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementMinOccurs1']/ex:typedef/.//xs:element[@minOccurs = '1' and (not(@maxOccurs) or @maxOccurs = '1')]/&#10;&#9;&#9;(@minOccurs, @maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementMinOccurs1']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementMaxOccurs1']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementMaxOccurs1']/ex:typedef/.//xs:element[(not(@minOccurs) or @minOccurs = '1') and @maxOccurs = '1']/&#10;&#9;&#9;(@minOccurs, @maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementMaxOccurs1']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NestedSequenceElementList" pattern="ElementMinOccurs0MaxOccursUnbounded">
        <pat:xpath>.//xs:element[@minOccurs = '0' and @maxOccurs = 'unbounded']/
		(@minOccurs, @maxOccurs)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NestedSequenceElementList']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NestedSequenceElementList']/ex:typedef/.//xs:element[@minOccurs = '0' and @maxOccurs = 'unbounded']/&#10;&#9;&#9;(@minOccurs, @maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NestedSequenceElementList']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ElementMinOccurs0MaxOccursUnbounded" pattern="ElementMinOccurs0MaxOccursUnbounded">
        <pat:xpath>.//xs:element[@minOccurs = '0' and @maxOccurs = 'unbounded']/
		(@minOccurs, @maxOccurs)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementMinOccurs0MaxOccursUnbounded']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementMinOccurs0MaxOccursUnbounded']/ex:typedef/.//xs:element[@minOccurs = '0' and @maxOccurs = 'unbounded']/&#10;&#9;&#9;(@minOccurs, @maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementMinOccurs0MaxOccursUnbounded']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementMaxOccursUnbounded']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementMaxOccursUnbounded']/ex:typedef/.//xs:element[(not(@minOccurs) or @minOccurs = '1') and @maxOccurs = 'unbounded']/&#10;&#9;&#9;(@minOccurs, @maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementMaxOccursUnbounded']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementMinOccurs1MaxOccursUnbounded']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementMinOccurs1MaxOccursUnbounded']/ex:typedef/.//xs:element[(not(@minOccurs) or @minOccurs = '1') and @maxOccurs = 'unbounded']/&#10;&#9;&#9;(@minOccurs, @maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementMinOccurs1MaxOccursUnbounded']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ElementMinOccursFinite" pattern="ElementMinOccursFinite">
        <pat:xpath>.//xs:element[xs:integer(@minOccurs) gt 1]/
		(@minOccurs, @maxOccurs)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementMinOccursFinite']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementMinOccursFinite']/ex:typedef/.//xs:element[xs:integer(@minOccurs) gt 1]/&#10;&#9;&#9;(@minOccurs, @maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementMinOccursFinite']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ElementMinOccurs2MaxOccurs2" pattern="ElementMinOccursFinite">
        <pat:xpath>.//xs:element[xs:integer(@minOccurs) gt 1]/
		(@minOccurs, @maxOccurs)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementMinOccurs2MaxOccurs2']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementMinOccurs2MaxOccurs2']/ex:typedef/.//xs:element[xs:integer(@minOccurs) gt 1]/&#10;&#9;&#9;(@minOccurs, @maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementMinOccurs2MaxOccurs2']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ElementMinOccurs2orMore" pattern="ElementMinOccursFinite">
        <pat:xpath>.//xs:element[xs:integer(@minOccurs) gt 1]/
		(@minOccurs, @maxOccurs)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementMinOccurs2orMore']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementMinOccurs2orMore']/ex:typedef/.//xs:element[xs:integer(@minOccurs) gt 1]/&#10;&#9;&#9;(@minOccurs, @maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementMinOccurs2orMore']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementMinOccurs0MaxOccursFinite']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementMinOccurs0MaxOccursFinite']/ex:typedef/.//xs:element[@minOccurs = '0' and @maxOccurs and not(@maxOccurs = '0' or @maxOccurs = '1' or @maxOccurs = 'unbounded')]/&#10;&#9;&#9;(@minOccurs, @maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementMinOccurs0MaxOccursFinite']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementMaxOccursFinite']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementMaxOccursFinite']/ex:typedef/.//xs:element[@maxOccurs and not(@maxOccurs = '0' or @maxOccurs = '1' or @maxOccurs = 'unbounded')]/&#10;&#9;&#9;(@maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementMaxOccursFinite']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ElementFormQualified" pattern="ElementFormQualified">
        <pat:xpath>.//xs:element[@form='qualified']/
		(@form)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementFormQualified']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementFormQualified']/ex:typedef/.//xs:element[@form='qualified']/&#10;&#9;&#9;(@form)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementFormQualified']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ElementFormUnqualified" pattern="ElementFormUnqualified">
        <pat:xpath>.//xs:element[@form='unqualified']/
		(@form)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementFormUnqualified']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementFormUnqualified']/ex:typedef/.//xs:element[@form='unqualified']/&#10;&#9;&#9;(@form)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementFormUnqualified']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="AttributeFormQualified" pattern="AttributeFormQualified">
        <pat:xpath>.//xs:attribute[@form='qualified']/
		(@form)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AttributeFormQualified']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AttributeFormQualified']/ex:typedef/.//xs:attribute[@form='qualified']/&#10;&#9;&#9;(@form)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AttributeFormQualified']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="AttributeFormUnqualified" pattern="AttributeFormUnqualified">
        <pat:xpath>.//xs:attribute[@form='unqualified']/
		(@form)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AttributeFormUnqualified']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AttributeFormUnqualified']/ex:typedef/.//xs:attribute[@form='unqualified']/&#10;&#9;&#9;(@form)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AttributeFormUnqualified']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GlobalElementDefault" pattern="ElementDefault">
        <pat:xpath>.//xs:element/
		(@default)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalElementDefault']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalElementDefault']/ex:typedef/.//xs:element/&#10;&#9;&#9;(@default)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalElementDefault']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ElementDefault" pattern="ElementDefault">
        <pat:xpath>.//xs:element/
		(@default)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementDefault']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementDefault']/ex:typedef/.//xs:element/&#10;&#9;&#9;(@default)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementDefault']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="AttributeOptional" pattern="AttributeOptional">
        <pat:xpath>.//xs:attribute[@use = 'optional']/ 
		(@use)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AttributeOptional']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AttributeOptional']/ex:typedef/.//xs:attribute[@use = 'optional']/ &#10;&#9;&#9;(@use)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AttributeOptional']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="AttributeRequired" pattern="AttributeRequired">
        <pat:xpath>.//xs:attribute[@use = 'required']/ 
		(@use)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AttributeRequired']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AttributeRequired']/ex:typedef/.//xs:attribute[@use = 'required']/ &#10;&#9;&#9;(@use)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AttributeRequired']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="AttributeFixed" pattern="AttributeFixed">
        <pat:xpath>.//xs:attribute[@fixed] / 
		(@fixed)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AttributeFixed']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AttributeFixed']/ex:typedef/.//xs:attribute[@fixed] / &#10;&#9;&#9;(@fixed)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AttributeFixed']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="AttributeDefault" pattern="AttributeDefault">
        <pat:xpath>.//xs:attribute[@default] / 
		(@default)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AttributeDefault']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AttributeDefault']/ex:typedef/.//xs:attribute[@default] / &#10;&#9;&#9;(@default)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AttributeDefault']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GlobalSimpleType" pattern="GlobalSimpleType">
        <pat:xpath>./xs:simpleType[@name]/
		(., @name)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalSimpleType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalSimpleType']/ex:typedef/./xs:simpleType[@name]/&#10;&#9;&#9;(., @name)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalSimpleType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GlobalComplexType" pattern="GlobalComplexType">
        <pat:xpath>./xs:complexType[@name]/
		(., @name)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalComplexType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalComplexType']/ex:typedef/./xs:complexType[@name]/&#10;&#9;&#9;(., @name)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalComplexType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GlobalComplexTypeAbstract" pattern="GlobalComplexTypeAbstract">
        <pat:xpath>./xs:complexType[@abstract='true']/
		(@abstract)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalComplexTypeAbstract']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalComplexTypeAbstract']/ex:typedef/./xs:complexType[@abstract='true']/&#10;&#9;&#9;(@abstract)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalComplexTypeAbstract']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ComplexTypeConcrete" pattern="ComplexTypeConcrete">
        <pat:xpath>.//xs:complexType[@abstract='false']/
		(@abstract)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexTypeConcrete']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexTypeConcrete']/ex:typedef/.//xs:complexType[@abstract='false']/&#10;&#9;&#9;(@abstract)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexTypeConcrete']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GlobalElementAbstract" pattern="GlobalElementAbstract">
        <pat:xpath>./xs:element[@abstract='true']/
		(@abstract)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalElementAbstract']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalElementAbstract']/ex:typedef/./xs:element[@abstract='true']/&#10;&#9;&#9;(@abstract)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalElementAbstract']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GlobalElementConcrete" pattern="GlobalElementConcrete">
        <pat:xpath>./xs:element[@abstract='false']/
		(@abstract)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalElementConcrete']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalElementConcrete']/ex:typedef/./xs:element[@abstract='false']/&#10;&#9;&#9;(@abstract)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalElementConcrete']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GlobalElementBlock" pattern="GlobalElementBlock">
        <pat:xpath>./xs:element/
		(@block)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalElementBlock']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalElementBlock']/ex:typedef/./xs:element/&#10;&#9;&#9;(@block)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalElementBlock']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GlobalElementFinal" pattern="GlobalElementFinal">
        <pat:xpath>./xs:element/
		(@final)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalElementFinal']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalElementFinal']/ex:typedef/./xs:element/&#10;&#9;&#9;(@final)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalElementFinal']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GlobalComplexTypeBlock" pattern="GlobalComplexTypeBlock">
        <pat:xpath>./xs:complexType/ 
		(@block)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalComplexTypeBlock']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalComplexTypeBlock']/ex:typedef/./xs:complexType/ &#10;&#9;&#9;(@block)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalComplexTypeBlock']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='StringEnumerationType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='StringEnumerationType']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:string') and xs:enumeration]/&#10;&#9;&#9;(., @base, xs:enumeration/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='StringEnumerationType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NMTOKENEnumerationType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NMTOKENEnumerationType']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:NMTOKEN') and xs:enumeration]/&#10;&#9;&#9;(., @base, xs:enumeration/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NMTOKENEnumerationType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='IntEnumerationType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='IntEnumerationType']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:int') and xs:enumeration]/&#10;&#9;&#9;(., @base, xs:enumeration/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='IntEnumerationType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ShortEnumerationType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ShortEnumerationType']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:short') and xs:enumeration]/&#10;&#9;&#9;(., @base, xs:enumeration/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ShortEnumerationType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='LongEnumerationType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='LongEnumerationType']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:long') and xs:enumeration]/&#10;&#9;&#9;(., @base, xs:enumeration/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='LongEnumerationType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='DoubleEnumerationType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='DoubleEnumerationType']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:double') and xs:enumeration]/&#10;&#9;&#9;(., @base, xs:enumeration/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='DoubleEnumerationType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='IntegerEnumerationType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='IntegerEnumerationType']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:integer') and xs:enumeration]/&#10;&#9;&#9;(., @base, xs:enumeration/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='IntegerEnumerationType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='DecimalEnumerationType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='DecimalEnumerationType']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:decimal') and xs:enumeration]/&#10;&#9;&#9;(., @base, xs:enumeration/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='DecimalEnumerationType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='FloatEnumerationType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='FloatEnumerationType']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:float') and xs:enumeration]/&#10;&#9;&#9;(., @base, xs:enumeration/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='FloatEnumerationType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NonNegativeIntegerEnumerationType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NonNegativeIntegerEnumerationType']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:nonNegativeInteger') and xs:enumeration]/&#10;&#9;&#9;(., @base, xs:enumeration/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NonNegativeIntegerEnumerationType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='PositiveIntegerEnumerationType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='PositiveIntegerEnumerationType']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:positiveInteger')&#10;&#9;&#9;and xs:enumeration]/&#10;&#9;&#9;(., @base, xs:enumeration/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='PositiveIntegerEnumerationType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='UnsignedIntEnumerationType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='UnsignedIntEnumerationType']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:unsignedInt') and xs:enumeration]/&#10;&#9;&#9;(., @base, xs:enumeration/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='UnsignedIntEnumerationType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='UnsignedLongEnumerationType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='UnsignedLongEnumerationType']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:unsignedLong') and xs:enumeration]/&#10;&#9;&#9;(., @base, xs:enumeration/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='UnsignedLongEnumerationType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='UnsignedShortEnumerationType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='UnsignedShortEnumerationType']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:unsignedShort') and xs:enumeration]/&#10;&#9;&#9;(., @base, xs:enumeration/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='UnsignedShortEnumerationType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='TokenEnumerationType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='TokenEnumerationType']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:token') and xs:enumeration]/&#10;         (., @base, xs:enumeration/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='TokenEnumerationType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='LanguageEnumerationType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='LanguageEnumerationType']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:language') and xs:enumeration]/&#10;         (., @base, xs:enumeration/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='LanguageEnumerationType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SimpleTypeEnumerationType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SimpleTypeEnumerationType']/ex:typedef/.//xs:simpleType/xs:restriction[@base and&#10;&#9;    namespace-uri-from-QName(resolve-QName(@base,.)) != 'http://www.w3.org/2001/XMLSchema' ]/&#10;&#9;&#9;(., @base, xs:enumeration/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SimpleTypeEnumerationType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ComplexTypeAll" pattern="ComplexTypeAll">
        <pat:xpath>.//xs:complexType/xs:all/
		(., xs:element/(., @name))</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexTypeAll']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexTypeAll']/ex:typedef/.//xs:complexType/xs:all/&#10;&#9;&#9;(., xs:element/(., @name))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexTypeAll']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ComplexTypeChoice" pattern="ComplexTypeChoice">
        <pat:xpath>.//xs:complexType/xs:choice/
		(., xs:element/(., @name))</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexTypeChoice']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexTypeChoice']/ex:typedef/.//xs:complexType/xs:choice/&#10;&#9;&#9;(., xs:element/(., @name))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexTypeChoice']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ComplexTypeSequenceChoice" pattern="ComplexTypeSequenceChoice">
        <pat:xpath>.//xs:complexType/xs:sequence/xs:choice/
         (., xs:element/(., @name))</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexTypeSequenceChoice']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexTypeSequenceChoice']/ex:typedef/.//xs:complexType/xs:sequence/xs:choice/&#10;         (., xs:element/(., @name))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexTypeSequenceChoice']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ComplexTypeAttribute" pattern="ComplexTypeAttribute">
        <pat:xpath>.//xs:complexType/xs:attribute[@name]/
		(., @name)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexTypeAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexTypeAttribute']/ex:typedef/.//xs:complexType/xs:attribute[@name]/&#10;&#9;&#9;(., @name)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexTypeAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexTypeOnlyAttributes']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexTypeOnlyAttributes']/ex:typedef/.//xs:complexType/xs:attribute[../not(xs:choice or xs:sequence or xs:all or xs:anyAttribute or xs:group &#10;         or xs:attributeGroup or xs:simpleContent or xs:complexContent)]/&#10;         (., ..,@use)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexTypeOnlyAttributes']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexTypeOnlyAttributeGroup']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexTypeOnlyAttributeGroup']/ex:typedef/.//xs:complexType/xs:attributeGroup[../not(xs:choice or xs:sequence or xs:all or xs:anyAttribute &#10;         or xs:group or xs:simpleContent or xs:complexContent)]/(., ..,@ref)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexTypeOnlyAttributeGroup']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ComplexTypeSequence" pattern="ComplexTypeSequence">
        <pat:xpath>.//xs:complexType/xs:sequence/
		(., xs:element/(., @name))</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexTypeSequence']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexTypeSequence']/ex:typedef/.//xs:complexType/xs:sequence/&#10;&#9;&#9;(., xs:element/(., @name))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexTypeSequence']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="SequenceSequenceElement" pattern="SequenceSequenceElement">
        <pat:xpath>.//xs:sequence/xs:sequence/xs:element/
		(., ..)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SequenceSequenceElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SequenceSequenceElement']/ex:typedef/.//xs:sequence/xs:sequence/xs:element/&#10;&#9;&#9;(., ..)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SequenceSequenceElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SequenceMinOccurs0']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SequenceMinOccurs0']/ex:typedef/.//xs:sequence[@minOccurs = '0' and (not(@maxOccurs) or @maxOccurs = '1')]/&#10;&#9;&#9; (@minOccurs, @maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SequenceMinOccurs0']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SequenceMinOccurs1']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SequenceMinOccurs1']/ex:typedef/.//xs:sequence[@minOccurs = '1' and (not(@maxOccurs) or @maxOccurs = '1')]/&#10;&#9;&#9; (@minOccurs, @maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SequenceMinOccurs1']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SequenceMaxOccurs1']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SequenceMaxOccurs1']/ex:typedef/.//xs:sequence[(not(@minOccurs) or @minOccurs = '1') and @maxOccurs = '1']/&#10;&#9;&#9; (@minOccurs, @maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SequenceMaxOccurs1']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="SequenceMinOccurs0MaxOccursUnbounded" pattern="SequenceMinOccurs0MaxOccursUnbounded">
        <pat:xpath>.//xs:sequence[@minOccurs = '0' and @maxOccurs = 'unbounded']/
		 (@minOccurs, @maxOccurs)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SequenceMinOccurs0MaxOccursUnbounded']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SequenceMinOccurs0MaxOccursUnbounded']/ex:typedef/.//xs:sequence[@minOccurs = '0' and @maxOccurs = 'unbounded']/&#10;&#9;&#9; (@minOccurs, @maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SequenceMinOccurs0MaxOccursUnbounded']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SequenceMinOccurs1MaxOccursUnbounded']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SequenceMinOccurs1MaxOccursUnbounded']/ex:typedef/.//xs:sequence[(not(@minOccurs) or @minOccurs = '1') and @maxOccurs = 'unbounded']/&#10;&#9;&#9; (@minOccurs, @maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SequenceMinOccurs1MaxOccursUnbounded']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SequenceMaxOccursUnbounded']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SequenceMaxOccursUnbounded']/ex:typedef/.//xs:sequence[(not(@minOccurs) or @minOccurs = '1') and @maxOccurs = 'unbounded']/&#10;&#9;&#9; (@minOccurs, @maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SequenceMaxOccursUnbounded']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="SequenceMinOccursFinite" pattern="SequenceMinOccursFinite">
        <pat:xpath>.//xs:sequence[xs:integer(@minOccurs) gt 1]/
		 (@minOccurs, @maxOccurs)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SequenceMinOccursFinite']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SequenceMinOccursFinite']/ex:typedef/.//xs:sequence[xs:integer(@minOccurs) gt 1]/&#10;&#9;&#9; (@minOccurs, @maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SequenceMinOccursFinite']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SequenceMaxOccursFinite']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SequenceMaxOccursFinite']/ex:typedef/.//xs:sequence[@maxOccurs and not(@maxOccurs = '0' or @maxOccurs = '1' or @maxOccurs = 'unbounded')]/&#10;&#9;&#9; (@maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SequenceMaxOccursFinite']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalElementSequence']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalElementSequence']/ex:typedef/./xs:element[@name]/xs:complexType/xs:sequence[xs:element]/&#10;&#9;&#9;(../../(., @name), .., ., xs:element/(., @name))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalElementSequence']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalElementAll']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalElementAll']/ex:typedef/./xs:element[@name]/xs:complexType/xs:all[xs:element]/&#10;&#9;&#9;(../../(., @name), .., ., xs:element/(., @name))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalElementAll']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalElementChoice']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalElementChoice']/ex:typedef/./xs:element[@name]/xs:complexType/xs:choice[xs:element]/&#10;&#9;&#9;(../../(., @name), .., ., xs:element/(., @name))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalElementChoice']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GlobalElementSimpleType" pattern="GlobalElementSimpleType">
        <pat:xpath>./xs:element[@name]/xs:simpleType/
		(../(., @name), .)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalElementSimpleType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalElementSimpleType']/ex:typedef/./xs:element[@name]/xs:simpleType/&#10;&#9;&#9;(../(., @name), .)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalElementSimpleType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalElementSequenceAny']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalElementSequenceAny']/ex:typedef/./xs:element[@name]/xs:complexType/xs:sequence[xs:any and not(xs:element)]/&#10;&#9;&#9;(../../(., @name))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalElementSequenceAny']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ComplexTypeAnyAttribute" pattern="ComplexTypeAnyAttribute">
        <pat:xpath>.//xs:complexType/xs:anyAttribute</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexTypeAnyAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexTypeAnyAttribute']/ex:typedef/.//xs:complexType/xs:anyAttribute"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexTypeAnyAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AnyAttributeStrict']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AnyAttributeStrict']/ex:typedef/.//xs:complexType/xs:anyAttribute[(not(@processContents) or @processContents = 'strict')&#10;&#9;    and (not(@namespace) or @namespace = '##any')]/&#10;&#9;    (., @processContents, @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AnyAttributeStrict']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AnyAttributeLax']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AnyAttributeLax']/ex:typedef/.//xs:complexType/xs:anyAttribute[(@processContents = 'lax')&#10;&#9;    and (not(@namespace) or @namespace = '##any')]/&#10;&#9;    (., @processContents, @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AnyAttributeLax']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AnyAttributeSkip']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AnyAttributeSkip']/ex:typedef/.//xs:complexType/xs:anyAttribute[(@processContents = 'skip')&#10;&#9;    and (not(@namespace) or @namespace = '##any')]/&#10;&#9;    (., @processContents, @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AnyAttributeSkip']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AnyAttributeOtherStrict']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AnyAttributeOtherStrict']/ex:typedef/.//xs:complexType/xs:anyAttribute[(not(@processContents) or @processContents = 'strict')&#10;&#9;    and (@namespace = '##other')]/&#10;&#9;    (., @processContents, @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AnyAttributeOtherStrict']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AnyAttributeOtherLax']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AnyAttributeOtherLax']/ex:typedef/.//xs:complexType/xs:anyAttribute[(@processContents = 'lax')&#10;&#9;    and (@namespace = '##other')]/&#10;&#9;    (., @processContents, @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AnyAttributeOtherLax']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AnyAttributeOtherSkip']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AnyAttributeOtherSkip']/ex:typedef/.//xs:complexType/xs:anyAttribute[(@processContents = 'skip')&#10;&#9;    and (@namespace = '##other')]/&#10;&#9;    (., @processContents, @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AnyAttributeOtherSkip']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ExtendedSequenceStrict']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ExtendedSequenceStrict']/ex:typedef/.//xs:sequence/xs:any[(not(@processContents) or @processContents = 'strict')&#10;&#9;    and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')&#10;&#9;    and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded')&#10;&#9;    and @namespace = '##targetNamespace']/&#10;&#9;    (., @processContents, @minOccurs, @maxOccurs, @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ExtendedSequenceStrict']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ExtendedSequenceLax']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ExtendedSequenceLax']/ex:typedef/.//xs:sequence/xs:any[@processContents = 'lax'&#10;&#9;    and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')&#10;&#9;    and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded')&#10;&#9;    and @namespace = '##targetNamespace']/&#10;&#9;    (., @processContents, @minOccurs, @maxOccurs, @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ExtendedSequenceLax']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ExtendedSequenceSkip']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ExtendedSequenceSkip']/ex:typedef/.//xs:sequence/xs:any[@processContents = 'skip'&#10;&#9;    and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')&#10;&#9;    and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded')&#10;&#9;    and @namespace = '##targetNamespace']/&#10;&#9;    (., @processContents, @minOccurs, @maxOccurs, @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ExtendedSequenceSkip']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ExtendedSequenceStrictAny']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ExtendedSequenceStrictAny']/ex:typedef/.//xs:sequence/xs:any[(not(@processContents) or @processContents = 'strict')&#10;&#9;    and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')&#10;&#9;    and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded')&#10;&#9;    and (not(@namespace) or @namespace = '##any')]/&#10;&#9;    (., @processContents, @minOccurs, @maxOccurs, @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ExtendedSequenceStrictAny']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ExtendedSequenceLaxAny']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ExtendedSequenceLaxAny']/ex:typedef/.//xs:sequence/xs:any[@processContents = 'lax'&#10;&#9;    and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')&#10;&#9;    and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded')&#10;&#9;    and (not(@namespace) or @namespace = '##any')]/&#10;&#9;    (., @processContents, @minOccurs, @maxOccurs, @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ExtendedSequenceLaxAny']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ExtendedSequenceSkipAny']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ExtendedSequenceSkipAny']/ex:typedef/.//xs:sequence/xs:any[@processContents = 'skip'&#10;&#9;    and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')&#10;&#9;    and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded')&#10;&#9;    and (not(@namespace) or @namespace = '##any')]/&#10;&#9;    (., @processContents, @minOccurs, @maxOccurs, @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ExtendedSequenceSkipAny']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ExtendedSequenceStrictOther']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ExtendedSequenceStrictOther']/ex:typedef/.//xs:sequence/xs:any[(not(@processContents) or @processContents = 'strict')&#10;&#9;    and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')&#10;&#9;    and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded')&#10;&#9;    and @namespace = '##other']/&#10;&#9;    (., @processContents, @minOccurs, @maxOccurs, @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ExtendedSequenceStrictOther']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ExtendedSequenceLaxOther']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ExtendedSequenceLaxOther']/ex:typedef/.//xs:sequence/xs:any[@processContents = 'lax'&#10;&#9;    and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')&#10;&#9;    and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded')&#10;&#9;    and @namespace = '##other']/&#10;&#9;    (., @processContents, @minOccurs, @maxOccurs, @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ExtendedSequenceLaxOther']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ExtendedSequenceSkipOther']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ExtendedSequenceSkipOther']/ex:typedef/.//xs:sequence/xs:any[@processContents = 'skip'&#10;&#9;    and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')&#10;&#9;    and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded')&#10;&#9;    and @namespace = '##other']/&#10;&#9;    (., @processContents, @minOccurs, @maxOccurs, @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ExtendedSequenceSkipOther']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SequenceAnyStrict']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SequenceAnyStrict']/ex:typedef/.//xs:sequence/xs:any[(not(@processContents) or @processContents = 'strict')&#10;&#9;    and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')&#10;&#9;    and (not (@maxOccurs) or @maxOccurs = '1' or @maxOccurs='unbounded')&#10;&#9;    and (not (@namespace) or @namespace = '##any')]/&#10;&#9;(., @processContents, @minOccurs, @maxOccurs, @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SequenceAnyStrict']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ExtendedSimpleContent']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ExtendedSimpleContent']/ex:typedef/.//xs:complexType/xs:simpleContent/xs:extension[@base]/&#10;&#9;    (.., ., ./@base, xs:attribute/&#10;&#9;&#9;(., @name))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ExtendedSimpleContent']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ChoiceSequence" pattern="ChoiceSequence">
        <pat:xpath>.//xs:choice/xs:sequence/(.)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ChoiceSequence']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ChoiceSequence']/ex:typedef/.//xs:choice/xs:sequence/(.)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ChoiceSequence']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="SequenceChoice" pattern="SequenceChoice">
        <pat:xpath>.//xs:sequence/xs:choice/(.)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SequenceChoice']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SequenceChoice']/ex:typedef/.//xs:sequence/xs:choice/(.)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SequenceChoice']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ChoiceChoice" pattern="ChoiceChoice">
        <pat:xpath>.//xs:choice/xs:choice/(.)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ChoiceChoice']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ChoiceChoice']/ex:typedef/.//xs:choice/xs:choice/(.)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ChoiceChoice']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ChoiceElement" pattern="ChoiceElement">
        <pat:xpath>.//xs:choice/xs:element/(.)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ChoiceElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ChoiceElement']/ex:typedef/.//xs:choice/xs:element/(.)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ChoiceElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="SequenceElement" pattern="SequenceElement">
        <pat:xpath>.//xs:sequence/xs:element/(.)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SequenceElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SequenceElement']/ex:typedef/.//xs:sequence/xs:element/(.)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SequenceElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="AllElement" pattern="AllElement">
        <pat:xpath>.//xs:all/xs:element/(.)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AllElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AllElement']/ex:typedef/.//xs:all/xs:element/(.)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AllElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SequenceSingleRepeatedElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SequenceSingleRepeatedElement']/ex:typedef/.//xs:sequence[count(xs:element) = 1]/xs:element[@maxOccurs = 'unbounded']/&#10;&#9;&#9;(., @maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SequenceSingleRepeatedElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NullEnumerationType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NullEnumerationType']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:string') &#10;&#9;&#9;and count(xs:enumeration) le 1 and xs:enumeration = '']/&#10;&#9;&#9;(@base, xs:enumeration/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NullEnumerationType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ElementFixed" pattern="ElementFixed">
        <pat:xpath>.//xs:element[@fixed] / 
         (@fixed)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementFixed']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementFixed']/ex:typedef/.//xs:element[@fixed] / &#10;         (@fixed)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementFixed']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementEmptySequence']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementEmptySequence']/ex:typedef/.//xs:element[@name]/xs:complexType/xs:sequence[not(node())]/&#10;&#9;    (., .., ../.., ../../@name)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementEmptySequence']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ElementEmptyComplexType" pattern="ElementEmptyComplexType">
        <pat:xpath>.//xs:element[@name]/xs:complexType[not(node())]/
	    (., .., ../@name)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementEmptyComplexType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementEmptyComplexType']/ex:typedef/.//xs:element[@name]/xs:complexType[not(node())]/&#10;&#9;    (., .., ../@name)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementEmptyComplexType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AttributeElementNameClash']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AttributeElementNameClash']/ex:typedef/.//xs:complexType/xs:sequence/xs:element[@name = ../../xs:attribute/@name]/&#10;&#9;    (@name)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AttributeElementNameClash']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NillableElement" pattern="NillableElement">
        <pat:xpath>.//xs:element[@nillable = 'true' and not(@minOccurs = '0')]/
	    (@nillable)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NillableElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NillableElement']/ex:typedef/.//xs:element[@nillable = 'true' and not(@minOccurs = '0')]/&#10;&#9;    (@nillable)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NillableElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NillableOptionalElement" pattern="NillableOptionalElement">
        <pat:xpath>.//xs:element[@nillable = 'true' and @minOccurs = '0']/
	    (@nillable, @minOccurs)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NillableOptionalElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NillableOptionalElement']/ex:typedef/.//xs:element[@nillable = 'true' and @minOccurs = '0']/&#10;&#9;    (@nillable, @minOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NillableOptionalElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NotNillableElement" pattern="NotNillableElement">
        <pat:xpath>.//xs:element[@nillable = 'false']/
	    (@nillable)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NotNillableElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NotNillableElement']/ex:typedef/.//xs:element[@nillable = 'false']/&#10;&#9;    (@nillable)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NotNillableElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementTypeReference']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementTypeReference']/ex:typedef/.//xs:element[@name and @type &#10;&#9;    and namespace-uri-from-QName(resolve-QName(@type,.)) != 'http://www.w3.org/2001/XMLSchema' &#10;&#9;    and contains(@type, ':')]/&#10;&#9;    (., @name, @type)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementTypeReference']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementTypeReferenceUnqualified']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementTypeReferenceUnqualified']/ex:typedef/.//xs:element[@name and @type &#10;&#9;    and namespace-uri-from-QName(resolve-QName(@type,.)) != 'http://www.w3.org/2001/XMLSchema' &#10;&#9;    and not(contains(@type, ':'))]/&#10;&#9;    (., @name, @type)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementTypeReferenceUnqualified']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ElementReference" pattern="ElementReference">
        <pat:xpath>.//xs:element[@ref and contains(@ref, ':')]/
	    (., @ref)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementReference']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementReference']/ex:typedef/.//xs:element[@ref and contains(@ref, ':')]/&#10;&#9;    (., @ref)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementReference']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ElementReferenceUnqualified" pattern="ElementReferenceUnqualified">
        <pat:xpath>.//xs:element[@ref and not(contains(@ref, ':'))]/
	    (., @ref)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementReferenceUnqualified']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementReferenceUnqualified']/ex:typedef/.//xs:element[@ref and not(contains(@ref, ':'))]/&#10;&#9;    (., @ref)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementReferenceUnqualified']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="AttributeReference" pattern="AttributeReference">
        <pat:xpath>.//xs:attribute[@ref and contains(@ref, ":")]/
	    (., @ref)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AttributeReference']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AttributeReference']/ex:typedef/.//xs:attribute[@ref and contains(@ref, &quot;:&quot;)]/&#10;&#9;    (., @ref)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AttributeReference']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="AttributeReferenceUnqualified" pattern="AttributeReferenceUnqualified">
        <pat:xpath>.//xs:attribute[@ref and not(contains(@ref, ':'))]/
	    (., @ref)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AttributeReferenceUnqualified']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AttributeReferenceUnqualified']/ex:typedef/.//xs:attribute[@ref and not(contains(@ref, ':'))]/&#10;&#9;    (., @ref)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AttributeReferenceUnqualified']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AttributeTypeReference']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AttributeTypeReference']/ex:typedef/.//xs:attribute[@name and @type &#10;&#9;    and namespace-uri-from-QName(resolve-QName(@type,.)) != 'http://www.w3.org/2001/XMLSchema' &#10;&#9;    and contains(@type, ':')]/&#10;&#9;    (., @name, @type)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AttributeTypeReference']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AttributeTypeReferenceUnqualified']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AttributeTypeReferenceUnqualified']/ex:typedef/.//xs:attribute[@name and @type &#10;&#9;    and namespace-uri-from-QName(resolve-QName(@type,.)) != 'http://www.w3.org/2001/XMLSchema' &#10;&#9;    and not(contains(@type, ':'))]/&#10;&#9;&#9;(., @name, @type)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AttributeTypeReferenceUnqualified']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='UnionMemberTypes']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='UnionMemberTypes']/ex:typedef/.//xs:simpleType/xs:union[@memberTypes and not(xs:simpleType)]/&#10;&#9;&#9;(., @memberTypes)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='UnionMemberTypes']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='UnionDateString']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='UnionDateString']/ex:typedef/.//xs:simpleType/xs:union[@memberTypes and not(xs:simpleType)]/&#10;&#9;&#9;(., @memberTypes)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='UnionDateString']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="UnionSimpleDateString" pattern="UnionSimpleTypes">
        <pat:xpath>.//xs:simpleType/xs:union[not(@memberTypes)]/xs:simpleType/
		(.., .)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='UnionSimpleDateString']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='UnionSimpleDateString']/ex:typedef/.//xs:simpleType/xs:union[not(@memberTypes)]/xs:simpleType/&#10;&#9;&#9;(.., .)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='UnionSimpleDateString']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='UnionSimpleAndMemberTypes']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='UnionSimpleAndMemberTypes']/ex:typedef/.//xs:simpleType/xs:union[@memberTypes and xs:simpleType]/&#10;&#9;&#9;(., @memberTypes, xs:simpleType)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='UnionSimpleAndMemberTypes']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="List" pattern="List">
        <pat:xpath>.//xs:list[@itemType]/
		(., @itemType)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='List']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='List']/ex:typedef/.//xs:list[@itemType]/&#10;&#9;&#9;(., @itemType)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='List']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="AnySimpleTypeElement" pattern="AnySimpleTypeElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:anySimpleType')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AnySimpleTypeElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AnySimpleTypeElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:anySimpleType')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AnySimpleTypeElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="AnySimpleTypeAttribute" pattern="AnySimpleTypeAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:anySimpleType')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AnySimpleTypeAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AnySimpleTypeAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:anySimpleType')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AnySimpleTypeAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="AnyTypeElement" pattern="AnyTypeElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:anyType')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AnyTypeElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AnyTypeElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:anyType')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AnyTypeElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="StringElement" pattern="StringElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:string')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='StringElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='StringElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:string')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='StringElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="StringAttribute" pattern="StringAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:string')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='StringAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='StringAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:string')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='StringAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="BooleanElement" pattern="BooleanElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:boolean')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='BooleanElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='BooleanElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:boolean')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='BooleanElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="BooleanAttribute" pattern="BooleanAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:boolean')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='BooleanAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='BooleanAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:boolean')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='BooleanAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="DecimalElement" pattern="DecimalElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:decimal')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='DecimalElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='DecimalElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:decimal')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='DecimalElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="DecimalAttribute" pattern="DecimalAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:decimal')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='DecimalAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='DecimalAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:decimal')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='DecimalAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="FloatElement" pattern="FloatElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:float')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='FloatElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='FloatElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:float')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='FloatElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="FloatAttribute" pattern="FloatAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:float')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='FloatAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='FloatAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:float')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='FloatAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="DoubleElement" pattern="DoubleElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:double')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='DoubleElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='DoubleElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:double')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='DoubleElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="DoubleAttribute" pattern="DoubleAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:double')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='DoubleAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='DoubleAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:double')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='DoubleAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="DurationElement" pattern="DurationElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:duration')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='DurationElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='DurationElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:duration')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='DurationElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="DurationAttribute" pattern="DurationAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:duration')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='DurationAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='DurationAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:duration')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='DurationAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="DateTimeElement" pattern="DateTimeElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:dateTime')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='DateTimeElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='DateTimeElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:dateTime')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='DateTimeElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="DateTimeAttribute" pattern="DateTimeAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:dateTime')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='DateTimeAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='DateTimeAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:dateTime')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='DateTimeAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="TimeElement" pattern="TimeElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:time')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='TimeElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='TimeElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:time')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='TimeElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="TimeAttribute" pattern="TimeAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:time')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='TimeAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='TimeAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:time')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='TimeAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="DateElement" pattern="DateElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:date')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='DateElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='DateElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:date')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='DateElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="DateAttribute" pattern="DateAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:date')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='DateAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='DateAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:date')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='DateAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GYearMonthElement" pattern="GYearMonthElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gYearMonth')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GYearMonthElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GYearMonthElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gYearMonth')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GYearMonthElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GYearMonthAttribute" pattern="GYearMonthAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gYearMonth')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GYearMonthAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GYearMonthAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gYearMonth')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GYearMonthAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GYearElement" pattern="GYearElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gYear')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GYearElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GYearElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gYear')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GYearElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GYearAttribute" pattern="GYearAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gYear')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GYearAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GYearAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gYear')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GYearAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GMonthDayElement" pattern="GMonthDayElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gMonthDay')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GMonthDayElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GMonthDayElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gMonthDay')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GMonthDayElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GMonthDayAttribute" pattern="GMonthDayAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gMonthDay')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GMonthDayAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GMonthDayAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gMonthDay')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GMonthDayAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GDayElement" pattern="GDayElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gDay')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GDayElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GDayElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gDay')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GDayElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GDayAttribute" pattern="GDayAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gDay')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GDayAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GDayAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gDay')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GDayAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GMonthElement" pattern="GMonthElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gMonth')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GMonthElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GMonthElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:gMonth')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GMonthElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GMonthAttribute" pattern="GMonthAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gMonth')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GMonthAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GMonthAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:gMonth')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GMonthAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="HexBinaryElement" pattern="HexBinaryElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:hexBinary')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='HexBinaryElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='HexBinaryElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:hexBinary')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='HexBinaryElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="HexBinaryAttribute" pattern="HexBinaryAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:hexBinary')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='HexBinaryAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='HexBinaryAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:hexBinary')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='HexBinaryAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="Base64BinaryElement" pattern="Base64BinaryElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:base64Binary')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='Base64BinaryElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='Base64BinaryElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:base64Binary')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='Base64BinaryElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="Base64BinaryAttribute" pattern="Base64BinaryAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:base64Binary')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='Base64BinaryAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='Base64BinaryAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:base64Binary')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='Base64BinaryAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="AnyURIElement" pattern="AnyURIElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:anyURI')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AnyURIElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AnyURIElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:anyURI')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AnyURIElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="AnyURIAttribute" pattern="AnyURIAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:anyURI')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AnyURIAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AnyURIAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:anyURI')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AnyURIAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="QNameElement" pattern="QNameElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:QName')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='QNameElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='QNameElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:QName')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='QNameElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="QNameAttribute" pattern="QNameAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:QName')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='QNameAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='QNameAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:QName')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='QNameAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NormalizedStringElement" pattern="NormalizedStringElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:normalizedString')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NormalizedStringElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NormalizedStringElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:normalizedString')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NormalizedStringElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NormalizedStringAttribute" pattern="NormalizedStringAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:normalizedString')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NormalizedStringAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NormalizedStringAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:normalizedString')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NormalizedStringAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="TokenElement" pattern="TokenElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:token')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='TokenElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='TokenElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:token')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='TokenElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="TokenAttribute" pattern="TokenAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:token')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='TokenAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='TokenAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:token')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='TokenAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="LanguageElement" pattern="LanguageElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:language')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='LanguageElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='LanguageElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:language')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='LanguageElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="LanguageAttribute" pattern="LanguageAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:language')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='LanguageAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='LanguageAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:language')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='LanguageAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NMTOKENElement" pattern="NMTOKENElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:NMTOKEN')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NMTOKENElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NMTOKENElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:NMTOKEN')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NMTOKENElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NMTOKENAttribute" pattern="NMTOKENAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:NMTOKEN')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NMTOKENAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NMTOKENAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:NMTOKEN')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NMTOKENAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NMTOKENSElement" pattern="NMTOKENSElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:NMTOKENS')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NMTOKENSElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NMTOKENSElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:NMTOKENS')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NMTOKENSElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NMTOKENSAttribute" pattern="NMTOKENSAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:NMTOKENS')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NMTOKENSAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NMTOKENSAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:NMTOKENS')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NMTOKENSAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NameElement" pattern="NameElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:Name')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NameElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NameElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:Name')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NameElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NameAttribute" pattern="NameAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:Name')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NameAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NameAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:Name')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NameAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NCNameElement" pattern="NCNameElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:NCName')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NCNameElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NCNameElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:NCName')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NCNameElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NCNameAttribute" pattern="NCNameAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:NCName')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NCNameAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NCNameAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:NCName')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NCNameAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="IDElement" pattern="IDElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:ID')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='IDElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='IDElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:ID')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='IDElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="IDAttribute" pattern="IDAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:ID')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='IDAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='IDAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:ID')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='IDAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="IDREFElement" pattern="IDREFElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:IDREF')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='IDREFElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='IDREFElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:IDREF')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='IDREFElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="IDREFAttribute" pattern="IDREFAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:IDREF')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='IDREFAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='IDREFAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:IDREF')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='IDREFAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="IDREFSElement" pattern="IDREFSElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:IDREFS')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='IDREFSElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='IDREFSElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:IDREFS')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='IDREFSElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="IDREFSAttribute" pattern="IDREFSAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:IDREFS')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='IDREFSAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='IDREFSAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:IDREFS')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='IDREFSAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ENTITYElement" pattern="ENTITYElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:ENTITY')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ENTITYElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ENTITYElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:ENTITY')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ENTITYElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ENTITYAttribute" pattern="ENTITYAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:ENTITY')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ENTITYAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ENTITYAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:ENTITY')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ENTITYAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ENTITIESElement" pattern="ENTITIESElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:ENTITIES')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ENTITIESElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ENTITIESElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:ENTITIES')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ENTITIESElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ENTITIESAttribute" pattern="ENTITIESAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:ENTITIES')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ENTITIESAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ENTITIESAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:ENTITIES')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ENTITIESAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="IntegerElement" pattern="IntegerElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:integer')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='IntegerElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='IntegerElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:integer')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='IntegerElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="IntegerAttribute" pattern="IntegerAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:integer')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='IntegerAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='IntegerAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:integer')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='IntegerAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NonPositiveIntegerElement" pattern="NonPositiveIntegerElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:nonPositiveInteger')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NonPositiveIntegerElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NonPositiveIntegerElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:nonPositiveInteger')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NonPositiveIntegerElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NonPositiveIntegerAttribute" pattern="NonPositiveIntegerAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:nonPositiveInteger')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NonPositiveIntegerAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NonPositiveIntegerAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:nonPositiveInteger')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NonPositiveIntegerAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NegativeIntegerElement" pattern="NegativeIntegerElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:negativeInteger')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NegativeIntegerElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NegativeIntegerElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:negativeInteger')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NegativeIntegerElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NegativeIntegerAttribute" pattern="NegativeIntegerAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:negativeInteger')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NegativeIntegerAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NegativeIntegerAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:negativeInteger')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NegativeIntegerAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="LongElement" pattern="LongElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:long')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='LongElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='LongElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:long')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='LongElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="LongAttribute" pattern="LongAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:long')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='LongAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='LongAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:long')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='LongAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="IntElement" pattern="IntElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:int')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='IntElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='IntElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:int')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='IntElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="IntAttribute" pattern="IntAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:int')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='IntAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='IntAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:int')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='IntAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ShortElement" pattern="ShortElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:short')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ShortElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ShortElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:short')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ShortElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ShortAttribute" pattern="ShortAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:short')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ShortAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ShortAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:short')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ShortAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ByteElement" pattern="ByteElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:byte')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ByteElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ByteElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:byte')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ByteElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ByteAttribute" pattern="ByteAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:byte')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ByteAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ByteAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:byte')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ByteAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NonNegativeIntegerElement" pattern="NonNegativeIntegerElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:nonNegativeInteger')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NonNegativeIntegerElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NonNegativeIntegerElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:nonNegativeInteger')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NonNegativeIntegerElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="NonNegativeIntegerAttribute" pattern="NonNegativeIntegerAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:nonNegativeInteger')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NonNegativeIntegerAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NonNegativeIntegerAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:nonNegativeInteger')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NonNegativeIntegerAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="UnsignedLongElement" pattern="UnsignedLongElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:unsignedLong')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='UnsignedLongElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='UnsignedLongElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:unsignedLong')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='UnsignedLongElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="UnsignedLongAttribute" pattern="UnsignedLongAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:unsignedLong')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='UnsignedLongAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='UnsignedLongAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:unsignedLong')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='UnsignedLongAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="UnsignedIntElement" pattern="UnsignedIntElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:unsignedInt')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='UnsignedIntElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='UnsignedIntElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:unsignedInt')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='UnsignedIntElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="UnsignedIntAttribute" pattern="UnsignedIntAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:unsignedInt')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='UnsignedIntAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='UnsignedIntAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:unsignedInt')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='UnsignedIntAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="UnsignedShortElement" pattern="UnsignedShortElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:unsignedShort')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='UnsignedShortElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='UnsignedShortElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:unsignedShort')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='UnsignedShortElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="UnsignedShortAttribute" pattern="UnsignedShortAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:unsignedShort')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='UnsignedShortAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='UnsignedShortAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:unsignedShort')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='UnsignedShortAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="UnsignedByteElement" pattern="UnsignedByteElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:unsignedByte')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='UnsignedByteElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='UnsignedByteElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:unsignedByte')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='UnsignedByteElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="UnsignedByteAttribute" pattern="UnsignedByteAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:unsignedByte')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='UnsignedByteAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='UnsignedByteAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:unsignedByte')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='UnsignedByteAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="PositiveIntegerElement" pattern="PositiveIntegerElement">
        <pat:xpath>.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:positiveInteger')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='PositiveIntegerElement']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='PositiveIntegerElement']/ex:typedef/.//xs:element/@type[resolve-QName(.,..) = xs:QName('xs:positiveInteger')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='PositiveIntegerElement']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="PositiveIntegerAttribute" pattern="PositiveIntegerAttribute">
        <pat:xpath>.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:positiveInteger')]</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='PositiveIntegerAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='PositiveIntegerAttribute']/ex:typedef/.//xs:attribute/@type[resolve-QName(.,..) = xs:QName('xs:positiveInteger')]"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='PositiveIntegerAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='StringSimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='StringSimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:string')]/xs:pattern[@value]/&#10;&#9;&#9;(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='StringSimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='IntSimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='IntSimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:int')]/xs:pattern[@value]/&#10;&#9;&#9;(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='IntSimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='IntegerSimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='IntegerSimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:integer')]/xs:pattern[@value]/&#10;&#9;&#9;(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='IntegerSimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='LongSimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='LongSimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:long')]/xs:pattern[@value]/&#10;&#9;&#9;(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='LongSimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='DecimalSimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='DecimalSimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:decimal')]/xs:pattern[@value]/&#10;&#9;&#9;(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='DecimalSimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='FloatSimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='FloatSimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:float')]/xs:pattern[@value]/&#10;&#9;&#9;(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='FloatSimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='DoubleSimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='DoubleSimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:double')]/xs:pattern[@value]/&#10;&#9;&#9;(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='DoubleSimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ShortSimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ShortSimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:short')]/xs:pattern[@value]/&#10;&#9;&#9;(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ShortSimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ByteSimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ByteSimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:byte')]/xs:pattern[@value]/&#10;         (.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ByteSimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='NonNegativeIntegerSimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='NonNegativeIntegerSimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:nonNegativeInteger')]/xs:pattern[@value]/&#10;&#9;&#9;(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='NonNegativeIntegerSimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='PositiveIntegerSimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='PositiveIntegerSimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:positiveInteger')]/xs:pattern[@value]/&#10;&#9;&#9;(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='PositiveIntegerSimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='UnsignedLongSimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='UnsignedLongSimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:unsignedLong')]/xs:pattern[@value]/&#10;&#9;&#9;(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='UnsignedLongSimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='UnsignedIntSimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='UnsignedIntSimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:unsignedInt')]/xs:pattern[@value]/&#10;&#9;&#9;(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='UnsignedIntSimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='UnsignedShortSimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='UnsignedShortSimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:unsignedShort')]/xs:pattern[@value]/&#10;&#9;&#9;(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='UnsignedShortSimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='DateSimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='DateSimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:date')]/xs:pattern[@value]/&#10;         (.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='DateSimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GYearSimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GYearSimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:gYear')]/xs:pattern[@value]/&#10;&#9;&#9;(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GYearSimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GMonthSimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GMonthSimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:gMonth')]/xs:pattern[@value]/&#10;&#9;&#9;(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GMonthSimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GDaySimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GDaySimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:gDay')]/xs:pattern[@value]/&#10;&#9;&#9;(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GDaySimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GYearMonthSimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GYearMonthSimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:gYearMonth')]/xs:pattern[@value]/&#10;&#9;&#9;(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GYearMonthSimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GMonthDaySimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GMonthDaySimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:gMonthDay')]/xs:pattern[@value]/&#10;&#9;&#9;(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GMonthDaySimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='TokenSimpleTypePattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='TokenSimpleTypePattern']/ex:typedef/.//xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:token')]/xs:pattern[@value]/&#10;         (.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='TokenSimpleTypePattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='RestrictedStringMinLength']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='RestrictedStringMinLength']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:string')]/xs:minLength[@value]/&#10;&#9;&#9;(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='RestrictedStringMinLength']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='RestrictedStringMaxLength']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='RestrictedStringMaxLength']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:string')]/xs:maxLength[@value]/&#10;&#9;&#9;(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='RestrictedStringMaxLength']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='RestrictedStringMinMaxLength']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='RestrictedStringMinMaxLength']/ex:typedef/&#10;&#9;.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:string') &#10;&#9;&#9;and xs:minLength/@value&#10;&#9;&#9;and xs:maxLength/@value]/&#10;&#9;&#9;(., @base, xs:minLength/(., @value), xs:maxLength/(., @value))&#10;&#9;"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='RestrictedStringMinMaxLength']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="SimpleTypeRenamed" pattern="SimpleTypeRenamed">
        <pat:xpath>.//xs:simpleType/xs:restriction[@base and count(./*) = 0]/
		(., @base)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SimpleTypeRenamed']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SimpleTypeRenamed']/ex:typedef/.//xs:simpleType/xs:restriction[@base and count(./*) = 0]/&#10;&#9;&#9;(., @base)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SimpleTypeRenamed']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="RestrictedMinInclusive" pattern="RestrictedMinInclusive">
        <pat:xpath>.//xs:simpleType/xs:restriction/xs:minInclusive[@value]/(.., ../@base, ., @value)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='RestrictedMinInclusive']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='RestrictedMinInclusive']/ex:typedef/.//xs:simpleType/xs:restriction/xs:minInclusive[@value]/(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='RestrictedMinInclusive']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="RestrictedMaxInclusive" pattern="RestrictedMaxInclusive">
        <pat:xpath>.//xs:simpleType/xs:restriction/xs:maxInclusive[@value]/(.., ../@base, ., @value)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='RestrictedMaxInclusive']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='RestrictedMaxInclusive']/ex:typedef/.//xs:simpleType/xs:restriction/xs:maxInclusive[@value]/(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='RestrictedMaxInclusive']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="RestrictedMinExclusive" pattern="RestrictedMinExclusive">
        <pat:xpath>.//xs:simpleType/xs:restriction/xs:minExclusive[@value]/(.., ../@base, ., @value)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='RestrictedMinExclusive']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='RestrictedMinExclusive']/ex:typedef/.//xs:simpleType/xs:restriction/xs:minExclusive[@value]/(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='RestrictedMinExclusive']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="RestrictedMaxExclusive" pattern="RestrictedMaxExclusive">
        <pat:xpath>.//xs:simpleType/xs:restriction/xs:maxExclusive[@value]/(.., ../@base, ., @value)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='RestrictedMaxExclusive']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='RestrictedMaxExclusive']/ex:typedef/.//xs:simpleType/xs:restriction/xs:maxExclusive[@value]/(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='RestrictedMaxExclusive']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="RestrictedLength" pattern="RestrictedLength">
        <pat:xpath>.//xs:simpleType/xs:restriction/xs:length[@value]/(.., ../@base, ., @value)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='RestrictedLength']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='RestrictedLength']/ex:typedef/.//xs:simpleType/xs:restriction/xs:length[@value]/(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='RestrictedLength']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="RestrictedMaxLength" pattern="RestrictedMaxLength">
        <pat:xpath>.//xs:simpleType/xs:restriction/xs:maxLength[@value]/(.., ../@base, ., @value)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='RestrictedMaxLength']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='RestrictedMaxLength']/ex:typedef/.//xs:simpleType/xs:restriction/xs:maxLength[@value]/(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='RestrictedMaxLength']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="RestrictedMinLength" pattern="RestrictedMinLength">
        <pat:xpath>.//xs:simpleType/xs:restriction/xs:minLength[@value]/(.., ../@base, ., @value)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='RestrictedMinLength']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='RestrictedMinLength']/ex:typedef/.//xs:simpleType/xs:restriction/xs:minLength[@value]/(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='RestrictedMinLength']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexTypeAttributeExtension']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexTypeAttributeExtension']/ex:typedef/.//xs:complexType/xs:complexContent[xs:extension[@base]/xs:attribute]/&#10;&#9;&#9;(., xs:extension/(., @base, xs:attribute/(., @name)))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexTypeAttributeExtension']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexTypeSequenceExtension']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexTypeSequenceExtension']/ex:typedef/.//xs:complexType/xs:complexContent[xs:extension[@base]/xs:sequence]/&#10;&#9;&#9;(., xs:extension/&#10;&#9;&#9;(., @base, xs:sequence/(., xs:element/(., @name))))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexTypeSequenceExtension']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalElementComplexTypeSequenceExtension']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalElementComplexTypeSequenceExtension']/ex:typedef/./xs:element[@name]/xs:complexType/xs:complexContent[xs:extension[@base]/xs:sequence]/&#10;&#9;&#9;(../../(., @name), &#10;&#9;&#9;.., ., &#10;&#9;&#9;xs:extension/(., @base, &#10;&#9;&#9;xs:sequence/(., xs:element/(., @name), &#10;&#9;&#9;xs:attribute/(., @name))))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalElementComplexTypeSequenceExtension']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalElementComplexTypeEmptyExtension']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalElementComplexTypeEmptyExtension']/ex:typedef/./xs:element[@name]/xs:complexType/xs:complexContent[xs:extension[@base]/not(*)]/&#10;&#9;&#9;(../../(., @name), .., ., xs:extension/(., @base))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalElementComplexTypeEmptyExtension']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalComplexTypeEmptyExtension']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalComplexTypeEmptyExtension']/ex:typedef/./xs:complexType[@name]/xs:complexContent[xs:extension[@base]/not(*)]/&#10;&#9;&#9;(../../(., @name), .., ., xs:extension/(., @base))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalComplexTypeEmptyExtension']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='PrecisionDecimal']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='PrecisionDecimal']/ex:typedef/.//xs:simpleType/xs:union[&#10;&#9;    xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:decimal')]/xs:totalDigits[@value ='16']&#10;&#9;    and xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:double')]&#10;&#9;    and xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:string') &#10;&#9;&#9;    and xs:enumeration/@value='NaN' and xs:enumeration/@value='-INF' and not(xs:enumeration[3])]&#10;&#9;    and not(xs:simpleType[4] | xs:simpleType[@*])&#10;&#9;]/(., xs:simpleType/(., xs:restriction/(., @base, xs:totalDigits/(., @value), xs:enumeration/(., @value))))&#10;      "/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='PrecisionDecimal']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="LocalElementSimpleType" pattern="LocalElementSimpleType">
        <pat:xpath>.//xs:element[not(parent::xs:schema)]/xs:simpleType</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='LocalElementSimpleType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='LocalElementSimpleType']/ex:typedef/.//xs:element[not(parent::xs:schema)]/xs:simpleType"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='LocalElementSimpleType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="LocalElementComplexType" pattern="LocalElementComplexType">
        <pat:xpath>.//xs:element[not(parent::xs:schema)]/xs:complexType</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='LocalElementComplexType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='LocalElementComplexType']/ex:typedef/.//xs:element[not(parent::xs:schema)]/xs:complexType"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='LocalElementComplexType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ChoiceMaxOccursUnbounded" pattern="ChoiceMaxOccursUnbounded">
        <pat:xpath>.//xs:choice[@maxOccurs = 'unbounded']/
		(@maxOccurs) </pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ChoiceMaxOccursUnbounded']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ChoiceMaxOccursUnbounded']/ex:typedef/.//xs:choice[@maxOccurs = 'unbounded']/&#10;&#9;&#9;(@maxOccurs) "/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ChoiceMaxOccursUnbounded']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ChoiceMaxOccursFinite']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ChoiceMaxOccursFinite']/ex:typedef/.//xs:choice[@maxOccurs and not(@maxOccurs = '0' or @maxOccurs = '1' or @maxOccurs = 'unbounded')]/&#10;         (@maxOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ChoiceMaxOccursFinite']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ChoiceMinOccurs0" pattern="ChoiceMinOccurs0">
        <pat:xpath>.//xs:choice[@minOccurs='0']/
         (@minOccurs) </pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ChoiceMinOccurs0']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ChoiceMinOccurs0']/ex:typedef/.//xs:choice[@minOccurs='0']/&#10;         (@minOccurs) "/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ChoiceMinOccurs0']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ChoiceMinOccursFinite']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ChoiceMinOccursFinite']/ex:typedef/.//xs:choice[@minOccurs and not(@minOccurs = '0' or @minOccurs = '1')]/&#10;         (@minOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ChoiceMinOccursFinite']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="LocalAttributeSimpleType" pattern="LocalAttributeSimpleType">
        <pat:xpath>.//xs:attribute[not(parent::xs:schema)]/xs:simpleType</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='LocalAttributeSimpleType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='LocalAttributeSimpleType']/ex:typedef/.//xs:attribute[not(parent::xs:schema)]/xs:simpleType"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='LocalAttributeSimpleType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SOAPEncodedArray']/ex:types"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SOAPEncodedArray']/ex:types//xs:schema/./xs:complexType[@name]/xs:complexContent/xs:restriction[&#10;&#9;    @base/resolve-QName(.,..) = xs:QName('soap11enc:Array')]/&#10;&#9;    xs:attribute[(@ref/resolve-QName(.,..) = xs:QName('soap11enc:arrayType')) &#10;&#9;    and @wsdl11:arrayType]/&#10;&#9;    (../.., ../(., @base), ., @ref, @wsdl11:arrayType)"/>
          </axsl:call-template>
        </ex:types>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SOAPEncodedArray']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='DecimalSimpleTypeTotalDigits']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='DecimalSimpleTypeTotalDigits']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:decimal') and xs:totalDigits/@value]/&#10;&#9;    (., @base, xs:totalDigits/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='DecimalSimpleTypeTotalDigits']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='DecimalSimpleTypeFractionDigits']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='DecimalSimpleTypeFractionDigits']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:decimal') and xs:fractionDigits/@value]/&#10;         (., @base, xs:fractionDigits/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='DecimalSimpleTypeFractionDigits']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="AttributeGroup" pattern="AttributeGroup">
        <pat:xpath>.//xs:attributeGroup/(.,@name,@ref,xs:attribute)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AttributeGroup']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AttributeGroup']/ex:typedef/.//xs:attributeGroup/(.,@name,@ref,xs:attribute)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AttributeGroup']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="SubstitutionGroup" pattern="SubstitutionGroup">
        <pat:xpath>.//xs:element[@substitutionGroup]/(.,@name,@substitutionGroup)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SubstitutionGroup']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SubstitutionGroup']/ex:typedef/.//xs:element[@substitutionGroup]/(.,@name,@substitutionGroup)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SubstitutionGroup']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="GlobalElementComplexType" pattern="GlobalElementComplexType">
        <pat:xpath>.//xs:element[parent::xs:schema]/xs:complexType / (.,..)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalElementComplexType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalElementComplexType']/ex:typedef/.//xs:element[parent::xs:schema]/xs:complexType / (.,..)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalElementComplexType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="RestrictedPattern" pattern="RestrictedPattern">
        <pat:xpath>.//xs:simpleType/xs:restriction/xs:pattern[@value]/(.., ../@base, ., @value)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='RestrictedPattern']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='RestrictedPattern']/ex:typedef/.//xs:simpleType/xs:restriction/xs:pattern[@value]/(.., ../@base, ., @value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='RestrictedPattern']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='RestrictedSimpleContent']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='RestrictedSimpleContent']/ex:typedef/.//xs:complexType/xs:simpleContent/xs:restriction[@base]/(.., ., @base, child::*, child::*/@value)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='RestrictedSimpleContent']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="AttributeProhibited" pattern="AttributeProhibited">
        <pat:xpath>.//xs:attribute[@use = 'prohibited']/ 
         (@use)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AttributeProhibited']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AttributeProhibited']/ex:typedef/.//xs:attribute[@use = 'prohibited']/ &#10;         (@use)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AttributeProhibited']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ExtendedSequenceNamespacedFinite']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ExtendedSequenceNamespacedFinite']/ex:typedef/.//xs:sequence/xs:any[@processContents&#10;         and @namespace&#10;         and @maxOccurs&#10;         and (not (@minOccurs) or @minOccurs = '1' or @minOccurs = '0')&#10;         and (not (@maxOccurs = '1') )&#10;         and (not (@maxOccurs='unbounded'))&#10;         and (not (@namespace = '##targetNamespace'))&#10;         and (not (@namespace = '##any'))&#10;         and (not (@namespace = '##local'))&#10;         and (not (@namespace = '##other'))]/&#10;         (., @processContents, @minOccurs, @maxOccurs, @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ExtendedSequenceNamespacedFinite']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexTypeChoiceExtension']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexTypeChoiceExtension']/ex:typedef/.//xs:complexType/xs:complexContent[xs:extension[@base]/xs:choice]/&#10;         (., xs:extension/&#10;         (., @base, xs:choice/(., xs:element/(., @name))))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexTypeChoiceExtension']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexTypeAttributeGroupExtension']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexTypeAttributeGroupExtension']/ex:typedef/.//xs:complexType/xs:complexContent[xs:extension[@base]/xs:attributeGroup]/&#10;         (., xs:extension/&#10;         (., @base, xs:attributeGroup))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexTypeAttributeGroupExtension']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='RestrictedWhitespacePreserve']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='RestrictedWhitespacePreserve']/ex:typedef/.//xs:simpleType/xs:restriction/xs:whiteSpace[@value='preserve']/(.., ../@base, ., @value, @fixed)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='RestrictedWhitespacePreserve']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='RestrictedWhitespaceCollapse']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='RestrictedWhitespaceCollapse']/ex:typedef/.//xs:simpleType/xs:restriction/xs:whiteSpace[@value='collapse']/(.., ../@base, ., @value, @fixed)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='RestrictedWhitespaceCollapse']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='RestrictedWhitespaceReplace']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='RestrictedWhitespaceReplace']/ex:typedef/.//xs:simpleType/xs:restriction/xs:whiteSpace[@value='replace']/(.., ../@base, ., @value, @fixed)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='RestrictedWhitespaceReplace']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="XmlLang" pattern="XmlLang">
        <pat:xpath>.[@xml:lang] / (@xml:lang)</pat:xpath>
        <ex:types>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='XmlLang']/ex:types"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='XmlLang']/ex:types//xs:schema/.[@xml:lang] / (@xml:lang)"/>
          </axsl:call-template>
        </ex:types>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='XmlLang']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="Redefine" pattern="Redefine">
        <pat:xpath>.//xs:redefine[@schemaLocation] / (., @schemaLocation, child::*, child::*/@name, child::*/@base)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='Redefine']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='Redefine']/ex:typedef/.//xs:redefine[@schemaLocation] / (., @schemaLocation, child::*, child::*/@name, child::*/@base)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='Redefine']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementGroup']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementGroup']/ex:typedef/.//xs:group/(.,@name,@ref,@minOccurs,@maxOccurs,xs:sequence,xs:all,xs:choice)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementGroup']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexTypeAttributeRestriction']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexTypeAttributeRestriction']/ex:typedef/.//xs:complexType/xs:complexContent[xs:restriction[@base]/xs:attribute]/&#10;         (., xs:restriction/(., @base, xs:attribute/(., @name)))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexTypeAttributeRestriction']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexTypeSequenceRestriction']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexTypeSequenceRestriction']/ex:typedef/.//xs:complexType/xs:complexContent[xs:restriction[@base]/xs:sequence]/&#10;         (., xs:restriction/(., @base, xs:sequence))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexTypeSequenceRestriction']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='Unique']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='Unique']/ex:typedef/.//xs:element/xs:unique/(.., .,xs:selector,xs:selector/@xpath,xs:field,xs:field/@xpath)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='Unique']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='LocalElementComplexTypeEmptyExtension']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='LocalElementComplexTypeEmptyExtension']/ex:typedef/.//xs:element[not(parent::xs:schema)]/xs:complexType[not(@name)]/xs:complexContent[xs:extension[@base]/not(*)]/&#10;         (../../(., @name), .., ., xs:extension/(., @base))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='LocalElementComplexTypeEmptyExtension']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="SequenceSequenceGroup" pattern="SequenceSequenceGroup">
        <pat:xpath>.//xs:sequence/xs:sequence/xs:group/(., ..)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SequenceSequenceGroup']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SequenceSequenceGroup']/ex:typedef/.//xs:sequence/xs:sequence/xs:group/(., ..)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SequenceSequenceGroup']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='GlobalAttributeSimpleType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='GlobalAttributeSimpleType']/ex:typedef/./xs:attribute/xs:simpleType/(../(., @name), .., ., descendant::*, descendant::*/@value, descendant::*/@base)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='GlobalAttributeSimpleType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementDefaultAnyType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementDefaultAnyType']/ex:typedef/.//xs:element[@name and not(@type) and ./not(xs:simpleType or xs:complexType or xs:unique or xs:key or xs:keyref)]/(.)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementDefaultAnyType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexContentRestrictionAnyAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexContentRestrictionAnyAttribute']/ex:typedef/.//xs:complexType/xs:complexContent/xs:restriction/xs:anyAttribute/(., @namespace, @processContents)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexContentRestrictionAnyAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexContentExtensionAnyAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexContentExtensionAnyAttribute']/ex:typedef/.//xs:complexType/xs:complexContent/xs:extension/xs:anyAttribute/(., @namespace, @processContents)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexContentExtensionAnyAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexTypeChoiceAny']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexTypeChoiceAny']/ex:typedef/.//xs:complexType/xs:choice/xs:any/(., @namespace, @processContents, @maxOccurs, @minOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexTypeChoiceAny']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="ComplexTypeFinal" pattern="ComplexTypeFinal">
        <pat:xpath>.//xs:complexType[@final]/(., @final)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexTypeFinal']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexTypeFinal']/ex:typedef/.//xs:complexType[@final]/(., @final)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexTypeFinal']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexTypeExtensionAnnotationOnly']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexTypeExtensionAnnotationOnly']/ex:typedef/.//xs:complexType/xs:complexContent/xs:extension[@base]/xs:annotation[not(preceding-sibling::*) and not(following-sibling::*)]/&#10;         (../(., @base), ../../(.))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexTypeExtensionAnnotationOnly']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ComplexTypeSequenceChoiceAny']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ComplexTypeSequenceChoiceAny']/ex:typedef/.//xs:complexType/xs:sequence/xs:choice/xs:any/(., @namespace, @processContents, @maxOccurs, @minOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ComplexTypeSequenceChoiceAny']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='QNameEnumerationType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='QNameEnumerationType']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:QName') and xs:enumeration]/&#10;         (., @base, xs:enumeration/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='QNameEnumerationType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AnyURIEnumerationType']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AnyURIEnumerationType']/ex:typedef/.//xs:simpleType/xs:restriction[@base/resolve-QName(.,..) = xs:QName('xs:anyURI') and xs:enumeration]/&#10;         (., @base, xs:enumeration/(., @value))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AnyURIEnumerationType']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SimpleContentAnyAttributeSkip']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SimpleContentAnyAttributeSkip']/ex:typedef/.//xs:complexType/xs:simpleContent/xs:extension/xs:anyAttribute[(@processContents = 'skip')]/&#10;            (., @processContents)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SimpleContentAnyAttributeSkip']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SimpleContentAnyAttributeLax']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SimpleContentAnyAttributeLax']/ex:typedef/.//xs:complexType/xs:simpleContent/xs:extension/xs:anyAttribute[(@processContents = 'lax')&#10;         and (@namespace = '##other')]/&#10;         (., @processContents, @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SimpleContentAnyAttributeLax']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='SimpleContentAnyAttributeStrict']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='SimpleContentAnyAttributeStrict']/ex:typedef/.//xs:complexType/xs:simpleContent/xs:extension/xs:anyAttribute[not(@processContents) or (@processContents = 'strict')&#10;         and (@namespace = '##other')]/&#10;         (., @processContents, @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='SimpleContentAnyAttributeStrict']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AnyAttributeNamespacedFinite']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AnyAttributeNamespacedFinite']/ex:typedef/.//xs:complexType/xs:anyAttribute[@processContents&#10;         and @namespace&#10;         and (not (@namespace = '##targetNamespace'))&#10;         and (not (@namespace = '##any'))&#10;         and (not (@namespace = '##local'))&#10;         and (not (@namespace = '##other'))]/&#10;         (., @processContents, @namespace)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AnyAttributeNamespacedFinite']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="AttributeGroupAnyAttribute" pattern="AttributeGroupAnyAttribute">
        <pat:xpath>.//xs:attributeGroup/xs:anyAttribute/(.,@namespace,@processContents)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='AttributeGroupAnyAttribute']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='AttributeGroupAnyAttribute']/ex:typedef/.//xs:attributeGroup/xs:anyAttribute/(.,@namespace,@processContents)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='AttributeGroupAnyAttribute']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </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>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='ElementKey']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='ElementKey']/ex:typedef/.//xs:element/xs:key[xs:selector and xs:field]/(., xs:selector, xs:selector/(@xpath), xs:field, xs:field/(@xpath))"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='ElementKey']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
      <ex:example xml:id="MaxOccurs0" pattern="MaxOccurs0">
        <pat:xpath>.//xs:element[@maxOccurs='0']/(., @maxOccurs, @minOccurs)</pat:xpath>
        <ex:typedef>
          <axsl:call-template name="example-to-string">
            <axsl:with-param name="node-set" select="ex:examples/ex:example[@xml:id='MaxOccurs0']/ex:typedef"/>
            <axsl:with-param name="flag-nodes" select="ex:examples/ex:example[@xml:id='MaxOccurs0']/ex:typedef/.//xs:element[@maxOccurs='0']/(., @maxOccurs, @minOccurs)"/>
          </axsl:call-template>
        </ex:typedef>
        <axsl:for-each select="ex:examples/ex:example[@xml:id='MaxOccurs0']/ex:instance">
          <axsl:copy-of select="."/>
        </axsl:for-each>
      </ex:example>
    </ex:examples>
  </axsl:template>
</axsl:stylesheet>

