<?xml version="1.0" encoding="utf-8"?>
<!-- edited with XMLSpy v2008 sp1 (http://www.altova.com) by Hubert Matthews (DCSF) -->
<!-- 
Modified: 30/01/2006 - Zoƫ Colburn (Opportunity Links)
  Initial draft version

Modified: 25/07/2006 - Rob Moran (Opportunity Links)
  Added description details to all elements and attributes
  Changed TotalVacancies type from a boolean to an integer

Modified: 20/03/2008 - Hubert Matthews (DCSF)
    Extended to cover Section 12 requirements of the Childcare Act 2006 as part of the ISPP project

  -->
<xs:schema xmlns:apd="http://www.govtalk.gov.uk/people/AddressAndPersonalDetails" xmlns="http://www.opp-links.org.uk/XMLSchema/Childcare" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:lg="http://www.esd.org.uk/standards" targetNamespace="http://www.opp-links.org.uk/XMLSchema/Childcare" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.1b" id="ProviderTypes-v1-1b">
  <xs:annotation>
    <xs:documentation>Childcare provider data schema initially developed by Opportunity Links for passing structured childcare provider information</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:documentation>Modified to cater for the requirements of Section 12 of the Childcare Act 2006</xs:documentation>
  </xs:annotation>
  <xs:annotation>
    <xs:appinfo>
      <Metadata xmlns="http://www.govtalk.gov.uk/metadata/egms">
        <Category codeListID="GCL">People, communities and living; Childcare Information</Category>
        <Category codeListID="IPSV">Care; Childcare Information</Category>
        <ConformsTo>http://www.w3.org/2001/XMLSchema</ConformsTo>
        <Creator Href="mailto:enquiries@opp-links.org.uk">Opportunity Links</Creator>
        <Format Scheme="http://www.iana.org/assignments/media-types/">text/xml</Format>
        <Identifier Href="http://www.opp-links.org.uk/XMLSchema/Childcare/ProviderTypes-v1-0.xsd">ProviderTypes-v1-0</Identifier>
        <Modified Scheme="W3CDTF">2006-07-25</Modified>
        <Publisher Href="mailto:enquiries@opp-links.org.uk">Opportunity Links</Publisher>
        <Status>Agreed</Status>
        <StatusDescription>Agreed by GovTalk</StatusDescription>
        <Title>Childcare Provider Types 1.0</Title>
        <Type>architectural</Type>
        <Version>1.0</Version>
        <Copyright>Opportunity Links 2006</Copyright>
        <Created Scheme="W3CDTF">2006-01-30</Created>
        <Description>Childcare Provider Types</Description>
        <Language codeListID="ISO639-2">eng</Language>
        <Project>ChildcareLink Webservice</Project>
        <ProtectiveMarking>Unclassified</ProtectiveMarking>
        <ProvidesDefinitionOf Namespace="http://www.opp-links.org.uk/XMLSchema/Childcare">Childcare Provider Information</ProvidesDefinitionOf>
        <Modified Scheme="W3CDTF">2008-03-20</Modified>
        <Contributor>Hubert Matthews</Contributor>
      </Metadata>
    </xs:appinfo>
    <xs:documentation>The following external schemas are referenced (imported) by this schema and can be found on the GovTalk website - http://www.govtalk.gov.uk/
These schemas may require further referenced schemas to function correctly, but will also be available on the GovTalk website.
    </xs:documentation>
  </xs:annotation>
  <xs:import namespace="http://www.govtalk.gov.uk/people/AddressAndPersonalDetails" schemaLocation="AddressTypes-v2-0.xsd"/>
  <xs:import namespace="http://www.govtalk.gov.uk/people/AddressAndPersonalDetails" schemaLocation="ContactTypes-v1-3.xsd"/>
  <xs:import namespace="http://www.esd.org.uk/standards" schemaLocation="MetadataElement-v1.0.xsd"/>
  <!--======================================-->
  <!--Top level type-->
  <!--======================================-->
  <xs:complexType name="ProviderStructure">
    <xs:annotation>
      <xs:documentation>Data structure for childcare provider details and associated metadata</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:group ref="eGMSGroup">
        <xs:annotation>
          <xs:documentation>eGMS Metatdata</xs:documentation>
        </xs:annotation>
      </xs:group>
      <xs:element name="ProviderDetails" type="ProviderDetailStructure">
        <xs:annotation>
          <xs:documentation>Data on a single provision of childcare</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <!--======================================-->
  <xs:complexType name="ProviderDetailStructure">
    <xs:annotation>
      <xs:documentation>Data structure for childcare provider details</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="ProviderName" type="xs:string">
        <xs:annotation>
          <xs:documentation>The name of the provider</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ConsentVisibleAddress" type="xs:boolean">
        <xs:annotation>
          <xs:documentation>Does the provider consent to have physical address details published</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="SettingDetails" type="ContactInformationStructure" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Setting of the childcare</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ContactDetails" type="ContactInformationStructure" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Contact details for the provider if different from the setting details</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ChildcareType" type="xs:string">
        <xs:annotation>
          <xs:documentation>Details of the childcare types of the provider. An open field to be provided by the Local Authority</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ProvisionType" type="ProvisionTypeType">
        <xs:annotation>
          <xs:documentation>Type of childcare provided</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ChildcareAges" type="ChildcareAgeListStructure" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Age range information the provider caters for.
This field is intended to be used by both registered and non-registered providers, thus it does not structure the information around the registration types like the ofsted schema. Also the child number limits are optional.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ChildcarePeriods" type="ChildcarePeriodListStructure" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Broad period of provision. from Ofsted. e.g. 'Before school'</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ChildcareTimes" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional details outlining the times and duration of the care the provided. From the Local Authority.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Times" type="xs:string" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Opening times of the provider. e.g. 9-5:30 mon-fri</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="OtherHours" type="xs:string" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Further hours provider is available</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="Availability" type="xs:string" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Types of time provider is available. e.g. term-time or working hours</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="TimesOfFundedPlaces" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional information specifying when the provider offers funded places</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="Times" type="xs:string" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Opening times of the provider. e.g. 9-5:30 mon-fri</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="OtherHours" type="xs:string" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Further hours provider is available</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="Availability" type="xs:string" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Types of time provider is available. e.g. term-time or working hours</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="CostDetails" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional details about the provider's costs</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:choice>
            <xs:annotation>
              <xs:documentation>Choice between outlining that the provider needs contacting for cost details or having the cost details included</xs:documentation>
            </xs:annotation>
            <xs:element name="ContactForCosts" type="xs:boolean" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Optional flag indicating whether the provider must be contacted for cost information</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:sequence>
              <xs:element name="Costs" type="xs:string" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>Details outlining the cost information for the provider</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element name="OtherCosts" type="xs:string" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>Additional information related to costs. e.g. discounts</xs:documentation>
                </xs:annotation>
              </xs:element>
            </xs:sequence>
          </xs:choice>
        </xs:complexType>
      </xs:element>
      <xs:element name="Pickups" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional details about whether the provider offers a pick up service for children</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="SchoolList" type="xs:string" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Optional details outlining a list of schools the provider is willing to pick up from</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="Details" type="xs:string" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Optional further details about the pick up service offered by the provider</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
          <xs:attribute name="HasProvision" type="xs:boolean" use="required">
            <xs:annotation>
              <xs:documentation>Flag specifying whether the provider picks up children</xs:documentation>
            </xs:annotation>
          </xs:attribute>
        </xs:complexType>
      </xs:element>
      <xs:element name="VacancyDetails" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional details about the provider's vacancies</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:choice>
            <xs:annotation>
              <xs:documentation>Choice between outlining that the provider needs contacting for vacancy details or having the vacancy details included</xs:documentation>
            </xs:annotation>
            <xs:element name="ContactForVacancies" type="xs:boolean" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Optional flag indicating whether the provider must be contacted for vacancy information</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:sequence>
              <xs:element name="VacancyInformation" type="xs:string" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>Details about the vacancies available at the provision (both current and upcoming)</xs:documentation>
                </xs:annotation>
              </xs:element>
              <xs:element name="TotalVacancies" type="xs:int" minOccurs="0">
                <xs:annotation>
                  <xs:documentation>The total amount of vacancies (both current and upcoming) of the provider</xs:documentation>
                </xs:annotation>
              </xs:element>
            </xs:sequence>
          </xs:choice>
        </xs:complexType>
      </xs:element>
      <xs:element name="SpecialProvisions" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional information about specific special provisions offered by the provider</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="SpecialNeeds" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Information about special needs catered for by the provider</xs:documentation>
              </xs:annotation>
              <xs:complexType>
                <xs:sequence>
                  <xs:element name="Experience" type="xs:string" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Details of any experience the provider has working with children with special needs</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Confidence" type="xs:string" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Details about the confidence the provider has working with children with special needs</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                  <xs:element name="Details" type="xs:string" minOccurs="0">
                    <xs:annotation>
                      <xs:documentation>Details about special needs provision of the provider</xs:documentation>
                    </xs:annotation>
                  </xs:element>
                </xs:sequence>
              </xs:complexType>
            </xs:element>
            <xs:element name="SpecialDiet" type="FacilitiesStructure" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Information about special diets catered for by the provider. e.g. vegetarian</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="CulturalProvision" type="FacilitiesStructure" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Information about cultural provision offered by the provider</xs:documentation>
              </xs:annotation>
            </xs:element>
            <xs:element name="WheelchairAccess" type="FacilitiesStructure" minOccurs="0">
              <xs:annotation>
                <xs:documentation>Information about wheelchair access offered by the provider</xs:documentation>
              </xs:annotation>
            </xs:element>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="Facilities" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional details outlining the facilities offered by the provider. e.g. pets</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="QualityAwards" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional details outlining any quality awards the provider has</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="OtherInformation" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional further textual information about the provider</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="Country" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional details about the country the provider record relates to</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="CISID" type="xs:int" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional unique identifier for the Children's Information Service responsible for the provider</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ModificationDate" type="xs:date" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional date that the details of the provider were last modified</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RegistrationDetails" type="RegistrationStructure" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Details pertaining to a providers registration. The absence of this denotes that the provider is unregistered.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <!-- elements to be removed -->
      <xs:element name="CaterForOverEights" type="xs:boolean" minOccurs="0" maxOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional flag specifying whether the provider caters for children over eight years old</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="ImmediateVacancies" type="xs:boolean" minOccurs="0" maxOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional flag specifying whether the provider has immediate vacancies</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="NotRegisteredUnderTwoHours" type="xs:boolean" minOccurs="0" maxOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional flag specifying whether the provider is not registered due to care only being offered for less than two hours per day. Note - this is used in Scotland only</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="RegistrationExempt" type="xs:boolean" minOccurs="0" maxOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional flag specifying whether the provider is exempt from registration. e.g. the provider being on a military base</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="ProviderID" type="xs:string" use="required">
      <xs:annotation>
        <xs:documentation>The unique identifier of the provider.  Used to link multiple provision records back to a single provider</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:group name="eGMSGroup">
    <xs:annotation>
      <xs:documentation>eGMS metatdata</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="DC.Title" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Title of the resource</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DC.Identifier" minOccurs="0">
        <xs:annotation>
          <xs:documentation>An unambiguous reference to the resource within a given context</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:simpleContent>
            <xs:extension base="xs:string">
              <xs:attribute name="Href" type="xs:anyURI"/>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
      <xs:element name="DC.Description" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Description of the resource. Multiple formats of the description can be input to support existing presentation markup</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:simpleContent>
            <xs:extension base="xs:string">
              <xs:attribute name="Format" type="FormatType">
                <xs:annotation>
                  <xs:documentation>Markup format of the description.</xs:documentation>
                </xs:annotation>
              </xs:attribute>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
      <xs:element name="DCTerms.Audience" type="lg:SimpleLiteralStructure" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>SimpleLiteralStructire is the base type for the LGAL type. Thus a DCTerms.Audience instance element could hold a plain string, or cast it to an LGAL typed element.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DC.Language" type="xs:language" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Language of the resource</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DC.Subject" type="lg:SimpleLiteralStructure" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>SimpleLiteralStructure is the base type for the IPSV type. Thus a DC.Subject instance element could hold a plain string, or cast it to an IPSV typed element.</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DC.Creator" minOccurs="0">
        <xs:annotation>
          <xs:documentation>An entity primarily responsible for making the content of the resource</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:simpleContent>
            <xs:extension base="xs:string">
              <xs:attribute name="Href" type="xs:anyURI"/>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
      <xs:element name="DC.Publisher" minOccurs="0">
        <xs:annotation>
          <xs:documentation>An entity responsible for making the resource available</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:simpleContent>
            <xs:extension base="xs:string">
              <xs:attribute name="Href" type="xs:anyURI"/>
            </xs:extension>
          </xs:simpleContent>
        </xs:complexType>
      </xs:element>
      <xs:element name="DC.Date.Created" type="xs:dateTime">
        <xs:annotation>
          <xs:documentation>Date of creation of the resource</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="DC.Date.Modified" type="xs:dateTime" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Date on which the resource was changed</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="eGMS.Copyright" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Statement and identifier indicating the legal ownership and rights regarding use and re-use of all or part of the resource</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="eGMS.Keyword" type="xs:string" minOccurs="0" maxOccurs="unbounded">
        <xs:annotation>
          <xs:documentation>Keywords for the resource</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:group>
  <xs:simpleType name="FormatType">
    <xs:annotation>
      <xs:documentation>Type for restricting string formats (for DC.Description)</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:enumeration value="plain"/>
      <xs:enumeration value="html"/>
      <xs:enumeration value="xhtml"/>
      <xs:enumeration value="bbcode"/>
      <xs:enumeration value="structuredtext"/>
      <xs:enumeration value="rest"/>
      <xs:enumeration value="wiki"/>
    </xs:restriction>
  </xs:simpleType>
  <!--======================================-->
  <!--Structures part of ProviderDetailStructure-->
  <!--======================================-->
  <xs:complexType name="ChildcareTypeStructure">
    <xs:annotation>
      <xs:documentation>Data structure for types of childcare available</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="ID" type="xs:int" use="required">
          <xs:annotation>
            <xs:documentation>A unique identifier for the childcare type</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <xs:complexType name="ContactInformationStructure">
    <xs:annotation>
      <xs:documentation>Data structure for contact information</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="ContactName" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional contact name for the contact information</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="TelephoneNumber" type="apd:TelephoneStructure">
        <xs:annotation>
          <xs:documentation>Telephone number for the contact information. Uses the TelephoneStructure type from the imported ContactTypes GovTalk schema</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="FaxNumber" type="apd:FaxStructure" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional fax numbers for the contact information. Uses the FaxStructure type from the imported ContactTypes GovTalk schema</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="PostalAddress" type="apd:UKAddressStructure">
        <xs:annotation>
          <xs:documentation>Postal address for the contact information. Uses the UKAddressStructure type from the imported AddressTypes GovTalk schema</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="EmailAddress" type="apd:EmailStructure" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional email address for the contact information. Uses the EmailStructure type from the imported ContactTypes GovTalk schema</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="WebsiteAddress" type="xs:string" minOccurs="0">
        <xs:annotation>
          <xs:documentation>Optional website address for the contact information</xs:documentation>
        </xs:annotation>
      </xs:element>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ChildcarePeriodListStructure">
    <xs:annotation>
      <xs:documentation>Broad periods of cahildcare offered by provider from Ofsted</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="ChildcarePeriod" type="ChildcarePeriodType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="ChildcarePeriodType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="ALYR">
        <xs:annotation>
          <xs:documentation>All year round</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="ASCH">
        <xs:annotation>
          <xs:documentation>After school</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="BSCH">
        <xs:annotation>
          <xs:documentation>Before school</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="3HPD">
        <xs:annotation>
          <xs:documentation>More than 3 hours per day</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="5DWK">
        <xs:annotation>
          <xs:documentation>At least 5 hours per week</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="45WY">
        <xs:annotation>
          <xs:documentation>At least 45 weeks per year</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SCTM">
        <xs:annotation>
          <xs:documentation>During school term</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="WHOL">
        <xs:annotation>
          <xs:documentation>Weekday during school holiday</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="WEND">
        <xs:annotation>
          <xs:documentation>Weekend</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="WKAM">
        <xs:annotation>
          <xs:documentation>Weekday AM</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="WKPM">
        <xs:annotation>
          <xs:documentation>Weekday PM</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="ProvisionTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="CCD">
        <xs:annotation>
          <xs:documentation>
                        Childcare on Domestic Premises - childcare provider on domestic premises (working with three or more other people, including assistants on domestic premises)
                    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CCN">
        <xs:annotation>
          <xs:documentation>
                        Childcare on non-Domestic Premises - childcare provider on non-domestic premises (working with three or more other people premises which are not domestic)
                    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CMR">
        <xs:annotation>
          <xs:documentation>
                        Childminder - caring for children on domestic premises which are not the home of one of the children and working with no more than two other childminders or assistants
                    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="HCR">
        <xs:annotation>
          <xs:documentation>
                        Home Childcarer - caring for children wholly or mainly in the home of a child under care, and caring for children from no more than two families in the home of one of the children e.g. nannies, au pairs
                    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="ChildcareAgeListStructure">
    <xs:annotation>
      <xs:documentation>Age ranges by registration type
with maximum number limits</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="ChildcareAge" type="ChildcareAgeStructure" minOccurs="0" maxOccurs="unbounded"/>
      <xs:element name="ChildNumberOverallLimit" type="xs:int" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="ChildcareAgeStructure">
    <xs:annotation>
      <xs:documentation>An age range with optional number limit</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="AgeFrom" type="ChildcareAgeType"/>
      <xs:element name="AgeTo" type="ChildcareAgeType"/>
      <xs:element name="ChildNumberLimit" type="xs:integer" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="ChildcareAgeType">
    <xs:restriction base="xs:int">
      <xs:minInclusive value="0"/>
      <xs:maxInclusive value="20"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="FacilitiesStructure">
    <xs:annotation>
      <xs:documentation>Data structure for facilities available</xs:documentation>
    </xs:annotation>
    <xs:simpleContent>
      <xs:extension base="xs:string">
        <xs:attribute name="HasProvision" type="xs:boolean" use="required">
          <xs:annotation>
            <xs:documentation>Flag specifying whether this provision is offered</xs:documentation>
          </xs:annotation>
        </xs:attribute>
      </xs:extension>
    </xs:simpleContent>
  </xs:complexType>
  <!--======================================-->
  <!--Registration related types-->
  <!--======================================-->
  <xs:complexType name="RegistrationStructure">
    <xs:annotation>
      <xs:documentation>Data structure for registration details</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="RegistrationDate" type="xs:date"/>
      <xs:element name="RegistrationConditions">
        <xs:annotation>
          <xs:documentation>Conditions attached to the registration.</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="RegistrationCondition" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="RegistrationTypes">
        <xs:annotation>
          <xs:documentation>One or more of EYR, CCR, VCR</xs:documentation>
        </xs:annotation>
        <xs:complexType>
          <xs:sequence>
            <xs:element name="RegistrationType" type="RegistrationTypeType" maxOccurs="3"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
      <xs:element name="RegistrationStatus" type="RegistrationStatusDetailStructure">
        <xs:annotation>
          <xs:documentation>Defaults to ACTV (Active)</xs:documentation>
        </xs:annotation>
      </xs:element>
      <xs:element name="LastInspection" type="InspectionStructure"/>
      <xs:element name="EnforcementHistoryList">
        <xs:complexType>
          <xs:sequence>
            <xs:element name="EnforcementDetail" type="EnforcementDetailType" minOccurs="0" maxOccurs="unbounded"/>
          </xs:sequence>
        </xs:complexType>
      </xs:element>
    </xs:sequence>
    <xs:attribute name="RegistrationId" type="ChildCareReferenceNumber" use="required">
      <xs:annotation>
        <xs:documentation>Ofsted URN</xs:documentation>
      </xs:annotation>
    </xs:attribute>
  </xs:complexType>
  <xs:simpleType name="ChildCareReferenceNumber">
    <xs:annotation>
      <xs:documentation>Ofsted unique RN</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:minLength value="6"/>
      <xs:maxLength value="20"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:simpleType name="RegistrationTypeType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="EYR">
        <xs:annotation>
          <xs:documentation>Early Years Register</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CCR">
        <xs:annotation>
          <xs:documentation>Compulsory Childcare Register</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="VCR">
        <xs:annotation>
          <xs:documentation>Voluntary Childcare Register</xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="RegistrationStatusDetailStructure">
    <xs:annotation>
      <xs:documentation>Details of a single registration status</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="RegistrationStatus" type="RegistrationStatusType"/>
      <xs:element name="RegistrationStatusStartDate" type="xs:date"/>
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="RegistrationStatusType">
    <xs:restriction base="xs:string">
      <xs:enumeration value="ACTV">
        <xs:annotation>
          <xs:documentation>
                        Active Registration
                    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="CANC">
        <xs:annotation>
          <xs:documentation>
                        Ofsted Cancelled Registration
                    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="INAC">
        <xs:annotation>
          <xs:documentation>
                        Inactive registration / application - Open in Error, Application Withdrawn
                    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="PROP">
        <xs:annotation>
          <xs:documentation>
                        Proposed Application
                    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="REFU">
        <xs:annotation>
          <xs:documentation>
                        Ofsted Refused Registration
                    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="RESG">
        <xs:annotation>
          <xs:documentation>
                        Provider Resignation
                    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
      <xs:enumeration value="SUSP">
        <xs:annotation>
          <xs:documentation>
                        Ofsted Suspension
                    </xs:documentation>
        </xs:annotation>
      </xs:enumeration>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="InspectionStructure">
    <xs:annotation>
      <xs:documentation>Data structure for a registration inspection</xs:documentation>
    </xs:annotation>
    <xs:sequence>
      <xs:element name="InspectionType" type="xs:string"/>
      <xs:element name="InspectionDate" type="xs:date"/>
      <xs:element name="InspectionOverallJudgementDescription" type="InspectionOverallJudgementDescriptionType"/>
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="InspectionOverallJudgementDescriptionType">
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="EnforcementHistoryListStructure">
    <xs:sequence>
      <xs:element name="EnforcementDetail" type="EnforcementDetailType" minOccurs="0" maxOccurs="unbounded"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="EnforcementDetailType">
    <xs:sequence>
      <xs:element name="EnforcementCategoryDescription" type="EnforcementCategoryDescriptionType"/>
      <xs:element name="EnforcementStartDate" type="xs:date"/>
      <xs:element name="EnforcementEndDate" type="xs:date" minOccurs="0"/>
      <xs:element name="RegistrationSuspensionDetail" type="RegistrationSuspensionDetailType" minOccurs="0"/>
      <xs:element name="RegistrationCancellationDetail" type="RegistrationCancellationDetailType" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
  <xs:simpleType name="EnforcementCategoryDescriptionType">
    <xs:annotation>
      <xs:documentation>Description of the Ofsted Enforcement Category</xs:documentation>
    </xs:annotation>
    <xs:restriction base="xs:string">
      <xs:minLength value="1"/>
      <xs:maxLength value="80"/>
    </xs:restriction>
  </xs:simpleType>
  <xs:complexType name="RegistrationCancellationDetailType">
    <xs:sequence>
      <xs:element name="NOIDate" type="xs:date"/>
    </xs:sequence>
  </xs:complexType>
  <xs:complexType name="RegistrationSuspensionDetailType">
    <xs:sequence>
      <xs:element name="SuspensionType" type="xs:string"/>
      <xs:element name="SuspensionStartDate" type="xs:date"/>
      <xs:element name="SuspensionEndDate" type="xs:date" minOccurs="0"/>
    </xs:sequence>
  </xs:complexType>
</xs:schema>