The Global Language of Business
  1. Home
  2. Standards
  3. GS1 XML
  4. Technical User Guide to GS1 XML 3.x
  5. GS1 XML schema hierarchy

GS1 XML schema hierarchy

Return to Table of Contents

 

In the GS1 XML release 3.0 the business message components are defined in the XML schemas of three levels:

  • Shared Common schema – contains all the components that can be re-used across domains, e.g. GS1 EDI and GDSN, such as GS1 Identification Keys, Party Identification, etc.
  • Domain Common – contains all the components that can be re-used within one domain, e.g. GS1 EDI, such as Transactional Party Identification, Order Type Code. The domain specific components are defined using the shared components when available. Thus, the eComCommon.xsd needs to import the SharedCommon.xsd
  • Message and extension schema – defines the structure of the actual message and the business document, as well as the content of the potential extensions. The document and extension specific components are defined using the shared and domain specific components when available. Thus, the BusinessMessage.xsd (e.g. Order.xsd, Invoice.xsd) needs to import the SharedCommon.xsd and eComCommon.xsd

The Standard Business Document Header component is defined in its own set of schemas, while the structure of the header is defined in the StandardBusinessDocumentHeader.xsd that needs to be imported into the BusinessMessage.xsd.

Installation of GS1 XML schemas

GS1 business message schemas re-use components from the common library, thus it must import the respective schemas. The <xsd:import> element contains a built-in attribute ‘schemaLocation’ that specifies the access path to the imported schema. If the re-used schema is saved in another place than the value of the location attribute has to be updated accordingly. Otherwise the validating tool cannot find the imported schema and declares the file (either schema itself or the instance file) as not valid. Therefore, it is crucial either to install the schemas as provided by GS1 in the Implementer’s Packet or – if this is not possible - edit the access path accordingly.

Example

Every business message schema imports at least the following three schemas:

<xsd:import namespace="http://www.unece.org/cefact/namespaces/StandardBusinessDocumentHeader" schemaLocation="../../sbdh/StandardBusinessDocumentHeader.xsd"/>

<xsd:import namespace="urn:gs1: shared:shared_common:xsd:3" schemaLocation="../shared/SharedCommon.xsd"/>

<xsd:import namespace="urn:gs1:ecom:ecom_common:xsd:3" schemaLocation="eComCommon.xsd"/>

These paths reflect the following folder structure:

Note: The file names of the GS1 XML schemas do not contain version numbers, therefore special care must be taken if multiple versions of business messages are used in the same system. For more details about versioning please refer to GS1 XML versioning.