<?xml version='1.0'?>
<schema
  xmlns='http://www.w3.org/1999/XMLSchema'
  xmlns:p3p='http://www.w3.org/2000/09/15/P3Pv1'
  targetNamespace='http://www.w3.org/2000/09/15/P3Pv1'
  elementFormDefault='qualified'>

<!-- Basic P3P Data Type -->
 <simpleType name='yes_no' base='string'>
  <enumeration value='yes'/>
  <enumeration value='no'/>
 </simpleType>


<!-- *********** Policy Refernece *********** -->
<!-- ************** META ************** -->
 <element name='META'>
  <complexType content='mixed'>
   <element ref='p3p:POLICY-REFERENCES'/>
  </complexType>
 </element>

<!-- ******* POLICY-REFERENCES ******** -->
 <element name='POLICY-REFERENCES'>
  <complexType content='elementOnly'>
   <element ref='p3p:EXPIRY' minOccurs='0'/>
   <element ref='p3p:POLICY-REF' minOccurs='0' maxOccurs='unbounded'/>
   <element ref='p3p:POLICIES' minOccurs='0'/>
  </complexType>
 </element>

 <element name='POLICY-REF'>
  <complexType content='elementOnly'>
   <element name='INCLUDE' minOccurs='0' maxOccurs='unbounded' type='uriReference'/>
   <element name='EXCLUDE' minOccurs='0' maxOccurs='unbounded' type='uriReference'/>
   <element name='EMBEDDED-INCLUDE' minOccurs='0' maxOccurs='unbounded' type='uriReference'/>
   <element name='EMBEDDED-EXCLUDE' minOccurs='0' maxOccurs='unbounded' type='uriReference'/>
   <element name='METHOD' minOccurs='0' maxOccurs='unbounded' type='uriReference'/>
   <attribute name='about' type='uriReference' use='required'/>
  </complexType>
 </element>

<!-- ************* EXPIRY ************* -->
 <element name='EXPIRY'>
  <complexType content='empty'>
   <attribute name='max-age' type='nonNegativeInteger' use='optional'/>
   <attribute name='date' type='string' use='optional'/>
  </complexType>
 </element>

<!-- ************ POLICIES ************ -->
 <element name='POLICIES'>
  <complexType content='elementOnly'>
   <element ref='p3p:POLICY' minOccurs='0' maxOccurs='unbounded'/>
  </complexType>
 </element>


<!-- **************** Policy **************** -->
<!-- ************* POLICY ************* -->
 <element name='POLICY'>
  <complexType content='elementOnly'>
   <element ref='p3p:EXTENSION' minOccurs='0' maxOccurs='unbounded'/>
   <element ref='p3p:EXPIRY' minOccurs='0'/>
   <element ref='p3p:DATASCHEMA' minOccurs='0'/>
   <element ref='p3p:ENTITY'/>
   <element ref='p3p:ACCESS'/>
   <element ref='p3p:DISPUTES-GROUP' minOccurs='0'/>
   <element ref='p3p:STATEMENT' minOccurs='0' maxOccurs='unbounded'/>
   <element ref='p3p:EXTENSION' minOccurs='0' maxOccurs='unbounded'/>
   <attribute name='discuri' type='uriReference' use='required'/>
   <attribute name='opturi' type='uriReference' use='optional'/>
   <attribute name='name' type='ID' use='optional'/>
  </complexType>
 </element>

<!-- ************* ENTITY ************* -->
 <element name='ENTITY'>
  <complexType content='elementOnly'>
   <element ref='p3p:EXTENSION' minOccurs='0' maxOccurs='unbounded'/>
   <element ref='p3p:DATA-GROUP'/>
   <element ref='p3p:EXTENSION' minOccurs='0' maxOccurs='unbounded'/>
  </complexType>
 </element>

<!-- ************* ACCESS ************* -->
 <element name='ACCESS'>
  <complexType content='elementOnly'>
   <choice>
    <element name='nonident' type='p3p:access-value'/>
    <element name='all' type='p3p:access-value'/>
    <element name='contact_and_other' type='p3p:access-value'/>
    <element name='ident_contact' type='p3p:access-value'/>
    <element name='other_ident' type='p3p:access-value'/>
    <element name='none' type='p3p:access-value'/>
   </choice>
   <element ref='p3p:EXTENSION' minOccurs='0' maxOccurs='unbounded'/>
  </complexType>
 </element>

 <complexType name='access-value' content='empty'/>

<!-- ************ DISPUTES ************ -->
 <element name='DISPUTES-GROUP'>
  <complexType content='elementOnly'>
   <element ref='p3p:DISPUTES' maxOccurs='unbounded'/>
   <element ref='p3p:EXTENSION' minOccurs='0' maxOccurs='unbounded'/>
  </complexType>
 </element>

 <element name='DISPUTES'>
  <complexType content='elementOnly'>
   <element ref='p3p:EXTENSION' minOccurs='0' maxOccurs='unbounded'/>
   <choice minOccurs='0'>
    <sequence>
     <element ref='p3p:LONG-DESCRIPTION'/>
     <element ref='p3p:IMG' minOccurs='0'/>
     <element ref='p3p:REMEDIES' minOccurs='0'/>
     <element ref='p3p:EXTENSION' minOccurs='0' maxOccurs='unbounded'/>
    </sequence>
    <sequence>
     <element ref='p3p:IMG'/>
     <element ref='p3p:REMEDIES' minOccurs='0'/>
     <element ref='p3p:EXTENSION' minOccurs='0' maxOccurs='unbounded'/>
    </sequence>
    <sequence>
     <element ref='p3p:REMEDIES'/>
     <element ref='p3p:EXTENSION' minOccurs='0' maxOccurs='unbounded'/>
    </sequence>
   </choice>
   <attribute name='resolution-type' use='required'>
    <simpleType base='string'>
     <enumeration value='service'/>
     <enumeration value='independent'/>
     <enumeration value='court'/>
     <enumeration value='law'/>
    </simpleType>
   </attribute>
   <attribute name='service' type='uriReference' use='required'/>
   <attribute name='verification' type='string' use='optional'/>
   <attribute name='short-description' type='string' use='optional'/>
  </complexType>
 </element>

<!-- ******** LONG-DESCRIPTION ******** -->
 <element name='LONG-DESCRIPTION'>
  <simpleType base='string'/>
 </element>

<!-- ************** IMG *************** -->
 <element name='IMG'>
  <complexType content='empty'>
   <attribute name='src' type='uriReference' use='required'/>
   <attribute name='width' type='nonNegativeInteger' use='optional'/>
   <attribute name='height' type='nonNegativeInteger' use='optional'/>
   <attribute name='alt' type='string' use='required'/>
  </complexType>
 </element>

<!-- ************ REMEDIES ************ -->
 <element name='REMEDIES'>
  <complexType content='elementOnly'>
   <choice maxOccurs='unbounded'>
    <element name='correct' type='p3p:remedies-value'/>
    <element name='money' type='p3p:remedies-value'/>
    <element name='law' type='p3p:remedies-value'/>
   </choice>
   <element ref='p3p:EXTENSION' minOccurs='0' maxOccurs='unbounded'/>
  </complexType>
 </element>

 <complexType name='remedies-value' content='empty'/>

<!-- *********** STATEMENT ************ -->
 <element name='STATEMENT'>
  <complexType content='elementOnly'>
   <element ref='p3p:EXTENSION' minOccurs='0' maxOccurs='unbounded'/>
   <element name='CONSEQUENCE' minOccurs='0' type='string'/>
   <element ref='p3p:PURPOSE'/>
   <element ref='p3p:RECIPIENT'/>
   <element ref='p3p:RETENTION'/>
   <element ref='p3p:DATA-GROUP' maxOccurs='unbounded'/>
   <element ref='p3p:EXTENSION' minOccurs='0' maxOccurs='unbounded'/>
  </complexType>
 </element>

<!-- ************ PURPOSE ************* -->
 <element name='PURPOSE'>
  <complexType content='elementOnly'>
   <choice maxOccurs='unbounded'>
    <element name='current' type='p3p:purpose-value'/>
    <element name='admin' type='p3p:purpose-value'/>
    <element name='develop' type='p3p:purpose-value'/>
    <element name='customization' type='p3p:purpose-value'/>
    <element name='tailoring' type='p3p:purpose-value'/>
    <element name='pseudo-analysis' type='p3p:purpose-value'/>
    <element name='pseudo-decision' type='p3p:purpose-value'/>
    <element name='individual-analysis' type='p3p:purpose-value'/>
    <element name='individual-decision' type='p3p:purpose-value'/>
    <element name='contact' type='p3p:purpose-value'/>
    <element name='historical' type='p3p:purpose-value'/>
    <element name='telemarketing' type='p3p:purpose-value'/>
    <element name='other-purpose'>
     <complexType content='mixed'>
      <attribute name='required' use='optional' type='p3p:required-value'/>
     </complexType>
    </element>
   </choice>
   <element ref='p3p:EXTENSION' minOccurs='0' maxOccurs='unbounded'/>
  </complexType>
 </element>


 <simpleType name='required-value' base='string'>
  <enumeration value='always'/>
  <enumeration value='opt_in'/>
  <enumeration value='opt_out'/>
 </simpleType>

 <complexType name='purpose-value' content='empty'>
  <attribute name='required' use='optional' type='p3p:required-value'/>
 </complexType>

<!-- *********** RECIPIENT ************ -->
 <element name='RECIPIENT'>
  <complexType content='elementOnly'>
   <choice maxOccurs='unbounded'>
    <element name='ours'>
     <complexType content='elementOnly'>
      <element ref='p3p:recipient-description' minOccurs='0' maxOccurs='unbounded'/>
     </complexType>
    </element>
    <element name='same' type='p3p:recipient-value'/>
    <element name='other-recipient' type='p3p:recipient-value'/>
    <element name='delivery' type='p3p:recipient-value'/>
    <element name='public' type='p3p:recipient-value'/>
    <element name='unrelated' type='p3p:recipient-value'/>
   </choice>
   <element ref='p3p:EXTENSION' minOccurs='0' maxOccurs='unbounded'/>
  </complexType>
 </element>

 <complexType name='recipient-value' content='elementOnly'>
  <element ref='p3p:recipient-description' minOccurs='0' maxOccurs='unbounded'/>
  <attribute name='required' use='optional' type='p3p:required-value'/>
 </complexType>

 <element name='recipient-description'>
  <complexType content='mixed'/>
 </element>

<!-- *********** RETENTION ************ -->
 <element name='RETENTION'>
  <complexType content='elementOnly'>
   <choice>
    <element name='no-retention' type='p3p:retention-value'/>
    <element name='stated-purpose' type='p3p:retention-value'/>
    <element name='legal-requirement' type='p3p:retention-value'/>
    <element name='indefinitely' type='p3p:retention-value'/>
    <element name='business-practices' type='p3p:retention-value'/>
   </choice>
   <element ref='p3p:EXTENSION' minOccurs='0' maxOccurs='unbounded'/>
  </complexType>
 </element>

 <complexType name='retention-value' content='empty'/>

<!-- ************** DATA ************** -->
 <element name='DATA-GROUP'>
  <complexType content='elementOnly'>
   <element ref='p3p:DATA' maxOccurs='unbounded'/>
   <element ref='p3p:EXTENSION' minOccurs='0' maxOccurs='unbounded'/>
   <attribute name='base' type='uriReference' use='default' 
              value='http://www.w3.org/TR/P3P/base'/>
  </complexType>
 </element>

 <element name='DATA'>
  <complexType content='mixed'>
   <sequence minOccurs='0' maxOccurs='unbounded'>
    <element ref='p3p:CATEGORIES'/>
   </sequence>
   <attribute name='ref' type='uriReference' use='required'/>
   <attribute name='optional' use='default' value='no' type='p3p:yes_no'/>
  </complexType>
 </element>


<!-- ************** Data Schema ************* -->
<!-- *********** DATASCHEMA *********** -->
 <element name='DATASCHEMA'>
  <complexType content='elementOnly'>
   <choice minOccurs='0' maxOccurs='unbounded'>
    <element ref='p3p:DATA-DEF'/>
    <element ref='p3p:DATA-STRUCT'/>
    <element ref='p3p:EXTENSION'/>
   </choice>
  </complexType>
 </element>

 <complexType name='data-def' content='elementOnly'>
  <element ref='p3p:CATEGORIES' minOccurs='0'/>
  <element ref='p3p:LONG-DESCRIPTION' minOccurs='0'/>
  <attribute name='name' type='ID' use='required'/>
  <attribute name='structref' type='uriReference' use='optional'/>
  <attribute name='short-description' type='string' use='optional'/>
 </complexType>

 <element name='DATA-DEF' type='p3p:data-def'/>
 <element name='DATA-STRUCT' type='p3p:data-def'/>

<!-- *********** CATEGORIES *********** -->
 <element name='CATEGORIES'>
  <complexType content='elementOnly'>
   <choice maxOccurs='unbounded'>
    <element name='physical' type='p3p:categories-value'/>
    <element name='online' type='p3p:categories-value'/>
    <element name='uniqueid' type='p3p:categories-value'/>
    <element name='purchase' type='p3p:categories-value'/>
    <element name='financial' type='p3p:categories-value'/>
    <element name='computer' type='p3p:categories-value'/>
    <element name='navigation' type='p3p:categories-value'/>
    <element name='interactive' type='p3p:categories-value'/>
    <element name='demographic' type='p3p:categories-value'/>
    <element name='content' type='p3p:categories-value'/>
    <element name='state' type='p3p:categories-value'/>
    <element name='political' type='p3p:categories-value'/>
    <element name='health' type='p3p:categories-value'/>
    <element name='preference' type='p3p:categories-value'/>
    <element name='government' type='p3p:categories-value'/>
    <element name='other' type='string'/>
   </choice>
  </complexType>
 </element>

 <complexType name='categories-value' content='empty'/>

<!-- *********** EXTENSION ************ -->
 <element name='EXTENSION'>
  <complexType content='mixed'>
   <any minOccurs='0' maxOccurs='unbounded' processContents='skip'/>
   <attribute name='optional' use='default' value='yes' type='p3p:yes_no'/>
  </complexType>
 </element>


</schema>
