home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2003 October / INTERNET108.ISO / pc / software / windows / building / xmlspy / xmlspyentcomplete5.exe / Data1.cab / _E8012184C39242DFB298E53C3CCA18D5 < prev    next >
Encoding:
Extensible Markup Language  |  2001-11-06  |  1.7 KB  |  45 lines

  1. <?xml version="1.0"?>
  2. <xs:schema targetNamespace="http://www.w3.org/XML/1998/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" xml:lang="en">
  3.     <xs:annotation>
  4.         <xs:documentation>This schema defines attributes and an attribute group
  5.         suitable for use by
  6.         schemas wishing to allow xml:lang or xml:space attributes
  7.         on elements they define.
  8.  
  9.         To enable this, such a schema must import this schema
  10.         for the XML namespace, e.g. as follows:
  11.         <schema . . .>
  12.          . . .
  13.          <import namespace="http://www.w3.org/XML/1998/namespace"
  14.                     schemaLocation="http://www.w3.org/2001/03/xml.xsd"/>
  15.  
  16.         Subsequently, qualified reference to either of the attributes
  17.         or the group defined below will have the desired effect, e.g.
  18.  
  19.         <type . . .>
  20.          . . .
  21.          <attributeGroup ref="xml:specialAttrs"/>
  22.  
  23.          will define a type which will schema-validate a instance
  24.          element with both xml:space and xml:lang attribute</xs:documentation>
  25.     </xs:annotation>
  26.     <xs:attribute name="lang" type="xs:language">
  27.         <xs:annotation>
  28.             <xs:documentation>In due course, we should install the relevant ISO 2- and 3-letter
  29.          codes as the enumerated possible values . . .</xs:documentation>
  30.         </xs:annotation>
  31.     </xs:attribute>
  32.     <xs:attribute name="space" default="preserve">
  33.         <xs:simpleType>
  34.             <xs:restriction base="xs:NCName">
  35.                 <xs:enumeration value="default"/>
  36.                 <xs:enumeration value="preserve"/>
  37.             </xs:restriction>
  38.         </xs:simpleType>
  39.     </xs:attribute>
  40.     <xs:attributeGroup name="specialAttrs">
  41.         <xs:attribute ref="xml:lang"/>
  42.         <xs:attribute ref="xml:space"/>
  43.     </xs:attributeGroup>
  44. </xs:schema>
  45.