<?xml version="1.0" encoding="UTF-8" ?>

<!--
XML Schema Rec
Generated by X-Meta 
Fri Sep 30 14:52:07 BST 2005
  -->
<xsd:schema version='1.0' elementFormDefault='qualified' attributeFormDefault='unqualified' id='wnu' targetNamespace='http://www.govtalk.gov.uk/taxation/WNU' xmlns='http://www.govtalk.gov.uk/taxation/WNU' xmlns:xsd='http://www.w3.org/2001/XMLSchema'>
  <xsd:include schemaLocation='http://www.hmrc.gov.uk/schemas/core-v2-0.xsd' />
  <xsd:annotation>
    <xsd:appinfo>
      <gt:KeyWords xmlns:gt='http://www.govtalk.gov.uk/CM/core'>taxation, PAYE, FBI, File By Internet, HMRC, Works Number Update, WNU</gt:KeyWords>
      <gms:Metadata xmlns:gms='http://www.govtalk.gov.uk/CM/gms-xs'>
        <gms:Audience>e-service developers</gms:Audience>
        <gms:Contributor>DecisionSoft Ltd</gms:Contributor>
        <gms:Creator>HMRC</gms:Creator>
        <gms:Date>
          <gms:Created>2003-06-30</gms:Created>
        </gms:Date>
        <gms:Date>
          <gms:Modified>2005-09-30</gms:Modified>
        </gms:Date>
        <gms:Format>
          <gms:MediaType>text/xml</gms:MediaType>
          <gms:Syntax>http://www.w3.org/2001/XMLSchema</gms:Syntax>
          <gms:Description>XML Schema, W3C Recommendation 2001</gms:Description>
        </gms:Format>
        <gms:Language>[ISO 639-2/B] ENG</gms:Language>
        <gms:Publisher>HMRC</gms:Publisher>
        <gms:Relation>
          <gms:Requires>core-v2-0</gms:Requires>
        </gms:Relation>
        <gms:Relation>
          <gms:ProvidesDefinitionOf>IRenvelope</gms:ProvidesDefinitionOf>
        </gms:Relation>
        <gms:Rights>
          <gms:Copyright>(C) Crown Copyright 2001-2005</gms:Copyright>
        </gms:Rights>
        <gms:Subject>
          <gms:Category>Economics, Finance and Tax</gms:Category>
        </gms:Subject>
        <gms:Title>Works Number Update</gms:Title>
        <gms:Type>message</gms:Type>
      </gms:Metadata>
    </xsd:appinfo>
  </xsd:annotation>
  <xsd:element name='IRenvelope'>
    <xsd:complexType>
      <xsd:sequence>
        <xsd:element minOccurs='1' maxOccurs='1' ref='IRheader' />
        <xsd:element name='WorksNumberUpdate' minOccurs='1' maxOccurs='1'>
          <xsd:complexType>
            <xsd:sequence>
              <xsd:element name='Employer' minOccurs='1' maxOccurs='1'>
                <xsd:complexType>
                  <xsd:sequence>
                    <xsd:element name='Name' minOccurs='0' maxOccurs='1'>
                      <xsd:simpleType>
                        <xsd:restriction base='PAYEstringType'>
                          <xsd:minLength value='1' />
                          <xsd:maxLength value='35' />
                        </xsd:restriction>
                      </xsd:simpleType>
                    </xsd:element>
                    <xsd:element name='Address' type='InternationalAddressStructure' minOccurs='1' maxOccurs='1' />
                  </xsd:sequence>
                </xsd:complexType>
              </xsd:element>
              <xsd:element name='RecordCount' minOccurs='1' maxOccurs='1'>
                <xsd:simpleType>
                  <xsd:restriction base='xsd:nonNegativeInteger'>
                    <xsd:maxInclusive value='999999' />
                  </xsd:restriction>
                </xsd:simpleType>
              </xsd:element>
              <xsd:element name='Employee' minOccurs='1' maxOccurs='unbounded'>
                <xsd:complexType>
                  <xsd:sequence>
                    <xsd:element name='Name' type='NameStructure' minOccurs='1' maxOccurs='1' />
                    <xsd:element name='NINO' minOccurs='1' maxOccurs='1'>
                      <xsd:simpleType>
                        <xsd:restriction base='PAYEstringType'>
                          <xsd:minLength value='9' />
                          <xsd:maxLength value='9' />
                          <xsd:pattern value='[A-Z]{2}[0-9]{6}[A-D]' />
                        </xsd:restriction>
                      </xsd:simpleType>
                    </xsd:element>
                    <xsd:element name='OldWorksNumber' type='WorksNumberType' minOccurs='0' maxOccurs='1' />
                    <xsd:element name='NewWorksNumber' type='WorksNumberType' minOccurs='1' maxOccurs='1' />
                  </xsd:sequence>
                </xsd:complexType>
              </xsd:element>
            </xsd:sequence>
          </xsd:complexType>
        </xsd:element>
      </xsd:sequence>
    </xsd:complexType>
  </xsd:element>
</xsd:schema>

