<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:nota="https://havochvatten.se/notaext/atomic/schema/v2" targetNamespace="https://havochvatten.se/notaext/atomic/schema/v2" elementFormDefault="qualified" attributeFormDefault="unqualified" version="2.1">
	<xs:annotation>
		<xs:documentation>Schema notaext_v2.xsd defines structure and form of data
                    delivered by Swedish catch receivers to the Swedish Agency
                    for Marine and water management.</xs:documentation>
	</xs:annotation>
	<xs:element name="SalesNote">
		<xs:complexType>
			<xs:annotation>
				<xs:documentation>Nota Element</xs:documentation>
			</xs:annotation>
			<xs:sequence>
				<xs:element name="Nota" type="nota:notaType" minOccurs="1" maxOccurs="unbounded"/>
			</xs:sequence>
			<xs:attribute name="test" type="xs:boolean" use="optional" default="false">
				<xs:annotation>
					<xs:documentation>Test flag is set to true to indicate that content should
                       be treated as a test message</xs:documentation>
				</xs:annotation>
			</xs:attribute>
		</xs:complexType>
	</xs:element>
	<xs:complexType name="notaType">
		<xs:sequence>
			<xs:element name="SalesLine" type="nota:saleLineType" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Sale line declaration</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="TakeOverLine" type="nota:takeOverLineType" minOccurs="0" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Take over line declaration</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="PNR" type="nota:civicnumberType" use="optional">
			<xs:annotation>
				<xs:documentation>Civicnr for master (seller)</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="LNR" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>Logbook number</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="IR" type="nota:cfrType" use="optional">
			<xs:annotation>
				<xs:documentation>Community Fleet Register number for vessel landing catch</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="RC" type="nota:ircsType" use="required">
			<xs:annotation>
				<xs:documentation>Radio callsign for vessel landing the catch</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="XR" type="nota:districtType" use="optional">
			<xs:annotation>
				<xs:documentation>External Marking for vessel landing catch</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="FS" type="nota:CountryType" use="required">
			<xs:annotation>
				<xs:documentation>Flagstate of vessel landing the catch</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="NA" type="nota:vesselNameType" use="optional">
			<xs:annotation>
				<xs:documentation>Name of vessel landing the catch</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="saleLineType">
		<xs:sequence>
			<xs:element name="SRC" type="nota:SrcDeclarationType">
				<xs:annotation>
					<xs:documentation>Source sub-declaration</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="CSS" type="nota:CssDeclarationType" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Consignment sold sub-declaration</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="weighingOperator" type="nota:WeighingOperatorType" minOccurs="0">
				<xs:annotation>
					<xs:documentation>#2.1:added from v3, optional</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="VN" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation>Vat number for body bying the catch</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="DA" type="xs:date" use="required">
			<xs:annotation>
				<xs:documentation>Date of sale</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="SC" type="nota:CountryType" use="required">
			<xs:annotation>
				<xs:documentation>Country of sale</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="SL" type="nota:PortType" use="required">
			<xs:annotation>
				<xs:documentation>Sale location (port code)</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="NS" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation>Name of seller (auctioncenter, person or body)</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="PNR" type="nota:civicnumberType" use="optional">
			<xs:annotation>
				<xs:documentation>Civicnumber of seller or organistaion number if other then
                      body landing the catch</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="NB" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation>Name of Buyer (auctioncenter, person or body)</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="CN" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>Sale contract number</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="FM" type="xs:integer" use="required">
			<xs:annotation>
				<xs:documentation>ID of the first hand buyer (fångstmottagarekod)</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="RC" type="nota:ircsType" use="optional">
			<xs:annotation>
				<xs:documentation>IRCS of vessel selling the catch if other than vessel
                      landing</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="TR" type="xs:string">
			<xs:annotation>
				<xs:documentation>Transport document reference number, identifying transport
                      document. The TR is used to match the transport document
                      against the sales note.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="takeOverLineType">
		<xs:sequence>
			<xs:element name="SRC" type="nota:SrcDeclarationType">
				<xs:annotation>
					<xs:documentation>Source sub-declaration</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="CST" type="nota:CstDeclarationType" maxOccurs="unbounded">
				<xs:annotation>
					<xs:documentation>Consignment taken over declaration</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="weighingOperator" type="nota:WeighingOperatorType" minOccurs="0">
				<xs:annotation>
					<xs:documentation>#2.1:added from v3, optional</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="DA" type="xs:date" use="required">
			<xs:annotation>
				<xs:documentation>Date of the take over</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="SC" type="nota:CountryType" use="required">
			<xs:annotation>
				<xs:documentation>Take over country</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="SL" type="nota:PortType" use="required">
			<xs:annotation>
				<xs:documentation>Take over location (port code)</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="NT" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation>Name of take over organisation</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="CN" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>take over contract reference number (if known)</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="FM" type="xs:integer" use="required">
			<xs:annotation>
				<xs:documentation>ID of the first hand buyer (fångstmottagarekod)</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="NF" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation>Name of storage facility (Name of facilities where the
                      products are stored). 1.1-2.0: New compulsory.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="AF" type="xs:string" use="required">
			<xs:annotation>
				<xs:documentation>Address of storage facility (Address of facilities where
                      the products are stored). 1.1-2.0: New compulsory.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="IDF" type="xs:string" use="optional">
			<xs:annotation>
				<xs:documentation>Id of storage facility.#2.1:added from v3, optional</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="TR" type="xs:string">
			<xs:annotation>
				<xs:documentation>Transport document reference number, identifying transport
                      document, see TRN. The TR is used to match the transport
                      document against the sales note.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="NotaProDeclarationType">
		<xs:attribute name="FF" type="nota:FishFreshnessType" use="required">
			<xs:annotation>
				<xs:documentation>Fish freshness category ( A, B, E, V, SO).</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="PS" type="nota:FishStateType" use="required">
			<xs:annotation>
				<xs:documentation>State of preservation. 1.1-2.0: made compulsory if, was
                      compulsory.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="PR" type="nota:FishPresentationType" use="required">
			<xs:annotation>
				<xs:documentation>Presentation of fish (reflects manner of processing.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="SrcDeclarationType">
		<xs:annotation>
			<xs:documentation>Sub-declaration containing details of the source document
                     for the consignment sold . Flag state authorities shall
                     trace back the source document based on the vessel's
                     logbook and landing data.</xs:documentation>
		</xs:annotation>
		<xs:attribute name="DL" type="nota:UtcDateType" use="required">
			<xs:annotation>
				<xs:documentation>UTC Date of landing.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="PO" type="nota:PortType" use="required">
			<xs:annotation>
				<xs:documentation>Port of landing.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="CstDeclarationType">
		<xs:annotation>
			<xs:documentation>Consignment taken over sub-declaration (containing detail
                     line for each species taken over).</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="SPE" type="nota:NotaSpeDeclarationType">
				<xs:annotation>
					<xs:documentation>List of species and quantities in consignment.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="SF" type="nota:FishSizeType">
			<xs:annotation>
				<xs:documentation>Fish size category.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="PP" type="nota:ProductDestinationType">
			<xs:annotation>
				<xs:documentation>Product destination (purpose).</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="CssDeclarationType">
		<xs:annotation>
			<xs:documentation>Consignment Sold sub-declaration.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="SPE" type="nota:NotaSpeDeclarationType">
				<xs:annotation>
					<xs:documentation>List of species and quantities sold.</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="FP" type="xs:decimal" use="required">
			<xs:annotation>
				<xs:documentation>Fish price (Price per Kg).</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="TP" type="xs:decimal">
			<xs:annotation>
				<xs:documentation>Total price attribute. To be given if total price cannot
                      be inferred from price per kg.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="CR" type="nota:CurrencyType" use="required">
			<xs:annotation>
				<xs:documentation>Currency of price of sale.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="SF" type="nota:FishSizeType">
			<xs:annotation>
				<xs:documentation>Fish size category (1-8; one size or kg, g, cm, mm or
                      number of fish per kg as appropriate).</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="PP" type="nota:ProductDestinationType">
			<xs:annotation>
				<xs:documentation>Product destination (purpose).</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="WD" type="nota:WithdrawnStateType">
			<xs:annotation>
				<xs:documentation>Withdrawn through a producer's organisation (Y-yes, N-no,
                      T-temporarily).</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="OP" type="nota:ProducerOrganizationUseType">
			<xs:annotation>
				<xs:documentation>P.O. use code.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:complexType name="NotaSpeDeclarationType">
		<xs:annotation>
			<xs:documentation>Species sub-declaration.</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="RAS" type="nota:RasDeclarationType">
				<xs:annotation>
					<xs:documentation>Geographical area in which the majority of the catch was
                       taken.</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="PRO" type="nota:NotaProDeclarationType" minOccurs="0">
				<xs:annotation>
					<xs:documentation>Fish processing declaration</xs:documentation>
				</xs:annotation>
			</xs:element>
			<xs:element name="catchRule" type="nota:CatchRuleType">
				<xs:annotation>
					<xs:documentation>Landing obligation to distinguish between different types of rules for catch.  #2.0:added</xs:documentation>
				</xs:annotation>
			</xs:element>
		</xs:sequence>
		<xs:attribute name="SN" type="nota:SpeciesType" use="required">
			<xs:annotation>
				<xs:documentation>Species name (FAO code).</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="WT" type="xs:decimal">
			<xs:annotation>
				<xs:documentation>Weight of fish in kg.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="NF" type="xs:integer">
			<xs:annotation>
				<xs:documentation>Number of fish (when catch have to be registered in
                      numbers of fish i.e. salmon, tuna).</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:simpleType name="MeansOfWeightMeasureType">
		<xs:annotation>
			<xs:documentation>means of weight measuring: estimation (EST), weighing on
                     board (WGH)</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="CurrencyType">
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="FishSizeType">
		<xs:annotation>
			<xs:documentation>As per AnnexII of Council R. 2406/96</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="UtcDateType">
		<xs:annotation>
			<xs:documentation>UTC Date, no timezone, YYYY-MM-DD</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:date"/>
	</xs:simpleType>
	<xs:simpleType name="ProductDestinationType">
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="WithdrawnStateType">
		<xs:annotation>
			<xs:documentation>Withdrawn through a producer's organisation (Y-yes, N-no,
                     T-temporarily)</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="ProducerOrganizationUseType" xml:base="xs:string">
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="SpeciesType">
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="weightType">
		<xs:restriction base="xs:decimal"/>
	</xs:simpleType>
	<xs:simpleType name="yearType">
		<xs:restriction base="xs:integer"/>
	</xs:simpleType>
	<xs:simpleType name="CountryType">
		<xs:annotation>
			<xs:documentation>ISO alpha-3 country code</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="PortType">
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="FishFreshnessType">
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="FishStateType">
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="FishPresentationType">
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="FishPackagingType">
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="GearType">
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="EconomicZoneType">
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="FaoAreaType">
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="FaoSubAreaType">
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="FaoDivisionType">
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="EffortZoneType">
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="FaoSubDivisionType">
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="FaoUnitType">
		<xs:annotation>
			<xs:documentation>FAO unit</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:simpleType name="civicnumberType">
		<xs:restriction base="xs:token"/>
	</xs:simpleType>
	<xs:simpleType name="cfrType">
		<xs:restriction base="xs:token"/>
	</xs:simpleType>
	<xs:simpleType name="ircsType">
		<xs:restriction base="xs:token"/>
	</xs:simpleType>
	<xs:simpleType name="districtType">
		<xs:restriction base="xs:token"/>
	</xs:simpleType>
	<xs:simpleType name="vesselNameType">
		<xs:restriction base="xs:token"/>
	</xs:simpleType>
	<xs:complexType name="RasDeclarationType">
		<xs:annotation>
			<xs:documentation/>
		</xs:annotation>
		<xs:attribute name="FA" type="nota:FaoAreaType" use="required">
			<xs:annotation>
				<xs:documentation>FAO area.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="SA" type="nota:FaoSubAreaType" use="required">
			<xs:annotation>
				<xs:documentation>FAO sub-area.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="ID" type="nota:FaoDivisionType" use="required">
			<xs:annotation>
				<xs:documentation>FAO division.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="SD" type="nota:FaoSubDivisionType" use="optional">
			<xs:annotation>
				<xs:documentation>FAO sub-division.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="UI" type="nota:FaoUnitType" use="optional">
			<xs:annotation>
				<xs:documentation>FAO Unit.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
		<xs:attribute name="EZ" type="nota:EconomicZoneType" use="optional">
			<xs:annotation>
				<xs:documentation>Economic zone.</xs:documentation>
			</xs:annotation>
		</xs:attribute>
	</xs:complexType>
	<xs:simpleType name="CatchRuleType">
		<xs:annotation>
			<xs:documentation>Catch rule (size), i.e. LSC (Legally Size Catch), BMS (Below Minimum Size) #2.0:added</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:complexType name="WeighingOperatorType">
		<xs:annotation>
			<xs:documentation>operator responsible for the weighing #2.1:added from v3</xs:documentation>
		</xs:annotation>
		<xs:choice>
			<xs:element name="weighingOperatorId" type="nota:WeighingOperatorIdType"/>
			<xs:element name="weighingOperatorContact" type="nota:WeighingOperatorContactType"/>
		</xs:choice>
	</xs:complexType>
	<xs:simpleType name="WeighingOperatorIdType">
		<xs:annotation>
			<xs:documentation>#2.1:added from v3</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
	<xs:complexType name="WeighingOperatorContactType">
		<xs:annotation>
			<xs:documentation>#2.1:added from v3</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="name" type="nota:NameType"/>
			<xs:element name="address" type="nota:AddressType"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="AddressType">
		<xs:annotation>
			<xs:documentation>#2.1:added from v3</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="streetName" type="xs:string"/>
			<xs:element name="streetNumber" type="xs:string"/>
			<xs:element name="city" type="xs:string"/>
			<xs:element name="postalCode" type="xs:string"/>
			<xs:element name="country" type="xs:string"/>
		</xs:sequence>
	</xs:complexType>
	<xs:complexType name="NameType">
		<xs:annotation>
			<xs:documentation>#2.1:added from v3</xs:documentation>
		</xs:annotation>
		<xs:choice>
			<xs:element name="personName" type="nota:PersonNameType"/>
			<xs:element name="organisationName" type="nota:OrganisationNameType"/>
		</xs:choice>
	</xs:complexType>
	<xs:complexType name="PersonNameType">
		<xs:annotation>
			<xs:documentation>#2.1:added from v3</xs:documentation>
		</xs:annotation>
		<xs:sequence>
			<xs:element name="givenName" type="xs:string"/>
			<xs:element name="familyName" type="xs:string"/>
		</xs:sequence>
	</xs:complexType>
	<xs:simpleType name="OrganisationNameType">
		<xs:annotation>
			<xs:documentation>#2.1:added from v3</xs:documentation>
		</xs:annotation>
		<xs:restriction base="xs:string"/>
	</xs:simpleType>
</xs:schema>
