ISO/IEC 8825-4:2008
(Main)Information technology — ASN.1 encoding rules: XML Encoding Rules (XER) — Part 4:
Information technology — ASN.1 encoding rules: XML Encoding Rules (XER) — Part 4:
ISO/IEC 8825-4:2008 specifies a set of basic XML Encoding Rules (BASIC-XER) that can be used to derive a transfer syntax for values of types defined in ISO/IEC 8824-1 and ISO/IEC 8824-2. It also specifies a set of Canonical XML Encoding Rules (CXER) which provide constraints on the basic XML Encoding Rules and produce a unique encoding for any given ASN.1 value. ISO/IEC 8825-4:2008 further specifies a set of extended XML Encoding Rules (EXTENDED-XER) which adds further encoder options, and also allows the ASN.1 specifier to vary the encoding that would be produced by BASIC-XER. It is implicit in the specification of these encoding rules that they are also used for decoding. The encoding rules specified in ISO/IEC 8825-4:2008: are used at the time of communication; are intended for use in circumstances where displaying of values and/or processing them using commonly available XML tools (such as browsers) is the major concern in the choice of encoding rules; allow the extension of an abstract syntax by addition of extra values for all forms of extensibility described in ISO/IEC 8824-1. ISO/IEC 8825-4:2008 also specifies the syntax and semantics of XER encoding instructions, and the rules for their assignment and combination. XER encoding instructions can be used to control the EXTENDED-XER encoding for specific ASN.1 types.
Technologies de l'information — Règles de codage ASN.1: Règles de codage XML (XER) — Partie 4:
General Information
Relations
Standards Content (Sample)
INTERNATIONAL ISO/IEC
STANDARD 8825-4
Second edition
2008-12-15
Information technology — ASN.1
encoding rules: XML Encoding
Rules (XER)
Technologies de l'information — Règles de codage ASN.1: Règles de
codage XML (XER)
Reference number
ISO/IEC 8825-4:2008(E)
©
ISO/IEC 2008
---------------------- Page: 1 ----------------------
ISO/IEC 8825-4:2008(E)
PDF disclaimer
This PDF file may contain embedded typefaces. In accordance with Adobe's licensing policy, this file may be printed or viewed but
shall not be edited unless the typefaces which are embedded are licensed to and installed on the computer performing the editing. In
downloading this file, parties accept therein the responsibility of not infringing Adobe's licensing policy. The ISO Central Secretariat
accepts no liability in this area.
Adobe is a trademark of Adobe Systems Incorporated.
Details of the software products used to create this PDF file can be found in the General Info relative to the file; the PDF-creation
parameters were optimized for printing. Every care has been taken to ensure that the file is suitable for use by ISO member bodies. In
the unlikely event that a problem relating to it is found, please inform the Central Secretariat at the address given below.
COPYRIGHT PROTECTED DOCUMENT
© ISO/IEC 2008
All rights reserved. Unless otherwise specified, no part of this publication may be reproduced or utilized in any form or by any means,
electronic or mechanical, including photocopying and microfilm, without permission in writing from either ISO at the address below or
ISO's member body in the country of the requester.
ISO copyright office
Case postale 56 • CH-1211 Geneva 20
Tel. + 41 22 749 01 11
Fax + 41 22 749 09 47
E-mail copyright@iso.org
Web www.iso.org
Published by ISO in 2009
Published in Switzerland
ii © ISO/IEC 2008 – All rights reserved
---------------------- Page: 2 ----------------------
ISO/IEC 8825-4:2008(E)
CONTENTS
Page
1 Scope. 1
2 Normative references . 1
2.1 Identical Recommendations | International Standards . 1
2.2 Additional references . 2
3 Definitions. 2
3.1 ASN.1 Basic Encoding Rules (BER) .2
3.2 Additional definitions . 2
4 Abbreviations . 4
5 Encodings specified by this Recommendation | International Standard. 4
6 Encoding instructions specified by this Recommendation | International Standard. 5
7 Conformance . 5
8 Basic XML encoding rules. 5
8.1 Production of a complete BASIC-XER encoding. 5
8.2 The XML prolog . 6
8.3 The XML document element . 6
8.4 Encoding of the EXTERNAL type .7
8.5 Encoding of the open type . 7
8.6 Decoding of types with extension markers . 7
9 Canonical XML encoding rules . 7
9.1 General rules for canonical XER . 7
9.2 Real values . 8
9.3 Bitstring value. 8
9.4 Octetstring value . 8
9.5 Sequence value. 8
9.6 Set value. 8
9.7 Set-of value . 8
9.8 Object identifier value. 9
9.9 Relative object identifier value . 9
9.10 GeneralizedTime. 9
9.11 UTCTime . 9
9.12 Open type value . 10
9.13 The TIME type and the useful time types . 10
10 Extended XML encoding rules. 10
10.1 General. 10
10.2 EXTENDED-XER conformance . 11
10.3 Structure of an EXTENDED-XER encoding. 13
11 Notation, character set and lexical items used in XER encoding instructions . 13
12 Keywords . 14
13 Assigning an XER encoding instruction to an ASN.1 type using a type prefix. 15
14 Assigning an XER encoding instruction using an XER encoding control section. 17
14.1 The encoding instruction assignment list.17
14.2 Identification of the targets for an XER encoding instruction using a target list. 18
14.2.1 General rules . 18
14.2.2 Target identification using an ASN.1 type reference and identifiers . 20
14.2.3 Target identification using a built-in type name . 22
14.2.4 Use of identifiers in context . 23
© ISO/IEC 2008 – All rights reserved iii
---------------------- Page: 3 ----------------------
ISO/IEC 8825-4:2008(E)
14.2.5 Use of imported types identification . 23
15 Multiple assignment of XER encoding instructions. 23
15.1 Order in which multiple assignments are considered. 23
15.2 Effect of assigning a negating encoding instruction . 24
15.3 Multiple assignment of encoding instructions with multiple categories . 24
15.4 Multiple assignment of XER encoding instructions of the same category. 24
15.5 Permitted combinations of final encoding instructions. 25
16 XER encoding instruction support for XML namespaces and qualified names. 27
17 Specification of EXTENDED-XER encodings. 28
17.1 The XML document element . 28
17.2 The "TypeNameOrModifiedTypeName" production. 28
17.3 The "AttributeList" production . 29
17.4 The "ExtendedXMLValue" production . 29
17.5 The "ExtendedXMLChoiceValue" production . 30
17.6 The "ExtendedXMLSequenceValue" and "ExtendedXMLSetValue" productions . 31
17.7 The "ExtendedXMLSequenceOfValue" and "ExtendedXMLSetOfValue" productions. 31
17.8 The "ModifiedXMLIntegerValue" production . 33
17.9 The "ModifiedXMLRealValue" production . 33
18 The ANY-ATTRIBUTES encoding instruction . 34
18.1 General. 34
18.2 Restrictions. 34
18.3 Effect on encodings. 35
19 The ANY-ELEMENT encoding instruction . 36
19.1 General. 36
19.2 Restrictions. 36
19.3 Effect on encodings. 37
20 The ATTRIBUTE encoding instruction. 37
20.1 General. 37
20.2 Restrictions. 37
20.3 Effect on encodings. 38
21 The BASE64 encoding instruction. 39
21.1 General. 39
21.2 Restrictions. 40
21.3 Effect on encodings. 40
22 The DECIMAL encoding instruction.40
22.1 General. 40
22.2 Restrictions. 41
22.3 Effect on encodings. 41
23 The DEFAULT-FOR-EMPTY encoding instruction . 41
23.1 General. 41
23.2 Restrictions. 42
23.3 Effect on encodings. 43
24 The ELEMENT encoding instruction.43
24.1 General. 43
24.2 Restrictions. 44
24.3 Effect on encodings. 44
25 The EMBED-VALUES encoding instruction. 44
25.1 General. 44
25.2 Restrictions. 44
25.3 Effect on encodings. 45
26 The GLOBAL-DEFAULTS encoding instruction. 45
26.1 General. 45
iv © ISO/IEC 2008 – All rights reserved
---------------------- Page: 4 ----------------------
ISO/IEC 8825-4:2008(E)
26.2 Restrictions. 46
26.3 Effect on encodings. 46
27 The LIST encoding instruction. 46
27.1 General. 46
27.2 Restrictions. 46
27.3 Effect on encodings. 47
28 The NAME encoding instruction. 47
28.1 General. 47
28.2 Restrictions. 48
28.3 Effect on encodings. 48
29 The NAMESPACE encoding instruction. 49
29.1 General. 49
29.2 Restrictions. 50
29.3 Effect on encodings. 50
30 The PI-OR-COMMENT encoding instruction. 50
30.1 General. 50
30.2 Restrictions. 51
30.3 Effect on the encodings. 51
31 The TEXT encoding instruction. 52
31.1 General. 52
31.2 Restrictions. 52
31.3 Effect on encodings. 52
32 The UNTAGGED encoding instruction . 53
32.1 General. 53
32.2 Restrictions. 54
32.3 Effect on encodings. 54
33 The USE-NIL encoding instruction.55
33.1 General. 55
33.2 Restrictions. 55
33.3 Effect on encodings. 56
34 The USE-NUMBER encoding instruction. 56
34.1 General. 56
34.2 Restrictions. 56
34.3 Effect on encodings. 56
35 The USE-ORDER encoding instruction. 57
35.1 General. 57
35.2 Restrictions. 57
35.3 Effect on encodings. 58
36 The USE-QNAME encoding instruction. 58
36.1 General. 58
36.2 Restrictions. 59
36.3 Effect on encodings. 59
37 The USE-TYPE encoding instruction . 59
37.1 General. 59
37.2 Restrictions. 59
37.3 Effect on encodings. 60
38 The USE-UNION encoding instruction. 60
38.1 General. 60
38.2 Restrictions. 61
38.3 Effect on encodings. 61
39 The WHITESPACE encoding instruction. 62
© ISO/IEC 2008 – All rights reserved v
---------------------- Page: 5 ----------------------
ISO/IEC 8825-4:2008(E)
39.1 General. 62
39.2 Restrictions. 62
39.3 Effect on encodings. 63
40 Identification of the encoding rules. 63
Annex A Examples of BASIC-XER and CXER encodings. 64
A.1 ASN.1 description of the record structure.64
A.2 ASN.1 description of a record value. 64
A.3 Basic XML representation of this record value . 64
A.4 Canonical XML representation of this record value . 65
B.1 Partial XML content. 66
B.2 Recommended restrictions on encodings producing partial XML element content . 66
C.1 Introduction. 69
C.2 Simple examples . 69
C.2.1 A base-ball card . 69
C.2.2 An employee . 70
C.3 More complex examples . 70
C.3.1 Using a union of two simple types. 70
C.3.2 Using a type identification attribute. 71
C.3.3 Using enumeration values. 71
C.3.4 Using an empty encoding for a default value. 71
C.3.5 Using embedded-values for notification of a payment due. 71
vi © ISO/IEC 2008 – All rights reserved
---------------------- Page: 6 ----------------------
ISO/IEC 8825-4:2008(E)
Foreword
ISO (the International Organization for Standardization) and IEC (the International Electrotechnical
Commission) form the specialized system for worldwide standardization. National bodies that are members of
ISO or IEC participate in the development of International Standards through technical committees
established by the respective organization to deal with particular fields of technical activity. ISO and IEC
technical committees collaborate in fields of mutual interest. Other international organizations, governmental
and non-governmental, in liaison with ISO and IEC, also take part in the work. In the field of information
technology, ISO and IEC have established a joint technical committee, ISO/IEC JTC 1.
International Standards are drafted in accordance with the rules given in the ISO/IEC Directives, Part 2.
The main task of the joint technical committee is to prepare International Standards. Draft International
Standards adopted by the joint technical committee are circulated to national bodies for voting. Publication as
an International Standard requires approval by at least 75 % of the national bodies casting a vote.
Attention is drawn to the possibility that some of the elements of this document may be the subject of patent
rights. ISO and IEC shall not be held responsible for identifying any or all such patent rights.
ISO/IEC 8825-4 was prepared by Joint Technical Committee ISO/IEC JTC 1, Information technology,
Subcommittee SC 6, Telecommunications and information exchange between systems, in collaboration with
ITU-T. The identical text is published as ITU-T Rec. X.693 (11/2008).
This second edition cancels and replaces the first edition (ISO/IEC 8825-4:2002), which has been
technically revised. It also incorporates the Amendments ISO/IEC 8825-4:2002/Amd.1:2004,
ISO/IEC 8825-4:2002/Amd.2:2006 and ISO/IEC 8825-4:2002/Amd.3:2008.
ISO/IEC 8825 consists of the following parts, under the general title Information technology — ASN.1
encoding rules:
⎯ Part 1: Specification of Basic Encoding Rules (BER), Canonical Encoding Rules (CER) and Distinguished
Encoding Rules (DER)
⎯ Part 2: Specification of Packed Encoding Rules (PER)
⎯ Part 3: Specification of Encoding Control Notation (ECN)
⎯ Part 4: XML Encoding Rules (XER)
⎯ Part 5: Mapping W3C XML schema definitions into ASN.1
⎯ Part 6: Registration and application of PER encoding instructions
© ISO/IEC 2008 – All rights reserved vii
---------------------- Page: 7 ----------------------
ISO/IEC 8825-4:2008(E)
Introduction
ITU-T Rec. X.680 | ISO/IEC 8824-1, ITU-T Rec. X.681 | ISO/IEC 8824-2, ITU-T Rec. X.682 | ISO/IEC 8824-3,
ITU-T Rec. X.683 | ISO/IEC 8824-4 together describe Abstract Syntax Notation One (ASN.1), a notation for the
definition of messages to be exchanged between peer applicat
...
Questions, Comments and Discussion
Ask us and Technical Secretary will try to provide an answer. You can facilitate discussion about the standard in here.