Listing  1
 

<element name="appinfo" id="appinfo">
  <annotation>
    <documentation source="http://www.w3.org/TR/
      xmlschema-1/#element-appinfo"/>
  </annotation>
  <complexType mixed="true">
    <sequence minOccurs="0" maxOccurs="unbounded">
      <any processContents="lax"/>
    </sequence>
    <attribute name="source" type="anyURI"/>
  </complexType>
</element>
 

Listing 2
 
 

<schema xmlns="http://www.w3.org/2000/10/XMLSchema">
<simpleType name="TextNumbers">
  <restriction base="string">
      <enumeration value="one"/>
      <enumeration value="two"/>
      <enumeration value="three"/>
  </restriction>
</simpleType>
</schema>
 

Listing  3
 

<schema xmlns="http://www.w3.org/2000/10/XMLSchema"
xmlns:loc="http://www.example.com/locenum">
<simpleType name="TextNumbers">
  <annotation>
    <appinfo>
      <loc:localize xml:lang="en" loc:default="true"/>
      <loc:localize xml:lang="fr">
        <loc:enumeration loc:value="un"/>
        <loc:enumeration loc:value="deux"/>
        <loc:enumeration loc:value="trois"/>
      </loc:localize>
      <loc:localize xml:lang="es">
        <loc:enumeration loc:value="uno"/>
        <loc:enumeration loc:value="dos"/>
        <loc:enumeration loc:value="tres"/>
      </loc:localize>
    </appinfo>
  </annotation>
  <restriction base="string">
      <enumeration value="one"/>
      <enumeration value="two"/>
      <enumeration value="three"/>
  </restriction>
</simpleType>
</schema>
 

</schema>
 

Listing 4
 

<simpleType name="string"
  xmlns:hfp="http://www.w3.org/2000/10/
   XMLSchema-hasFacetAndProperty">
   <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>
 

Listing  5
<schema xmlns="http://www.w3.org/2000/10/XMLSchema"
  targetNamespace="http://www.w3.org/2000/10/XMLSchema-
   hasFacetAndProperty" xmlns:hfp="http://www.w3.org/
   2000/10/XMLSchema-hasFacetAndProperty"
  xmlns:xhtml="http://www.w3.org/1999/xhtml">
 

 <element name="hasFacet">
  <annotation>
   <documentation>
    <xhtml:p> hasFacet is used to signal that the
      contraining facet given in the name attribute is
      applicable to a primitive datatype (and all types
      derived from it).  </xhtml:p>
    <xhtml:p> Note: this element will only appear in
      the appinfo of primitive types or built-in types
      derived by "list". </xhtml:p>
    <xhtml:p> A schema processor (or the XSLT which
      generates the HTML version of the XML Schema Part 2:
      Datatypes specification) which reads a derived
      simpleType definition should walk up the base type
      chain until it reaches the primitive type at the top
      of the chain and "push" all facets found there down
      to all derived types in the chain.  </xhtml:p>
   </documentation>
  </annotation>
  <complexType>
   <attribute name="name" use="required">
    <simpleType>
     <restriction base="NMTOKEN">
      <enumeration value="length"/>
      <enumeration value="minLength"/>
      <enumeration value="maxLength"/>
      <enumeration value="pattern"/>
      <enumeration value="enumeration"/>
      <enumeration value="maxInclusive"/>
      <enumeration value="maxExclusive"/>
      <enumeration value="minInclusive"/>
      <enumeration value="minExclusive"/>
      <enumeration value="precision"/>
      <enumeration value="scale"/>
      <enumeration value="encoding"/>
      <enumeration value="duration"/>
      <enumeration value="period"/>
     </restriction>
    </simpleType>
   </attribute>
  </complexType>
 </element>
</schema>
 

Listing  6
<schema xmlns="http://www.w3.org/2000/10/XMLSchema"
  xmlns:psc="urn:schemas-progress-com:data-mapping:91b">
        <complexType name="Address">
                <sequence>
                        <element name="name" type="string" psc:file="pomap.w"
    psc:name="BT-Address" psc:type="column"
    psc:object="pomap"/>
                        <element name="street" type="string" psc:file="pomap.w"
     psc:name="BT-Address2" psc:type="column"
     psc:object="pomap"/>
                        <element name="city" type="string"
    psc:file="pomap.w,pomap.w" psc:name="BT-City"
    psc:type="column" psc:object="pomap"/>
                        <element name="state" type="string" psc:file="pomap.w"
     psc:name="BT-State" psc:type="column"
     psc:object="pomap"/>
                        <element name="zip" type="decimal" psc:file="pomap.w"
     psc:name="BT-PostalCode" psc:type="column"
     psc:object="pomap"/>
                </sequence>
                <attribute name="country" type="NMTOKEN" use="fixed"
    value="US"/>
        </complexType>
</schema>