home *** CD-ROM | disk | FTP | other *** search
/ Internet Magazine 2002 December / INTERNET97.ISO / pc / software / windows / building / xmlspy / setup44.exe / Data1.cab / F1581_Data_shape.xsd < prev    next >
Encoding:
Extensible Markup Language  |  2002-02-04  |  2.7 KB  |  80 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- edited with XML Spy v4.0 NT beta 1 build Jun 13 2001 (http://www.xmlspy.com) by Alex Pilz (Altova) -->
  3. <xs:schema targetNamespace="http://my-company.com/namespace" xmlns="http://my-company.com/namespace" xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified">
  4.     <xs:element name="Company">
  5.         <xs:annotation>
  6.             <xs:documentation>Root element</xs:documentation>
  7.         </xs:annotation>
  8.         <xs:complexType>
  9.             <xs:sequence>
  10.                 <xs:element name="Address" type="AddressType"/>
  11.                 <xs:element name="Division" type="DivisionType" maxOccurs="unbounded"/>
  12.             </xs:sequence>
  13.         </xs:complexType>
  14.     </xs:element>
  15.     <xs:complexType name="AddressType">
  16.         <xs:sequence>
  17.             <xs:element name="Name" type="xs:string"/>
  18.             <xs:element name="Street" type="xs:string"/>
  19.             <xs:element name="City" type="xs:string"/>
  20.         </xs:sequence>
  21.     </xs:complexType>
  22.     <xs:complexType name="US-Address">
  23.         <xs:complexContent>
  24.             <xs:extension base="AddressType">
  25.                 <xs:sequence>
  26.                     <xs:element name="State" type="US-State"/>
  27.                     <xs:element name="Zip" type="xs:positiveInteger"/>
  28.                 </xs:sequence>
  29.             </xs:extension>
  30.         </xs:complexContent>
  31.     </xs:complexType>
  32.     <xs:complexType name="UK-Address">
  33.         <xs:complexContent>
  34.             <xs:extension base="AddressType">
  35.                 <xs:sequence>
  36.                     <xs:element name="Postcode" type="xs:string"/>
  37.                 </xs:sequence>
  38.             </xs:extension>
  39.         </xs:complexContent>
  40.     </xs:complexType>
  41.     <xs:simpleType name="US-State">
  42.         <xs:restriction base="xs:string"/>
  43.     </xs:simpleType>
  44.     <xs:element name="Person">
  45.         <xs:complexType>
  46.             <xs:sequence>
  47.                 <xs:element name="First" type="xs:string"/>
  48.                 <xs:element name="Last" type="xs:string"/>
  49.                 <xs:element name="Title" type="xs:string" minOccurs="0"/>
  50.                 <xs:element name="PhoneExt">
  51.                     <xs:simpleType>
  52.                         <xs:restriction base="xs:int">
  53.                             <xs:maxInclusive value="999"/>
  54.                         </xs:restriction>
  55.                     </xs:simpleType>
  56.                 </xs:element>
  57.                 <xs:element name="EMail" type="xs:string"/>
  58.             </xs:sequence>
  59.             <xs:attribute name="Manager" type="xs:boolean" use="required"/>
  60.             <xs:attribute name="Programmer" type="xs:boolean" use="optional"/>
  61.             <xs:attribute name="Degree">
  62.                 <xs:simpleType>
  63.                     <xs:restriction base="xs:string">
  64.                         <xs:enumeration value="BA"/>
  65.                         <xs:enumeration value="MA"/>
  66.                         <xs:enumeration value="Ph.D"/>
  67.                     </xs:restriction>
  68.                 </xs:simpleType>
  69.             </xs:attribute>
  70.         </xs:complexType>
  71.     </xs:element>
  72.     <xs:complexType name="DivisionType">
  73.         <xs:sequence>
  74.             <xs:element name="Division-Name" type="xs:string"/>
  75.             <xs:element name="Location" type="xs:string"/>
  76.             <xs:element ref="Person" maxOccurs="unbounded"/>
  77.         </xs:sequence>
  78.     </xs:complexType>
  79. </xs:schema>
  80.