<?xml version='1.0'?>
<!-- XML Schema schema for XML Schemas: Part 2: Datatypes -->
<!-- Note this schema is NOT the normative datatypes schema - - the
     prose copy in the datatypes REC is the normative version (which
     shouldn't differ from this one except for this comment and entity
     expansions, but just in case -->
<!DOCTYPE schema PUBLIC "-//W3C//DTD XMLSCHEMA 200010//EN" "XMLSchema.dtd" [
<!--
     keep this schema XML1.0 DTD valid
  -->
        <!ENTITY % elementAttrs 'xmlns:x CDATA #IMPLIED'>
        <!ENTITY % schemaAttrs 'xmlns:hfp CDATA #IMPLIED'>

        <!ELEMENT hfp:hasFacet EMPTY>
        <!ATTLIST hfp:hasFacet
                name NMTOKEN #REQUIRED
                >
        <!ELEMENT hfp:hasProperty EMPTY>
        <!ATTLIST hfp:hasProperty
                name NMTOKEN #REQUIRED
                value CDATA #REQUIRED
                >
        ]>
<schema xmlns="http://www.w3.org/2000/10/XMLSchema" targetNamespace="http://www.w3.org/2000/10/XMLSchema" version="$Id: datatypes.xsd,v 1.24 2000/09/22 22:02:28 ht Exp $" xmlns:hfp="http://www.w3.org/2000/10/XMLSchema-hasFacetAndProperty">

 <annotation>
   <documentation source="http://www.w3.org/TR/2000/WD-xmlschema-1-20000922/datatypes.html">
   The schema corresponding to this document is normative,
   with respect to the syntactic constraints it expresses in the
   XML Schema language.  The documentation (within &lt;documentation> elements)
   below, is not normative, but rather highlights important aspects of
   the W3C Recommendation of which this is a part</documentation>
 </annotation>

        <import namespace="http://www.w3.org/XML/1998/namespace"
                schemaLocation="http://www.w3.org/2000/10/xml.xsd">
                <annotation>
                        <documentation>
                                Get access to the xml: attribute groups for xml:lang
                        </documentation>
                </annotation>
        </import>

        <annotation>
                <documentation>
                        First the builtin primitive datatypes.  These definitions are for
                        information only, the real builtin definitions are magic.  Note in
                        particular that there is no type named 'anySimpleType'.  The
                        primitives should really be derived from no type at all, and
                        anySimpleType should be derived as a union of all the primitives.
                </documentation>
        </annotation>
 
        <simpleType name="string">
                <annotation>
                        <appinfo>
                                <hfp:hasFacet name="length"/>
                                <hfp:hasFacet name="minLength"/>
                                <hfp:hasFacet name="maxLength"/>
                                <hfp:hasFacet name="pattern"/>
                                <hfp:hasFacet name="enumeration"/>
                                <hfp:hasProperty name="ordered" value="false"/>
                                <hfp:hasProperty name="bounded" value="false"/>
                                <hfp:hasProperty name="cardinality" value="countably infinite"/>
                                <hfp:hasProperty name="numeric" value="false"/>
                        </appinfo>
                </annotation>
                <restriction base="anySimpleType"/>
        </simpleType>

        <simpleType name="boolean">
                <annotation>
                        <appinfo>
                                <hfp:hasFacet name="pattern"/>
                                <hfp:hasProperty name="ordered" value="false"/>
                                <hfp:hasProperty name="bounded" value="false"/>
                                <hfp:hasProperty name="cardinality" value="finite"/>
                                <hfp:hasProperty name="numeric" value="false"/>
                        </appinfo>
                </annotation>
                <restriction base="anySimpleType"/>
        </simpleType>

        <simpleType name="float">
                <annotation>
                        <appinfo>
                                <hfp:hasFacet name="pattern"/>
                                <hfp:hasFacet name="enumeration"/>
                                <hfp:hasFacet name="maxInclusive"/>
                                <hfp:hasFacet name="maxExclusive"/>
                                <hfp:hasFacet name="minInclusive"/>
                                <hfp:hasFacet name="minExclusive"/>
                                <hfp:hasProperty name="ordered" value="true"/>
                                <hfp:hasProperty name="bounded" value="true"/>
                                <hfp:hasProperty name="cardinality" value="finite"/>
                                <hfp:hasProperty name="numeric" value="true"/>
                        </appinfo>
                </annotation>
                <restriction base="anySimpleType"/>
         </simpleType>

         <simpleType name="double">
                <annotation>
                        <appinfo>
                                <hfp:hasFacet name="pattern"/>
                                <hfp:hasFacet name="enumeration"/>
                                <hfp:hasFacet name="maxInclusive"/>
                                <hfp:hasFacet name="maxExclusive"/>
                                <hfp:hasFacet name="minInclusive"/>
                                <hfp:hasFacet name="minExclusive"/>
                                <hfp:hasProperty name="ordered" value="true"/>
                                <hfp:hasProperty name="bounded" value="true"/>
                                <hfp:hasProperty name="cardinality" value="finite"/>
                                <hfp:hasProperty name="numeric" value="true"/>
                        </appinfo>
                </annotation>
                <restriction base="anySimpleType"/>
         </simpleType>

         <simpleType name="decimal">
                <annotation>
                        <appinfo>
                                <hfp:hasFacet name="precision"/>
                                <hfp:hasFacet name="scale"/>
                                <hfp:hasFacet name="pattern"/>
                                <hfp:hasFacet name="enumeration"/>
                                <hfp:hasFacet name="maxInclusive"/>
                                <hfp:hasFacet name="maxExclusive"/>
                                <hfp:hasFacet name="minInclusive"/>
                                <hfp:hasFacet name="minExclusive"/>
                                <hfp:hasProperty name="ordered" value="true"/>
                                <hfp:hasProperty name="bounded" value="false"/>
                                <hfp:hasProperty name="cardinality" value="countably infinite"/>
                                <hfp:hasProperty name="numeric" value="true"/>
                        </appinfo>
                </annotation>
                <restriction base="anySimpleType"/>
         </simpleType>

         <simpleType name="timeDuration">
                <annotation>
                        <appinfo>
                                <hfp:hasFacet name="pattern"/>
                                <hfp:hasFacet name="enumeration"/>
                                <hfp:hasFacet name="maxInclusive"/>
                                <hfp:hasFacet name="maxExclusive"/>
                                <hfp:hasFacet name="minInclusive"/>
                                <hfp:hasFacet name="minExclusive"/>
                                <hfp:hasProperty name="ordered" value="true"/>
                                <hfp:hasProperty name="bounded" value="false"/>
                                <hfp:hasProperty name="cardinality" value="countably infinite"/>
                                <hfp:hasProperty name="numeric" value="false"/>
                        </appinfo>
                </annotation>
                <restriction base="anySimpleType"/>
         </simpleType>

         <simpleType name="recurringDuration">
                <annotation>
                        <appinfo>
                                <hfp:hasFacet name="duration"/>
                                <hfp:hasFacet name="period"/>
                                <hfp:hasFacet name="pattern"/>
                                <hfp:hasFacet name="enumeration"/>
                                <hfp:hasFacet name="maxInclusive"/>
                                <hfp:hasFacet name="maxExclusive"/>
                                <hfp:hasFacet name="minInclusive"/>
                                <hfp:hasFacet name="minExclusive"/>
                                <hfp:hasProperty name="ordered" value="false"/>
                                <hfp:hasProperty name="bounded" value="false"/>
                                <hfp:hasProperty name="cardinality" value="countably infinite"/>
                                <hfp:hasProperty name="numeric" value="false"/>
                        </appinfo>
                </annotation>
                <restriction base="anySimpleType"/>
         </simpleType>

         <simpleType name="binary">
                <annotation>
                        <appinfo>
                                <hfp:hasFacet name="encoding"/>
                                <hfp:hasFacet name="length"/>
                                <hfp:hasFacet name="minLength"/>
                                <hfp:hasFacet name="maxLength"/>
                                <hfp:hasFacet name="pattern"/>
                                <hfp:hasFacet name="enumeration"/>
                                <hfp:hasProperty name="ordered" value="false"/>
                                <hfp:hasProperty name="bounded" value="false"/>
                                <hfp:hasProperty name="cardinality" value="countably infinite"/>
                                <hfp:hasProperty name="numeric" value="false"/>
                        </appinfo>
                </annotation>
                <restriction base="anySimpleType"/>
         </simpleType>

         <simpleType name="uriReference">
                <annotation>
                        <appinfo>
                                <hfp:hasFacet name="length"/>
                                <hfp:hasFacet name="minLength"/>
                                <hfp:hasFacet name="maxLength"/>
                                <hfp:hasFacet name="pattern"/>
                                <hfp:hasFacet name="enumeration"/>
                                <hfp:hasProperty name="ordered" value="false"/>
                                <hfp:hasProperty name="bounded" value="false"/>
                                <hfp:hasProperty name="cardinality" value="countably infinite"/>
                                <hfp:hasProperty name="numeric" value="false"/>
                        </appinfo>
                </annotation>
                <restriction base="anySimpleType"/>
         </simpleType>

         <simpleType name="ID">
                <annotation>
                        <appinfo>
                                <hfp:hasFacet name="length"/>
                                <hfp:hasFacet name="minLength"/>
                                <hfp:hasFacet name="maxLength"/>
                                <hfp:hasFacet name="pattern"/>
                                <hfp:hasFacet name="enumeration"/>
                                <hfp:hasFacet name="maxInclusive"/>
                                <hfp:hasFacet name="maxExclusive"/>
                                <hfp:hasFacet name="minInclusive"/>
                                <hfp:hasFacet name="minExclusive"/>
                                <hfp:hasProperty name="ordered" value="true"/>
                                <hfp:hasProperty name="bounded" value="false"/>
                                <hfp:hasProperty name="cardinality" value="countably infinite"/>
                                <hfp:hasProperty name="numeric" value="false"/>
                        </appinfo>
                </annotation>
                <restriction base="anySimpleType"/>
         </simpleType>

         <simpleType name="IDREF">
                <annotation>
                        <appinfo>
                                <hfp:hasFacet name="length"/>
                                <hfp:hasFacet name="minLength"/>
                                <hfp:hasFacet name="maxLength"/>
                                <hfp:hasFacet name="pattern"/>
                                <hfp:hasFacet name="enumeration"/>
                                <hfp:hasFacet name="maxInclusive"/>
                                <hfp:hasFacet name="maxExclusive"/>
                                <hfp:hasFacet name="minInclusive"/>
                                <hfp:hasFacet name="minExclusive"/>
                                <hfp:hasProperty name="ordered" value="true"/>
                                <hfp:hasProperty name="bounded" value="false"/>
                                <hfp:hasProperty name="cardinality" value="countably infinite"/>
                                <hfp:hasProperty name="numeric" value="false"/>
                        </appinfo>
                </annotation>
                <restriction base="anySimpleType"/>
         </simpleType>

         <simpleType name="ENTITY">
                <annotation>
                        <appinfo>
                                <hfp:hasFacet name="length"/>
                                <hfp:hasFacet name="minLength"/>
                                <hfp:hasFacet name="maxLength"/>
                                <hfp:hasFacet name="pattern"/>
                                <hfp:hasFacet name="enumeration"/>
                                <hfp:hasFacet name="maxInclusive"/>
                                <hfp:hasFacet name="maxExclusive"/>
                                <hfp:hasFacet name="minInclusive"/>
                                <hfp:hasFacet name="minExclusive"/>
                                <hfp:hasProperty name="ordered" value="true"/>
                                <hfp:hasProperty name="bounded" value="false"/>
                                <hfp:hasProperty name="cardinality" value="countably infinite"/>
                                <hfp:hasProperty name="numeric" value="false"/>
                        </appinfo>
                </annotation>
                <restriction base="anySimpleType"/>
         </simpleType>

         <simpleType name="NOTATION">
                <annotation>
                        <appinfo>
                                <hfp:hasFacet name="length"/>
                                <hfp:hasFacet name="minLength"/>
                                <hfp:hasFacet name="maxLength"/>
                                <hfp:hasFacet name="pattern"/>
                                <hfp:hasFacet name="enumeration"/>
                                <hfp:hasFacet name="maxInclusive"/>
                                <hfp:hasFacet name="maxExclusive"/>
                                <hfp:hasFacet name="minInclusive"/>
                                <hfp:hasFacet name="minExclusive"/>
                                <hfp:hasProperty name="ordered" value="true"/>
                                <hfp:hasProperty name="bounded" value="false"/>
                                <hfp:hasProperty name="cardinality" value="countably infinite"/>
                                <hfp:hasProperty name="numeric" value="false"/>
                        </appinfo>
                </annotation>
                <restriction base="anySimpleType"/>
        </simpleType>

        <simpleType name="QName">
                <annotation>
                    <appinfo>
                                <hfp:hasFacet name="length"/>
                                <hfp:hasFacet name="minLength"/>
                                <hfp:hasFacet name="maxLength"/>
                                <hfp:hasFacet name="pattern"/>
                                <hfp:hasFacet name="enumeration"/>
                                <hfp:hasFacet name="maxInclusive"/>
                                <hfp:hasFacet name="maxExclusive"/>
                                <hfp:hasFacet name="minInclusive"/>
                                <hfp:hasFacet name="minExclusive"/>
                                <hfp:hasProperty name="ordered" value="true"/>
                                <hfp:hasProperty name="bounded" value="false"/>
                                <hfp:hasProperty name="cardinality" value="countably infinite"/>
                                <hfp:hasProperty name="numeric" value="false"/>
                        </appinfo>
              </annotation>
                <restriction base="anySimpleType"/>
        </simpleType>

        <annotation>
                <documentation>
                        Now the derived primitive types
                </documentation>
        </annotation>

        <simpleType name="language">
                <restriction base="string">
                        <pattern value="([a-zA-Z]{2}|[iI]-[a-zA-Z]+|[xX]-[a-zA-Z]+)(-[a-zA-Z]+)*">
                                <annotation>
                                        <documentation source="http://www.w3.org/TR/REC-xml#NT-LanguageID">
                                                pattern matches production 33 from the XML spec
                                        </documentation>
                                </annotation>
                        </pattern>
                </restriction>
        </simpleType>

        <simpleType name="IDREFS">
                <annotation>
                        <appinfo>
                                <hfp:hasFacet name="length"/>
                                <hfp:hasFacet name="minLength"/>
                                <hfp:hasFacet name="maxLength"/>
                                <hfp:hasFacet name="enumeration"/>
                                <hfp:hasProperty name="ordered" value="false"/>
                                <hfp:hasProperty name="bounded" value="false"/>
                                <hfp:hasProperty name="cardinality" value="countably infinite"/>
                                <hfp:hasProperty name="numeric" value="false"/>
                        </appinfo>
                </annotation>
                <list itemType="IDREF"/>
        </simpleType>

        <simpleType name="ENTITIES">
                <annotation>
                        <appinfo>
                                <hfp:hasFacet name="length"/>
                                <hfp:hasFacet name="minLength"/>
                                <hfp:hasFacet name="maxLength"/>
                                <hfp:hasFacet name="enumeration"/>
                                <hfp:hasProperty name="ordered" value="false"/>
                                <hfp:hasProperty name="bounded" value="false"/>
                                <hfp:hasProperty name="cardinality" value="countably infinite"/>
                                <hfp:hasProperty name="numeric" value="false"/>
                        </appinfo>
                </annotation>
                <list itemType="ENTITY"/>
        </simpleType>

        <simpleType name="NMTOKEN">
                <restriction base="string">
                        <pattern value="\c+">
                                <annotation>
                                        <documentation source="http://www.w3.org/TR/REC-xml#NT-Nmtoken">
                                                pattern matches production 7 from the XML spec
                                        </documentation>
                                </annotation>
                        </pattern>
                </restriction>
        </simpleType>

        <simpleType name="NMTOKENS">
                <annotation>
                        <appinfo>
                                <hfp:hasFacet name="length"/>
                                <hfp:hasFacet name="minLength"/>
                                <hfp:hasFacet name="maxLength"/>
                                <hfp:hasFacet name="enumeration"/>
                                <hfp:hasProperty name="ordered" value="true"/>
                                <hfp:hasProperty name="bounded" value="false"/>
                                <hfp:hasProperty name="cardinality" value="countably infinite"/>
                                <hfp:hasProperty name="numeric" value="false"/>
                        </appinfo>
                </annotation>
                <list itemType="NMTOKEN"/>
        </simpleType>

        <simpleType name="Name">
                <restriction base="string">
                        <pattern value="\i\c*">
                                <annotation>
                                        <documentation source="http://www.w3.org/TR/REC-xml#NT-Name">
                                                pattern matches production 5 from the XML spec
                                        </documentation>
                                </annotation>
                        </pattern>
                </restriction>
        </simpleType>

        <simpleType name="NCName">
                <restriction base="Name">
                        <pattern value="[\i-[:]][\c-[:]]*">
                                <annotation>
                                        <documentation source="http://www.w3.org/TR/REC-xml-names/#NT-NCName">
                                                pattern matches production 4 from the Namespaces in XML spec
                                        </documentation>
                                </annotation>
                        </pattern>
                </restriction>
        </simpleType>

        <simpleType name="integer">
                <restriction base="decimal">
                        <scale value="0" fixed="true"/>
                </restriction>
        </simpleType>

        <simpleType name="nonPositiveInteger">
                <restriction base="integer">
                        <maxInclusive value="0"/>
                </restriction>
        </simpleType>

        <simpleType name="negativeInteger">
                <restriction base="nonPositiveInteger">
                        <maxInclusive value="-1"/>
                </restriction>
        </simpleType>

        <simpleType name="long">
                <annotation>
                        <appinfo>
                                <hfp:hasProperty name="bounded" value="true"/>
                                <hfp:hasProperty name="cardinality" value="finite"/>
                        </appinfo>
                </annotation>
                <restriction base="integer">
                        <minInclusive value="-9223372036854775808"/>
                        <maxInclusive value="9223372036854775807"/>
                </restriction>
        </simpleType>

        <simpleType name="int">
                <restriction base="long">
                        <minInclusive value="-2147483648"/>
                        <maxInclusive value="2147483647"/>
                </restriction>
        </simpleType>

        <simpleType name="short">
                <restriction base="int">
                        <minInclusive value="-32768"/>
                        <maxInclusive value="32767"/>
                </restriction>
        </simpleType>

        <simpleType name="byte">
                <restriction base="short">
                        <minInclusive value="-128"/>
                        <maxInclusive value="127"/>
                </restriction>
        </simpleType>

        <simpleType name="nonNegativeInteger">
                <restriction base="integer">
                        <minInclusive value="0"/>
                </restriction>
        </simpleType>

        <simpleType name="unsignedLong">
                <annotation>
                        <appinfo>
                                <hfp:hasProperty name="bounded" value="true"/>
                                <hfp:hasProperty name="cardinality" value="finite"/>
                        </appinfo>
                </annotation>
                <restriction base="nonNegativeInteger">
                        <maxInclusive value="18446744073709551615"/>
                </restriction>
        </simpleType>

        <simpleType name="unsignedInt">
                <restriction base="unsignedLong">
                        <maxInclusive value="4294967295"/>
                </restriction>
        </simpleType>

        <simpleType name="unsignedShort">
                <restriction base="unsignedInt">
                        <maxInclusive value="65535"/>
                </restriction>
        </simpleType>

        <simpleType name="unsignedByte">
                <restriction base="unsignedShort">
                        <maxInclusive value="255"/>
                </restriction>
        </simpleType>

        <simpleType name="positiveInteger">
                <restriction base="nonNegativeInteger">
                        <minInclusive value="1"/>
                </restriction>
        </simpleType>

        <simpleType name="timeInstant">
                <restriction base="recurringDuration">
                        <duration value="P0Y" fixed="true"/>
                        <period value="P0Y" fixed="true"/>
                </restriction>
        </simpleType>

        <simpleType name="time">
                <restriction base="recurringDuration">
                        <period value="PT24H" fixed="true"/>
                        <duration value="P0Y" fixed="true"/>
                </restriction>
        </simpleType>

        <simpleType name="timePeriod">
                <restriction base="recurringDuration">
                        <period value="P0Y" fixed="true"/>
                </restriction>
        </simpleType>

        <simpleType name="date">
                <restriction base="timePeriod">
                        <duration value="PT24H" fixed="true"/>
                </restriction>
        </simpleType>

        <simpleType name="month">
                <restriction base="timePeriod">
                        <duration value="P1M" fixed="true"/>
                </restriction>
        </simpleType>

        <simpleType name="year">
                <restriction base="timePeriod">
                        <duration value="P1Y" fixed="true"/>
                </restriction>
        </simpleType>

        <simpleType name="century">
                <restriction base="timePeriod">
                        <period value="P100Y" fixed="true"/>
                </restriction>
        </simpleType>

        <simpleType name="recurringDate">
                <restriction base="recurringDuration">
                        <duration value="P24H" fixed="true"/>
                        <period value="P1Y" fixed="true"/>
                </restriction>
        </simpleType>

        <simpleType name="recurringDay">
                <restriction base="recurringDuration">
                        <duration value="P24H" fixed="true"/>
                        <period value="P1M" fixed="true"/>
                </restriction>
        </simpleType>

  <complexType name="openAttrs">
   <annotation>
    <documentation>This type is extended by almost all schema types
                   to allow attributes from other namespaces to be
                   added to user schemas.</documentation>
    </annotation>
   <complexContent>
    <restriction base="anyType">
     <anyAttribute namespace="##other" processContents="lax"/>
    </restriction>
   </complexContent>
  </complexType>

  <complexType name="annotated">
<annotation>
    <documentation>This type is extended by all types which allow annotation
          other than &lt;schema&gt; itself</documentation>
    </annotation>
    <complexContent>
      <extension base="openAttrs">
       <sequence>
        <element ref="annotation" minOccurs="0"/>
       </sequence>
       <attribute name="id" type="ID"/>
      </extension>
    </complexContent>
  </complexType>

  <complexType name="simpleType" abstract="true">
    <complexContent>
      <extension base="annotated">
    <sequence>
     <element ref="simpleDerivation"/>
    </sequence>
    <attribute name="name" type="NCName">
     <annotation>
      <documentation>Can be restricted to required or forbidden</documentation>
     </annotation>
    </attribute>
        </extension>
    </complexContent>
  </complexType>

  <complexType name="topLevelSimpleType">
    <complexContent>
      <restriction base="simpleType">
   <sequence>
    <element ref="annotation" minOccurs="0"/>
    <element ref="simpleDerivation"/>
   </sequence>
   <attribute name="name" use="required" type="NCName">
     <annotation>
       <documentation>Required at the top level</documentation>
     </annotation>
   </attribute>   
        </restriction>
    </complexContent>
  </complexType>

  <complexType name="localSimpleType">
    <complexContent>
      <restriction base="simpleType">
   <sequence>
    <element ref="annotation" minOccurs="0"/>
    <element ref="simpleDerivation"/>
   </sequence>
   <attribute name="name" use="prohibited">
     <annotation>
       <documentation>Forbidden when nested</documentation>
     </annotation>
   </attribute>   
        </restriction>
    </complexContent>
  </complexType>

  <element name="simpleType" substitutionGroup="redefinable" type="topLevelSimpleType"/>

  <element name="simpleDerivation" abstract="true" type="annotated"/>

  <group name="simpleRestrictionModel">
     <choice>
      <element ref="facet" minOccurs="0" maxOccurs="unbounded"/>
     </choice>
  </group>

  <element name="restriction" substitutionGroup="simpleDerivation">
   <complexType>
<annotation>
     <documentation>base attribute and simpleType child are mutually
                    exclusive, but one or other is required</documentation>
    </annotation>
      <complexContent>
        <extension base="annotated">
    
    <sequence>
     <element name="simpleType" type="localSimpleType" minOccurs="0"/>
     <group ref="simpleRestrictionModel"/>
    </sequence>
    <attribute name="base" type="QName" use="optional"/>
           </extension>
      </complexContent>
    </complexType>
  </element>

  <element name="list" substitutionGroup="simpleDerivation">
   <complexType>
<annotation>
     <documentation>type attribute and simpleType child are mutually
                    exclusive, but one or other is required</documentation>
    </annotation>
      <complexContent>
        <extension base="annotated">
    
    <sequence>
     <element name="simpleType" type="localSimpleType" minOccurs="0"/>
    </sequence>
    <attribute name="itemType" type="QName" use="optional"/>
           </extension>
      </complexContent>
    </complexType>
  </element>

  <element name="union" substitutionGroup="simpleDerivation">
   <complexType>
<annotation>
      <documentation>types attribute must be non-empty or there must be
                     at least one simpleType child</documentation>
    </annotation>
      <complexContent>
        <extension base="annotated">
    
    <sequence>
     <element name="simpleType" type="localSimpleType" minOccurs="0" maxOccurs="unbounded"/>
    </sequence>
    <attribute name="memberTypes" use="optional">
     <simpleType>
      <list itemType="QName"/>
     </simpleType>
    </attribute>
           </extension>
      </complexContent>
    </complexType>
  </element>
        
  <complexType name="facet">
    <complexContent>
      <extension base="annotated">
    <attribute name="value" use="required"/>
    <attribute name="fixed" type="boolean" use="optional"/>
        </extension>
    </complexContent>
  </complexType>

        <element name="facet" type="facet" abstract="true"/>

        <element name="minBound" abstract="true" substitutionGroup="facet"/>

        <element name="minExclusive" substitutionGroup="minBound"/>
        <element name="minInclusive" substitutionGroup="minBound"/>

        <element name="maxBound" abstract="true" substitutionGroup="facet"/>

        <element name="maxExclusive" substitutionGroup="maxBound"/>
        <element name="maxInclusive" substitutionGroup="maxBound"/>

  <complexType name="numFacet">
    <complexContent>
      <restriction base="facet">
       <sequence>
        <element ref="annotation" minOccurs="0"/>
       </sequence>
    <attribute name="value" type="nonNegativeInteger"/>
        </restriction>
    </complexContent>
  </complexType>


        <element name="precision" substitutionGroup="facet">
                <complexType>
                 <complexContent>
                  <restriction base="numFacet">
                   <sequence>
                    <element ref="annotation" minOccurs="0"/>
                   </sequence>
                   <attribute name="value" type="positiveInteger"/>
                  </restriction>
                 </complexContent>
                </complexType>
        </element>
        <element name="scale" type="numFacet" substitutionGroup="facet"/>

        <element name="length" type="numFacet" substitutionGroup="facet"/>
        <element name="minLength" type="numFacet" substitutionGroup="facet"/>
        <element name="maxLength" type="numFacet" substitutionGroup="facet"/>

        <element name="encoding" substitutionGroup="facet">
   <complexType>
      <complexContent>
        <restriction base="facet">
       <sequence>
	<element ref="annotation" minOccurs="0"/>
       </sequence>
                        <attribute name="value">
                                <simpleType>
                                        <restriction base="NMTOKEN">
                                                <enumeration value="hex">
                                                        <annotation>
                                                                <documentation>
                                                                        each (8-bit) byte is encoded as a sequence
                                                                        of 2 hexidecimal digits
                                                                </documentation>
                                                        </annotation>
                                                </enumeration>
                                                <enumeration value="base64">
                                                        <annotation>
                                                                <documentation>
                                                                        value is encoded in Base64 as defined
                                                                        in the MIME RFC
                                                                </documentation>
                                                        </annotation>
                                                </enumeration>
                                        </restriction>
                                </simpleType>
                        </attribute>
           </restriction>
      </complexContent>
                </complexType>
        </element>

        <element name="period" substitutionGroup="facet">
    <complexType>
      <complexContent>
        <restriction base="facet">
       <sequence>
	<element ref="annotation" minOccurs="0"/>
       </sequence>
                        <attribute name="value" type="timeDuration"/>
            </restriction>
      </complexContent>
                </complexType>
        </element>

        <element name="duration" substitutionGroup="facet">
    <complexType>
      <complexContent>
        <restriction base="facet">
       <sequence>
	<element ref="annotation" minOccurs="0"/>
       </sequence>
                        <attribute name="value" type="timeDuration"/>
            </restriction>
      </complexContent>
                </complexType>
        </element>
  
        <element name="enumeration" substitutionGroup="facet"/>

        <element name="pattern" substitutionGroup="facet"/>

        <element name="appinfo">
    <complexType mixed="true">
                        <sequence minOccurs="0" maxOccurs="unbounded">
                                <any processContents="lax"/>
                        </sequence>
                        <attribute name="source" type="uriReference"/>
                </complexType>
        </element>

        <element name="documentation" xmlns:x="http://www.w3.org/XML/1998/namespace">
    <complexType mixed="true">
                        <sequence minOccurs="0" maxOccurs="unbounded">
                                <any processContents="lax"/>
                        </sequence>
                        <attribute name="source" type="uriReference"/>
                        <attribute ref="x:lang"/>
                </complexType>
        </element>

        <element name="annotation">
                <complexType>
                        <choice minOccurs="0" maxOccurs="unbounded">
                                <element ref="appinfo"/>
                                <element ref="documentation"/>
                        </choice>
                </complexType>
        </element>
 
 <simpleType name="anySimpleType">
  <annotation>
   <documentation>Not the real thing, provided just for
                  completeness</documentation>
  </annotation>
  <restriction base="anyType"/>
 </simpleType>

</schema>
