Skip to content

Commit

Permalink
XSD Compliance with EPCIS Standard.
Browse files Browse the repository at this point in the history
  • Loading branch information
npenkov committed Dec 15, 2019
1 parent 6a246c0 commit 9a29f8e
Show file tree
Hide file tree
Showing 17 changed files with 3,068 additions and 43 deletions.
20 changes: 20 additions & 0 deletions fixtures/epcis/BasicTypes.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" targetNamespace="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" elementFormDefault="qualified" attributeFormDefault="unqualified">

<xs:simpleType name="MimeTypeQualifier">
<xs:annotation>
<xs:documentation>The MIME type as defined by IANA. Please refer to
http://www.iana.org/assignments/media-types/ for a list of types.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string"/>
</xs:simpleType>

<xs:simpleType name="Language">
<xs:annotation>
<xs:documentation>ISO 639-2; 1998 representation of Language name. Refer to http://www.loc.gov/standards/iso639-2/iso639jac.html to get the latest version of the standard.
</xs:documentation>
</xs:annotation>
<xs:restriction base="xs:string"/>
</xs:simpleType>
</xs:schema>
55 changes: 55 additions & 0 deletions fixtures/epcis/BusinessScope.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" targetNamespace="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:complexType name="BusinessScope">
<xs:sequence>
<xs:element name="Scope" type="Scope" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="Scope">
<xs:sequence>
<xs:group ref="ScopeAttributes"/>
<xs:element ref="ScopeInformation" minOccurs="0" maxOccurs="unbounded"/>
</xs:sequence>
</xs:complexType>
<xs:group name="ScopeAttributes">
<xs:sequence>
<xs:element name="Type" type="xs:string"/>
<xs:element name="InstanceIdentifier" type="xs:string"/>
<xs:element name="Identifier" type="xs:string" minOccurs="0"/>
</xs:sequence>
</xs:group>
<xs:element name="ScopeInformation" type="xs:anyType" abstract="true"/>
<xs:element name="CorrelationInformation" type="CorrelationInformation" substitutionGroup="ScopeInformation"/>
<xs:complexType name="CorrelationInformation">
<xs:sequence>
<xs:element name="RequestingDocumentCreationDateTime" type="xs:dateTime" minOccurs="0"/>
<xs:element name="RequestingDocumentInstanceIdentifier" type="xs:string" minOccurs="0"/>
<xs:element name="ExpectedResponseDateTime" type="xs:dateTime" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:element name="BusinessService" type="BusinessService" substitutionGroup="ScopeInformation"/>
<xs:complexType name="BusinessService">
<xs:sequence>
<xs:element name="BusinessServiceName" type="xs:string" minOccurs="0"/>
<xs:element name="ServiceTransaction" type="ServiceTransaction" minOccurs="0"/>
</xs:sequence>
</xs:complexType>
<xs:complexType name="ServiceTransaction">
<xs:attribute name="TypeOfServiceTransaction" type="TypeOfServiceTransaction" use="optional"/>
<xs:attribute name="IsNonRepudiationRequired" type="xs:string"/>
<xs:attribute name="IsAuthenticationRequired" type="xs:string"/>
<xs:attribute name="IsNonRepudiationOfReceiptRequired" type="xs:string"/>
<xs:attribute name="IsIntegrityCheckRequired" type="xs:string"/>
<xs:attribute name="IsApplicationErrorResponseRequested" type="xs:string"/>
<xs:attribute name="TimeToAcknowledgeReceipt" type="xs:string"/>
<xs:attribute name="TimeToAcknowledgeAcceptance" type="xs:string"/>
<xs:attribute name="TimeToPerform" type="xs:string"/>
<xs:attribute name="Recurrence" type="xs:string"/>
</xs:complexType>
<xs:simpleType name="TypeOfServiceTransaction">
<xs:restriction base="xs:string">
<xs:enumeration value="RequestingServiceTransaction"/>
<xs:enumeration value="RespondingServiceTransaction"/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
14 changes: 14 additions & 0 deletions fixtures/epcis/DocumentIdentification.xsd
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" targetNamespace="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" elementFormDefault="qualified" attributeFormDefault="unqualified">

<xs:complexType name="DocumentIdentification">
<xs:sequence>
<xs:element name="Standard" type="xs:string"/>
<xs:element name="TypeVersion" type="xs:string"/>
<xs:element name="InstanceIdentifier" type="xs:string"/>
<xs:element name="Type" type="xs:string"/>
<xs:element name="MultipleType" type="xs:boolean" minOccurs="0"/>
<xs:element name="CreationDateAndTime" type="xs:dateTime"/>
</xs:sequence>
</xs:complexType>
</xs:schema>
Loading

0 comments on commit 9a29f8e

Please sign in to comment.