<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:ers="http://www.fishregister.gov.uk/schema/ers/v1" xmlns:xs="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.fishregister.gov.uk/schema/ers/v1" elementFormDefault="qualified" attributeFormDefault="unqualified" version="1.3">
  <xs:include schemaLocation="ers-codes-1.3-UK.xsd"/>
  <xs:element name="ERS">
    <xs:annotation>
      <xs:documentation>Tag indicating the start of the ERS message. It contains the definition of the logbook message structures.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice>
        <xs:element ref="ers:LOG">
          <xs:annotation>
            <xs:documentation>Tag indicating the start of a logbook record. A standard logbook record contains one or more of the following declaration types: DEP, FAR, COE, COX, DIS, PNO, EOF, RTP, LAN, TRA, RLC or GBRCON.</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:choice>
      <xs:attribute name="RN">
        <xs:annotation>
          <xs:documentation>The Record Number of this ERS message. Fixed format defined by the pattern: "AAAYYYYMMDD999999" (AAA = Alphanumeric String, YYYY = Year, MM = Month, DD = Date, 999999 = Zero-Padded Numeric.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="17"/>
            <xs:pattern value="[a-zA-Z]{3}(\d{4}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01]))[0-9]{6}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="GBRRN">
        <xs:annotation>
          <xs:documentation>The GB Record Number of this ERS message. Fixed format defined by the pattern:  "RSSNoYYYYMMDD999999" (RSSNo = RSS Number, YYYY = Year, MM = Month, DD = Date, 999999 = Zero-Padded Numeric.) Example GBRRN: "A1234520090623000001"</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="20"/>
            <xs:pattern value="[a-zA-Z0-9]{20}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="RD" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation>The transmission date of the message. Fixed format defined by the pattern: "YYYY-MM-DD" (YYYY = Year, MM = Month, DD = Date. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="RT" use="required">
        <xs:annotation>
          <xs:documentation>The transmission time of the message. Fixed format defined by the pattern: "HH:MM" (HH = Hours, MM = Minutes. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="([01]\d|2[0-3]):[0-5]\d"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="LOG">
    <xs:annotation>
      <xs:documentation>Tag indicating the start of a logbook record. A standard logbook record contains one or more of the following declaration types: DEP, FAR, COE, COX, DIS, PNO, EOF, RTP, LAN, TRA, RLC or GBRCON.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ers:DEP" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Tag indicating the start of a departure message. It is required on every departure from port.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:FAR" minOccurs="0" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>Tag indicating the start of a Fishing Activity Report. Every vessel is required to submit at least one FAR message per day before midnight and additionally in response to requests from the flag state where the fishing is being conducted.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:RLC" minOccurs="0" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>Tag indicating the start of a Relocation declaration. This is used when all or part of a catch is moved from a shared fishing gear to a vessel or from a vessel's hold or its fishing gear to a keep net, container or cage (outside the vessel) in which the live catch is kept until landing.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:COE" minOccurs="0" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>Tag indicating the start of a Crossing (Entry) notification message. Used to declare entry into a stock recovery area or Western Waters.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:COX" minOccurs="0" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>Tag indicating the start of a Crossing (Exit) notification message. Used to declare exit out of a stock recovery area or Western Waters.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:GBRCON" minOccurs="0" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>Tag indicating the start of a GB Control Point notification message. Used to make a trans-zonal fishing declaration.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:DIS" minOccurs="0" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>Tag indicating the start of a Discard declaration message. Must be sent at least once per day with an FAR message.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:PNO" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Tag indicating the start of a Prior Notification of Return declaration message. To be transmitted prior to return to port or if required by Community rules.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:EOF" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Tag indicating the start of an End of Fishing declaration message. To be transmitted immediately after last fishing operation and before returning to port and landing fish.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:RTP" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Tag indicating the start of a Return To Port declaration message. To be transmitted on entry into port, after any PNO declaration and before landing any fish.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:LAN" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Tag indicating the start of a Landing declaration message. To be transmitted after landing of catch.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:TRA" minOccurs="0" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>Tag indicating the start of a Transshipment declaration message. For every transshipment of catch, a declaration is required from both the donor and the recipient.</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="GBRLOGNO" use="required">
        <xs:annotation>
          <xs:documentation>The unique logbook reference number for this specific voyage. Fixed format defined by the pattern: "RSSNoYYYY0000" (RSSNo = RSS Number, YYYY = Year, 0000 = Zero-Padded Numeric.) Example GBRLOGNO: A1234520100001. The first voyage of a calendar year will have '0001' as the last four digits of the GBRLOGNO. All logbook messages submitted for the same voyage will retain the same four digits. The second voyage of the calendar year will then use '0002' for the final four digits, the third voyage will use '0003' and so on. This sequence will always reset at the beginning of each new calendar year.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="14"/>
            <xs:pattern value="[a-zA-Z0-9]{14}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="GBRLOGSEQ" use="required">
        <xs:annotation>
          <xs:documentation>The unique voyage-specific sequence number for this logbook message. The first message of a given voyage should use the value '0001', the second message of the same voyage should use the value '0002' and so on. The sequence resets for each new voyage undertaken.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:integer"/>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="IR" use="optional">
        <xs:annotation>
          <xs:documentation>The vessel's Community Fleet Registration number. Fixed format defined by the pattern: "AAAXXXXXXXXX" (AAA = Fully capitalised country code of the vessel's first registration within the EU, XXXXXXXXX = 9 character alphanumeric code.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="12"/>
            <xs:pattern value="[A-Z]{3}[a-zA-Z0-9]{9}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="GBRRSSNO">
        <xs:annotation>
          <xs:documentation>The vessel's unique identity number as recorded by the UK Registrar of Seamen and Shipping. Fixed format defined by the pattern: "AAAAAA" ( AAAAAA = six character alphanumeric code.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="6"/>
            <xs:pattern value="[a-zA-Z0-9]{6}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="RC" use="optional">
        <xs:annotation>
          <xs:documentation>The vessel's international radio call sign.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="4"/>
            <xs:maxLength value="7"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="XR" use="optional">
        <xs:annotation>
          <xs:documentation>The vessel's side (hull) registration number.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="1"/>
            <xs:maxLength value="14"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="NA" type="xs:string" use="optional">
        <xs:annotation>
          <xs:documentation>The vessel's name.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="MA" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>The name of the vessel's master. Any change of vessel master during a voyage must be notified in the next LOG message.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="MD" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>The address of the vessel's master. Any change during a voyage must be notified in the next LOG message.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="FS" type="ers:countries" use="required">
        <xs:annotation>
          <xs:documentation>The flag state of the vessel's registration. Must conform to the ISO alpha-3 country code.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GBRCOM" use="optional">
        <xs:annotation>
          <xs:documentation>Free format comments from the master of the vessel.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="0"/>
            <xs:maxLength value="500"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="DEP">
    <xs:annotation>
      <xs:documentation>Tag indicating the start of a departure message. It is required on every departure from port.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ers:GEA" minOccurs="0" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>Details of a gear deployment.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:SPE" minOccurs="0" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>Details of stocks held on board, referenced by species.</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="DA" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation>The departure date of the vessel. Fixed format defined by the pattern: "YYYY-MM-DD" (YYYY = Year, MM = Month, DD = Date. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="TI" use="required">
        <xs:annotation>
          <xs:documentation>The departure time of the vessel. Fixed format defined by the pattern: "HH:MM" (HH = Hours, MM = Minutes. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="([01]\d|2[0-3]):[0-5]\d"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="PO" type="ers:ports" use="required">
        <xs:annotation>
          <xs:documentation>The port code of the port from which the vessel is departing. Fixed format defined by the pattern: "CCPPP" (CC = ISO alpha-2 country code, PPP = 3 letter port code.) Port code list to be found at the EC ERS web site. (http://ec.europa.eu/fisheries/cfp/control_enforcement/ers_en.htm)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="AA" type="ers:anticipated_activities" use="required">
        <xs:annotation>
          <xs:documentation>The anticipated activity of the vessel for the departing voyage. Code list of defined anticipated activities to be found at the UK Fisheries web site. (http://www.fishregister.gov.uk/schema/ers/v1)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GBRAAZONE" type="xs:string" use="optional">
        <xs:annotation>
          <xs:documentation>Notice of vessel's intention to fish exclusively inside or outside zone. 'Y' indicates vessel WILL be fishing exclusively outside of the zone. 'N' indicates otherwise.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="FAR">
    <xs:annotation>
      <xs:documentation>Tag indicating the start of a Fishing Activity Report. Every vessel is required to submit at least one FAR message per day before midnight and additionally in response to requests from the flag state where the fishing is being conducted.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ers:RAS" minOccurs="0">
          <xs:annotation>
            <xs:documentation>The relevant area sub-declaration. Dependent upon the reporting requirement, at least one field should be filled in. List of accepted codes to be found at the UK Fisheries web site. (http://www.fishregister.gov.uk/schema/ers/v1)</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:GEA" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Details of a gear deployment.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:SPE" minOccurs="0" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>Details of stocks held on board, referenced by species.</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="DA" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation>The date of the fishing activity being reported. Fixed format defined by the pattern: "YYYY-MM-DD" (YYYY = Year, MM = Month, DD = Date. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="TI" use="optional">
        <xs:annotation>
          <xs:documentation>The time of the fishing activity being reported. Fixed format defined by the pattern: "HH:MM" (HH = Hours, MM = Minutes. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="([01]\d|2[0-3]):[0-5]\d"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="IS">
        <xs:annotation>
          <xs:documentation>Marker indictating that this FAR report was transmitted prior to inspection. Fixed format: "1" if true, "0" or not present otherwise.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:integer">
            <xs:enumeration value="0"/>
            <xs:enumeration value="1"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="RLC">
    <xs:annotation>
      <xs:documentation>Tag indicating the start of a Relocation declaration. This is used when all or part of a catch is moved from a shared fishing gear to a vessel or from a vessel's hold or its fishing gear to a keep net, container or cage (outside the vessel) in which the live catch is kept until landing.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ers:POS" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Details of a geographical position given in latitude (-90 to 90) and longtitude (-180 to 180).</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:SPE" minOccurs="0" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>Details of stocks held on board, referenced by species.</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="DA" type="xs:date">
        <xs:annotation>
          <xs:documentation>The date of the relocation being reported. Fixed format defined by the pattern: "YYYY-MM-DD" (YYYY = Year, MM = Month, DD = Date. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="TI">
        <xs:annotation>
          <xs:documentation>The time of the relocation being reported. Fixed format defined by the pattern: "HH:MM" (HH = Hours, MM = Minutes. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="([01]\d|2[0-3]):[0-5]\d"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="IR">
        <xs:annotation>
          <xs:documentation>The receiving vessel's CFR number, if joint fishing with an EU vessel. Fixed format defined by the pattern: "AAAZZZZZZZZZ" (AAA = three character alphabetical uppercase country code of vessel's first registration, ZZZZZZZZZ = 9 character alphabetical identity string.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="12"/>
            <xs:pattern value="[A-Z]{3}[a-zA-Z0-9]{9}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="GBRRXR" type="xs:string">
        <xs:annotation>
          <xs:documentation>External registration number of the receiving vessel.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="TT">
        <xs:annotation>
          <xs:documentation>International radio call sign of the receiving vessel.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="4"/>
            <xs:maxLength value="7"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="TC" type="ers:countries">
        <xs:annotation>
          <xs:documentation>Flag state of the receiving vessel. Must conform to the ISO alpha-3 country code.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="RF">
        <xs:annotation>
          <xs:documentation>The receiving vessel's Community Fleet Registration number. Fixed format defined by the pattern: "AAAXXXXXXXXX" (AAA = Fully capitalised country code of the vessel's first registration within the EU, XXXXXXXXX = 9 character alphanumeric code.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="12"/>
            <xs:pattern value="[A-Z]{3}[a-zA-Z0-9]{9}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="GBRPXR" type="xs:string">
        <xs:annotation>
          <xs:documentation>External registration number of the partner vessel.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="TF">
        <xs:annotation>
          <xs:documentation>International radio call sign of the partner vessel(s).</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="4"/>
            <xs:maxLength value="7"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="FC" type="ers:countries">
        <xs:annotation>
          <xs:documentation>Flag state of the other partner vessel. Must conform to the ISO alpha-3 country code.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GBRPMA">
        <xs:annotation>
          <xs:documentation>The name of the partner vessel's master.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string"/>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="RT" type="ers:relocation_to">
        <xs:annotation>
          <xs:documentation>Three letter code for the relocation destination. (eg: Keep net = "KNE", Cage = "CGE" etc.) List of accepted codes to be found at the UK Fisheries web site. (http://www.fishregister.gov.uk/schema/ers/v1)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="TRA">
    <xs:annotation>
      <xs:documentation>Tag indicating the start of a Transshipment declaration message. For every transshipment of catch, a declaration is required from both the donor and the recipient.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ers:POS" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Details of a geographical position given in latitude (-90 to 90) and longtitude (-180 to 180).</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:SPE" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>Details of stocks held on board, referenced by species.</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="DA" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation>The date of the transshipment being reported. Fixed format defined by the pattern: "YYYY-MM-DD" (YYYY = Year, MM = Month, DD = Date. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="TI" use="required">
        <xs:annotation>
          <xs:documentation>The time of the transshipment being reported. Fixed format defined by the pattern: "HH:MM" (HH = Hours, MM = Minutes. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="([01]\d|2[0-3]):[0-5]\d"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="PO" type="ers:ports">
        <xs:annotation>
          <xs:documentation>The port code, if the transshipment occurred in a port. Fixed format defined by the pattern: "CCPPP" (CC = ISO alpha-2 country code, PPP = 3 letter port code.) Port code list to be found at the EC ERS web site. (http://ec.europa.eu/fisheries/cfp/control_enforcement/ers_en.htm)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="IR">
        <xs:annotation>
          <xs:documentation>The receiving vessel's CFR number, if an EU vessel. Fixed format defined by the pattern: "AAAZZZZZZZZZ" (AAA = three character alphabetical uppercase country code of vessel's first registration, ZZZZZZZZZ = 9 character alphabetical identity string.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="12"/>
            <xs:pattern value="[A-Z]{3}[a-zA-Z0-9]{9}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="GBRRXR" type="xs:string">
        <xs:annotation>
          <xs:documentation>External registration number of the receiving vessel.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="TT" use="required">
        <xs:annotation>
          <xs:documentation>International radio call sign of the receiving vessel, if donor vessel.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="4"/>
            <xs:maxLength value="7"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="TC" type="ers:countries" use="required">
        <xs:annotation>
          <xs:documentation>Flag state of the receiving vessel. Must conform to the ISO alpha-3 country code.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="RF">
        <xs:annotation>
          <xs:documentation>The donor vessel's Community Fleet Registration number. Fixed format defined by the pattern: "AAAXXXXXXXXX" (AAA = Fully capitalised country code of the vessel's first registration within the EU, XXXXXXXXX = 9 character alphanumeric code.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="12"/>
            <xs:pattern value="[A-Z]{3}[a-zA-Z0-9]{9}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="GBRDXR" type="xs:string">
        <xs:annotation>
          <xs:documentation>External registration number of the donor vessel.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="TF" use="required">
        <xs:annotation>
          <xs:documentation>International radio call sign of the donor vessel, if receiving vessel.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:minLength value="4"/>
            <xs:maxLength value="7"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="FC" type="ers:countries" use="required">
        <xs:annotation>
          <xs:documentation>Flag state of the donor vessel. Must conform to the ISO alpha-3 country code.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="COE">
    <xs:annotation>
      <xs:documentation>Tag indicating the start of a Crossing (Entry) notification message. Used to declare entry into a stock recovery area or Western Waters.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ers:RAS" minOccurs="0">
          <xs:annotation>
            <xs:documentation>The relevant area sub-declaration. Dependent upon the reporting requirement, at least one field should be filled in. List of accepted codes to be found at the UK Fisheries web site. (http://www.fishregister.gov.uk/schema/ers/v1)</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:POS">
          <xs:annotation>
            <xs:documentation>Details of a geographical position given in latitude (-90 to 90) and longtitude (-180 to 180).</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:SPE" minOccurs="0" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>Details of stocks held on board, referenced by species.</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="DA" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation>The date of the entry being reported. Fixed format defined by the pattern: "YYYY-MM-DD" (YYYY = Year, MM = Month, DD = Date. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="TI" use="required">
        <xs:annotation>
          <xs:documentation>The time of the entry being reported. Fixed format defined by the pattern: "HH:MM" (HH = Hours, MM = Minutes. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="([01]\d|2[0-3]):[0-5]\d"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="TS" type="ers:target_species" use="required">
        <xs:annotation>
          <xs:documentation>Species targeted within zone. Fixed format defined by the pattern "X" (X = single character alphabetical species code.) List of accepted codes to be found at the UK Fisheries web site. (http://www.fishregister.gov.uk/schema/ers/v1)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GBRDS" type="ers:species">
        <xs:annotation>
          <xs:documentation>Directed species. Must conform to a single FAO (Fisheries and Agricultural Organisation) species code. Supported as a Norwegian requirement.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GBRFE">
        <xs:annotation>
          <xs:documentation>The name of the fishing effort zone. List of accepted codes to be found at the UK Fisheries web site. (http://www.fishregister.gov.uk/schema/ers/v1)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string"/>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="GBRTRZ">
        <xs:annotation>
          <xs:documentation>Indicator of whether a vessel has engaged in transzonal fishing. Fixed format defined by the pattern "Y" or "N". (Y = vessel has engaged in transzonal fishing, N = vessel has not engaged in transzonal fishing.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="1"/>
            <xs:enumeration value="N"/>
            <xs:enumeration value="Y"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="COX">
    <xs:annotation>
      <xs:documentation>Tag indicating the start of a Crossing (Exit) notification message. Used to declare exit out of a stock recovery area or Western Waters.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ers:POS">
          <xs:annotation>
            <xs:documentation>Details of a geographical position given in latitude (-90 to 90) and longtitude (-180 to 180).</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:SPE" minOccurs="0" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>Details of stocks held on board, referenced by species.</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="DA" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation>The date of the exit being reported. Fixed format defined by the pattern: "YYYY-MM-DD" (YYYY = Year, MM = Month, DD = Date. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="TI" use="required">
        <xs:annotation>
          <xs:documentation>The time of the entry being reported. Fixed format defined by the pattern: "HH:MM" (HH = Hours, MM = Minutes. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="([01]\d|2[0-3]):[0-5]\d"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="TS" type="ers:target_species">
        <xs:annotation>
          <xs:documentation>Species targeted within zone. Fixed format defined by the pattern "X" (X = single character alphabetical species code.) List of accepted codes to be found at the UK Fisheries web site. (http://www.fishregister.gov.uk/schema/ers/v1)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GBRFE">
        <xs:annotation>
          <xs:documentation>The name of the fishing effort zone. List of accepted codes to be found at the UK Fisheries web site. (http://www.fishregister.gov.uk/schema/ers/v1)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string"/>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="GBRTRZ">
        <xs:annotation>
          <xs:documentation>Indicator of whether a vessel has engaged in transzonal fishing. Fixed format defined by the pattern "Y" or "N". (Y = vessel has engaged in transzonal fishing, N = vessel has not engaged in transzonal fishing.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="1"/>
            <xs:enumeration value="N"/>
            <xs:enumeration value="Y"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="GBRCON">
    <xs:annotation>
      <xs:documentation>Tag indicating the start of a GB Control Point notification message. Used to make a trans-zonal fishing declaration.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ers:POS">
          <xs:annotation>
            <xs:documentation>Details of a geographical position given in latitude (-90 to 90) and longtitude (-180 to 180).</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="GBRCP" use="required">
        <xs:annotation>
          <xs:documentation>Control point the vessel is exiting from. Fixed format defined by the pattern "X" (X = single character alphabetical in the range A-H or a single numerical digit in the range 1-3.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="[a-hA-H1-3]{1}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="GBRDA" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation>The estimated date of arrival at the control point. Fixed format defined by the pattern: "YYYY-MM-DD" (YYYY = Year, MM = Month, DD = Date. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GBRTI" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>The estimated time of arrival at the control point. Fixed format defined by the pattern: "HH:MM" (HH = Hours, MM = Minutes. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="DIS">
    <xs:annotation>
      <xs:documentation>Tag indicating the start of a Discard declaration message. Must be sent at least once per day with an FAR message.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ers:POS" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Details of a geographical position given in latitude (-90 to 90) and longtitude (-180 to 180).</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:SPE" minOccurs="0" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>Details of stocks held on board, referenced by species.</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="DA" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation>The date of the discard being reported. Fixed format defined by the pattern: "YYYY-MM-DD" (YYYY = Year, MM = Month, DD = Date. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="TI" use="required">
        <xs:annotation>
          <xs:documentation>The time of the discard being reported. Fixed format defined by the pattern: "HH:MM" (HH = Hours, MM = Minutes. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="([01]\d|2[0-3]):[0-5]\d"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="PNO">
    <xs:annotation>
      <xs:documentation>Tag indicating the start of a Prior Notification of Return declaration. To be transmitted prior to return to port or if required by community rules.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ers:RAS" minOccurs="0">
          <xs:annotation>
            <xs:documentation>The relevant area sub-declaration. Dependent upon the reporting requirement, at least one field should be filled in. List of accepted codes to be found at the UK Fisheries web site. (http://www.fishregister.gov.uk/schema/ers/v1)</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:SPE" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>Details of stocks held on board, referenced by species.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:POS" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Details of a geographical position given in latitude (-90 to 90) and longtitude (-180 to 180).</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="GBRDDA" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation>The date of the departure being reported. Fixed format defined by the pattern: "YYYY-MM-DD" (YYYY = Year, MM = Month, DD = Date. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GBRDTI" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>The time of the departure being reported. Fixed format defined by the pattern: "HH:MM" (HH = Hours, MM = Minutes. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="PD" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation>The estimated date of arrival being reported. Fixed format defined by the pattern: "YYYY-MM-DD" (YYYY = Year, MM = Month, DD = Date. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="PT" use="required">
        <xs:annotation>
          <xs:documentation>The estimated time of arrival being reported. Fixed format defined by the pattern: "HH:MM" (HH = Hours, MM = Minutes. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="([01]\d|2[0-3]):[0-5]\d"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="PO" type="ers:ports" use="required">
        <xs:annotation>
          <xs:documentation>The port code for the port of arrival. Fixed format defined by the pattern: "CCPPP" (CC = ISO alpha-2 country code, PPP = 3 letter port code.) Port code list to be found at the EC ERS web site. (http://ec.europa.eu/fisheries/cfp/control_enforcement/ers_en.htm)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="DA" type="xs:date">
        <xs:annotation>
          <xs:documentation>The estimated date of landing being reported. Fixed format defined by the pattern: "YYYY-MM-DD" (YYYY = Year, MM = Month, DD = Date. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="TI">
        <xs:annotation>
          <xs:documentation>The estimated time of landing being reported. Fixed format defined by the pattern: "HH:MM" (HH = Hours, MM = Minutes. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="([01]\d|2[0-3]):[0-5]\d"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="GBRLS" type="xs:string">
        <xs:annotation>
          <xs:documentation>The landing location in port. Required for Norwegian reporting cases.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="EOF">
    <xs:annotation>
      <xs:documentation>Tag indicating the start of an End of Fishing declaration message. To be transmitted immediately after last fishing operation and before returning to port and landing fish.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="DA" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation>The date the fishing log is recorded as complete. Fixed format defined by the pattern: "YYYY-MM-DD" (YYYY = Year, MM = Month, DD = Date. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="TI" use="required">
        <xs:annotation>
          <xs:documentation>The time the fishing log is recorded as complete. Fixed format defined by the pattern: "HH:MM" (HH = Hours, MM = Minutes. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="([01]\d|2[0-3]):[0-5]\d"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="RTP">
    <xs:annotation>
      <xs:documentation>Tag indicating the start of a Return To Port declaration message. To be transmitted on entry into port, after any PNO declaration and before landing any fish.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="DA" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation>The date the vessel returned to port. Fixed format defined by the pattern: "YYYY-MM-DD" (YYYY = Year, MM = Month, DD = Date. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="TI" use="required">
        <xs:annotation>
          <xs:documentation>The time the vessel returned to port. Fixed format defined by the pattern: "HH:MM" (HH = Hours, MM = Minutes. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="([01]\d|2[0-3]):[0-5]\d"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="PO" type="ers:ports" use="required">
        <xs:annotation>
          <xs:documentation>The port code for the port the vessel returned to. Fixed format defined by the pattern: "CCPPP" (CC = ISO alpha-2 country code, PPP = 3 letter port code.) Port code list to be found at the EC ERS web site. (http://ec.europa.eu/fisheries/cfp/control_enforcement/ers_en.htm)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="RE" type="ers:reason_return" use="required">
        <xs:annotation>
          <xs:documentation>The reason code indicating why the vessel returned to port. Fixed format defined by the pattern: "XXX" (XXX = 3 character alphabetical uppercase code.) Reason code list to be found at the UK Fisheries web site. (http://www.fishregister.gov.uk/schema/ers/v1)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="LAN">
    <xs:annotation>
      <xs:documentation>Tag indicating the start of a Landing declaration message. To be transmitted after landing of catch.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ers:SPE" maxOccurs="unbounded">
          <xs:annotation>
            <xs:documentation>Details of stocks held on board, referenced by species.</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="DA" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation>The date of the landing being reported. Fixed format defined by the pattern: "YYYY-MM-DD" (YYYY = Year, MM = Month, DD = Date. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="TI" use="required">
        <xs:annotation>
          <xs:documentation>The time of the landing being reported. Fixed format defined by the pattern: "HH:MM" (HH = Hours, MM = Minutes. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="([01]\d|2[0-3]):[0-5]\d"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="TS" use="required">
        <xs:annotation>
          <xs:documentation>Description of the message sender type. Fixed format, the response must be one of: "MAS" (Vessel Master) "REP" (Representative of the Vessel Master) or "AGE" (Agent of the Vessel Master).</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:enumeration value="MAS"/>
            <xs:enumeration value="REP"/>
            <xs:enumeration value="AGE"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="PO" type="ers:ports" use="required">
        <xs:annotation>
          <xs:documentation>The port code for the port of landing. Fixed format defined by the pattern: "CCPPP" (CC = ISO alpha-2 country code, PPP = 3 letter port code.) Port code list to be found at the EC ERS web site. (http://ec.europa.eu/fisheries/cfp/control_enforcement/ers_en.htm)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="POS">
    <xs:annotation>
      <xs:documentation>Details of a geographical position given in latitude (-90 to 90) and longtitude (-180 to 180).</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="LT" use="required">
        <xs:annotation>
          <xs:documentation>Latitude expressed in accordance with the WGS84 format used for VMS.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:decimal">
            <xs:minInclusive value="-90"/>
            <xs:maxInclusive value="90"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="LG" use="required">
        <xs:annotation>
          <xs:documentation>Longtitude expressed in accordance with the WGS84 format used for VMS.</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:decimal">
            <xs:minInclusive value="-180"/>
            <xs:maxInclusive value="180"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="GEA">
    <xs:annotation>
      <xs:documentation>Details of a gear deployment.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ers:GES" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Tag containing gear-shot info.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:GER" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Tag containing gear retrieved info.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:GLS" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Tag containing gear lost info.</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="GE" type="ers:gears" use="required">
        <xs:annotation>
          <xs:documentation>Gear code corresponding to the FAO’s "International Standard Statistical Classification of the Fishing Gear."</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GBRGS">
        <xs:annotation>
          <xs:documentation>Norwegian requirement - gear specification (trawls: 1=single, 2=double, 3=triple)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:integer">
            <xs:enumeration value="1"/>
            <xs:enumeration value="2"/>
            <xs:enumeration value="3"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="GBRGP">
        <xs:annotation>
          <xs:documentation>Norwegian requirement - gear problems (1=empty net, 2=net burst, 3=net split, 4=broken meshes, 5=lost gear, 6=other)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:integer">
            <xs:enumeration value="1"/>
            <xs:enumeration value="2"/>
            <xs:enumeration value="3"/>
            <xs:enumeration value="4"/>
            <xs:enumeration value="5"/>
            <xs:enumeration value="6"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="ME" type="xs:integer">
        <xs:annotation>
          <xs:documentation>Mesh size, measured in millimeters.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GC" type="xs:string">
        <xs:annotation>
          <xs:documentation>Gear capacity.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GBRGN" type="xs:integer">
        <xs:annotation>
          <xs:documentation>Gear number.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GBRTNS" type="xs:integer">
        <xs:annotation>
          <xs:documentation>Total number of shots: gill nets and long lines.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="FO" type="xs:integer">
        <xs:annotation>
          <xs:documentation>Number of fishing operations (hauls) per 24 hour period.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="DU" type="xs:integer">
        <xs:annotation>
          <xs:documentation>Number of hours the gear was deployed.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="FD" type="xs:integer">
        <xs:annotation>
          <xs:documentation>Fishing depth. The distance from the water surface to the lowest part of the fishing gear, measured in meters. Applies to vessels using towed gear, long lines and fixed nets.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="NH" type="xs:integer">
        <xs:annotation>
          <xs:documentation>The average number of hooks used on the long lines.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GL" type="xs:integer">
        <xs:annotation>
          <xs:documentation>The average length of the nets used when using fixed nets, measured in metres.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GD" type="xs:integer">
        <xs:annotation>
          <xs:documentation>The average height of the nets used when using fixed nets, measured in metres.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="NL" type="xs:integer">
        <xs:annotation>
          <xs:documentation>The nominal length of one net, measured in metres.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="NN" type="xs:integer">
        <xs:annotation>
          <xs:documentation>The number of nets in a fleet.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="FL" type="xs:integer">
        <xs:annotation>
          <xs:documentation>The number of fleets deployed.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GBRGNT" type="xs:integer">
        <xs:annotation>
          <xs:documentation>The total number of gill nets on board.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="GES">
    <xs:annotation>
      <xs:documentation>Tag containing gear-shot info.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ers:POS">
          <xs:annotation>
            <xs:documentation>Details of a geographical position given in latitude (-90 to 90) and longtitude (-180 to 180).</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="DA" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation>The date of the gear-shot event being reported. Fixed format defined by the pattern: "YYYY-MM-DD" (YYYY = Year, MM = Month, DD = Date. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="TI" use="required">
        <xs:annotation>
          <xs:documentation>The time of the gear-shot event being reported. Fixed format defined by the pattern: "HH:MM" (HH = Hours, MM = Minutes. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="([01]\d|2[0-3]):[0-5]\d"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="GBRZO" type="xs:string">
        <xs:annotation>
          <xs:documentation>Indicator of where zone fishing will be commencing. Data recorded in accordance with Norwegian requirements.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GBRGNFN" type="xs:string">
        <xs:annotation>
          <xs:documentation>Unique reference number identifying the gill net fleet deployed.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="FD" type="xs:integer">
        <xs:annotation>
          <xs:documentation>Fleet depth indicating the depth for each fleet deployed. (Measured as the distance from the water surface to the lowest part of the fishing gear.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="GER">
    <xs:annotation>
      <xs:documentation>Tag containing gear retrieved info.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ers:POS">
          <xs:annotation>
            <xs:documentation>Details of a geographical position given in latitude (-90 to 90) and longtitude (-180 to 180).</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="DA" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation>The date of the gear retrieval being reported. Fixed format defined by the pattern: "YYYY-MM-DD" (YYYY = Year, MM = Month, DD = Date. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="TI" use="required">
        <xs:annotation>
          <xs:documentation>The time of the gear retrieval being reported. Fixed format defined by the pattern: "HH:MM" (HH = Hours, MM = Minutes. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="([01]\d|2[0-3]):[0-5]\d"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="GBRGNFN" type="xs:string">
        <xs:annotation>
          <xs:documentation>Unique reference number identifying the gill net fleet retrieved.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="ST" type="xs:integer">
        <xs:annotation>
          <xs:documentation>Soak time of each gill net fleet deployed, measured in hours.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="GLS">
    <xs:annotation>
      <xs:documentation>Tag containing gear lost info.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ers:POS">
          <xs:annotation>
            <xs:documentation>Details of a geographical position given in latitude (-90 to 90) and longtitude (-180 to 180).</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="DA" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation>The date of the gear loss event being reported. Fixed format defined by the pattern: "YYYY-MM-DD" (YYYY = Year, MM = Month, DD = Date. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="NN" type="xs:integer" use="required">
        <xs:annotation>
          <xs:documentation>Numerical value indicating the quantity of gear lost.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GBRGNFN" type="xs:string">
        <xs:annotation>
          <xs:documentation>Unique reference number identifying the gill net fleet lost.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="RAS">
    <xs:annotation>
      <xs:documentation>The relevant area sub-declaration. Dependent upon the reporting requirement, at least one field should be filled in. List of accepted codes to be found at the UK Fisheries web site. (http://www.fishregister.gov.uk/schema/ers/v1)</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ers:POS" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Details of a geographical position given in latitude (-90 to 90) and longtitude (-180 to 180).</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="FA" type="ers:fao_areas" use="required">
        <xs:annotation>
          <xs:documentation>The FAO area. (Eg. "27")</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="SA" type="ers:fao_sub-areas" use="required">
        <xs:annotation>
          <xs:documentation>The FAO sub-area. (Eg. "3")</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="ID" type="ers:fao_divisions">
        <xs:annotation>
          <xs:documentation>The FAO division. (Eg. "d")</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="SD" type="ers:fao_sub-divisions">
        <xs:annotation>
          <xs:documentation>The FAO sub-division. (Eg. "24")</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="EZ" type="ers:economic_zones">
        <xs:annotation>
          <xs:documentation>The economic zone.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="SR">
        <xs:annotation>
          <xs:documentation>The ICES statistical rectangle. (Eg. "49E6")</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="4"/>
            <xs:pattern value="[0-9]{2}[a-zA-Z]{1}[0-9]{1}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="SPE">
    <xs:annotation>
      <xs:documentation>Details of stocks held on board, referenced by species.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ers:RAS" minOccurs="0">
          <xs:annotation>
            <xs:documentation>The relevant area sub-declaration. Dependent upon the reporting requirement, at least one field should be filled in. List of accepted codes to be found at the UK Fisheries web site. (http://www.fishregister.gov.uk/schema/ers/v1)</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:PRO" minOccurs="0">
          <xs:annotation>
            <xs:documentation>Tag containing fish processing details. Processing/presentation for each species landed.</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="SN" type="ers:species" use="required">
        <xs:annotation>
          <xs:documentation>Directed species. Must conform to a single FAO (Fisheries and Agricultural Organisation) species code. Supported as a Norwegian requirement.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="WT" type="xs:decimal">
        <xs:annotation>
          <xs:documentation>Depending on context, this data item is to be either: 1. Total weight of fish (in kilograms) in catch period. 2. Total weight of fish (in kilograms) on board (aggregate) or 3. Total weight of fish (in kilograms) landed.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GBRLWT" type="xs:decimal">
        <xs:annotation>
          <xs:documentation>Estimate of weight of fish to be landed, measured in Kg. Relevant when reporting PNO.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="NF" type="xs:integer">
        <xs:annotation>
          <xs:documentation>Number of fish in catch. Completed when catch is measured in 'numbers of fish'.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GBRLNF" type="xs:integer">
        <xs:annotation>
          <xs:documentation>Estimated number of fish landed. Relevant when reporting PNO.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="NQ" type="xs:decimal" use="optional">
        <xs:annotation>
          <xs:documentation>Estimated quantity of fish held in nets. (ie. not held in hold)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="NB" type="xs:integer" use="optional">
        <xs:annotation>
          <xs:documentation>Estimated number of fish held in nets. (ie. not held in hold)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GE" type="ers:gears">
        <xs:annotation>
          <xs:documentation>Gear code corresponding to the FAO’s "International Standard Statistical Classification of the Fishing Gear."</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="PRO">
    <xs:annotation>
      <xs:documentation>Tag containing fish processing details. Processing/presentation for each species landed. Only used for "TRA" and "LAN" log-type messages.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="PS" type="ers:fish_state" use="required">
        <xs:annotation>
          <xs:documentation>Letter code for the Preservation State of the fish. (Eg. 'live', 'frozen', 'salted', etc.) Preservation state code list to be found at the UK Fisheries web site. (http://www.fishregister.gov.uk/schema/ers/v1)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="PR" type="ers:fish_presentation" use="required">
        <xs:annotation>
          <xs:documentation>Letter code for the Product Presentation, which reflects the manner of processing. Presentation code list to be found at the UK Fisheries web site. (http://www.fishregister.gov.uk/schema/ers/v1)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="TY" type="ers:fish_packaging" use="required">
        <xs:annotation>
          <xs:documentation>Processing type of packaging. Fixed format defined by the following 3 letter codes: "CRT"=cartons, "BOX"=boxes, "BGS"=bags, "BLC"=blocks.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="NN" type="xs:integer" use="required">
        <xs:annotation>
          <xs:documentation>Number of packing units. (ie. cartoons, boxes, bags, containers, blocks etc.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="AW" type="xs:decimal" use="required">
        <xs:annotation>
          <xs:documentation>Average product weight, measured in Kg.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="CF" type="xs:decimal" use="optional">
        <xs:annotation>
          <xs:documentation>Conversion factor. A numerical factor that is applied to convert fish processed weight into fish live weight.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="OPS">
    <xs:annotation>
      <xs:documentation>This is the top level envelope of all operations sent to the web services operation. OPS element must contain one of the sub-elements DAT, RET, DEL, COR.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:choice>
        <xs:element ref="ers:DAT">
          <xs:annotation>
            <xs:documentation>Data operation to push log book information to another MS.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:RET">
          <xs:annotation>
            <xs:documentation>Acknowledgement operation to reply to DAT, DEL and COR operation.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:DEL">
          <xs:annotation>
            <xs:documentation>Delete operation to ask receiving MS to delete previously sent data.</xs:documentation>
          </xs:annotation>
        </xs:element>
        <xs:element ref="ers:COR">
          <xs:annotation>
            <xs:documentation>Correction operation to ask another MS to correct previously sent data.</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:choice>
      <xs:attribute name="AD" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>The country of destination for this OPS message. Must conform to the ISO alpha-3 country code.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="FR" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>The country sending this OPS message. Must conform to the ISO alpha-3 country code.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="ON">
        <xs:annotation>
          <xs:documentation>The Record Number of this OPS message. Fixed format defined by the pattern: "AAAYYYYMMDD999999" (AAA = Alphanumeric String, YYYY = Year, MM = Month, DD = Date, 999999 = Zero-Padded Numeric.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="17"/>
            <xs:pattern value="[a-zA-Z]{3}(\d{4}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01]))[0-9]{6}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="GBRON">
        <xs:annotation>
          <xs:documentation>The GB Record Number of this OPS message. Fixed format defined by the pattern:  "RSSNoYYYYMMDD999999" (RSSNo = RSS Number, YYYY = Year, MM = Month, DD = Date, 999999 = Zero-Padded Numeric.) Example GBRRN: "A1234520090623000001"</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="20"/>
            <xs:pattern value="[a-zA-Z0-9]{20}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="OD" type="xs:date" use="required">
        <xs:annotation>
          <xs:documentation>The date of sending for this OPS message. Fixed format defined by the pattern: "YYYY-MM-DD" (YYYY = Year, MM = Month, DD = Date. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="OT" use="required">
        <xs:annotation>
          <xs:documentation>The time of sending for this OPS message. Fixed format defined by the pattern: "HH:MM" (HH = Hours, MM = Minutes. Values must conform to UTC standards.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:pattern value="([01]\d|2[0-3]):[0-5]\d"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="GBRSVN" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>Version number of the software that transmits the LOG message</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="GBRSRN" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>Reference or serial number of the software that transmits the LOG message</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="TS" type="xs:string" use="optional">
        <xs:annotation>
          <xs:documentation>Set to "1" if this OPS message is to be regarded as a test message.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="DAT">
    <xs:annotation>
      <xs:documentation>Data operation to push log book information to another MS.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ers:ERS">
          <xs:annotation>
            <xs:documentation>Includes all relevant ERS data. ie: The whole message.</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
    </xs:complexType>
  </xs:element>
  <xs:element name="RET">
    <xs:annotation>
      <xs:documentation>Acknowledgement operation to reply to DAT, DEL and COR operation.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="ON">
        <xs:annotation>
          <xs:documentation>The Record Number of the ERS message being referred to. Fixed format defined by the pattern: "AAAYYYYMMDD999999" (AAA = Alphanumeric String, YYYY = Year, MM = Month, DD = Date, 999999 = Zero-Padded Numeric.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="17"/>
            <xs:pattern value="[a-zA-Z]{3}(\d{4}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01]))[0-9]{6}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="GBRON">
        <xs:annotation>
          <xs:documentation>The GB Record Number of the ERS message being referred to. Fixed format defined by the pattern:  "RSSNoYYYYMMDD999999" (RSSNo = RSS Number, YYYY = Year, MM = Month, DD = Date, 999999 = Zero-Padded Numeric.) Example GBRRN: "A1234520090623000001"</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="20"/>
            <xs:pattern value="[a-zA-Z0-9]{20}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="RS" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>Return status of the message. Status code list to be found at the UK Fisheries web site. (http://www.fishregister.gov.uk/schema/ers/v1)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
      <xs:attribute name="RE" type="xs:string" use="optional">
        <xs:annotation>
          <xs:documentation>Free text giving an explanation for the rejection.</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="DEL">
    <xs:annotation>
      <xs:documentation>Delete operation to ask UK Fisheries to delete previously sent data.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:attribute name="RN">
        <xs:annotation>
          <xs:documentation>The Record Number of the ERS message to be deleted. Fixed format defined by the pattern: "AAAYYYYMMDD999999" (AAA = Alphanumeric String, YYYY = Year, MM = Month, DD = Date, 999999 = Zero-Padded Numeric.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="17"/>
            <xs:pattern value="[a-zA-Z]{3}(\d{4}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01]))[0-9]{6}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="GBRRN">
        <xs:annotation>
          <xs:documentation>The GB Record Number of the ERS message to be deleted. Fixed format defined by the pattern:  "RSSNoYYYYMMDD999999" (RSSNo = RSS Number, YYYY = Year, MM = Month, DD = Date, 999999 = Zero-Padded Numeric.) Example GBRRN: "A1234520090623000001"</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="20"/>
            <xs:pattern value="[a-zA-Z0-9]{20}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="RE" type="xs:string" use="optional">
        <xs:annotation>
          <xs:documentation>Reason for this operation. (Free text field.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
  <xs:element name="COR">
    <xs:annotation>
      <xs:documentation>Correction operation to ask UK Fisheries to correct previously sent data.</xs:documentation>
    </xs:annotation>
    <xs:complexType>
      <xs:sequence>
        <xs:element ref="ers:ERS">
          <xs:annotation>
            <xs:documentation>Includes all relevant ERS data. ie: The whole message.</xs:documentation>
          </xs:annotation>
        </xs:element>
      </xs:sequence>
      <xs:attribute name="RN">
        <xs:annotation>
          <xs:documentation>The Record Number of the ERS message to be corrected. Fixed format defined by the pattern: "AAAYYYYMMDD999999" (AAA = Alphanumeric String, YYYY = Year, MM = Month, DD = Date, 999999 = Zero-Padded Numeric.)</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="17"/>
            <xs:pattern value="[a-zA-Z]{3}(\d{4}(0[1-9]|1[0-2])(0[1-9]|[12]\d|3[01]))[0-9]{6}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="GBRRN">
        <xs:annotation>
          <xs:documentation>The GB Record Number of the ERS message to be corrected. Fixed format defined by the pattern:  "RSSNoYYYYMMDD999999" (RSSNo = RSS Number, YYYY = Year, MM = Month, DD = Date, 999999 = Zero-Padded Numeric.) Example GBRRN: "A1234520090623000001"</xs:documentation>
        </xs:annotation>
        <xs:simpleType>
          <xs:restriction base="xs:string">
            <xs:length value="20"/>
            <xs:pattern value="[a-zA-Z0-9]{20}"/>
          </xs:restriction>
        </xs:simpleType>
      </xs:attribute>
      <xs:attribute name="RE" type="xs:string" use="required">
        <xs:annotation>
          <xs:documentation>Reason for this operation. (Free text field.)</xs:documentation>
        </xs:annotation>
      </xs:attribute>
    </xs:complexType>
  </xs:element>
</xs:schema>

