General Information

Abstract

The present document defines the mapping rules for W3C® XML Schema (as defined in [7] to [9]) to TTCN-3 as
defined in ETSI ES 201 873-1 [1] to enable testing of XML-based systems, interfaces and protocols.

Status
Published
Publication Date
07-Aug-2017
Current Stage
6060 - National Implementation/Publication (Adopted Project)
Start Date
10-Jul-2017
Due Date
14-Sep-2017
Completion Date
08-Aug-2017

Buy Documents

Standard

ETSI ES 201 873-9 V4.8.1 (2017-03) - Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 9: Using XML schema with TTCN-3

English language (153 pages)
sale 15% off
Preview
sale 15% off
Preview
Standard

ETSI ES 201 873-9 V4.8.1 (2017-05) - Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 9: Using XML schema with TTCN-3

English language (153 pages)
sale 15% off
Preview
sale 15% off
Preview
Standardization document

SIST ES 201 873-9 V4.8.1:2017

English language (153 pages)
Preview
Preview
e-Library read for
×1 day

Overview

SIST ES 201 873-9 V4.8.1:2017 is the Slovenian implementation of an important international standard from the SIST and ETSI standards organizations. This document addresses advanced testing methodologies for software systems that utilize XML-based interfaces. Specifically, it defines mapping rules for transforming W3C XML Schema definitions into the Testing and Test Control Notation version 3 (TTCN-3), enabling comprehensive testing of XML-driven systems, interfaces, and protocols.

By providing systematic guidance, this standard bridges the gap between XML schema specifications and formalized test descriptions, supporting effective interoperability and conformance testing in telecommunication and IT environments.

Key Topics

  • XML Schema to TTCN-3 Mapping
    Outlines detailed rules for translating W3C XML Schema constructs into corresponding TTCN-3 types, reflecting structure, data types, and constraints in test code.

  • Component Mapping
    Explains how core XML Schema elements such as simpleType, complexType, elements, attributes, and groups are represented in TTCN-3 for effective test coverage.

  • Namespaces and Name Conversion
    Covers the handling of XML namespaces, document references, and conversion of XML identifiers to valid TTCN-3 names, ensuring clarity and avoiding conflicts.

  • Data Types Support
    Details the mapping of XML built-in data types (string, integer, float, boolean, date/time, etc.) to TTCN-3 equivalents, maintaining semantic integrity in tests.

  • Facets and Constraints
    Presents methods for handling XML Schema facets like enumeration, length, pattern, and numeric restrictions within TTCN-3 test artifacts.

  • Encoding Instructions
    Specifies recommendations for encoding and variant attribute handling necessary for aligning XML instances with TTCN-3 test conditions.

Applications

SIST ES 201 873-9 V4.8.1:2017 is highly relevant for organizations involved in:

  • Testing of XML-based Protocols and Systems:

    • Telecommunications protocols (e.g., 3GPP, LTE, UMTS, oneM2M)
    • Enterprise and web services using XML interfaces
    • IoT protocols where XML is a message or data schema format
  • Automated Conformance Testing:

    • Generating TTCN-3 test scripts from XML Schemas to automate compliance and interoperability verification
    • Ensuring conformance to standards in multi-vendor or multi-domain environments
  • Quality Assurance in Software Development:

    • Integrating formalized TTCN-3 tests derived from XML Schemas into CI/CD pipelines for continuous verification
  • Regulatory and Certification Testing:

    • Creating robust, standards-based test suites required for product certification in communications and IT sectors

Related Standards

For a comprehensive testing approach, consider these related standards:

  • ETSI ES 201 873-1
    Defines the core specification of the TTCN-3 language, which forms the baseline for all parts in the series.

  • Other Parts of ETSI ES 201 873
    Cover broader aspects of the Methods for Testing and Specification (MTS) suite, including syntax, semantics, and mapping rules for various data interchange formats.

  • W3C XML Schema (XSD)
    The foundational specification for XML data structure definition, referenced throughout the mapping rules.

  • ETSI TTCN-3 Extension Modules
    Modules that further enhance TTCN-3’s applicability for different encoding and communication scenarios.

By integrating these standards, organizations can achieve reliable, formalized, and repeatable testing of XML-based technologies, ensuring their solutions adhere to industry best practices and international requirements.

Buy Documents

Standard

ETSI ES 201 873-9 V4.8.1 (2017-03) - Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 9: Using XML schema with TTCN-3

English language (153 pages)
sale 15% off
Preview
sale 15% off
Preview
Standard

ETSI ES 201 873-9 V4.8.1 (2017-05) - Methods for Testing and Specification (MTS); The Testing and Test Control Notation version 3; Part 9: Using XML schema with TTCN-3

English language (153 pages)
sale 15% off
Preview
sale 15% off
Preview
Standardization document

SIST ES 201 873-9 V4.8.1:2017

English language (153 pages)
Preview
Preview
e-Library read for
×1 day

Get Certified

Connect with accredited certification bodies for this standard

ANCE

Mexican certification and testing association.

EMA Mexico Verified

Intertek Slovenia

Intertek testing, inspection, and certification services in Slovenia.

UKAS Slovenia Verified

LNE (Laboratoire National de Métrologie et d'Essais)

French national laboratory for metrology and testing.

COFRAC France Verified

Sponsored listings

Frequently Asked Questions

SIST ES 201 873-9 V4.8.1:2017 is a standard published by the Slovenian Institute for Standardization (SIST). Its full title is "Methods for Testing and Specification (MTS) - The Testing and Test Control Notation version 3 - Part 9: Using XML schema with TTCN-3". This standard covers: The present document defines the mapping rules for W3C® XML Schema (as defined in [7] to [9]) to TTCN-3 as defined in ETSI ES 201 873-1 [1] to enable testing of XML-based systems, interfaces and protocols.

The present document defines the mapping rules for W3C® XML Schema (as defined in [7] to [9]) to TTCN-3 as defined in ETSI ES 201 873-1 [1] to enable testing of XML-based systems, interfaces and protocols.

SIST ES 201 873-9 V4.8.1:2017 is classified under the following ICS (International Classification for Standards) categories: 33.040.01 - Telecommunication systems in general. The ICS classification helps identify the subject area and facilitates finding related standards.

SIST ES 201 873-9 V4.8.1:2017 is available in PDF format for immediate download after purchase. The document can be added to your cart and obtained through the secure checkout process. Digital delivery ensures instant access to the complete standard document.

Standards Content (Sample)


Final draft ETSI ES 201 873-9 V4.8.1 (2017-03)

ETSI STANDARD
Methods for Testing and Specification (MTS);
The Testing and Test Control Notation version 3;
Part 9: Using XML schema with TTCN-3

2 Final draft ETSI ES 201 873-9 V4.8.1 (2017-03)

Reference
RES/MTS-201873-9 T3XSD ed481
Keywords
language, testing, TTCN-3
ETSI
650 Route des Lucioles
F-06921 Sophia Antipolis Cedex - FRANCE

Tel.: +33 4 92 94 42 00  Fax: +33 4 93 65 47 16

Siret N° 348 623 562 00017 - NAF 742 C
Association à but non lucratif enregistrée à la
Sous-Préfecture de Grasse (06) N° 7803/88

Important notice
The present document can be downloaded from:
http://www.etsi.org/standards-search
The present document may be made available in electronic versions and/or in print. The content of any electronic and/or
print versions of the present document shall not be modified without the prior written authorization of ETSI. In case of any
existing or perceived difference in contents between such versions and/or in print, the only prevailing document is the
print of the Portable Document Format (PDF) version kept on a specific network drive within ETSI Secretariat.
Users of the present document should be aware that the document may be subject to revision or change of status.
Information on the current status of this and other ETSI documents is available at
https://portal.etsi.org/TB/ETSIDeliverableStatus.aspx
If you find errors in the present document, please send your comment to one of the following services:
https://portal.etsi.org/People/CommiteeSupportStaff.aspx
Copyright Notification
No part may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying
and microfilm except as authorized by written permission of ETSI.
The content of the PDF version shall not be modified without the written authorization of ETSI.
The copyright and the foregoing restriction extend to reproduction in all media.

© European Telecommunications Standards Institute 2017.
All rights reserved.
TM TM TM
DECT , PLUGTESTS , UMTS and the ETSI logo are Trade Marks of ETSI registered for the benefit of its Members.
TM
3GPP and LTE™ are Trade Marks of ETSI registered for the benefit of its Members and
of the 3GPP Organizational Partners.
GSM® and the GSM logo are Trade Marks registered and owned by the GSM Association.
ETSI
3 Final draft ETSI ES 201 873-9 V4.8.1 (2017-03)
Contents
Intellectual Property Rights . 7
Foreword . 7
Modal verbs terminology . 7
1 Scope . 8
2 References . 8
2.1 Normative references . 8
2.2 Informative references . 9
3 Definitions and abbreviations . 10
3.1 Definitions . 10
3.2 Abbreviations . 10
4 Introduction . 11
5 Mapping XML Schemas . 11
5.0 Approach . 11
5.1 Namespaces and document references . 13
5.1.1 Namespaces . 13
5.1.2 Includes . 13
5.1.3 Imports . 14
5.1.4 Attributes of the XSD schema element . 15
5.1.5 The control namespace . 16
5.2 Name conversion . 16
5.2.1 General . 16
5.2.2 Name conversion rules . 17
5.2.3 Order of the mapping . 22
5.3 Mapping of XSD schema components . 22
5.4 Unsupported features . 23
5.5 Conformance and compatibility . 23
6 Built-in data types . 23
6.0 General . 23
6.1 Mapping of facets . 24
6.1.0 General . 24
6.1.1 Length . 24
6.1.2 MinLength . 25
6.1.3 MaxLength . 25
6.1.4 Pattern . 26
6.1.5 Enumeration . 27
6.1.6 WhiteSpace . 29
6.1.7 MinInclusive . 29
6.1.8 MaxInclusive . 31
6.1.9 MinExclusive . 32
6.1.10 MaxExclusive . 33
6.1.11 Total digits . 35
6.1.12 Fraction digits . 35
6.1.13 Not specifically mapped facets . 36
6.2 String types . 36
6.2.0 General . 36
6.2.1 String . 37
6.2.2 Normalized string . 37
6.2.3 Token . 37
6.2.4 Name . 37
6.2.5 NMTOKEN . 37
6.2.6 NCName . 38
6.2.7 ID . 38
6.2.8 IDREF . 38
ETSI
4 Final draft ETSI ES 201 873-9 V4.8.1 (2017-03)
6.2.9 ENTITY . 38
6.2.10 Hexadecimal binary . 38
6.2.11 Base 64 binary . 38
6.2.12 Any URI . 39
6.2.13 Language . 39
6.2.14 NOTATION . 39
6.3 Integer types . 39
6.3.0 General . 39
6.3.1 Integer . 39
6.3.2 Positive integer . 39
6.3.3 Non-positive integer . 40
6.3.4 Negative integer . 40
6.3.5 Non-negative integer. 40
6.3.6 Long . 40
6.3.7 Unsigned long . 40
6.3.8 Int . 40
6.3.9 Unsigned int . 40
6.3.10 Short. 41
6.3.11 Unsigned Short . 41
6.3.12 Byte . 41
6.3.13 Unsigned byte . 41
6.4 Float types . 41
6.4.0 General . 41
6.4.1 Decimal . 41
6.4.2 Float . 42
6.4.3 Double . 42
6.5 Time types . 42
6.5.0 General . 42
6.5.1 Duration . 43
6.5.2 Date and time . 43
6.5.3 Time . 43
6.5.4 Date . 43
6.5.5 Gregorian year and month . 43
6.5.6 Gregorian year . 43
6.5.7 Gregorian month and day . 44
6.5.8 Gregorian day . 44
6.5.9 Gregorian month . 44
6.6 Sequence types . 44
6.6.0 General . 44
6.6.1 NMTOKENS . 44
6.6.2 IDREFS . 44
6.6.3 ENTITIES . 44
6.6.4 QName . 45
6.7 Boolean type . 45
6.8 AnyType and anySimpleType types. 45
7 Mapping XSD components . 50
7.0 General . 50
7.1 Attributes of XSD component declarations . 51
7.1.0 General . 51
7.1.1 Id . 51
7.1.2 Ref . 51
7.1.3 Name . 52
7.1.4 MinOccurs and maxOccurs. 52
7.1.5 Default and Fixed . 57
7.1.6 Form. 57
7.1.7 Type . 58
7.1.8 Mixed . 58
7.1.9 Abstract . 58
7.1.10 Block and blockDefault . 59
7.1.11 Nillable . 59
7.1.12 Use . 61
ETSI
5 Final draft ETSI ES 201 873-9 V4.8.1 (2017-03)
7.1.13 Substitution group . 61
7.1.14 Final . 61
7.1.15 Process contents . 61
7.2 Schema component. 62
7.3 Element component . 62
7.4 Attribute and attribute group definitions . 63
7.4.1 Attribute element definitions . 63
7.4.2 Attribute group definitions . 64
7.5 SimpleType components . 64
7.5.0 General . 64
7.5.1 Derivation by restriction . 64
7.5.2 Derivation by list . 65
7.5.3 Derivation by union . 67
7.6 ComplexType components . 71
7.6.0 General . 71
7.6.1 ComplexType containing simple content . 71
7.6.1.0 General . 71
7.6.1.1 Extending simple content . 71
7.6.1.2 Restricting simple content . 73
7.6.2 ComplexType containing complex content . 74
7.6.2.0 General . 74
7.6.2.1 Complex content derived by extension . 75
7.6.2.2 Complex content derived by restriction . 80
7.6.3 Referencing group components . 82
7.6.4 All content . 85
7.6.5 Choice content . 87
7.6.5.0 General . 87
7.6.5.1 Choice with nested elements . 87
7.6.5.2 Choice with nested group . 87
7.6.5.3 Choice with nested choice . 88
7.6.5.4 Choice with nested sequence. 89
7.6.5.5 Choice with nested any . 90
7.6.6 Sequence content . 90
7.6.6.0 General . 90
7.6.6.1 Sequence with nested element content . 90
7.6.6.2 Sequence with nested group content . 91
7.6.6.3 Sequence with nested choice content . 91
7.6.6.4 Sequence with nested sequence content . 92
7.6.6.5 Sequence with nested any content . 92
7.6.6.6 Effect of the minOccurs and maxOccurs attributes on the mapping . 93
7.6.7 Attribute definitions, attribute and attributeGroup references . 95
7.6.8 Mixed content . 97
7.7 Any and anyAttribute . 100
7.7.0 General . 100
7.7.1 The any element . 100
7.7.2 The anyAttribute element . 104
7.8 Annotation . 109
7.9 Group components . 109
7.10 Identity-constraint definition schema components . 110
8 Substitutions . 110
8.0 General . 110
8.1 Element substitution . 111
8.1.1 Head elements of substitution groups . 111
8.1.2 Substitution group members . 116
8.2 Type substitution . 116
Annex A (normative): TTCN-3 module XSD . 123
Annex B (normative): Encoding instructions . 127
B.0 General . 127
ETSI
6 Final draft ETSI ES 201 873-9 V4.8.1 (2017-03)
B.1 General . 127
B.2 Basic XML encode and variant attribute rules . 128
B.2.1 The XML encode attribute . 128
B.2.2 Variant Attribute Overwriting Rules . 128
B.3 Encoding instructions . 129
B.3.1 XSD data type identification . 129
B.3.2 Any element . 129
B.3.3 Any attributes . 130
B.3.4 Attribute . 131
B.3.5 AttributeFormQualified . 131
B.3.6 Control namespace identification . 131
B.3.7 Default for empty . 132
B.3.8 Element . 132
B.3.9 ElementFormQualified . 132
B.3.10 Embed values . 133
B.3.11 Form . 133
B.3.12 List. 133
B.3.13 Name . 134
B.3.14 Namespace identification . 134
B.3.15 Nillable elements . 135
B.3.16 Use union. 135
B.3.17 Text . 136
B.3.18 Use number . 136
B.3.19 Use order . 137
B.3.20 Whitespace control . 137
B.3.21 Untagged elements . 137
B.3.22 Abstract . 138
B.3.23 Block . 139
B.3.24 Use type . 139
B.3.25 Process the content of any elements and attributes . 140
B.3.26 Transparent . 140
B.3.27 No Type . 141
B.3.28 Number of fraction digits . 141
B.3.29 XML header control . 142
Annex C (informative): Examples . 143
C.0 General . 143
C.1 Example 1 . 143
C.2 Example 2 . 145
C.3 Example 3 . 146
Annex D (informative): Deprecated features . 150
D.1 Using the anyElement encoding instruction to record of fields . 150
D.2 Using the XML language identifier string. 150
D.3 Id. 151
Annex E (informative): Bibliography . 152
History . 153

ETSI
7 Final draft ETSI ES 201 873-9 V4.8.1 (2017-03)
Intellectual Property Rights
IPRs essential or potentially essential to the present document may have been declared to ETSI. The information
pertaining to these essential IPRs, if any, is publicly available for ETSI members and non-members, and can be found
in ETSI SR 000 314: "Intellectual Property Rights (IPRs); Essential, or potentially Essential, IPRs notified to ETSI in
respect of ETSI standards", which is available from the ETSI Secretariat. Latest updates are available on the ETSI Web
server (https://ipr.etsi.org/).
Pursuant to the ETSI IPR Policy, no investigation, including IPR searches, has been carried out by ETSI. No guarantee
can be given as to the existence of other IPRs not referenced in ETSI SR 000 314 (or the updates on the ETSI Web
server) which are, or may be, or may become, essential to the present document.
Foreword
This final draft ETSI Standard (ES) has been produced by ETSI Technical Committee Methods for Testing and
Specification (MTS), and is now submitted for the ETSI standards Membership Approval Procedure.
The present document is part 9 of a multi-part deliverable. Full details of the entire series can be found in part 1 [1].
Modal verbs terminology
In the present document "shall", "shall not", "should", "should not", "may", "need not", "will", "will not", "can" and
"cannot" are to be interpreted as described in clause 3.2 of the ETSI Drafting Rules (Verbal forms for the expression of
provisions).
"must" and "must not" are NOT allowed in ETSI deliverables except when used in direct citation.
ETSI
8 Final draft ETSI ES 201 873-9 V4.8.1 (2017-03)
1 Scope ®
The present document defines the mapping rules for W3C XML Schema (as defined in [7] to [9]) to TTCN-3 as
defined in ETSI ES 201 873-1 [1] to enable testing of XML-based systems, interfaces and protocols.
2 References
2.1 Normative references
References are either specific (identified by date of publication and/or edition number or version number) or
non-specific. For specific references, only the cited version applies. For non-specific references, the latest version of the
referenced document (including any amendments) applies.
Referenced documents which are not found to be publicly available in the expected location might be found at
https://docbox.etsi.org/Reference.
NOTE: While any hyperlinks included in this clause were valid at the time of publication, ETSI cannot guarantee
their long term validity.
The following referenced documents are necessary for the application of the present document.
[1] ETSI ES 201 873-1: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; Part 1: TTCN-3 Core Language".
[2] ETSI ES 201 873-7: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; Part 7: Using ASN.1 with TTCN-3".
[3] Recommendation ITU-T X.680: "Information technology - Abstract Syntax Notation One
(ASN.1): Specification of basic notation".
[4] Recommendation ITU-T X.694: "Information technology - ASN.1 encoding rules: Mapping W3C
XML schema definitions into ASN.1".
[5] World Wide Web Consortium W3C Recommendation: "Extensible Markup Language (XML)
1.1".
NOTE: Available at http://www.w3.org/TR/xml11.
[6] World Wide Web Consortium W3C Recommendation (2006): "Namespaces in XML 1.0".
NOTE: Available at http://www.w3.org/TR/REC-xml-names/.
[7] World Wide Web Consortium W3C Recommendation (2004): "XML Schema Part 0: Primer".
NOTE: Available at http://www.w3.org/TR/xmlschema-0.
[8] World Wide Web Consortium W3C Recommendation (2004): "XML Schema Part 1: Structures".
NOTE: Available at http://www.w3.org/TR/xmlschema-1.
[9] World Wide Web Consortium W3C Recommendation (2004): "XML Schema Part 2: Datatypes".
NOTE: Available at http://www.w3.org/TR/xmlschema-2.
ETSI
9 Final draft ETSI ES 201 873-9 V4.8.1 (2017-03)
2.2 Informative references
References are either specific (identified by date of publication and/or edition number or version number) or
non-specific. For specific references, only the cited version applies. For non-specific references, the latest version of the
referenced document (including any amendments) applies.
NOTE: While any hyperlinks included in this clause were valid at the time of publication, ETSI cannot guarantee
their long term validity.
The following referenced documents are not necessary for the application of the present document but they assist the
user with regard to a particular subject area.
[i.1] World Wide Web Consortium W3C Recommendation: "SOAP version 1.2, Part 1: Messaging
Framework".
NOTE: Available at http://www.w3.org/TR/soap12.
[i.2] ISO 8601 (2004): "Data elements and interchange formats - Information interchange -
Representation of dates and times".
[i.3] Void.
[i.4] ISO/IEC 10646 (2012): "Information technology - Universal Coded Character Set (UCS)".
[i.5] ETSI ES 202 781: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: Configuration and Deployment Support".
[i.6] ETSI ES 202 782: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: TTCN-3 Performance and Real Time Testing".
[i.7] ETSI ES 202 784: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: Advanced Parameterization".
[i.8] ETSI ES 202 785: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: Behaviour Types".
[i.9] ETSI ES 202 786: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: Support of interfaces with continuous signals".
[i.10] ETSI ES 202 789: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: Extended TRI".
[i.11] ETSI ES 201 873-7: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; Part 7: Using ASN.1 with TTCN-3".
[i.12] ETSI ES 201 873-8: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; Part 8: The IDL to TTCN-3 Mapping ".
[i.13] ETSI ES 201 873-11: "Methods for Testing and Specification (MTS); The Testing and Test
Control Notation version 3; Part 11: Using JSON with TTCN-3".
ETSI
10 Final draft ETSI ES 201 873-9 V4.8.1 (2017-03)
3 Definitions and abbreviations
3.1 Definitions
For the purposes of the present document, the terms and definitions given in ETSI ES 201 873-1 [1], Recommendation
ITU-T X.694 [4] and the following apply:
alphabetical order: way of sorting the XSD names based on the code positions of their characters according to
ISO/IEC 10646 [i.4]
NOTE: During this sorting the group, plane, row and cell octets is considered, in this order. Names, starting with
a character with a smaller code position take precedence Among the names with identical first character,
names containing no more characters take precedence over all other names. Otherwise, names with the
second character of smaller code position take precedence, etc. This algorithm is to be continued
recursively until all names are sorted into a sequential order.
schema component: generic XSD term for the building blocks that comprise the abstract data model of the schema
NOTE: The primary components, which may (type definitions) or obliged to (element and attribute declarations)
have names are as follows: simple type definitions, complex type definitions, attribute declarations and
element declarations. The secondary components, which are obliged to have names, are as follows:
attribute group definitions, identity-constraint definitions, model group definitions and notation
declarations. Finally, the "helper" components provide small parts of other components; they are not
independent of their context: annotations, model groups, particles, wildcards and attribute uses.
schema document: XML document containing a collection of schema components,
...


ETSI STANDARD
Methods for Testing and Specification (MTS);
The Testing and Test Control Notation version 3;
Part 9: Using XML schema with TTCN-3

2 ETSI ES 201 873-9 V4.8.1 (2017-05)

Reference
RES/MTS-201873-9 T3XSD ed481
Keywords
language, testing, TTCN-3, XML
ETSI
650 Route des Lucioles
F-06921 Sophia Antipolis Cedex - FRANCE

Tel.: +33 4 92 94 42 00  Fax: +33 4 93 65 47 16

Siret N° 348 623 562 00017 - NAF 742 C
Association à but non lucratif enregistrée à la
Sous-Préfecture de Grasse (06) N° 7803/88

Important notice
The present document can be downloaded from:
http://www.etsi.org/standards-search
The present document may be made available in electronic versions and/or in print. The content of any electronic and/or
print versions of the present document shall not be modified without the prior written authorization of ETSI. In case of any
existing or perceived difference in contents between such versions and/or in print, the only prevailing document is the
print of the Portable Document Format (PDF) version kept on a specific network drive within ETSI Secretariat.
Users of the present document should be aware that the document may be subject to revision or change of status.
Information on the current status of this and other ETSI documents is available at
https://portal.etsi.org/TB/ETSIDeliverableStatus.aspx
If you find errors in the present document, please send your comment to one of the following services:
https://portal.etsi.org/People/CommiteeSupportStaff.aspx
Copyright Notification
No part may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying
and microfilm except as authorized by written permission of ETSI.
The content of the PDF version shall not be modified without the written authorization of ETSI.
The copyright and the foregoing restriction extend to reproduction in all media.

© European Telecommunications Standards Institute 2017.
All rights reserved.
TM TM TM
DECT , PLUGTESTS , UMTS and the ETSI logo are Trade Marks of ETSI registered for the benefit of its Members.
TM
3GPP and LTE™ are Trade Marks of ETSI registered for the benefit of its Members and
of the 3GPP Organizational Partners.
oneM2M logo is protected for the benefit of its Members
GSM® and the GSM logo are Trade Marks registered and owned by the GSM Association.
ETSI
3 ETSI ES 201 873-9 V4.8.1 (2017-05)
Contents
Intellectual Property Rights . 7
Foreword . 7
Modal verbs terminology . 7
1 Scope . 8
2 References . 8
2.1 Normative references . 8
2.2 Informative references . 9
3 Definitions and abbreviations . 10
3.1 Definitions . 10
3.2 Abbreviations . 10
4 Introduction . 11
5 Mapping XML Schemas . 11
5.0 Approach . 11
5.1 Namespaces and document references . 13
5.1.1 Namespaces . 13
5.1.2 Includes . 13
5.1.3 Imports . 14
5.1.4 Attributes of the XSD schema element . 15
5.1.5 The control namespace . 16
5.2 Name conversion . 16
5.2.1 General . 16
5.2.2 Name conversion rules . 17
5.2.3 Order of the mapping . 22
5.3 Mapping of XSD schema components . 22
5.4 Unsupported features . 23
5.5 Conformance and compatibility . 23
6 Built-in data types . 23
6.0 General . 23
6.1 Mapping of facets . 24
6.1.0 General . 24
6.1.1 Length . 24
6.1.2 MinLength . 25
6.1.3 MaxLength . 25
6.1.4 Pattern . 26
6.1.5 Enumeration . 27
6.1.6 WhiteSpace . 29
6.1.7 MinInclusive . 29
6.1.8 MaxInclusive . 31
6.1.9 MinExclusive . 32
6.1.10 MaxExclusive . 33
6.1.11 Total digits . 35
6.1.12 Fraction digits . 35
6.1.13 Not specifically mapped facets . 36
6.2 String types . 36
6.2.0 General . 36
6.2.1 String . 37
6.2.2 Normalized string . 37
6.2.3 Token . 37
6.2.4 Name . 37
6.2.5 NMTOKEN . 37
6.2.6 NCName . 38
6.2.7 ID . 38
6.2.8 IDREF . 38
ETSI
4 ETSI ES 201 873-9 V4.8.1 (2017-05)
6.2.9 ENTITY . 38
6.2.10 Hexadecimal binary . 38
6.2.11 Base 64 binary . 38
6.2.12 Any URI . 39
6.2.13 Language . 39
6.2.14 NOTATION . 39
6.3 Integer types . 39
6.3.0 General . 39
6.3.1 Integer . 39
6.3.2 Positive integer . 39
6.3.3 Non-positive integer . 40
6.3.4 Negative integer . 40
6.3.5 Non-negative integer. 40
6.3.6 Long . 40
6.3.7 Unsigned long . 40
6.3.8 Int . 40
6.3.9 Unsigned int . 40
6.3.10 Short. 41
6.3.11 Unsigned Short . 41
6.3.12 Byte . 41
6.3.13 Unsigned byte . 41
6.4 Float types . 41
6.4.0 General . 41
6.4.1 Decimal . 41
6.4.2 Float . 42
6.4.3 Double . 42
6.5 Time types . 42
6.5.0 General . 42
6.5.1 Duration . 43
6.5.2 Date and time . 43
6.5.3 Time . 43
6.5.4 Date . 43
6.5.5 Gregorian year and month . 43
6.5.6 Gregorian year . 43
6.5.7 Gregorian month and day . 44
6.5.8 Gregorian day . 44
6.5.9 Gregorian month . 44
6.6 Sequence types . 44
6.6.0 General . 44
6.6.1 NMTOKENS . 44
6.6.2 IDREFS . 44
6.6.3 ENTITIES . 44
6.6.4 QName . 45
6.7 Boolean type . 45
6.8 AnyType and anySimpleType types. 45
7 Mapping XSD components . 50
7.0 General . 50
7.1 Attributes of XSD component declarations . 51
7.1.0 General . 51
7.1.1 Id . 51
7.1.2 Ref . 51
7.1.3 Name . 52
7.1.4 MinOccurs and maxOccurs. 52
7.1.5 Default and Fixed . 57
7.1.6 Form. 57
7.1.7 Type . 58
7.1.8 Mixed . 58
7.1.9 Abstract . 58
7.1.10 Block and blockDefault . 59
7.1.11 Nillable . 59
7.1.12 Use . 61
ETSI
5 ETSI ES 201 873-9 V4.8.1 (2017-05)
7.1.13 Substitution group . 61
7.1.14 Final . 61
7.1.15 Process contents . 61
7.2 Schema component. 62
7.3 Element component . 62
7.4 Attribute and attribute group definitions . 63
7.4.1 Attribute element definitions . 63
7.4.2 Attribute group definitions . 64
7.5 SimpleType components . 64
7.5.0 General . 64
7.5.1 Derivation by restriction . 64
7.5.2 Derivation by list . 65
7.5.3 Derivation by union . 67
7.6 ComplexType components . 70
7.6.0 General . 70
7.6.1 ComplexType containing simple content . 71
7.6.1.0 General . 71
7.6.1.1 Extending simple content . 71
7.6.1.2 Restricting simple content . 72
7.6.2 ComplexType containing complex content . 74
7.6.2.0 General . 74
7.6.2.1 Complex content derived by extension . 74
7.6.2.2 Complex content derived by restriction . 80
7.6.3 Referencing group components . 82
7.6.4 All content . 85
7.6.5 Choice content . 87
7.6.5.0 General . 87
7.6.5.1 Choice with nested elements . 87
7.6.5.2 Choice with nested group . 87
7.6.5.3 Choice with nested choice . 88
7.6.5.4 Choice with nested sequence. 88
7.6.5.5 Choice with nested any . 89
7.6.6 Sequence content . 90
7.6.6.0 General . 90
7.6.6.1 Sequence with nested element content . 90
7.6.6.2 Sequence with nested group content . 90
7.6.6.3 Sequence with nested choice content . 91
7.6.6.4 Sequence with nested sequence content . 91
7.6.6.5 Sequence with nested any content . 92
7.6.6.6 Effect of the minOccurs and maxOccurs attributes on the mapping . 93
7.6.7 Attribute definitions, attribute and attributeGroup references . 95
7.6.8 Mixed content . 97
7.7 Any and anyAttribute . 100
7.7.0 General . 100
7.7.1 The any element . 100
7.7.2 The anyAttribute element . 104
7.8 Annotation . 109
7.9 Group components . 109
7.10 Identity-constraint definition schema components . 110
8 Substitutions . 110
8.0 General . 110
8.1 Element substitution . 111
8.1.1 Head elements of substitution groups . 111
8.1.2 Substitution group members . 116
8.2 Type substitution . 116
Annex A (normative): TTCN-3 module XSD . 123
Annex B (normative): Encoding instructions . 127
B.0 General . 127
ETSI
6 ETSI ES 201 873-9 V4.8.1 (2017-05)
B.1 General . 127
B.2 Basic XML encode and variant attribute rules . 128
B.2.1 The XML encode attribute . 128
B.2.2 Variant Attribute Overwriting Rules . 128
B.3 Encoding instructions . 129
B.3.1 XSD data type identification . 129
B.3.2 Any element . 129
B.3.3 Any attributes . 130
B.3.4 Attribute . 131
B.3.5 AttributeFormQualified . 131
B.3.6 Control namespace identification . 131
B.3.7 Default for empty . 132
B.3.8 Element . 132
B.3.9 ElementFormQualified . 132
B.3.10 Embed values . 133
B.3.11 Form . 133
B.3.12 List. 133
B.3.13 Name . 134
B.3.14 Namespace identification . 134
B.3.15 Nillable elements . 135
B.3.16 Use union. 135
B.3.17 Text . 136
B.3.18 Use number . 136
B.3.19 Use order . 137
B.3.20 Whitespace control . 137
B.3.21 Untagged elements . 137
B.3.22 Abstract . 138
B.3.23 Block . 139
B.3.24 Use type . 139
B.3.25 Process the content of any elements and attributes . 140
B.3.26 Transparent . 140
B.3.27 No Type . 141
B.3.28 Number of fraction digits . 141
B.3.29 XML header control . 142
Annex C (informative): Examples . 143
C.0 General . 143
C.1 Example 1 . 143
C.2 Example 2 . 145
C.3 Example 3 . 146
Annex D (informative): Deprecated features . 150
D.1 Using the anyElement encoding instruction to record of fields . 150
D.2 Using the XML language identifier string. 150
D.3 Id. 151
Annex E (informative): Bibliography . 152
History . 153

ETSI
7 ETSI ES 201 873-9 V4.8.1 (2017-05)
Intellectual Property Rights
IPRs essential or potentially essential to the present document may have been declared to ETSI. The information
pertaining to these essential IPRs, if any, is publicly available for ETSI members and non-members, and can be found
in ETSI SR 000 314: "Intellectual Property Rights (IPRs); Essential, or potentially Essential, IPRs notified to ETSI in
respect of ETSI standards", which is available from the ETSI Secretariat. Latest updates are available on the ETSI Web
server (https://ipr.etsi.org/).
Pursuant to the ETSI IPR Policy, no investigation, including IPR searches, has been carried out by ETSI. No guarantee
can be given as to the existence of other IPRs not referenced in ETSI SR 000 314 (or the updates on the ETSI Web
server) which are, or may be, or may become, essential to the present document.
Foreword
This ETSI Standard (ES) has been produced by ETSI Technical Committee Methods for Testing and Specification
(MTS).
The present document is part 9 of a multi-part deliverable. Full details of the entire series can be found in part 1 [1].
Modal verbs terminology
In the present document "shall", "shall not", "should", "should not", "may", "need not", "will", "will not", "can" and
"cannot" are to be interpreted as described in clause 3.2 of the ETSI Drafting Rules (Verbal forms for the expression of
provisions).
"must" and "must not" are NOT allowed in ETSI deliverables except when used in direct citation.
ETSI
8 ETSI ES 201 873-9 V4.8.1 (2017-05)
1 Scope ®
The present document defines the mapping rules for W3C XML Schema (as defined in [7] to [9]) to TTCN-3 as
defined in ETSI ES 201 873-1 [1] to enable testing of XML-based systems, interfaces and protocols.
2 References
2.1 Normative references
References are either specific (identified by date of publication and/or edition number or version number) or
non-specific. For specific references, only the cited version applies. For non-specific references, the latest version of the
referenced document (including any amendments) applies.
Referenced documents which are not found to be publicly available in the expected location might be found at
https://docbox.etsi.org/Reference.
NOTE: While any hyperlinks included in this clause were valid at the time of publication, ETSI cannot guarantee
their long term validity.
The following referenced documents are necessary for the application of the present document.
[1] ETSI ES 201 873-1: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; Part 1: TTCN-3 Core Language".
[2] ETSI ES 201 873-7: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; Part 7: Using ASN.1 with TTCN-3".
[3] Recommendation ITU-T X.680: "Information technology - Abstract Syntax Notation One
(ASN.1): Specification of basic notation".
[4] Recommendation ITU-T X.694: "Information technology - ASN.1 encoding rules: Mapping W3C
XML schema definitions into ASN.1".
[5] World Wide Web Consortium W3C Recommendation: "Extensible Markup Language (XML)
1.1".
NOTE: Available at http://www.w3.org/TR/xml11.
[6] World Wide Web Consortium W3C Recommendation (2006): "Namespaces in XML 1.0".
NOTE: Available at http://www.w3.org/TR/REC-xml-names/.
[7] World Wide Web Consortium W3C Recommendation (2004): "XML Schema Part 0: Primer".
NOTE: Available at http://www.w3.org/TR/xmlschema-0.
[8] World Wide Web Consortium W3C Recommendation (2004): "XML Schema Part 1: Structures".
NOTE: Available at http://www.w3.org/TR/xmlschema-1.
[9] World Wide Web Consortium W3C Recommendation (2004): "XML Schema Part 2: Datatypes".
NOTE: Available at http://www.w3.org/TR/xmlschema-2.
ETSI
9 ETSI ES 201 873-9 V4.8.1 (2017-05)
2.2 Informative references
References are either specific (identified by date of publication and/or edition number or version number) or
non-specific. For specific references, only the cited version applies. For non-specific references, the latest version of the
referenced document (including any amendments) applies.
NOTE: While any hyperlinks included in this clause were valid at the time of publication, ETSI cannot guarantee
their long term validity.
The following referenced documents are not necessary for the application of the present document but they assist the
user with regard to a particular subject area.
[i.1] World Wide Web Consortium W3C Recommendation: "SOAP version 1.2, Part 1: Messaging
Framework".
NOTE: Available at http://www.w3.org/TR/soap12.
[i.2] ISO 8601 (2004): "Data elements and interchange formats - Information interchange -
Representation of dates and times".
[i.3] Void.
[i.4] ISO/IEC 10646 (2012): "Information technology - Universal Coded Character Set (UCS)".
[i.5] ETSI ES 202 781: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: Configuration and Deployment Support".
[i.6] ETSI ES 202 782: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: TTCN-3 Performance and Real Time Testing".
[i.7] ETSI ES 202 784: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: Advanced Parameterization".
[i.8] ETSI ES 202 785: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: Behaviour Types".
[i.9] ETSI ES 202 786: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: Support of interfaces with continuous signals".
[i.10] ETSI ES 202 789: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: Extended TRI".
[i.11] ETSI ES 201 873-7: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; Part 7: Using ASN.1 with TTCN-3".
[i.12] ETSI ES 201 873-8: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; Part 8: The IDL to TTCN-3 Mapping ".
[i.13] ETSI ES 201 873-11: "Methods for Testing and Specification (MTS); The Testing and Test
Control Notation version 3; Part 11: Using JSON with TTCN-3".
ETSI
10 ETSI ES 201 873-9 V4.8.1 (2017-05)
3 Definitions and abbreviations
3.1 Definitions
For the purposes of the present document, the terms and definitions given in ETSI ES 201 873-1 [1], Recommendation
ITU-T X.694 [4] and the following apply:
alphabetical order: way of sorting the XSD names based on the code positions of their characters according to
ISO/IEC 10646 [i.4]
NOTE: During this sorting the group, plane, row and cell octets is considered, in this order. Names, starting with
a character with a smaller code position take precedence Among the names with identical first character,
names containing no more characters take precedence over all other names. Otherwise, names with the
second character of smaller code position take precedence, etc. This algorithm is to be continued
recursively until all names are sorted into a sequential order.
schema component: generic XSD term for the building blocks that comprise the abstract data model of the schema
NOTE: The primary components, which may (type definitions) or obliged to (element and attribute declarations)
have names are as follows: simple type definitions, complex type definitions, attribute declarations and
element declarations. The secondary components, which are obliged to have names, are as follows:
attribute group definitions, identity-constraint definitions, model group definitions and notation
declarations. Finally, the "helper" components provide small parts of other components; they are not
independent of their context: annotations, model groups, particles, wildcards and attribute uses.
schema document: XML document containing a collection of schema components, assembled in a schema element
information item
NOTE: The target namespace of the schema document may be defined (specified by the targetNamespace
...


SLOVENSKI STANDARD
01-september-2017
0HWRGH]DSUHVNXãDQMHLQVSHFLILFLUDQMH 076 UD]OLþLFD]DSLVDSUHVNXãDQMDLQ
NUPLOMHQMDSUHVNXVRYGHO8SRUDEDVKHPH;0/Y77&1
Methods for Testing and Specification (MTS) - The Testing and Test Control Notation
version 3 - Part 9: Using XML schema with TTCN-3
Ta slovenski standard je istoveten z: ETSI ES 201 873-9 V4.8.1 (2017-05)
ICS:
33.040.01 Telekomunikacijski sistemi Telecommunication systems
na splošno in general
2003-01.Slovenski inštitut za standardizacijo. Razmnoževanje celote ali delov tega standarda ni dovoljeno.

ETSI STANDARD
Methods for Testing and Specification (MTS);
The Testing and Test Control Notation version 3;
Part 9: Using XML schema with TTCN-3

2 ETSI ES 201 873-9 V4.8.1 (2017-05)

Reference
RES/MTS-201873-9 T3XSD ed481
Keywords
language, testing, TTCN-3, XML
ETSI
650 Route des Lucioles
F-06921 Sophia Antipolis Cedex - FRANCE

Tel.: +33 4 92 94 42 00  Fax: +33 4 93 65 47 16

Siret N° 348 623 562 00017 - NAF 742 C
Association à but non lucratif enregistrée à la
Sous-Préfecture de Grasse (06) N° 7803/88

Important notice
The present document can be downloaded from:
http://www.etsi.org/standards-search
The present document may be made available in electronic versions and/or in print. The content of any electronic and/or
print versions of the present document shall not be modified without the prior written authorization of ETSI. In case of any
existing or perceived difference in contents between such versions and/or in print, the only prevailing document is the
print of the Portable Document Format (PDF) version kept on a specific network drive within ETSI Secretariat.
Users of the present document should be aware that the document may be subject to revision or change of status.
Information on the current status of this and other ETSI documents is available at
https://portal.etsi.org/TB/ETSIDeliverableStatus.aspx
If you find errors in the present document, please send your comment to one of the following services:
https://portal.etsi.org/People/CommiteeSupportStaff.aspx
Copyright Notification
No part may be reproduced or utilized in any form or by any means, electronic or mechanical, including photocopying
and microfilm except as authorized by written permission of ETSI.
The content of the PDF version shall not be modified without the written authorization of ETSI.
The copyright and the foregoing restriction extend to reproduction in all media.

© European Telecommunications Standards Institute 2017.
All rights reserved.
TM TM TM
DECT , PLUGTESTS , UMTS and the ETSI logo are Trade Marks of ETSI registered for the benefit of its Members.
TM
3GPP and LTE™ are Trade Marks of ETSI registered for the benefit of its Members and
of the 3GPP Organizational Partners.
oneM2M logo is protected for the benefit of its Members
GSM® and the GSM logo are Trade Marks registered and owned by the GSM Association.
ETSI
3 ETSI ES 201 873-9 V4.8.1 (2017-05)
Contents
Intellectual Property Rights . 7
Foreword . 7
Modal verbs terminology . 7
1 Scope . 8
2 References . 8
2.1 Normative references . 8
2.2 Informative references . 9
3 Definitions and abbreviations . 10
3.1 Definitions . 10
3.2 Abbreviations . 10
4 Introduction . 11
5 Mapping XML Schemas . 11
5.0 Approach . 11
5.1 Namespaces and document references . 13
5.1.1 Namespaces . 13
5.1.2 Includes . 13
5.1.3 Imports . 14
5.1.4 Attributes of the XSD schema element . 15
5.1.5 The control namespace . 16
5.2 Name conversion . 16
5.2.1 General . 16
5.2.2 Name conversion rules . 17
5.2.3 Order of the mapping . 22
5.3 Mapping of XSD schema components . 22
5.4 Unsupported features . 23
5.5 Conformance and compatibility . 23
6 Built-in data types . 23
6.0 General . 23
6.1 Mapping of facets . 24
6.1.0 General . 24
6.1.1 Length . 24
6.1.2 MinLength . 25
6.1.3 MaxLength . 25
6.1.4 Pattern . 26
6.1.5 Enumeration . 27
6.1.6 WhiteSpace . 29
6.1.7 MinInclusive . 29
6.1.8 MaxInclusive . 31
6.1.9 MinExclusive . 32
6.1.10 MaxExclusive . 33
6.1.11 Total digits . 35
6.1.12 Fraction digits . 35
6.1.13 Not specifically mapped facets . 36
6.2 String types . 36
6.2.0 General . 36
6.2.1 String . 37
6.2.2 Normalized string . 37
6.2.3 Token . 37
6.2.4 Name . 37
6.2.5 NMTOKEN . 37
6.2.6 NCName . 38
6.2.7 ID . 38
6.2.8 IDREF . 38
ETSI
4 ETSI ES 201 873-9 V4.8.1 (2017-05)
6.2.9 ENTITY . 38
6.2.10 Hexadecimal binary . 38
6.2.11 Base 64 binary . 38
6.2.12 Any URI . 39
6.2.13 Language . 39
6.2.14 NOTATION . 39
6.3 Integer types . 39
6.3.0 General . 39
6.3.1 Integer . 39
6.3.2 Positive integer . 39
6.3.3 Non-positive integer . 40
6.3.4 Negative integer . 40
6.3.5 Non-negative integer. 40
6.3.6 Long . 40
6.3.7 Unsigned long . 40
6.3.8 Int . 40
6.3.9 Unsigned int . 40
6.3.10 Short. 41
6.3.11 Unsigned Short . 41
6.3.12 Byte . 41
6.3.13 Unsigned byte . 41
6.4 Float types . 41
6.4.0 General . 41
6.4.1 Decimal . 41
6.4.2 Float . 42
6.4.3 Double . 42
6.5 Time types . 42
6.5.0 General . 42
6.5.1 Duration . 43
6.5.2 Date and time . 43
6.5.3 Time . 43
6.5.4 Date . 43
6.5.5 Gregorian year and month . 43
6.5.6 Gregorian year . 43
6.5.7 Gregorian month and day . 44
6.5.8 Gregorian day . 44
6.5.9 Gregorian month . 44
6.6 Sequence types . 44
6.6.0 General . 44
6.6.1 NMTOKENS . 44
6.6.2 IDREFS . 44
6.6.3 ENTITIES . 44
6.6.4 QName . 45
6.7 Boolean type . 45
6.8 AnyType and anySimpleType types. 45
7 Mapping XSD components . 50
7.0 General . 50
7.1 Attributes of XSD component declarations . 51
7.1.0 General . 51
7.1.1 Id . 51
7.1.2 Ref . 51
7.1.3 Name . 52
7.1.4 MinOccurs and maxOccurs. 52
7.1.5 Default and Fixed . 57
7.1.6 Form. 57
7.1.7 Type . 58
7.1.8 Mixed . 58
7.1.9 Abstract . 58
7.1.10 Block and blockDefault . 59
7.1.11 Nillable . 59
7.1.12 Use . 61
ETSI
5 ETSI ES 201 873-9 V4.8.1 (2017-05)
7.1.13 Substitution group . 61
7.1.14 Final . 61
7.1.15 Process contents . 61
7.2 Schema component. 62
7.3 Element component . 62
7.4 Attribute and attribute group definitions . 63
7.4.1 Attribute element definitions . 63
7.4.2 Attribute group definitions . 64
7.5 SimpleType components . 64
7.5.0 General . 64
7.5.1 Derivation by restriction . 64
7.5.2 Derivation by list . 65
7.5.3 Derivation by union . 67
7.6 ComplexType components . 70
7.6.0 General . 70
7.6.1 ComplexType containing simple content . 71
7.6.1.0 General . 71
7.6.1.1 Extending simple content . 71
7.6.1.2 Restricting simple content . 72
7.6.2 ComplexType containing complex content . 74
7.6.2.0 General . 74
7.6.2.1 Complex content derived by extension . 74
7.6.2.2 Complex content derived by restriction . 80
7.6.3 Referencing group components . 82
7.6.4 All content . 85
7.6.5 Choice content . 87
7.6.5.0 General . 87
7.6.5.1 Choice with nested elements . 87
7.6.5.2 Choice with nested group . 87
7.6.5.3 Choice with nested choice . 88
7.6.5.4 Choice with nested sequence. 88
7.6.5.5 Choice with nested any . 89
7.6.6 Sequence content . 90
7.6.6.0 General . 90
7.6.6.1 Sequence with nested element content . 90
7.6.6.2 Sequence with nested group content . 90
7.6.6.3 Sequence with nested choice content . 91
7.6.6.4 Sequence with nested sequence content . 91
7.6.6.5 Sequence with nested any content . 92
7.6.6.6 Effect of the minOccurs and maxOccurs attributes on the mapping . 93
7.6.7 Attribute definitions, attribute and attributeGroup references . 95
7.6.8 Mixed content . 97
7.7 Any and anyAttribute . 100
7.7.0 General . 100
7.7.1 The any element . 100
7.7.2 The anyAttribute element . 104
7.8 Annotation . 109
7.9 Group components . 109
7.10 Identity-constraint definition schema components . 110
8 Substitutions . 110
8.0 General . 110
8.1 Element substitution . 111
8.1.1 Head elements of substitution groups . 111
8.1.2 Substitution group members . 116
8.2 Type substitution . 116
Annex A (normative): TTCN-3 module XSD . 123
Annex B (normative): Encoding instructions . 127
B.0 General . 127
ETSI
6 ETSI ES 201 873-9 V4.8.1 (2017-05)
B.1 General . 127
B.2 Basic XML encode and variant attribute rules . 128
B.2.1 The XML encode attribute . 128
B.2.2 Variant Attribute Overwriting Rules . 128
B.3 Encoding instructions . 129
B.3.1 XSD data type identification . 129
B.3.2 Any element . 129
B.3.3 Any attributes . 130
B.3.4 Attribute . 131
B.3.5 AttributeFormQualified . 131
B.3.6 Control namespace identification . 131
B.3.7 Default for empty . 132
B.3.8 Element . 132
B.3.9 ElementFormQualified . 132
B.3.10 Embed values . 133
B.3.11 Form . 133
B.3.12 List. 133
B.3.13 Name . 134
B.3.14 Namespace identification . 134
B.3.15 Nillable elements . 135
B.3.16 Use union. 135
B.3.17 Text . 136
B.3.18 Use number . 136
B.3.19 Use order . 137
B.3.20 Whitespace control . 137
B.3.21 Untagged elements . 137
B.3.22 Abstract . 138
B.3.23 Block . 139
B.3.24 Use type . 139
B.3.25 Process the content of any elements and attributes . 140
B.3.26 Transparent . 140
B.3.27 No Type . 141
B.3.28 Number of fraction digits . 141
B.3.29 XML header control . 142
Annex C (informative): Examples . 143
C.0 General . 143
C.1 Example 1 . 143
C.2 Example 2 . 145
C.3 Example 3 . 146
Annex D (informative): Deprecated features . 150
D.1 Using the anyElement encoding instruction to record of fields . 150
D.2 Using the XML language identifier string. 150
D.3 Id. 151
Annex E (informative): Bibliography . 152
History . 153

ETSI
7 ETSI ES 201 873-9 V4.8.1 (2017-05)
Intellectual Property Rights
IPRs essential or potentially essential to the present document may have been declared to ETSI. The information
pertaining to these essential IPRs, if any, is publicly available for ETSI members and non-members, and can be found
in ETSI SR 000 314: "Intellectual Property Rights (IPRs); Essential, or potentially Essential, IPRs notified to ETSI in
respect of ETSI standards", which is available from the ETSI Secretariat. Latest updates are available on the ETSI Web
server (https://ipr.etsi.org/).
Pursuant to the ETSI IPR Policy, no investigation, including IPR searches, has been carried out by ETSI. No guarantee
can be given as to the existence of other IPRs not referenced in ETSI SR 000 314 (or the updates on the ETSI Web
server) which are, or may be, or may become, essential to the present document.
Foreword
This ETSI Standard (ES) has been produced by ETSI Technical Committee Methods for Testing and Specification
(MTS).
The present document is part 9 of a multi-part deliverable. Full details of the entire series can be found in part 1 [1].
Modal verbs terminology
In the present document "shall", "shall not", "should", "should not", "may", "need not", "will", "will not", "can" and
"cannot" are to be interpreted as described in clause 3.2 of the ETSI Drafting Rules (Verbal forms for the expression of
provisions).
"must" and "must not" are NOT allowed in ETSI deliverables except when used in direct citation.
ETSI
8 ETSI ES 201 873-9 V4.8.1 (2017-05)
1 Scope ®
The present document defines the mapping rules for W3C XML Schema (as defined in [7] to [9]) to TTCN-3 as
defined in ETSI ES 201 873-1 [1] to enable testing of XML-based systems, interfaces and protocols.
2 References
2.1 Normative references
References are either specific (identified by date of publication and/or edition number or version number) or
non-specific. For specific references, only the cited version applies. For non-specific references, the latest version of the
referenced document (including any amendments) applies.
Referenced documents which are not found to be publicly available in the expected location might be found at
https://docbox.etsi.org/Reference.
NOTE: While any hyperlinks included in this clause were valid at the time of publication, ETSI cannot guarantee
their long term validity.
The following referenced documents are necessary for the application of the present document.
[1] ETSI ES 201 873-1: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; Part 1: TTCN-3 Core Language".
[2] ETSI ES 201 873-7: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; Part 7: Using ASN.1 with TTCN-3".
[3] Recommendation ITU-T X.680: "Information technology - Abstract Syntax Notation One
(ASN.1): Specification of basic notation".
[4] Recommendation ITU-T X.694: "Information technology - ASN.1 encoding rules: Mapping W3C
XML schema definitions into ASN.1".
[5] World Wide Web Consortium W3C Recommendation: "Extensible Markup Language (XML)
1.1".
NOTE: Available at http://www.w3.org/TR/xml11.
[6] World Wide Web Consortium W3C Recommendation (2006): "Namespaces in XML 1.0".
NOTE: Available at http://www.w3.org/TR/REC-xml-names/.
[7] World Wide Web Consortium W3C Recommendation (2004): "XML Schema Part 0: Primer".
NOTE: Available at http://www.w3.org/TR/xmlschema-0.
[8] World Wide Web Consortium W3C Recommendation (2004): "XML Schema Part 1: Structures".
NOTE: Available at http://www.w3.org/TR/xmlschema-1.
[9] World Wide Web Consortium W3C Recommendation (2004): "XML Schema Part 2: Datatypes".
NOTE: Available at http://www.w3.org/TR/xmlschema-2.
ETSI
9 ETSI ES 201 873-9 V4.8.1 (2017-05)
2.2 Informative references
References are either specific (identified by date of publication and/or edition number or version number) or
non-specific. For specific references, only the cited version applies. For non-specific references, the latest version of the
referenced document (including any amendments) applies.
NOTE: While any hyperlinks included in this clause were valid at the time of publication, ETSI cannot guarantee
their long term validity.
The following referenced documents are not necessary for the application of the present document but they assist the
user with regard to a particular subject area.
[i.1] World Wide Web Consortium W3C Recommendation: "SOAP version 1.2, Part 1: Messaging
Framework".
NOTE: Available at http://www.w3.org/TR/soap12.
[i.2] ISO 8601 (2004): "Data elements and interchange formats - Information interchange -
Representation of dates and times".
[i.3] Void.
[i.4] ISO/IEC 10646 (2012): "Information technology - Universal Coded Character Set (UCS)".
[i.5] ETSI ES 202 781: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: Configuration and Deployment Support".
[i.6] ETSI ES 202 782: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: TTCN-3 Performance and Real Time Testing".
[i.7] ETSI ES 202 784: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: Advanced Parameterization".
[i.8] ETSI ES 202 785: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: Behaviour Types".
[i.9] ETSI ES 202 786: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: Support of interfaces with continuous signals".
[i.10] ETSI ES 202 789: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; TTCN-3 Language Extensions: Extended TRI".
[i.11] ETSI ES 201 873-7: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; Part 7: Using ASN.1 with TTCN-3".
[i.12] ETSI ES 201 873-8: "Methods for Testing and Specification (MTS); The Testing and Test Control
Notation version 3; Part 8: The IDL to TTCN-3 Mapping ".
[i.13] ETSI ES 201 873-11: "Methods for Testing and Specification (MTS); The Testing and Test
Control Notation version 3; Part 11: Using JSON with TTCN-3".
ETSI
10 ETSI ES 201 873-9 V4.8.1 (2017-05)
3 Definitions and abbreviations
3.1 Definitions
For the purposes of the present document, the terms and definitions given in ETSI ES 201 873-1 [1], Recommendation
ITU-T X.694 [4] and the following apply:
alphabetical order: way of sorting the XSD names based on the code positions of their characters according to
ISO/IEC 10646 [i.4]
NOTE: During this sorting the group, plane, row and cell octets is considered, in this order. Names, starting with
a character with a smaller code position take precedence Among the names with identical first character,
names containing no more characters take precedence over all other names. Otherwis
...