|
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.1.1 (2009-06)
Reference
RES/MTS-00107-9 T3 ed411 XML
Keywords
MTS, testing, TTCN, 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
Individual copies of the present document can be downloaded from:
http://www.etsi.org
The present document may be made available in more than one electronic version or in print. In any case of existing or
perceived difference in contents between such versions, the reference version is the Portable Document Format (PDF).
In case of dispute, the reference shall be the printing on ETSI printers of the 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
http://portal.etsi.org/tb/status/status.asp
If you find errors in the present document, please send your comment to one of the following services:
http://portal.etsi.org/chaircor/ETSI_support.asp
Copyright Notification
No part may be reproduced except as authorized by written permission.
The copyright and the foregoing restriction extend to reproduction in all media.
© European Telecommunications Standards Institute 2009.
All rights reserved.
TM TM TM TM
DECT , PLUGTESTS , UMTS , TIPHON , the TIPHON logo and the ETSI logo are Trade Marks of ETSI registered
for the benefit of its Members.
TM
3GPP is a Trade Mark of ETSI registered for the benefit of its Members and of the 3GPP Organizational Partners.
LTE™ is a Trade Mark of ETSI currently being 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 ETSI ES 201 873-9 V4.1.1 (2009-06)
Contents
Intellectual Property Rights.6
Foreword.6
1 Scope.7
2 References.7
2.1 Normative references.7
2.2 Informative references.8
3 Definitions and abbreviations.8
3.1 Definitions.8
3.2 Abbreviations.8
4 Introduction .9
5 Mapping XML Schemas .9
5.1 Namespaces and document references .10
5.2 Name conversion.13
5.2.1 General.13
5.2.2 Name conversion rules.13
5.2.3 Order of the mapping.18
5.3 Unsupported features.18
6 Built-in data types .18
6.1 Mapping of facets.19
6.1.1 Length.19
6.1.2 MinLength.20
6.1.3 MaxLength.20
6.1.4 Pattern.20
6.1.5 Enumeration.22
6.1.6 WhiteSpace.24
6.1.7 MinInclusive.24
6.1.8 MaxInclusive.24
6.1.9 MinExclusive.25
6.1.10 MaxExclusive.25
6.1.11 Total digits.25
6.2 String types.26
6.2.1 String.26
6.2.2 Normalized string.26
6.2.3 Token.26
6.2.4 Name.27
6.2.5 NMTOKEN.27
6.2.6 NCName.27
6.2.7 ID.27
6.2.8 IDREF.27
6.2.9 ENTITY.27
6.2.10 Hexadecimal binary.27
6.2.11 Base 64 binary .28
6.2.12 Any URI.28
6.2.13 Language.28
6.2.14 NOTATION.28
6.3 Integer types.28
6.3.1 Integer.28
6.3.2 Positive integer .29
6.3.3 Non-positive integer.29
6.3.4 Negative integer.29
6.3.5 Non-negative integer.29
6.3.6 Long.29
6.3.7 Unsigned long.29
ETSI
---------------------- Page: 3 ----------------------
4 ETSI ES 201 873-9 V4.1.1 (2009-06)
6.3.8 Int.29
6.3.9 Unsigned int.30
6.3.10 Short.30
6.3.11 Unsigned Short.30
6.3.12 Byte.30
6.3.13 Unsigned byte.30
6.4 Float types.30
6.4.1 Decimal.30
6.4.2 Float.31
6.4.3 Double.31
6.5 Time types.31
6.5.1 Duration.31
6.5.2 Date and time.32
6.5.3 Time.32
6.5.4 Date.32
6.5.5 Gregorian year and month .32
6.5.6 Gregorian year.32
6.5.7 Gregorian month and day .32
6.5.8 Gregorian day.33
6.5.9 Gregorian month.33
6.6 Sequence types.33
6.6.1 NMTOKENS.33
6.6.2 IDREFS.33
6.6.3 ENTITIES.33
6.6.4 QName.33
6.7 Boolean type.34
6.8 AnyType and anySimpleType types.34
7 Mapping XSD components .35
7.1 Attributes of XSD component declarations.35
7.1.1 Id.36
7.1.2 Ref.36
7.1.3 Name.36
7.1.4 MinOccurs and maxOccurs.36
7.1.5 Default and Fixed .37
7.1.6 Form.38
7.1.7 Type.39
7.1.8 Mixed.39
7.1.9 Abstract.39
7.1.10 Block and final.39
7.1.11 Nillable.39
7.1.12 Use.41
7.1.13 Substitution group.41
7.2 Schema component.41
7.3 Element component.41
7.4 Attribute and attribute group definitions .42
7.4.1 Attribute element definitions .42
7.4.2 Attribute group definitions.43
7.5 SimpleType components.43
7.5.1 Derivation by restriction .43
7.5.2 Derivation by list.43
7.5.3 Derivation by union.44
7.6 ComplexType components.46
7.6.1 ComplexType containing simple content .46
7.6.1.1 Extending simple content.46
7.6.1.2 Restricting simple content.47
7.6.2 ComplexType containing complex content .47
7.6.2.1 Complex content derived by extending complex types.48
7.6.2.2 Complex content derived by restriction .52
7.6.3 Group components.53
7.6.4 All content.53
7.6.5 Choice content.55
ETSI
---------------------- Page: 4 ----------------------
5 ETSI ES 201 873-9 V4.1.1 (2009-06)
7.6.5.1 Choice with nested elements.55
7.6.5.2 Choice with nested group.56
7.6.5.3 Choice with nested choice.56
7.6.5.4 Choice with nested sequence.57
7.6.5.5 Choice with nested any .58
7.6.6 Sequence content.58
7.6.6.1 Sequence with nested element content.58
7.6.6.2 Sequence with nested group content .59
7.6.6.3 Sequence with nested choice content .59
7.6.6.4 Sequence with nested sequence content.60
7.6.6.5 Sequence with nested any content.60
7.6.6.6 Effect of the minOccurs and maxOccurs attributes on the mapping .61
7.6.7 Attribute definitions, attribute and attributeGroup references .62
7.6.8 Mixed content.64
7.7 Any and anyAttribute .67
7.8 Annotation.69
7.9 Group components .69
Annex A (normative): TTCN-3 module XSD .71
Annex B (normative): Encoding instructions.75
B.1 General.75
B.2 The XML encode attribute .75
B.3 Encoding instructions.76
B.3.1 XSD data type identification .76
B.3.2 Any element.76
B.3.3 Any attributes.77
B.3.4 Attribute.77
B.3.5 AttributeFormQualified.77
B.3.6 Control Namespace identification .78
B.3.7 Default for empty .78
B.3.8 Element.78
B.3.9 ElementFormQualified.78
B.3.10 Embed values.79
B.3.11 Form.79
B.3.12 List.80
B.3.13 Name.80
B.3.14 Namespace identification.80
B.3.15 Nillable elements.81
B.3.16 Use Union.81
B.3.17 Text.81
B.3.18 Use number.82
B.3.19 Use order.82
B.3.20 Whitespace control.83
Annex C (informative): Examples.84
C.1 Example 1.84
C.2 Example 2.85
C.3 Example 3.87
C.4 Example 4.88
History .90
ETSI
---------------------- Page: 5 ----------------------
6 ETSI ES 201 873-9 V4.1.1 (2009-06)
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 (http://webapp.etsi.org/IPR/home.asp).
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 docum
...