• No results found

General Identifier Scheme XML Schema Components3009

7 General XML Schema Definition Language Conventions

8.7 Identifier Scheme XML Schema Files

8.7.1 General Identifier Scheme XML Schema Components3009

Both Common Identifier Scheme XML Schema Files and Business Identifier Scheme 3010

XML Schema Files define the schemes using a consistent approach.

3011

8.7.1.1 Identifier Scheme XML Schema File Structure 3012

Each Identifier Scheme XML Schema File will be structured in a standard format in 3013

order to ensure consistency and ease of use. This structure is show in Example 8-3014

47.

3015

Example 8-47: Identifier scheme XML Schema File structure 3016

<?xml version="1.0" encoding="UTF-8"?>

3017

<!-- ==================================================================== -->

3018

<!-- ===== Global Trade Identification Number – Identifier Scheme XML Schema

3019

File===== -->

3020

<!-- ==================================================================== -->

3021

<!--3022

Schema agency: GS1

3023

Schema version: 1.0

3024

Schema date: 21 December 2008

30253026

Identifier Scheme name: Global Trade Identification Number

3027

Identification Scheme agency: GS1

3028

Identification Scheme version: 1

30293030

Copyright (C) UN/CEFACT (2009). All Rights Reserved.

30313032

... see copyright information ...

30333034

-->

3035

<xsd:schema targetNamespace=" ... see namespace ...

3036

xmlns:xsd="http://www.w3.org/2001/XMLSchema"

3037

elementFormDefault="qualified" attributeFormDefault="unqualified">

3038

<!-- ================================================================== -->

3039

<!-- ===== Root Element ===== -->

3040

<!-- =================================================================== -->

3041

... see root element declaration ...

3042

<!-- ================================================================== -->

3043

<!-- ===== Type Definitions ===== -->

3044

<!-- =================================================================== -->

3045

<!--= Type Definition: Global Trade Identification Number Content Type =-->

3046

<!-- =================================================================== -->

3047

... see type definition ...

3048

</xsd:schema>

3049

8.7.1.2 Identifier Scheme XML Schema Name 3050

The name of Identifier Scheme XML Schema Files are dependent upon the agency 3051

that defines them and the identifier scheme itself.

3052

[R A50B]

Identifier Scheme XML Schema File names MUST be of the form:

<Scheme Agency Identifier>_<Scheme

Identifier>_<Scheme Version Identifier>.xsd

All periods, spaces, or other separators are removed except for the . before xsd and the _ between the names.

Where:

Scheme Agency Identifier – Identifies the agency that manages the identifier scheme. The default agency IDs used are those from UN/EDIFACT DE 3055, however, roles defined in DE 3055 cannot be used.

Scheme Identifier – Identifies the identifier scheme.

Scheme Version Identifier – Identifies the version of the scheme.

2

8.7.1.3 Element Declarations 3053

An Identifier Scheme XML Schema File contains one global element declaration.

3054

This global element is a unique identifier for the identifier scheme and is mandatory 3055

for UN/CEFACT Identifier Scheme XML Schema Files. Other organizations using 3056

this specification may choose to not provide the Identifier Scheme Root Element and 3057

still be in compliance with this specification.

3058

[R BFEB] Each Identifier Scheme XML Schema File MUST declare a single

global element. 3

The global element serves as the root element and is of the one xsd:simpleType 3059

that is defined in the Identifier Scheme XML Schema File.

3060

[R B236]

The Identifier Scheme XML Schema File root element MUST be of the xsd:simpleType that is defined in the Identifier Scheme XML Schema File.

1

The global element is named using the formal identifier scheme name.

3061

[R 9B48]

The Identifier Scheme XML Schema File global element name MUST be the formal name of the Identifier Scheme with the word identifier appended if not present in the Identifier Scheme name

1

Example 8-48 shows a root element declaration for an identifier scheme.

3062

Example 8-48: Identifier scheme root element declaration 3063

<!-- =================================================================== -->

3064

<!-- ===== Root Element ===== -->

3065

<!-- =================================================================== -->

3066

<xsd:element name="GlobalTradeIdentificationNumber"

3067

type="ism8GTIN:GlobalTradeIdentificationNumberType"/>

3068

The actual implementation of the identifier scheme is through the use of its 3069

xsd:simpleType by a BDT BVD or BBIE.

3070

8.7.1.4 Type Definitions 3071

Each Identifier XML Schema File will have one named xsd:simpleType defined.

3072

The name of this type will correspond to the identifier scheme name with the word 3073

‘ContentType’ appended.

3074

[R 9451] Each Identifier Scheme XML Schema File MUST define one, and only one, named xsd:simpleType for the content component. 1

[R B79A]

The Identifier Scheme XML Schema File xsd:simpleType name MUST be the name of the identifier scheme with the word

Identifier appended if not part of the identifier scheme name and the word ContentType appended.

1

The identifiers created by an identifier scheme are never enumerated.

3075

Example 8-49 shows the definition of a Global Trade Identification Number 3076

xsd:simpleType. 3077

Example 8-49: Identifier scheme xsd:simpleType name 3078

<!-- =================================================================== -->

3079

<!-- ===== Root Element ===== -->

3080

<!-- =================================================================== -->

3081

<xsd:element name="GlobalTradeIdentificationNumber"

3082

type="ism8GTIN:GlobalTradeIdentificationNumberType"/>

3083

<!-- =================================================================== -->

3084

<!-- ===== Type Definitions ===== -->

3085

<!-- =================================================================== -->

3086

<!-- == Type Definition: Global Trade Identification Number Identifier= -->

3087

<!-- =================================================================== -->

3088

<xsd:simpleType name="GlobalTradeIdentificationNumberContentType">

3089

See type definition

3090

</xsd:simpleType>

3091

8.7.1.5 Annotation 3092

8.7.1.5.1 Annotation Documentation 3093

8.7.1.5.1.1 Identifier Scheme Documentation 3094

Every Identifier Scheme XML Schema file must include structured annotation 3095

documentation.

3096

[R B30A]

Every Identifier Scheme MUST contain a structured set of xsd:annotation xsd:documentation elements in the following sequence and pattern:

SchemeOrListID (mandatory): The unique identifier assigned to the Identifier Scheme.

SchemeOrListVersionID (mandatory): Identifies the version of the scheme.

SchemeOrListAgencyID (mandatory): The unique identifier assigned to the Agency that owns or is responsible for the identifier scheme being referenced.

SchemeOrListModificationAllowedIndicator (mandatory):

Indicates whether the values being validated can be outside the pattern specified by the scheme.

1

Example 8-50 shows the declaration of the annotation documentation for each 3097

Identifier Scheme.

3098

Example 8-50: Identifier scheme documentation structure 3099

<xsd:group name="SchemeOrListDocumentation">

3100

<xsd:sequence>

3101

<xsd:element name="SchemeOrListID" type="IDType"/>

3102

<xsd:element name="SchemeOrListVersionID" type="IDType/>

3103

<xsd:element name="SchemeOrListAgencyID" type="IDType" />

3104

<xsd:element name="SchemeOrListModificationAllowedIndicator"

3105

type="IndicatorType"/>

3106

</xsd:sequence>

3107

</xsd:group>

3108

8.7.2 Common Identifier Scheme XML Schema Components