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

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.

Metode za preskušanje in specificiranje (MTS) - 3. različica zapisa preskušanja in krmiljenja preskusov - 9. del: Uporaba sheme XML v TTCN-3

V tem dokumentu so opredeljena pravila preslikave za shemo W3C® XML (kot je opredeljeno v točkah [7] do [9]) v TTCN-3, kot je opredeljeno v standardu ETSI ES 201 873-1 [1] za omogočanje preskušanja sistemov, vmesnikov in protokolov, ki temeljijo na jeziku XML.

General Information

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 Standard

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
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
Standardization document
SIST ES 201 873-9 V4.8.1:2017
English language
153 pages
sale 10% off
Preview
sale 10% off
Preview

e-Library read for
1 day

Standards Content (sample)

ETSI ES 201 873-9 V4.8.1 (2017-05)
ETSI STANDARD
Methods for Testing and Specification (MTS);
The Testing and Test Control Notation version 3;
Part 9: Using XML schema with TTCN-3
---------------------- Page: 1 ----------------------
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.

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
---------------------- Page: 2 ----------------------
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
---------------------- Page: 3 ----------------------
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
---------------------- Page: 4 ----------------------
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
---------------------- Page: 5 ----------------------
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 Va
...

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
---------------------- Page: 1 ----------------------
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.

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
---------------------- Page: 2 ----------------------
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
---------------------- Page: 3 ----------------------
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
---------------------- Page: 4 ----------------------
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
---------------------- Page: 5 ----------------------
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 .................................................................................................................... 12

...

SLOVENSKI STANDARD
SIST ES 201 873-9 V4.8.1:2017
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
SIST ES 201 873-9 V4.8.1:2017 en

2003-01.Slovenski inštitut za standardizacijo. Razmnoževanje celote ali delov tega standarda ni dovoljeno.

---------------------- Page: 1 ----------------------
SIST ES 201 873-9 V4.8.1:2017
---------------------- Page: 2 ----------------------
SIST ES 201 873-9 V4.8.1:2017
ETSI ES 201 873-9 V4.8.1 (2017-05)
ETSI STANDARD
Methods for Testing and Specification (MTS);
The Testing and Test Control Notation version 3;
Part 9: Using XML schema with TTCN-3
---------------------- Page: 3 ----------------------
SIST ES 201 873-9 V4.8.1:2017
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.

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
---------------------- Page: 4 ----------------------
SIST ES 201 873-9 V4.8.1:2017
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
---------------------- Page: 5 ----------------------
SIST ES 201 873-9 V4.8.1:2017
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
---------------------- Page: 6 ----------------------
SIST ES 201 873-9 V4.8.1:2017
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 .......................................................................................................................

...

Questions, Comments and Discussion

Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.