home *** CD-ROM | disk | FTP | other *** search
/ Computer Active Guide 2009 April / CAGidas04.iso / Programos / wlsetup-all.exe / Contacts.msi / contact / XML_FILE / MSVCARD.XSD < prev   
Encoding:
Extensible Markup Language  |  2009-09-30  |  32.0 KB  |  627 lines

  1. <?xml version="1.0" encoding="UTF-8"?>
  2. <!-- Copyright Microsoft Corporation. All Rights Reserved. -->
  3.  
  4. <xs:schema
  5.            xmlns:xs=       "http://www.w3.org/2001/XMLSchema"
  6.            xmlns:ext=      "http://schemas.microsoft.com/Contact/Extended"
  7.  
  8.            xmlns:tns=      "http://schemas.microsoft.com/Contact"
  9.            targetNamespace="http://schemas.microsoft.com/Contact"
  10.  
  11.            elementFormDefault=    "qualified"
  12.            attributeFormDefault=  "qualified"
  13.            version="1.0">
  14.  
  15.     <!-- *****************************************-->
  16.     <!-- attribute type definitions -->
  17.     <!-- *****************************************-->
  18.  
  19. <!-- TODO: figure out how to restrict nodes with Version to always have ModificationDate -->
  20.  
  21.     <!-- tns:contactAttributes is the standard group of attributes allowed on tns elements
  22.                     including any attribute from other namespaces -->
  23.     <xs:attributeGroup name="contactAttributes">
  24.         <xs:attribute name="Version"          type="xs:positiveInteger" default="1"/>
  25.         <xs:attribute name="ModificationDate" type="xs:dateTime"/>
  26.         <xs:anyAttribute namespace="##other" processContents="lax"/>
  27.     </xs:attributeGroup>
  28.  
  29.     <!-- tns:entryAttributes are attributes present on individual multi value property entries
  30.                 and with an ElementID attribute
  31.                 and with contactAttributes  -->
  32.     <xs:attributeGroup name="entryAttributes">
  33.         <xs:attribute name="ElementID" type="tns:GUID" use="required"/>
  34.         <xs:attribute name="type" type="xs:string" fixed="arrayNode"/>
  35.         <xs:attributeGroup ref="tns:contactAttributes"/>
  36.     </xs:attributeGroup>
  37.  
  38.     <!-- tns:arrayElementAttributes are attributes present in DOM on container elements
  39.                 of multi value property entries -->
  40.     <xs:attributeGroup name="arrayElementAttributes">
  41.         <xs:attribute name="type" type="xs:string" fixed="arrayElement"/>
  42.         <xs:attributeGroup ref="tns:contactAttributes"/>
  43.     </xs:attributeGroup>
  44.  
  45.     <!-- *****************************************-->
  46.     <!-- complex type definitions -->
  47.     <!-- *****************************************-->
  48.  
  49.     <!-- tns:string is a standand string
  50.                with contactAttributes allowed -->
  51.     <xs:complexType name="string">
  52.         <xs:simpleContent>
  53.             <xs:extension base="xs:string">
  54.                 <xs:attribute name="type" type="xs:string" fixed="string"/>
  55.                 <xs:attributeGroup ref="tns:contactAttributes"/>
  56.             </xs:extension>
  57.         </xs:simpleContent>
  58.     </xs:complexType>
  59.  
  60.     <!-- tns:binary is a base64Binary
  61.                which must have a MIME content type attribute
  62.                content is interpreted as base64 encoded binary data
  63.                with contactAttributes allowed -->
  64.     <xs:complexType name="binary">
  65.         <xs:simpleContent>
  66.             <xs:extension base="xs:base64Binary">
  67.                 <xs:attribute name="ContentType" type="xs:string" use="required"/>
  68.                 <xs:attribute name="type" type="xs:string" fixed="binary"/>
  69.                 <xs:attributeGroup ref="tns:contactAttributes"/>
  70.             </xs:extension>
  71.         </xs:simpleContent>
  72.     </xs:complexType>
  73.  
  74.     <!-- tns:dateTime is a standand dateTime
  75.                with contactAttributes allowed -->
  76.     <xs:complexType name="dateTime">
  77.         <xs:simpleContent>
  78.             <xs:extension base="xs:dateTime">
  79.                 <xs:attribute name="type" type="xs:string" fixed="dateTime"/>
  80.                 <xs:attributeGroup ref="tns:contactAttributes"/>
  81.             </xs:extension>
  82.         </xs:simpleContent>
  83.     </xs:complexType>
  84.  
  85.     <!-- tns:GUID is a GUID
  86.                represented as a string, without the surrounding {} -->
  87.     <xs:simpleType name="GUID">
  88.         <xs:restriction base="xs:string">
  89.             <!-- regexp language primer:
  90.                  [0-9A-Fa-f] == one character from the ranges, inclusive (hex)
  91.                  {8} == repeated 8 times
  92.                  \-  == the dash character, not part of regexp -->
  93.             <xs:pattern value="[0-9A-Fa-f]{8}\-[0-9A-Fa-f]{4}\-[0-9A-Fa-f]{4}\-[0-9A-Fa-f]{4}\-[0-9A-Fa-f]{12}"/>
  94.         </xs:restriction>
  95.     </xs:simpleType>
  96.  
  97.     <!-- tns:valueGUID is a tns:GUID
  98.                with contactAttributes allowed -->
  99.     <xs:complexType name="valueGUID">
  100.         <xs:simpleContent>
  101.             <xs:extension base="tns:GUID">
  102.                 <xs:attributeGroup ref="tns:contactAttributes"/>
  103.             </xs:extension>
  104.         </xs:simpleContent>
  105.     </xs:complexType>
  106.  
  107.     <!-- tns:anyURI is an xs:anyURI
  108.                 with a minimum length of 1 -->
  109.     <xs:simpleType name="anyURI">
  110.         <xs:restriction base="xs:anyURI">
  111.             <xs:minLength value="1"/>
  112.         </xs:restriction>
  113.     </xs:simpleType>
  114.  
  115.     <!-- tns:uri is a tns:anyURI
  116.                with contactAttributes allowed -->
  117.     <xs:complexType name="uri">
  118.         <xs:simpleContent>
  119.             <xs:extension base="tns:anyURI">
  120.                 <xs:attributeGroup ref="tns:contactAttributes"/>
  121.             </xs:extension>
  122.         </xs:simpleContent>
  123.     </xs:complexType>
  124.  
  125.     <!-- tns:gender is a tns:string
  126.                 with value of Male, Female or Unspecified -->
  127.     <xs:complexType name="gender">
  128.         <xs:simpleContent>
  129.             <xs:restriction base="tns:string">
  130.                 <xs:enumeration value="Male"/>
  131.                 <xs:enumeration value="Female"/>
  132.                 <xs:enumeration value="Unspecified"/>
  133.                 <xs:attributeGroup ref="tns:contactAttributes"/>
  134.             </xs:restriction>
  135.         </xs:simpleContent>
  136.     </xs:complexType>
  137.  
  138.     <!-- tns:labelUnion is the union of a string
  139.                 with value of (Preferred, Personal, Business, Mobile, Pager, Fax)
  140.                 or a uri -->
  141.     <xs:simpleType name="labelUnion">
  142.         <xs:union memberTypes="tns:anyURI">
  143.             <xs:simpleType>
  144.                 <xs:restriction base="xs:string">
  145.                     <xs:minLength value="1"/>
  146.  
  147.                     <!-- labels for all Collections -->
  148.                     <xs:enumeration value="Preferred"/>
  149.                     <xs:enumeration value="Personal"/>
  150.                     <xs:enumeration value="Business"/>
  151.  
  152.                     <!-- labels for PhoneNumber -->
  153.                     <xs:enumeration value="Voice"/>
  154.                     <xs:enumeration value="Mobile"/>
  155.                     <xs:enumeration value="Cellular"/>
  156.                     <xs:enumeration value="PCS"/>
  157.                     <xs:enumeration value="Pager"/>
  158.                     <xs:enumeration value="TTY"/>
  159.                     <xs:enumeration value="Fax"/>
  160.                     <xs:enumeration value="Video"/>
  161.                     <xs:enumeration value="Modem"/>
  162.                     <xs:enumeration value="BBS"/>
  163.                     <xs:enumeration value="Car"/>
  164.                     <xs:enumeration value="ISDN"/>
  165.  
  166.                     <!-- labels for Person -->
  167.                     <xs:enumeration value="Agent"/>
  168.  
  169.                     <!-- labels for PhysicalAddress -->
  170.                     <xs:enumeration value="Domestic"/>
  171.                     <xs:enumeration value="International"/>
  172.                     <xs:enumeration value="Postal"/>
  173.                     <xs:enumeration value="Parcel"/>
  174.  
  175.                     <!-- labels for Photo -->
  176.                     <xs:enumeration value="UserTile"/>
  177.                     <xs:enumeration value="Logo"/>
  178.  
  179.                 </xs:restriction>
  180.             </xs:simpleType>
  181.         </xs:union>
  182.     </xs:simpleType>
  183.  
  184.     <!-- tns:label is a labelUnion, with contactAttributes -->
  185.     <xs:complexType name="Label">
  186.         <xs:simpleContent>
  187.             <xs:extension base="tns:labelUnion">
  188.                 <xs:attributeGroup ref="tns:contactAttributes"/>
  189.             </xs:extension>
  190.         </xs:simpleContent>
  191.     </xs:complexType>
  192.  
  193.     <!-- tns:LabelCollection is a sequence of Label elements -->
  194.     <xs:complexType name="LabelCollection">
  195.         <xs:sequence>
  196.             <xs:element name="Label" type="tns:Label" minOccurs="1" maxOccurs="unbounded"/>
  197.         </xs:sequence>
  198.     </xs:complexType>
  199.  
  200.     <!-- tns:Extended is any elements from other namespaces
  201.                 including simpleExtension namespaces -->
  202.     <xs:complexType name="Extended">
  203.         <xs:choice minOccurs="0" maxOccurs="unbounded">
  204.             <xs:any minOccurs="0" maxOccurs="unbounded" namespace="##other" processContents="skip"/>
  205.         </xs:choice>
  206.     </xs:complexType>
  207.  
  208.     <!-- tns:EmailAddress is one email address
  209.                 with optional type information (e.g. SMTP)
  210.                 and labels (and elements from other namespaces)
  211.                 and entryAttributes -->
  212.     <xs:complexType name="EmailAddress">
  213.         <xs:all minOccurs="0" maxOccurs="1">
  214.             <xs:element name="Address"         type="tns:string" minOccurs="0" maxOccurs="1" nillable="true"/>
  215.             <xs:element name="Type"            type="tns:string" minOccurs="0" maxOccurs="1" nillable="true"/>
  216.  
  217.             <xs:element name="LabelCollection" type="tns:LabelCollection"   minOccurs="0" maxOccurs="1" nillable="true"/>
  218.             <xs:element name="Extended"        type="tns:Extended" minOccurs="0" maxOccurs="1" nillable="true"/>
  219.         </xs:all>
  220.         <xs:attributeGroup ref="tns:entryAttributes"/>
  221.     </xs:complexType>
  222.  
  223.     <!-- tns:EmailAddressCollection is a sequence of EmailAddress entries -->
  224.     <xs:complexType name="EmailAddressCollection">
  225.         <xs:sequence>
  226.             <xs:element name="EmailAddress" type="tns:EmailAddress" minOccurs="1" maxOccurs="unbounded" nillable="true"/>
  227.         </xs:sequence>
  228.         <xs:attributeGroup ref="tns:arrayElementAttributes"/>
  229.     </xs:complexType>
  230.  
  231.     <!-- tns:Person is one person element
  232.                 with labels (and elements from other namespaces)
  233.                 and entryAttributes -->
  234.     <xs:complexType name="Person">
  235.         <xs:all minOccurs="0" maxOccurs="1">
  236.             <xs:element name="FormattedName"    type="tns:string"       minOccurs="0" maxOccurs="1" nillable="true"/>
  237.             <xs:element name="PersonID"         type="tns:string"       minOccurs="0" maxOccurs="1" nillable="true"/>
  238.  
  239.             <xs:element name="LabelCollection" type="tns:LabelCollection"   minOccurs="0" maxOccurs="1" nillable="true"/>
  240.             <xs:element name="Extended"        type="tns:Extended" minOccurs="0" maxOccurs="1" nillable="true"/>
  241.         </xs:all>
  242.         <xs:attributeGroup ref="tns:entryAttributes"/>
  243.     </xs:complexType>
  244.  
  245.     <!-- tns:PersonCollection is a sequence of Person entries -->
  246.     <xs:complexType name="PersonCollection">
  247.         <xs:sequence>
  248.             <xs:element name="Person" type="tns:Person" minOccurs="1" maxOccurs="unbounded" nillable="true"/>
  249.         </xs:sequence>
  250.         <xs:attributeGroup ref="tns:arrayElementAttributes"/>
  251.     </xs:complexType>
  252.     <!-- tns:Photo is one Photo element
  253.                 with labels (and elements from other namespaces)
  254.                 and entryAttributes -->
  255.     <xs:complexType name="Photo">
  256.         <xs:all minOccurs="0" maxOccurs="1">
  257.             <xs:element name="Value"           type="tns:binary"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  258.             <xs:element name="Url"             type="tns:uri"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  259.  
  260.             <xs:element name="LabelCollection" type="tns:LabelCollection"   minOccurs="0" maxOccurs="1" nillable="true"/>
  261.             <xs:element name="Extended"        type="tns:Extended" minOccurs="0" maxOccurs="1" nillable="true"/>
  262.         </xs:all>
  263.         <xs:attributeGroup ref="tns:entryAttributes"/>
  264.     </xs:complexType>
  265.  
  266.     <!-- tns:PhotoCollection is a sequence of Photo entries -->
  267.     <xs:complexType name="PhotoCollection">
  268.         <xs:sequence>
  269.             <xs:element name="Photo" type="tns:Photo" minOccurs="1" maxOccurs="unbounded" nillable="true"/>
  270.         </xs:sequence>
  271.         <xs:attributeGroup ref="tns:arrayElementAttributes"/>
  272.     </xs:complexType>
  273.  
  274.     <!-- tns:Date is one date element
  275.                 with labels (and elements from other namespaces)
  276.                 and entryAttributes -->
  277.     <xs:complexType name="Date">
  278.         <xs:all minOccurs="0" maxOccurs="1">
  279.             <xs:element name="Value"           type="tns:dateTime" minOccurs="0" maxOccurs="1" nillable="true"/>
  280.  
  281.             <xs:element name="LabelCollection" type="tns:LabelCollection"   minOccurs="0" maxOccurs="1" nillable="true"/>
  282.             <xs:element name="Extended"        type="tns:Extended" minOccurs="0" maxOccurs="1" nillable="true"/>
  283.         </xs:all>
  284.         <xs:attributeGroup ref="tns:entryAttributes"/>
  285.     </xs:complexType>
  286.  
  287.     <!-- tns:DateCollection is a sequence of Date entries -->
  288.     <xs:complexType name="DateCollection">
  289.         <xs:sequence>
  290.             <xs:element name="Date" type="tns:Date" minOccurs="1" maxOccurs="unbounded" nillable="true"/>
  291.         </xs:sequence>
  292.         <xs:attributeGroup ref="tns:arrayElementAttributes"/>
  293.     </xs:complexType>
  294.  
  295.     <!-- tns:PhysicalAddress is one address
  296.                 with labels (and elements from other namespaces)
  297.                 and entryAttributes -->
  298.     <xs:complexType name="PhysicalAddress">
  299.         <xs:all minOccurs="0" maxOccurs="1">
  300.             <xs:element name="AddressLabel"    type="tns:string"   minOccurs="0" maxOccurs="1" nillable="true"/>
  301.             <xs:element name="Street"          type="tns:string"   minOccurs="0" maxOccurs="1" nillable="true"/>
  302.             <xs:element name="Locality"        type="tns:string"   minOccurs="0" maxOccurs="1" nillable="true"/>
  303.             <xs:element name="Region"          type="tns:string"   minOccurs="0" maxOccurs="1" nillable="true"/>
  304.             <xs:element name="PostalCode"      type="tns:string"   minOccurs="0" maxOccurs="1" nillable="true"/>
  305.             <xs:element name="Country"         type="tns:string"   minOccurs="0" maxOccurs="1" nillable="true"/>
  306.             <xs:element name="POBox"           type="tns:string"   minOccurs="0" maxOccurs="1" nillable="true"/>
  307.             <xs:element name="ExtendedAddress" type="tns:string"   minOccurs="0" maxOccurs="1" nillable="true"/>
  308.  
  309.             <xs:element name="LabelCollection" type="tns:LabelCollection"   minOccurs="0" maxOccurs="1" nillable="true"/>
  310.             <xs:element name="Extended"        type="tns:Extended" minOccurs="0" maxOccurs="1" nillable="true"/>
  311.         </xs:all>
  312.         <xs:attributeGroup ref="tns:entryAttributes"/>
  313.     </xs:complexType>
  314.  
  315.     <!-- tns:PhysicalAddressCollection is a sequence of PhysicalAddress entries -->
  316.     <xs:complexType name="PhysicalAddressCollection">
  317.         <xs:sequence>
  318.             <xs:element name="PhysicalAddress" type="tns:PhysicalAddress" minOccurs="1" maxOccurs="unbounded" nillable="true"/>
  319.         </xs:sequence>
  320.         <xs:attributeGroup ref="tns:arrayElementAttributes"/>
  321.     </xs:complexType>
  322.  
  323.     <!-- tns:PhoneNumber is one PhoneNumber
  324.                 with labels (and elements from other namespaces)
  325.                 and entryAttributes -->
  326.     <xs:complexType name="PhoneNumber">
  327.         <xs:all minOccurs="0" maxOccurs="1">
  328.             <xs:element name="Number"       type="tns:string" minOccurs="0" maxOccurs="1" nillable="true"/>
  329.             <xs:element name="Alternate"    type="tns:string" minOccurs="0" maxOccurs="1" nillable="true"/>
  330.  
  331.             <xs:element name="LabelCollection" type="tns:LabelCollection"   minOccurs="0" maxOccurs="1" nillable="true"/>
  332.             <xs:element name="Extended"        type="tns:Extended" minOccurs="0" maxOccurs="1" nillable="true"/>
  333.         </xs:all>
  334.         <xs:attributeGroup ref="tns:entryAttributes"/>
  335.     </xs:complexType>
  336.  
  337.     <!-- tns:PhoneNumberCollection is a sequence of PhoneNumber entries -->
  338.     <xs:complexType name="PhoneNumberCollection">
  339.         <xs:sequence>
  340.             <xs:element name="PhoneNumber" type="tns:PhoneNumber" minOccurs="1" maxOccurs="unbounded" nillable="true"/>
  341.         </xs:sequence>
  342.         <xs:attributeGroup ref="tns:arrayElementAttributes"/>
  343.     </xs:complexType>
  344.  
  345.     <!-- tns:Url is one Url
  346.                 with labels (and elements from other namespaces)
  347.                 and entryAttributes -->
  348.     <xs:complexType name="Url">
  349.         <xs:all minOccurs="0" maxOccurs="1">
  350.             <xs:element name="Value"        type="tns:uri"     minOccurs="0" maxOccurs="1" nillable="true"/>
  351.  
  352.             <xs:element name="LabelCollection" type="tns:LabelCollection"   minOccurs="0" maxOccurs="1" nillable="true"/>
  353.             <xs:element name="Extended"        type="tns:Extended" minOccurs="0" maxOccurs="1" nillable="true"/>
  354.         </xs:all>
  355.         <xs:attributeGroup ref="tns:entryAttributes"/>
  356.     </xs:complexType>
  357.  
  358.     <!-- tns:UrlCollection is a sequence of Url entries -->
  359.     <xs:complexType name="UrlCollection">
  360.         <xs:sequence>
  361.             <xs:element name="Url" type="tns:Url" minOccurs="1" maxOccurs="unbounded" nillable="true"/>
  362.         </xs:sequence>
  363.         <xs:attributeGroup ref="tns:arrayElementAttributes"/>
  364.     </xs:complexType>
  365.  
  366.     <!-- tns:Certificate is one Certificate
  367.                 with labels (and elements from other namespaces)
  368.                 and entryAttributes -->
  369.     <xs:complexType name="Certificate">
  370.         <xs:all minOccurs="0" maxOccurs="1">
  371.             <xs:element name="Value"        type="tns:binary"   minOccurs="0" maxOccurs="1" nillable="true"/>
  372.             <xs:element name="ThumbPrint"   type="tns:binary"   minOccurs="0" maxOccurs="1" nillable="true"/>
  373.  
  374.             <xs:element name="LabelCollection" type="tns:LabelCollection"   minOccurs="0" maxOccurs="1" nillable="true"/>
  375.             <xs:element name="Extended"        type="tns:Extended" minOccurs="0" maxOccurs="1" nillable="true"/>
  376.         </xs:all>
  377.         <xs:attributeGroup ref="tns:entryAttributes"/>
  378.     </xs:complexType>
  379.  
  380.     <!-- tns:CertificateCollection is a sequence of Certificate entries -->
  381.     <xs:complexType name="CertificateCollection">
  382.         <xs:sequence>
  383.             <xs:element name="Certificate" type="tns:Certificate" minOccurs="1" maxOccurs="unbounded" nillable="true"/>
  384.         </xs:sequence>
  385.         <xs:attributeGroup ref="tns:arrayElementAttributes"/>
  386.     </xs:complexType>
  387.  
  388.     <!-- tns:Name is one Name
  389.                 with labels (and elements from other namespaces)
  390.                 and entryAttributes -->
  391.     <xs:complexType name="Name">
  392.         <xs:all minOccurs="0" maxOccurs="1">
  393.             <xs:element name="FormattedName" type="tns:string"  minOccurs="0"   maxOccurs="1" nillable="true"/>
  394.             <xs:element name="Phonetic"     type="tns:string"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  395.  
  396.             <xs:element name="Prefix"       type="tns:string"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  397.             <xs:element name="Title"        type="tns:string"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  398.             <xs:element name="GivenName"    type="tns:string"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  399.             <xs:element name="FamilyName"   type="tns:string"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  400.             <xs:element name="MiddleName"   type="tns:string"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  401.             <xs:element name="Generation"   type="tns:string"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  402.             <xs:element name="Suffix"       type="tns:string"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  403.             <xs:element name="NickName"     type="tns:string"   minOccurs="0"  maxOccurs="1" nillable="true"/>
  404.  
  405.             <xs:element name="LabelCollection" type="tns:LabelCollection"   minOccurs="0" maxOccurs="1" nillable="true"/>
  406.             <xs:element name="Extended"        type="tns:Extended" minOccurs="0" maxOccurs="1" nillable="true"/>
  407.         </xs:all>
  408.         <xs:attributeGroup ref="tns:entryAttributes"/>
  409.     </xs:complexType>
  410.  
  411.     <!-- tns:Position is one Position
  412.                 with labels (and elements from other namespaces)
  413.                 and entryAttributes -->
  414.     <xs:complexType name="Position">
  415.         <xs:all minOccurs="0" maxOccurs="1">
  416.             <xs:element name="Organization" type="tns:string"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  417.             <xs:element name="Role"         type="tns:string"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  418.             <xs:element name="Company"      type="tns:string"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  419.             <xs:element name="Department"   type="tns:string"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  420.             <xs:element name="Office"       type="tns:string"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  421.             <xs:element name="JobTitle"     type="tns:string"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  422.             <xs:element name="Profession"   type="tns:string"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  423.  
  424.  
  425.             <xs:element name="LabelCollection" type="tns:LabelCollection"   minOccurs="0" maxOccurs="1" nillable="true"/>
  426.             <xs:element name="Extended"        type="tns:Extended" minOccurs="0" maxOccurs="1" nillable="true"/>
  427.         </xs:all>
  428.         <xs:attributeGroup ref="tns:entryAttributes"/>
  429.     </xs:complexType>
  430.  
  431.     <!-- tns:PositionCollection is a sequence of Position entries -->
  432.     <xs:complexType name="PositionCollection">
  433.         <xs:sequence>
  434.             <xs:element name="Position" type="tns:Position" minOccurs="1" maxOccurs="unbounded" nillable="true"/>
  435.         </xs:sequence>
  436.         <xs:attributeGroup ref="tns:arrayElementAttributes"/>
  437.     </xs:complexType>
  438.  
  439.     <!-- tns:NameCollection is a sequence of Name entries -->
  440.     <xs:complexType name="NameCollection">
  441.         <xs:sequence>
  442.             <xs:element name="Name" type="tns:Name" minOccurs="1" maxOccurs="unbounded" nillable="true"/>
  443.         </xs:sequence>
  444.         <xs:attributeGroup ref="tns:arrayElementAttributes"/>
  445.     </xs:complexType>
  446.  
  447.     <!-- tns:IMAddress is one IMAddress
  448.                 with labels (and elements from other namespaces)
  449.                 and entryAttributes -->
  450.     <xs:complexType name="IMAddress">
  451.         <xs:all minOccurs="0" maxOccurs="1">
  452.             <xs:element name="Value"        type="tns:string"     minOccurs="0" maxOccurs="1" nillable="true"/>
  453.             <xs:element name="Protocol"     type="tns:string"     minOccurs="0" maxOccurs="1" nillable="true"/>
  454.  
  455.             <xs:element name="LabelCollection" type="tns:LabelCollection"   minOccurs="0" maxOccurs="1" nillable="true"/>
  456.             <xs:element name="Extended"        type="tns:Extended" minOccurs="0" maxOccurs="1" nillable="true"/>
  457.         </xs:all>
  458.         <xs:attributeGroup ref="tns:entryAttributes"/>
  459.     </xs:complexType>
  460.  
  461.     <!-- tns:IMAddressCollection is a sequence of IMAddress entries -->
  462.     <xs:complexType name="IMAddressCollection">
  463.         <xs:sequence>
  464.             <xs:element name="IMAddress" type="tns:IMAddress" minOccurs="1" maxOccurs="unbounded" nillable="true"/>
  465.         </xs:sequence>
  466.         <xs:attributeGroup ref="tns:arrayElementAttributes"/>
  467.     </xs:complexType>
  468.  
  469.     <!-- tns:ContactID is one ContactID
  470.                 with labels (and elements from other namespaces)
  471.                 and entryAttributes -->
  472.     <xs:complexType name="ContactID">
  473.         <xs:all minOccurs="0" maxOccurs="1">
  474.             <xs:element name="Value"        type="tns:valueGUID"     minOccurs="0" maxOccurs="1" nillable="true"/>
  475.  
  476.             <xs:element name="LabelCollection" type="tns:LabelCollection"   minOccurs="0" maxOccurs="1" nillable="true"/>
  477.             <xs:element name="Extended"        type="tns:Extended" minOccurs="0" maxOccurs="1" nillable="true"/>
  478.         </xs:all>
  479.         <xs:attributeGroup ref="tns:entryAttributes"/>
  480.     </xs:complexType>
  481.  
  482.     <!-- tns:ContactIDCollection is a sequence of ContactID entries -->
  483.     <xs:complexType name="ContactIDCollection">
  484.         <xs:sequence>
  485.             <xs:element name="ContactID" type="tns:ContactID" minOccurs="1" maxOccurs="unbounded" nillable="true"/>
  486.         </xs:sequence>
  487.         <xs:attributeGroup ref="tns:arrayElementAttributes"/>
  488.     </xs:complexType>
  489.  
  490.     <!-- *****************************************-->
  491.     <!-- element definitions -->
  492.     <!-- *****************************************-->
  493.  
  494.     <!-- tns:contact is the root element in instance documents -->
  495.     <xs:element name="contact">
  496.         <xs:complexType>
  497.             <xs:all>
  498.                 <!-- tns:ContactIDCollection is a collection of 1 or more ContactID elements -->
  499.                 <xs:element name="ContactIDCollection" type="tns:ContactIDCollection" minOccurs="1" maxOccurs="1" nillable="false">
  500.                     <!-- require unique element IDs on all ContactID entries -->
  501.                     <xs:unique name="ElementID_Must_Be_Unique_ContactIDCollection">
  502.                         <xs:selector xpath="tns:ContactID"/>
  503.                         <xs:field xpath="@ElementID"/>
  504.                     </xs:unique>
  505.                 </xs:element>
  506.  
  507.                 <!-- top level elements without hierarchy/labels applied -->
  508.                 <xs:element name="CreationDate" type="xs:dateTime"  minOccurs="1"   maxOccurs="1"/>
  509.  
  510.                 <xs:element name="Mailer"       type="tns:string"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  511.                 <xs:element name="ProgID"       type="tns:string"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  512.                 <xs:element name="Notes"        type="tns:string"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  513.  
  514.                 <xs:element name="Gender"       type="tns:gender"   minOccurs="0"   maxOccurs="1" nillable="true"/>
  515.  
  516.                 <!-- tns:NameCollection is a collection of 1 or more name elements -->
  517.                 <xs:element name="NameCollection" type="tns:NameCollection" minOccurs="0" maxOccurs="1" nillable="true">
  518.                     <!-- require unique element IDs on all names entries -->
  519.                     <xs:unique name="ElementID_Must_Be_Unique_NameCollection">
  520.                         <xs:selector xpath="tns:Name"/>
  521.                         <xs:field xpath="@ElementID"/>
  522.                     </xs:unique>
  523.                 </xs:element>
  524.  
  525.                 <!-- tns:PhotoCollection is a collection of 1 or more Photo elements -->
  526.                 <xs:element name="PhotoCollection" type="tns:PhotoCollection" minOccurs="0" maxOccurs="1" nillable="true">
  527.                     <!-- require unique element IDs on all Photo entries -->
  528.                     <xs:unique name="ElementID_Must_Be_Unique_PhotoCollection">
  529.                         <xs:selector xpath="tns:Photo"/>
  530.                         <xs:field xpath="@ElementID"/>
  531.                     </xs:unique>
  532.                 </xs:element>
  533.  
  534.                 <!-- tns:PersonCollection is a collection of 1 or more Person elements -->
  535.                 <xs:element name="PersonCollection" type="tns:PersonCollection" minOccurs="0" maxOccurs="1" nillable="true">
  536.                     <!-- require unique element IDs on all people entries -->
  537.                     <xs:unique name="ElementID_Must_Be_Unique_PersonCollection">
  538.                         <xs:selector xpath="tns:Person"/>
  539.                         <xs:field xpath="@ElementID"/>
  540.                     </xs:unique>
  541.                 </xs:element>
  542.  
  543.                 <!-- tns:PositionCollection is a collection of 1 or more Position elements -->
  544.                 <xs:element name="PositionCollection" type="tns:PositionCollection" minOccurs="0" maxOccurs="1" nillable="true">
  545.                     <!-- require unique element IDs on all Position entries -->
  546.                     <xs:unique name="ElementID_Must_Be_Unique_PositionCollection">
  547.                         <xs:selector xpath="tns:Position"/>
  548.                         <xs:field xpath="@ElementID"/>
  549.                     </xs:unique>
  550.                 </xs:element>
  551.  
  552.                 <!-- tns:dates is a collection of 1 or more Date elements -->
  553.                 <xs:element name="DateCollection" type="tns:DateCollection" minOccurs="0" maxOccurs="1" nillable="true">
  554.                     <!-- require unique element IDs on all Date entries -->
  555.                     <xs:unique name="ElementID_Must_Be_Unique_DateCollection">
  556.                         <xs:selector xpath="tns:Date"/>
  557.                         <xs:field xpath="@ElementID"/>
  558.                     </xs:unique>
  559.                 </xs:element>
  560.  
  561.                 <!-- tns:emailAddresses is a collection of 1 or more EmailAddress elements -->
  562.                 <xs:element name="EmailAddressCollection" type="tns:EmailAddressCollection" minOccurs="0" maxOccurs="1" nillable="true">
  563.                     <!-- require unique element IDs on all EmailAddress entries -->
  564.                     <xs:unique name="ElementID_Must_Be_Unique_EmailAddressCollection">
  565.                         <xs:selector xpath="tns:EmailAddress"/>
  566.                         <xs:field xpath="@ElementID"/>
  567.                     </xs:unique>
  568.                 </xs:element>
  569.  
  570.                 <!-- tns:phoneNumbers is a collection of 1 or more PhoneNumber elements -->
  571.                 <xs:element name="PhoneNumberCollection" type="tns:PhoneNumberCollection" minOccurs="0" maxOccurs="1" nillable="true">
  572.                     <!-- require unique element IDs on all PhoneNumber entries -->
  573.                     <xs:unique name="ElementID_Must_Be_Unique_PhoneNumberCollection">
  574.                         <xs:selector xpath="tns:PhoneNumber"/>
  575.                         <xs:field xpath="@ElementID"/>
  576.                     </xs:unique>
  577.                 </xs:element>
  578.  
  579.                 <!-- tns:PhysicalAddressCollection is a collection of 1 or more PhysicalAddress elements -->
  580.                 <xs:element name="PhysicalAddressCollection" type="tns:PhysicalAddressCollection" minOccurs="0" maxOccurs="1" nillable="true">
  581.                     <!-- require unique element IDs on all physicalAddresses entries -->
  582.                     <xs:unique name="ElementID_Must_Be_Unique_PhysicalAddressCollection">
  583.                         <xs:selector xpath="tns:PhysicalAddress"/>
  584.                         <xs:field xpath="@ElementID"/>
  585.                     </xs:unique>
  586.                 </xs:element>
  587.  
  588.                 <!-- tns:UrlCollection is a collection of 1 or more Url elements -->
  589.                 <xs:element name="UrlCollection" type="tns:UrlCollection" minOccurs="0" maxOccurs="1" nillable="true">
  590.                     <!-- require unique element IDs on all uri entries -->
  591.                     <xs:unique name="ElementID_Must_Be_Unique_UrlCollection">
  592.                         <xs:selector xpath="tns:Url"/>
  593.                         <xs:field xpath="@ElementID"/>
  594.                     </xs:unique>
  595.                 </xs:element>
  596.  
  597.                 <!-- tns:CertificateCollection is a collection of 1 or more Certificate elements -->
  598.                 <xs:element name="CertificateCollection" type="tns:CertificateCollection" minOccurs="0" maxOccurs="1" nillable="true">
  599.                     <!-- require unique element IDs on all Certificate entries -->
  600.                     <xs:unique name="ElementID_Must_Be_Unique_CertificateCollection">
  601.                         <xs:selector xpath="tns:Certificate"/>
  602.                         <xs:field xpath="@ElementID"/>
  603.                     </xs:unique>
  604.                 </xs:element>
  605.  
  606.                 <!-- tns:IMAddressCollection is a collection of 1 or more IMAddress elements -->
  607.                 <xs:element name="IMAddressCollection" type="tns:IMAddressCollection" minOccurs="0" maxOccurs="1" nillable="true">
  608.                     <!-- require unique element IDs on all IMAddress entries -->
  609.                     <xs:unique name="ElementID_Must_Be_Unique_IMAddressCollection">
  610.                         <xs:selector xpath="tns:IMAddress"/>
  611.                         <xs:field xpath="@ElementID"/>
  612.                     </xs:unique>
  613.                 </xs:element>
  614.  
  615.                 <!-- elements from other namespaces are allowed here -->
  616.                 <xs:element name="Extended" type="tns:Extended" nillable="true" minOccurs="1" maxOccurs="1" />
  617.  
  618.             </xs:all>
  619.  
  620.             <!-- c:Contact must have c:Version="1" attribute set -->
  621.             <xs:attribute name="Version"          type="xs:positiveInteger" fixed="1"/>
  622.         </xs:complexType>
  623.     </xs:element>
  624.  
  625. </xs:schema>
  626.  
  627.