git_bsmd/nsw/HIS-NORD/xsd.assert/sec_reeder.xsd
2015-07-12 18:12:31 +00:00

108 lines
4.8 KiB
XML

<?xml version="1.0"?>
<!-- DATEN + DIENSTE GmbH Rostock, Version vom 12.03.2015 -->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
<xs:complexType name="sec">
<xs:sequence>
<xs:element name="CSOLastName" type="string1-99-type"/>
<xs:element name="CSOFirstName" type="string1-99-type" minOccurs="0"/>
<xs:element name="CSOPhone" type="string1-99-type"/>
<xs:element name="CSOFax" type="string1-99-type" minOccurs="0"/>
<xs:element name="CSOEMail" type="string1-99-type" minOccurs="0"/>
<xs:element name="ValidISSCOnBoard" type="yorn-type"/>
<xs:element name="ReasonsForNoValidISSC" type="string1-255-type" minOccurs="0"/>
<xs:element name="ISSCType" type="issc-type"/>
<xs:element name="ISSCIssuerType" type="isscissuer-type"/>
<xs:element name="ISSCIssuerName" type="string1-99-type"/>
<xs:element name="ISSCDateOfExpiration" type="xs:date"/>
<xs:element name="ApprovedSecurityPlanOnBoard" type="yorn-type"/>
<xs:element name="CurrentShipSecurityLevel " type="posint1-3-type"/>
<xs:element name="PortFacilityOfArrival" type="string1-99-type"/>
<xs:element name="GeneralDescriptionOfCargo" type="cargodescription-type"/>
<xs:element name="Last10Ports" type="last10ports"/>
<xs:element name="LastActivities" type="lastactivities" minOccurs="0"/>
</xs:sequence>
<xs:assert test="if (ValidISSCOnBoard eq 'Y') then ReasonsForNoValidISSC else empty(ReasonsForNoValidISSC)"/>
</xs:complexType>
<xs:complexType name="last10ports">
<xs:sequence>
<xs:element name="LastPort" type="last10port" maxOccurs="10"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="last10port">
<xs:sequence>
<xs:element name="PortFacilityPortName" type="string1-99-type" minOccurs="0"/>
<xs:element name="PortFacilityPortCountry" type="string1-99-type" minOccurs="0"/>
<xs:element name="PortFacilityPortLoCode" type="locode-type" minOccurs="0"/>
<xs:element name="PortFacilityDateOfArrival" type="xs:date"/>
<xs:element name="PortFacilityDateOfDeparture" type="xs:date"/>
<xs:element name="PortFacilityShipSecurityLevel" type="posint1-3-type"/>
<xs:element name="PortFacilitySecurityMattersToReport" type="string1-255-type" minOccurs="0"/>
<xs:element name="PortFacilityGISISCode" type="unnumber-type"/>
</xs:sequence>
<xs:attribute name="Index" type="posint-type" use="required"/>
<xs:assert test="if (count(PortFacilityPortLoCode) eq 0) then PortFacilityPortName and PortFacilityPortCountry else PortFacilityPortLoCode"/>
</xs:complexType>
<xs:complexType name="lastactivities">
<xs:sequence>
<xs:element name="LastActivity" type="lastactivity" minOccurs="0" maxOccurs="10"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="lastactivity">
<xs:sequence>
<xs:element name="ShipToShipActivityLocation" type="location"/>
<xs:element name="ShipToShipActivityDateFrom" type="xs:date"/>
<xs:element name="ShipToShipActivityDateTo" type="xs:date"/>
<xs:element name="ShipToShipActivityType" type="string1-255-type"/>
<xs:element name="ShipToShipActivitySecurityMattersToReportOf" type="string1-255-type" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="location">
<xs:choice maxOccurs="3">
<xs:element name="ShipToShipActivityLocationName" type="string1-255-type"/>
<xs:element name="ShipToShipActivityLocationLoCode" type="locode-type"/>
<xs:element name="ShipToShipActivityLocationCoordinates" type="coordinates"/>
</xs:choice>
<xs:assert test="count(ShipToShipActivityLocationName) le 1 and count(ShipToShipActivityLocationLoCode) le 1 and count(ShipToShipActivityLocationCoordinates) le 1"/>
</xs:complexType>
<xs:complexType name="coordinates">
<xs:sequence>
<xs:element name="ShipToShipActivityLocationCoordinatesLatitude" type="xs:integer"/>
<xs:element name="ShipToShipActivityLocationCoordinatesLongitude" type="xs:integer"/>
</xs:sequence>
</xs:complexType>
<!-- ======== simple types - enumerations =========== -->
<xs:simpleType name="issc-type">
<xs:restriction base="xs:string">
<xs:enumeration value="FULL"/>
<xs:enumeration value="INTERIM"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="isscissuer-type">
<xs:restriction base="xs:string">
<xs:enumeration value="ADMINISTRATION"/>
<xs:enumeration value="RSO"/>
</xs:restriction>
</xs:simpleType>
<xs:simpleType name="cargodescription-type">
<xs:restriction base="xs:string">
<xs:enumeration value="CONTAINER"/>
<xs:enumeration value="VEHICLES"/>
<xs:enumeration value="CONVENTIONAL_GENERAL_CARGO"/>
<xs:enumeration value="DRY_CARGO_IN_BULK"/>
<xs:enumeration value="LIQUID_CARGO_IN_BULK"/>
<xs:enumeration value="EMPTY"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>