draft-legg-xed-asd-05.txt  -->   draft-legg-xed-asd-06.txt

view Side-By-Side changes






INTERNET-DRAFT                                                   S. Legg
draft-legg-xed-asd-05.txt
draft-legg-xed-asd-06.txt                                        eB2Bcom
Intended Category: Standards Track                     November 11, 2005                      October 20, 2006


                   Abstract Syntax Notation X (ASN.X)

               Copyright (C) The Internet Society (2005). (2006).

   Status of this This Memo

   By submitting this Internet-draft, each author represents that any
   applicable patent or other IPR claims of which he or she is aware
   have been or will be disclosed, and any of which he or she becomes
   aware will be disclosed, in accordance with Section 6 of BCP 79.

   By submitting this Internet-draft, I accept the provisions of
   Section 3 of BCP 78.

   Internet-Drafts are working documents of the Internet Engineering
   Task Force (IETF), its areas, and its working groups.  Note that
   other groups may also distribute working documents as
   Internet-Drafts.

   Internet-Drafts are draft documents valid for a maximum of six months
   and may be updated, replaced, or obsoleted by other documents at any
   time.  It is inappropriate to use Internet-Drafts as reference
   material or to cite them other than as "work in progress".

   The list of current Internet-Drafts can be accessed at
   http://www.ietf.org/1id-abstracts.html

   The list of Internet-Draft Shadow Directories can be accessed at
   http://www.ietf.org/shadow.html

   Technical discussion of this document should take place on the XED
   developers mailing list <xeddev@eb2bcom.com>.  Please send editorial
   comments directly to the editor <steven.legg@eb2bcom.com>.  Further
   information is available on the XED website: www.xmled.info.

   This Internet-Draft expires on 11 May 2006. 20 April 2007.


Abstract

   Abstract Syntax Notation X (ASN.X) is a semantically equivalent
   Extensible Markup Language (XML) representation for Abstract Syntax
   Notation One (ASN.1) specifications.  ASN.X completely avoids the



Legg                       Expires 11 May 2006                  [Page 1]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
   numerous ambiguities inherent in the ASN.1 language, therefore ASN.X
   documents are much easier to parse and manage than original ASN.1
   specifications.  ASN.X, together with the Robust XML Encoding Rules



Legg                      Expires 20 April 2007                 [Page 1]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   (RXER), constitutes a schema language for XML documents that offers,
   through other ASN.1 encoding rules, alternative compact binary
   encodings for XML instance documents.

Table of Contents

   1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3 ....................................................3
   2.  Conventions. . . . . . . . . . . . . . . . . . . . . . . . . .  5 Conventions .....................................................5
   3. General Considerations . . . . . . . . . . . . . . . . . . . .  5 ..........................................5
      3.1.  Annotations. . . . . . . . . . . . . . . . . . . . . . .  7 Annotations ................................................7
   4. ModuleDefinition Translation . . . . . . . . . . . . . . . . .  8 ....................................8
   5. Translation of Assignments . . . . . . . . . . . . . . . . . . 10 .....................................10
      5.1. Referencing Named Constructs . . . . . . . . . . . . . . 10 ..............................11
      5.2. Importing Namespaces . . . . . . . . . . . . . . . . . . 12 ......................................12
      5.3. TypeAssignment Translation . . . . . . . . . . . . . . . 12 ................................13
      5.4. ValueAssignment and XMLValueAssignment Translation . . . 13 ........14
      5.5. ValueSetTypeAssignment Translation . . . . . . . . . . . 13 ........................14
      5.6. ObjectClassAssignment Translation. . . . . . . . . . . . 14 Translation .........................15
      5.7. ObjectAssignment Translation . . . . . . . . . . . . . . 14 ..............................15
      5.8. ObjectSetAssignment Translation. . . . . . . . . . . . . 15 Translation ...........................16
      5.9. Parameterized Assignments. . . . . . . . . . . . . . . . 15 Definitions .................................16
   6. Translation of Types . . . . . . . . . . . . . . . . . . . . . 16 ...........................................16
      6.1. Identifier Replacement . . . . . . . . . . . . . . . . . 16 ....................................25
      6.2. DefinedType Translation. . . . . . . . . . . . . . . . . 17 Translation ...................................26
      6.3. Translation of Predefined Types. . . . . . . . . . . . . 23 Types ...........................29
      6.4. BitStringType Translation. . . . . . . . . . . . . . . . 25 Translation .................................30
      6.5. IntegerType Translation. . . . . . . . . . . . . . . . . 26 Translation ...................................31
      6.6. EnumeratedType Translation . . . . . . . . . . . . . . . 27 ................................33
      6.7. PrefixedType Translation . . . . . . . . . . . . . . . . 29 ..................................34
           6.7.1. Short Form TaggedType Translation . . . . . . . . . . . . . 31 ..................37
           6.7.2.  Insertion Encoding Instructions. . . . . . . . . 32 Long Form TaggedType Translation ...................38
      6.8. SelectionType Translation  . . . . . . . . . . . . . . . 33  ................................39
      6.9. InstanceOfType Translation . . . . . . . . . . . . . . . 33 ................................40
      6.10. ObjectClassFieldType Translation . . . . . . . . . . . . 34 .........................40
      6.11. TypeFromObject and ValueSetFromObjects Translation . . . 34 .......40
      6.12. Translation of Combining Types . . . . . . . . . . . . . 35 ...........................41
           6.12.1. NamedType Translation . . . . . . . . . . . . . 35 .............................41
           6.12.2. SequenceType Translation. . . . . . . . . . . . 38 Translation ..........................45
           6.12.3. SetType Translation . . . . . . . . . . . . . . 40 ...............................47
           6.12.4. ChoiceType Translation. . . . . . . . . . . . . 40 Translation ............................47
           6.12.5. Translation of UNION Types. . . . . . . . . . . 41 Types ........................48
           6.12.6. SequenceOfType Translation. . . . . . . . . . . 42 Translation ........................49
           6.12.7. Translation of LIST Types . . . . . . . . . . . 43 .........................50
           6.12.8. SetOfType Translation . . . . . . . . . . . . . 43 .............................50
           6.12.9. Insertion Encoding Instructions ...................51
      6.13. Translation of Constrained Types . . . . . . . . . . . . 43 .........................51
           6.13.1. Constraint Translation. . . . . . . . . . . . . 45 Translation ............................54
           6.13.2. UserDefinedConstraint Translation . . . . . . . 46
             6.13.3.  TableConstraint Translation . . . . . . . . . . 47 .................54



Legg                      Expires 11 May 2006 20 April 2007                 [Page 2]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005       October 20, 2006


           6.13.3. TableConstraint Translation .......................55
           6.13.4. ContentsConstraint Translation. . . . . . . . . 49 Translation ....................57
           6.13.5. ExceptionSpec Translation . . . . . . . . . . . 49
       6.14. Tag Defaults and Extension Defaults. . . . . . . . . . . 50 .........................58
   7. Translation of Values. . . . . . . . . . . . . . . . . . . . . 52 Values ..........................................59
      7.1. Translation of Literal Values. . . . . . . . . . . . . . 53 Values .............................60
      7.2. Translation of Notational Values . . . . . . . . . . . . 55 ..........................62
           7.2.1. DefinedValue Translation . . . . . . . . . . . . 56 ...........................63
           7.2.2. BuiltinValue Translation . . . . . . . . . . . . 57 ...........................64
           7.2.3. ValueFromObject Translation. . . . . . . . . . . 60 Translation ........................67
           7.2.4. ObjectClassFieldValue Translation. . . . . . . . 60 Translation ..................67
   8. Translation of Value Sets. . . . . . . . . . . . . . . . . . . 61 Sets ......................................68
      8.1. ElementSetSpecs Translation. . . . . . . . . . . . . . . 62 Translation ...............................69
      8.2. ElementSetSpec Translation . . . . . . . . . . . . . . . 62 ................................69
      8.3. SubtypeElements Translation. . . . . . . . . . . . . . . 63 Translation ...............................70
           8.3.1. ValueRange Translation . . . . . . . . . . . . . 64 .............................71
           8.3.2. InnerTypeConstraints Translation . . . . . . . . 65 ...................72
   9. Translation of Object Classes. . . . . . . . . . . . . . . . . 66 Classes ..................................73
      9.1. DefinedObjectClass Translation . . . . . . . . . . . . . 66 ............................73
      9.2. ObjectClassDefn Translation. . . . . . . . . . . . . . . 67 Translation ...............................74
           9.2.1. TypeFieldSpec Translation. . . . . . . . . . . . 68 Translation ..........................75
           9.2.2. FixedTypeValueFieldSpec Translation. . . . . . . 69 Translation ................76
           9.2.3. FixedTypeValueSetFieldSpec Translation . . . . . 70 .............77
           9.2.4. VariableTypeValueFieldSpec Translation . . . . . 71 .............78
           9.2.5. VariableTypeValueSetFieldSpec Translation. . . . 72 Translation ..........79
           9.2.6. FieldName Translation. . . . . . . . . . . . . . 74 Translation ..............................81
           9.2.7. ObjectFieldSpec Translation. . . . . . . . . . . 74 Translation ........................81
           9.2.8. ObjectSetFieldSpec Translation . . . . . . . . . 75 .....................82
   10. Translation of Objects . . . . . . . . . . . . . . . . . . . . 76 ........................................84
      10.1. DefinedObject Translation . . . . . . . . . . . . . . . 77 ................................84
      10.2. ObjectDefn Translation. . . . . . . . . . . . . . . . . 78 Translation ...................................85
      10.3. ObjectFromObject Translation. . . . . . . . . . . . . . 79 Translation .............................86
   11. Translation of Object Sets . . . . . . . . . . . . . . . . . . 79 ....................................86
      11.1. DefinedObjectSet Translation. . . . . . . . . . . . . . 80 Translation .............................87
      11.2. ObjectSetElements Translation . . . . . . . . . . . . . 81 ............................88
            11.2.1. ObjectSetFromObjects Translation . . . . . . . 82 .................89
   12. Translation of Information From Objects. . . . . . . . . . . . 82 Objects .......................89
   13. EncodingControlSections Translation. . . . . . . . . . . . . . 83 Translation ...........................90
   14. Security Considerations. . . . . . . . . . . . . . . . . . . . 84 Considerations .......................................90
   15. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 84 ..............................................91
   16. IANA Considerations. . . . . . . . . . . . . . . . . . . . . . 85 Considerations ...........................................91
   17. References ....................................................91
      17.1. Normative References .....................................91
      17.2. Informative References ...................................93
   Appendix A. ASN.1 for ASN.X. . . . . . . . . . . . . . . . . . . . 85 ASN.X .......................................93
   Appendix B. ASN.X for ASN.X. . . . . . . . . . . . . . . . . . . .103
   Normative References . . . . . . . . . . . . . . . . . . . . . . .144
   Informative Reference  . . . . . . . . . . . . . . . . . . . . . .146
   Author's Address . . . . . . . . . . . . . . . . . . . . . . . . .146
   Full Copyright Statement . . . . . . . . . . . . . . . . . . . . .147 ASN.X ......................................113

1.  Introduction




Legg                      Expires 11 May 2006 20 April 2007                 [Page 3]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005       October 20, 2006


   A full parser for the Abstract Syntax Notation One (ASN.1) language
   [X.680] is difficult to implement due to numerous ambiguities in the
   notation.  For example, certain notations for a Value are
   syntactically indistinguishable from notation for a ValueSet, Object,
   ObjectSet, DummyReference or SimpleTableConstraint.  An
   ObjectClassAssignment, ObjectAssignment or ObjectSetAssignment
   resembles respectively a TypeAssignment, ValueAssignment or
   ValueSetTypeAssignment.  A FixedTypeValueFieldSpec or
   FixedTypeValueSetFieldSpec resembles respectively an ObjectFieldSpec
   or ObjectSetFieldSpec, and an ObjectClassFieldType resembles
   InformationFromObjects.  In general such ambiguities can only be
   resolved once the entire specification has been parsed.  There are
   other notations which that are not mutually ambiguous but still require
   several lexical tokens to be scanned before they can be distinguished
   from each other.  The difficulty of parsing ASN.1 is an impediment to
   its wider adoption.

   This document defines a semantically equivalent Extensible Markup
   Language (XML) [XML10][XML11] representation for ASN.1 specifications
   called Abstract Syntax Notation X (ASN.X).  ASN.X completely avoids
   the inherent ambiguities of the ASN.1 language, therefore ASN.X
   documents are much easier to parse and manage than original ASN.1
   specifications.  For example, any conformant XML processor forms the
   basis of an ASN.1 toolkit.

   An ASN.X document is a well-formed and valid XML document conforming
   to XML namespaces [XMLNS10][XMLNS11].  ASN.X, together with the
   Robust XML Encoding Rules (RXER) [RXER], constitutes a schema
   language for XML documents that automatically provides more offers, through other ASN.1 encoding
   rules, alternative compact binary encodings for XML instance
   documents conforming to ASN.X. an ASN.X specification.  ASN.X definitions
   can also incorporate type, element and attribute definitions from
   XML Schema [XSD1], RELAX NG [RNG] or Document Type Definitions (DTDs)
   [XML10][XML11].

   ASN.X is defined in terms of rules for translating from an ASN.1
   specification.  This does not preclude an ASN.X document being
   written directly without a pre-existing ASN.1 specification, however
   such an ASN.X document is considered valid if and only if there
   exists
   exists, in principle principle, an ASN.1 specification which that when translated
   would yield the ASN.X document.

   The format for ASN.X has also been designed so that the content of an
   ASN.X document conforms to the RXER encoding of an abstract value of
   an ASN.1 type, the ModuleDefinition type, presented in Appendix A.
   This means that it is possible to decode an ASN.X document using an
   RXER decoder and then re-encode the abstract value (for storage or
   transmission) using any of the other encoding rules for ASN.1.  Thus



Legg                      Expires 20 April 2007                 [Page 4]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   the "X" in ASN.X can be regarded as standing for either XML or RXER,



Legg                       Expires 11 May 2006                  [Page 4]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
   or more generally, for any set of ASN.1 encoding rules.

   The ASN.X translation of the ASN.1 module in Appendix A is presented
   in Appendix B.

2.  Conventions

   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED" and "MAY" in this document are
   to be interpreted as described in, BCP 14, RFC 2119 [BCP14].  The key
   word "OPTIONAL" is exclusively used with its ASN.1 meaning.

   Throughout this document "type" shall be taken to mean an ASN.1 type,
   and "value" shall be taken to mean an ASN.1 abstract value.

   A reference to an ASN.1 production [X.680] (e.g., Type, NamedType) is
   a reference to the text in an ASN.1 specification corresponding to
   that production.

   The description of the translation of an ASN.1 module into an ASN.X
   document makes use of definitions from the XML Information Set
   (Infoset) [ISET].  In particular, information item property names are
   presented per
   follow the Infoset, Infoset convention of being shown in square brackets,
   e.g., [local name].  In the sections that follow, "information item"
   will be abbreviated to "item", e.g., "element information item" is
   abbreviated to "element item".  Element items will be referred to by
   their [local name] in angle brackets, e.g., "the <type> element item"
   means the element item with the [local name] "type".  Attribute items
   will be referred to by their [local name], e.g., "the type attribute
   item" means the attribute item with the [local name] "type".

   This document uses the namespace prefix "asn1:" "asnx:" to stand for the
   namespace name "http://xmled.info/ns/ASN.1", "urn:ietf:params:xml:ns:asnx", though in practice any
   valid namespace prefix is permitted in ASN.X.

   Encoding instructions [X.680-1] referenced by name in this
   specification are encoding instructions for RXER [RXEREI].  The
   associated provisions do not apply to encoding instructions for other
   encoding rules that happen to have the same name.

   Code points for characters [UNICODE] are expressed using the Unicode
   convention U+n, where n is four to six hexadecimal digits, e.g., the
   space character is U+0020.

3.  General Considerations

   ASN.X is defined in terms of rules for translating an ASN.1 module



Legg                      Expires 20 April 2007                 [Page 5]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   into a synthetic Infoset.  This synthetic Infoset is then serialized



Legg                       Expires 11 May 2006                  [Page 5]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
   into a well-formed and valid XML document (the ASN.X document) in the
   same manner that the synthetic Infoset for a non-canonical RXER
   encoding is serialized into an XML document (see Section 5.11 of the
   specification for RXER [RXER]).

      ASIDE:

      Aside: The serialization permits CDATA sections, character
      references and parsed entity references.  However, note that an
      ASN.X document may be transferred as data in a protocol and that
      some protocols disallow entity references.

   Apart from the [document element] of the document item for an ASN.X
   document, the translation of some ASN.1 construct belongs to the
   content
   [children] or [attributes] of an enclosing element item.

   Where the translation of the construct is an element item, it is
   appended to the [children] of the enclosing element item.  Elements
   MUST be appended to the [children] of the enclosing element item in
   the order described.  Translators MAY add white space character items
   (i.e., U+0020, U+0009, U+000D and U+000A) to the [children] of any
   element item (to improve the layout) except element items with the
   [local name] "literalValue", "fieldName" or "restrictBy".

      ASIDE:

      Aside: White space character items in the [children] of
      <fieldName> and <restrictBy> element items is explicitly covered
      under their respective descriptions.

   Where the translation of the construct is an attribute item it is
   added to the [attributes] of the enclosing element item.  The order
   of attribute items is not significant.  Translators MAY add leading
   and trailing white space characters to the [normalized value] of any
   attribute item except an attribute item with the [local name]
   "literalValue".

      ASIDE:

      Aside: An attribute or element item with the [local name]
      "literalValue" holds an RXER Infoset translation of an abstract
      value, and white space characters may be significant in that
      abstract value.  In most cases RXER itself permits optional
      leading and trailing white space characters in the Infoset
      translation.

   Translators MAY add comment and processing instruction (PI) items to
   the [children] of any element item except an element item with the
   [local name] "literalValue".

      ASIDE:

      Aside: In most cases RXER itself permits comment and PI items in
      the [children] of the element items with the [local name]
      "literalValue".



Legg                      Expires 11 May 2006 20 April 2007                 [Page 6]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


      ASIDE:       October 20, 2006


      Aside: Note that an ASN.X document may be transferred as data in a
      protocol and that some protocols disallow processing instructions.

   The [in-scope namespaces] and [namespace attributes] for
   <literalValue> and <restrictBy> element items are determined
   according to Section 5.9 of the specification for RXER [RXER].  The
   [in-scope namespaces] and [namespace attributes] for other element
   items in the translation are determined according to Section 5.3.1.1 5.3.2.1
   of the specification for RXER.

   The [namespace name] of any element item or attribute item generated
   by the translation from an ASN.1 specification has no value unless
   specified otherwise.

   In those cases where the [namespace name] of an element item has a
   value, the [prefix] of the element item is determined according to
   Section 5.3.1.2 5.3.2.2 of the specification for RXER.  In those cases where
   the [namespace name] of an attribute item has a value, the [prefix]
   of the attribute item is determined according to Section 5.3.2.1 5.3.3.1 of
   the specification for RXER.

      ASIDE:

      Aside: Non-canonical RXER allows all valid namespace prefixes and
      all valid placements for their corresponding namespace declaration
      attributes.

   Whenever an element item is added to the [children] of an enclosing
   element item the enclosing element item becomes the [parent] of the
   element item.

   Whenever an attribute item is added to the [attributes] of an element
   item the element item becomes the [owner element] of the attribute
   item.  For each attribute item, the [specified] property is set to
   true, the [attribute type] has no value and the value of the
   [references] property is set to unknown.

3.1.  Annotations

   In a number of places, as indicated in subsequent sections, the
   translator is permitted to add an element item with the [local name]
   "annotation".  The corresponding ASN.1 type for the <annotation>
   element item is AnyType [RXER] the Markup type [RXER], and the content [children] and
   [attributes] of the <annotation> element item is are at the discretion
   of the translator.

   Typical uses of the <annotation> element item would be to hold
   comments from the ASN.1 specification that are normative in nature,
   e.g., a comment in a user defined constraint, or to hold directives
   for an ASN.1 compiler.



Legg                      Expires 11 May 2006 20 April 2007                 [Page 7]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005       October 20, 2006


   Free text or XML comments in an <annotation> element will be
   preserved in a Canonical RXER (CRXER) encoding, while XML comments
   outside <annotation> elements will not. not be.

   Vendors using the <annotation> element items to hold ASN.1 compiler
   directives (as attributes or child elements of the <annotation>
   element) are encouraged to use element or attribute names that are
   qualified with a namespace name specific to the vendor.

4.  ModuleDefinition Translation

   The translation of a ModuleDefinition [X.680] (an ASN.1 module) is a
   document item.  The [document element] of the document item is an
   element item with the [local name] "module" and the [namespace name]
   "http://xmled.info/ns/ASN.1".
   "urn:ietf:params:xml:ns:asnx".

   An attribute item with the [local name] "format" and
   [normalized value] "1.0" MAY be added to the [attributes] of the
   [document element].

   An ASN.1 module has a schema identity URI if it contains a
   SCHEMA-IDENTITY encoding instruction, in which case the schema
   identity URI is the character string specified by the AnyURIValue of
   the SCHEMA-IDENTITY encoding instruction.

   If the ASN.1 module being translated has a schema identity URI URI, then
   an attribute item with the [local name] "schemaIdentity" SHALL be
   added to the [attributes] of the [document element] (i.e., the
   <asn1:module>
   <asnx:module> element item).  The [normalized value] of this
   attribute item is the schema identity URI of the module.

   An ASN.1 module has a target namespace if it contains a
   TARGET-NAMESPACE encoding instruction, in which case the target
   namespace is the character string specified by the AnyURIValue of the
   TARGET-NAMESPACE encoding instruction.

   If the ASN.1 module being translated has a target namespace namespace, then an
   attribute item with the [local name] "targetNamespace" SHALL be added
   to the [attributes] of the [document element].  The
   [normalized value] of this attribute item is the target namespace of
   the module.

   If the ASN.1 module contains a TARGET-NAMESPACE encoding instruction
   that specifies a Prefix, then an attribute item with the [local name]
   "targetPrefix" SHALL be added to the [attributes] of the
   [document element].  The [normalized value] of this attribute item is
   the character string specified by the NCName value of the Prefix.




Legg                      Expires 20 April 2007                 [Page 8]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   In examples in the remainder of this document the namespace prefix
   "tns:" is used to stand for the target namespace of the module being
   translated.

   An attribute item with the [local name] "name" SHALL be added to the
   [attributes] of the [document element].  The [normalized value] of



Legg                       Expires 11 May 2006                  [Page 8]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
   this attribute item is the modulereference in the ModuleIdentifier in
   the ModuleDefinition.

   If the DefinitiveIdentifier in the ModuleIdentifier in the
   ModuleDefinition is not empty empty, then an attribute item with the
   [local name] "identifier" SHALL be added to the [attributes] of the
   [document element].  The [normalized value] of this attribute item is
   the RXER character data translation [RXER] of the
   DefinitiveIdentifier.

   If the TagDefault in the ModuleDefinition is empty empty, then an attribute
   item with the [local name] "tagDefault" and [normalized value]
   "explicit" SHALL be added to the [attributes] of the
   [document element].

   If the TagDefault in the ModuleDefinition is not empty and the first
   keyword in the TagDefault is not "AUTOMATIC" "AUTOMATIC", then an attribute item
   with the [local name] "tagDefault" SHALL be added to the [attributes]
   of the [document element].  The [normalized value] of this attribute
   item is the first keyword in the TagDefault with all letters
   downcased, i.e., "explicit" or "implicit".

   If the TagDefault in the ModuleDefinition is not empty and the first
   keyword in the TagDefault is "AUTOMATIC" "AUTOMATIC", then an attribute item with
   the [local name] "tagDefault" and [normalized value] "automatic" MAY
   be added to the [attributes] of the [document element].

   If the ExtensionDefault in the ModuleDefinition is not empty empty, then an
   attribute item with the [local name] "extensibilityImplied" and
   [normalized value] "true" or "1" SHALL be added to the [attributes]
   of the [document element].

   If the ExtensionDefault in the ModuleDefinition is empty empty, then an
   attribute item with the [local name] "extensibilityImplied" and
   [normalized value] "false" or "0" MAY be added to the [attributes] of
   the [document element].

   An element item with the [local name] "annotation" MAY be added to
   the [children] of the [document element].

   The translation of each Assignment in the AssignmentList in the
   ModuleBody in the ModuleDefinition of the module being translated



Legg                      Expires 20 April 2007                 [Page 9]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   SHALL be appended to the [children] of the [document element].

   If the EncodingControlSections in the ModuleDefinition contains an
   EncodingControlSection for RXER RXER, then the translation of each
   NamedType in a TopLevelComponent [RXEREI] in a TopLevelComponents in
   the EncodingInstructionAssignmentList SHALL be added to the



Legg                       Expires 11 May 2006                  [Page 9]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
   [children] of the [document element].  The relative order of the top
   level
   top-level components SHOULD be preserved in the translation, however
   the translations of the top level top-level components MAY be interspersed with
   the translations of the assignments in the AssignmentList.

   The translation of the EncodingControlSections in the
   ModuleDefinition of the module being translated SHALL be appended to
   the [children] of the [document element].

   Example

      MyModule DEFINITIONS
      IMPLICIT TAGS
      EXTENSIBILITY IMPLIED ::=
      BEGIN

      MyType ::= INTEGER

      ENCODING-CONTROL RXER

          SCHEMA-IDENTITY  "http://example.com/id/MyModule"
          TARGET-NAMESPACE "http://example.com/ns/MyModule"

          COMPONENT myElement INTEGER

      END

      <asn1:module xmlns:asn1="http://xmled.info/ns/ASN.1"

      <asnx:module xmlns:asnx="urn:ietf:params:xml:ns:asnx"
                   name="MyModule"
                   schemaIdentity="http://example.com/id/MyModule"
                   targetNamespace="http://example.com/ns/MyModule"
                   tagDefault="implicit"
                   extensibilityImplied="true">

       <namedType name="MyType" type="asn1:INTEGER"/> type="asnx:INTEGER"/>

       <element name="myElement" type="asn1:INTEGER"/>

      </asn1:module> type="asnx:INTEGER"/>

      </asnx:module>

5.  Translation of Assignments




Legg                      Expires 20 April 2007                [Page 10]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


5.1.  Referencing Named Constructs

   An Assignment in ASN.1 associates a reference name with a Type,
   Value, ValueSet, ObjectClass, Object or ObjectSet.  In ASN.X, the
   translation of the Assignment is regarded as associating a qualified
   name [XMLNS10][XMLNS11] with the Type, Value, ValueSet, ObjectClass,



Legg                       Expires 11 May 2006                 [Page 10]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
   Object or ObjectSet.  ASN.X uses these qualified names in place of
   the references in an ASN.1 specification.

   In every case, the local part of the qualified name is the
   typereference, valuereference, objectclassreference, objectreference
   or objectsetreference in the Assignment (i.e., the [normalized value]
   of the name attribute item in the translation of the Assignment,
   ignoring white space characters).  If the ASN.1 module in which the
   Assignment is defined has a target namespace namespace, then this SHALL be the
   namespace name of the qualified name.  The namespace prefix is
   determined according to Section 5.6.11.1 of the specification for
   RXER.

   If the ASN.1 module in which the Assignment is defined does not have
   a target namespace namespace, then the namespace name of the qualified name is
   absent (i.e., the name is unqualified).

   If an ASN.1 specification contains two or more modules without target
   namespaces
   namespaces, then there exists the possibility that reference names
   defined in the those modules are not distinct.  The reference names are
   not distinct if two or more type or value set assignments define the
   same typereference or two or more value assignments define the same
   valuereference or two or more object class assignments define the
   same objectclassreference or two or more object assignments define
   the same objectreference or two or more object set assignments define
   the same objectsetreference or two or more top level top-level NamedType
   instances [RXEREI] subject to an ATTRIBUTE encoding instruction have
   the same effective name [RXEREI] or two or more top level top-level NamedType
   instances not subject to an ATTRIBUTE encoding instruction have the
   same effective name.  If the reference names are not distinct distinct, then
   an unambiguous translation into ASN.X does not exist unless each of
   the modules has a SCHEMA-IDENTITY encoding instruction.
   Consequently, if two or more modules without target namespaces are
   being translated into ASN.X and the reference names defined in those
   modules are not
   distinct then, distinct, then as a local action prior to the
   translation, a SCHEMA-IDENTITY encoding instruction MUST be added to
   each of the modules that defines one or more of the indistinct
   reference names and which that does not already have a SCHEMA-IDENTITY
   encoding instruction.  The character string (a URI) specified by the
   AnyURIValue of each added SCHEMA-IDENTITY encoding instruction is
   freely chosen by the translator, subject to the condition that these
   character strings are distinct [RXEREI].

      ASIDE:



Legg                      Expires 20 April 2007                [Page 11]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


      Aside: Although this means that different translators might
      produce ASN.X documents that are syntactically different for any
      given ASN.1 module, those documents will be semantically
      equivalent to each other and to the original ASN.1 module.




Legg                       Expires 11 May 2006                 [Page 11]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005

   TARGET-NAMESPACE and SCHEMA-IDENTITY encoding instructions are
   RECOMMENDED for every ASN.1 module.

5.2.  Importing Namespaces

   An element Assignment is referenced from an ASN.X document if its qualified
   name appears in the [normalized value] of a an attribute item with
   the [local name] "import" SHALL be added to the
   [children] of the [document element] for each external module, except
   the AdditionalBasicDefinitions module [RXER], containing Assignments
   that "type", "value", "class", "object" or "objectSet".
   These references are categorized as direct references.  An Assignment
   or top-level component is also referenced from the definitions an ASN.X document if
   its qualified name appears in the ASN.X document.

   An [normalized value] of an attribute
   item with the [local name] "name" SHOULD be added to the
   [attributes] of "ref".  This reference is only categorized
   as direct if the <import> element item.  The [normalized value] of
   this ref attribute item is not the modulereference result of the translation
   of a DefinedType subject to a TYPE-REF encoding instruction or a
   NamedType subject to an ATTRIBUTE-REF or ELEMENT-REF encoding
   instruction.

      Aside: In the case of an indirect reference, an attribute with the
      [local name] "embedded" and [normalized value] "true" or "1" will
      also be present.

   Definition (external module): An external module is any module other
   than the module being translated and the AdditionalBasicDefinitions
   module [RXER].

      Aside: The AdditionalBasicDefinitions module is always assumed to
      be imported, as are all the built-in types and object classes of
      ASN.1.

   An element item with the [local name] "import" SHALL be added to the
   [children] of the [document element] for each external module
   containing Assignments or top-level components that are directly
   referenced from the ASN.X document.  An <import> element item MAY be
   added to the [children] of the [document element] for any other
   external module.

   An attribute item with the [local name] "name" SHOULD be added to the
   [attributes] of the <import> element item.  The [normalized value] of
   this attribute item is the modulereference in the ModuleIdentifier in
   the ModuleDefinition of the external module.

   If the DefinitiveIdentifier in the ModuleIdentifier in the
   ModuleDefinition of the external module is not empty empty, then an



Legg                      Expires 20 April 2007                [Page 12]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   attribute item with the [local name] "identifier" SHOULD SHALL be added to
   the [attributes] of the <import> element item.  The
   [normalized value] of this attribute item is the RXER character data
   translation of the DefinitiveIdentifier.

   If the external module has a schema identity URI URI, then an attribute
   item with the [local name] "schemaIdentity" SHALL be added to the
   [attributes] of the <import> element item.  The [normalized value] of
   this attribute item is the schema identity URI of the external
   module.

   If the external module has a target namespace namespace, then an attribute item
   with the [local name] "namespace" SHALL be added to the [attributes]
   of the <import> element item.  The [normalized value] of this
   attribute item is the target namespace of the external module.

   An attribute item with the [local name] "schemaLocation" MAY be added
   to the [attributes] of the <import> element item.  The
   [normalized value] of this attribute item is a URI [URI] indicating
   the physical location of the ASN.X translation of the external
   module.

   The <import> element items MUST follow an <annotation> element item
   (if present) and MUST precede any other element items in the
   [children] of the [document element].

   Note that because of the way parameterized references are expanded in
   ASN.X, the modules in the Imports of the ModuleDefinition may not
   correspond exactly to the <import> element items.

5.3.  TypeAssignment Translation



Legg                       Expires 11 May 2006                 [Page 12]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005

   The translation of a TypeAssignment is an element item with the
   [local name] "namedType".  An attribute item with the [local name]
   "name" SHALL be added to the [attributes] of the <namedType> element
   item.  The [normalized value] of this attribute item is the
   typereference on the left hand side of the assignment.

   An element item with the [local name] "annotation" MAY be added to
   the [children] of the <namedType> element item.  The translation of
   the Type on the right hand side of the assignment SHALL be appended added to
   the content [children] or [attributes] of the <namedType> element item.

   Example

      MyType ::= INTEGER

      <namedType name="MyType" type="asn1:INTEGER"/> type="asnx:INTEGER"/>



Legg                      Expires 20 April 2007                [Page 13]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


5.4.  ValueAssignment and XMLValueAssignment Translation

   The translation of a ValueAssignment is an element item with the
   [local name] "namedValue".  An attribute item with the [local name]
   "name" SHALL be added to the [attributes] of the <namedValue> element
   item.  The [normalized value] of this attribute item is the
   valuereference on the left hand side of the assignment.

   An element item with the [local name] "annotation" MAY be added to
   the [children] of the <namedValue> element item.  The translation of
   the Type on the left hand side of the assignment SHALL be appended to
   the content of and the <namedValue> element item.  The translation
   of the Value on the right hand side of the assignment SHALL be appended added
   to the content [children] and/or [attributes] of the <namedValue> element
   item.

   Example

      myValue INTEGER ::= 10

      <namedValue name="myValue" type="asn1:INTEGER" type="asnx:INTEGER" literalValue="10"/>

   An XMLValueAssignment is converted into the equivalent
   ValueAssignment and then translated as a ValueAssignment.  Note that
   the ASN.X representation for a Value is unrelated to XMLTypedValue.

5.5.  ValueSetTypeAssignment Translation

   The translation of a ValueSetTypeAssignment is an element item with
   the [local name] "namedValueSet".  An attribute item with the
   [local name] "name" SHALL be added to the [attributes] of the
   <namedValueSet> element item.  The [normalized value] of this



Legg                       Expires 11 May 2006                 [Page 13]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
   attribute item is the typereference on the left hand side of the
   assignment.

   An element item with the [local name] "annotation" MAY be added to
   the [children] of the <namedValueSet> element item.  The translation
   of the Type on the left hand side of the assignment SHALL be appended added to
   the content [children] or [attributes] of the <namedValueSet> element item.
   The translation of the ValueSet on the right hand side of the
   assignment SHALL be
   appended added to the content [children] of the <namedValueSet>
   element item.

   Example

      MyValueSet INTEGER ::= { 10 }

      <namedValueSet name="MyValueSet" type="asn1:INTEGER"> type="asnx:INTEGER">
       <valueSet>
        <literalValue>10</literalValue>
       </valueSet>
      </namedValueSet>

5.6.  ObjectClassAssignment Translation

   The translation of an



Legg                      Expires 20 April 2007                [Page 14]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


        <literalValue>10</literalValue>
       </valueSet>
      </namedValueSet>

5.6.  ObjectClassAssignment Translation

   The translation of an ObjectClassAssignment is an element item with
   the [local name] "namedClass".  An attribute item with the
   [local name] "name" SHALL be added to the [attributes] of the
   <namedClass> element item.  The [normalized value] of this attribute
   item is the objectclassreference on the left hand side of the
   assignment.

   An element item with the [local name] "annotation" MAY be added to
   the [children] of the <namedClass> element item.  The translation of
   the ObjectClass on the right hand side of the assignment SHALL be
   appended
   added to the content [children] or [attributes] of the <namedClass> element
   item.

   Example

      MY-CLASS ::= TYPE-IDENTIFIER

      <namedClass name="MY-CLASS" class="asn1:TYPE-IDENTIFIER"/> class="asnx:TYPE-IDENTIFIER"/>

5.7.  ObjectAssignment Translation

   The translation of an ObjectAssignment is an element item with the
   [local name] "namedObject".  An attribute item with the [local name]
   "name" SHALL be added to the [attributes] of the <namedObject>
   element item.  The [normalized value] of this attribute item is the
   objectreference on the left hand side of the assignment.




Legg                       Expires 11 May 2006                 [Page 14]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005

   An element item with the [local name] "annotation" MAY be added to
   the [children] of the <namedObject> element item.  The translation of
   the DefinedObjectClass on the left hand side of the assignment SHALL
   be appended to the content of and
   the <namedObject> element item.  The translation of the Object on the right hand side of the
   assignment SHALL be appended added to the content [children] and/or [attributes] of
   the <namedObject> element item.

   Example

      myObject TYPE-IDENTIFIER ::=
          { INTEGER IDENTIFIED BY { 2 5 13 14 } }

      <namedObject name="myObject" class="asn1:TYPE-IDENTIFIER"> class="asnx:TYPE-IDENTIFIER">
       <object>
        <field name="id" literalValue="2.5.13.14"/>



Legg                      Expires 20 April 2007                [Page 15]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


        <field name="Type" type="asn1:INTEGER"/> type="asnx:INTEGER"/>
       </object>
      </namedObject>

5.8.  ObjectSetAssignment Translation

   The translation of an ObjectSetAssignment is an element item with the
   [local name] "namedObjectSet".  An attribute item with the
   [local name] "name" SHALL be added to the [attributes] of the
   <namedObjectSet> element item.  The [normalized value] of this
   attribute item is the objectsetreference on the left hand side of the
   assignment.

   An element item with the [local name] "annotation" MAY be added to
   the [children] of the <namedObjectSet> element item.  The translation
   of the DefinedObjectClass on the left hand side of the assignment
   SHALL be appended to the content of and
   the <namedObjectSet> element
   item.  The translation of the ObjectSet on the right hand side of the
   assignment SHALL be appended added to the content [children] and/or [attributes] of
   the <namedObjectSet> element item.

   Example

      MyObjectSet TYPE-IDENTIFIER ::= { myObject }

      <namedObjectSet name="MyObjectSet" class="asn1:TYPE-IDENTIFIER"> class="asnx:TYPE-IDENTIFIER">
       <objectSet>
        <object ref="tns:myObject"/>
       </objectSet>
      </namedObjectSet>

5.9.  Parameterized Assignments




Legg                       Expires 11 May 2006                 [Page 15]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005 Definitions

   The translation of an ASN.1 specification into ASN.X replaces any
   DummyReference [X.683] or reference to a parameterized definition
   [X.683] with the definition expanded in-line (except for a special
   case involving recursive parameterized types).  For example, a
   ParameterizedObject is replaced by the Object on the right hand side
   of the referenced ParameterizedObjectAssignment.  Consequently there
   is no direct translation for a ParameterizedAssignment, though its
   definition may come into play in the translation of references to the
   parameterized definition.

   The definition that substitutes for a DummyReference or parameterized
   reference (e.g., the Object that substitutes for a
   ParameterizedObject) is potentially in comes from a different module scope to from
   the parameterized reference.  Expanding a DummyReference or parameterized reference
   in-line puts the substitute definition into the module scope context of the parameterized module
   containing the reference, which could therefore alter the



Legg                      Expires 20 April 2007                [Page 16]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   interpretation of the substitute definition.
   However, only type definitions have dependencies on the module scope.
   Other kinds of definitions are not affected.

   A type definition is potentially dependent on the TagDefault and
   ExtensionDefault of the module, module in which it appears, and may also be
   affected by encoding instructions in an XML Encoding Rules (XER)
   [X.693] encoding control section [X.693-1].  Section 6.14 describes attribute items that are added to
   the translation  Other kinds of a type definition to override
   definitions are not dependent on the module defaults
   and ensure the appropriate interpretation with respect to tagging and
   extensibility.  The solution with respect to XER encoding
   instructions is described by context, however type
   definitions can be nested within the procedure for translating XER
   encoding instructions into ASN.X [XEREIT].

      ASIDE: other kinds of definitions, so a
   change of context can still be significant.

      Aside: Type definitions are not dependent on their module's RXER
      or Generic String Encoding Rules (GSER) [GSER] encoding control
      section [RXEREI][GSEREI].

6.  Translation of Types

   The rules for translating the different varieties of Type [RXEREI][GSEREI] (as they are
   detailed in this section.

   Note that currently defined), so the notation
      presence of ASN.1 an encoding control section for RXER or GSER is ambiguous where not
      significant in a Type is both
   prefixed [X.680-1] (e.g., tagged) change of context.

   The remainder of this section describes how and constrained.  For example, when a change of
   context is indicated in the
   notation "[0] INTEGER (0..10)" could be interpreted either as ASN.X translation of a
   tagged ConstrainedType DummyReference or a constrained TaggedType.  For the purposes
   parameterized reference.

   In any instance of use, the translation into ASN.X module containing the constraint DummyReference or
   parameterized reference is assumed to have
   higher precedence than the prefix, so referencing module and the above notation would be
   taken to be a tagged ConstrainedType.

6.1.  Identifier Replacement



Legg                       Expires 11 May 2006                 [Page 16]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


   Various RXER encoding instructions can be used to override an
   identifier in an ASN.1 specification with an NCName [XMLNS10].  The
   NCName module
   providing the substitute definition is given pre-eminence in the ASN.X representation referenced module.  The
   referenced and referencing modules may be the
   identifier same module.

   In the case of a ParameterizedType, the substitute definition is not explicitly given if it the
   Type on the right hand side of the referenced
   ParameterizedTypeAssignment.

   In the case of a ParameterizedValueSetType, the substitute definition
   is algorithmically related
   to the NCName.  The cases where an NCName overrides an identifier are
   covered individually in other parts constrained type on the right hand side of this specification and make
   use the notional
   ParameterizedTypeAssignment equivalent to the referenced
   ParameterizedValueSetTypeAssignment (see Clause 15.8 of X.680
   [X.680]).

   In the following definition.

   Definition: The reduction case of an NCName a ParameterizedValue, the substitute definition is the string
   Value on the right hand side of characters
   resulting from the following operations performed in order on referenced
   ParameterizedValueAssignment.

   In the
   NCName:

   (1) replace each "." (U+002E) and "_" (U+005F) character with case of a "-"
       (U+002D) character,

   (2) remove every character except latin letters (U+0041-U+005A,
       U+0061-U+007A), decimal digits (U+0030-U+0039) and hyphens
       (U+002D),

   (3) remove leading and trailing hyphen characters,

   (4) replace sequences ParameterizedObjectClass, the substitute definition
   is the ObjectClass on the right hand side of the referenced
   ParameterizedObjectClassAssignment.

   In the case of two or more hyphen characters with a single
       hyphen, and

   (5) convert ParameterizedObject, the first character to lowercase if it substitute definition is an uppercase
       letter.

      ASIDE: If
   the reduction Object on the right hand side of an NCName is not the same as referenced
   ParameterizedObjectAssignment.

   In the
      identifier that case of a ParameterizedObjectSet, the NCName replaces then substitute definition is



Legg                      Expires 20 April 2007                [Page 17]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   the identifier will be
      explicitly given in ObjectSet on the translation into ASN.X.

6.2.  DefinedType Translation right hand side of the referenced
   ParameterizedObjectSetAssignment.

   If the ActualParameter corresponding to a Type DummyReference is not a DefinedType in a ReferencedType
   ValueSet, then the translation
   of the Type substitute definition for that DummyReference is
   the translation of Type, Value, DefinedObjectClass, Object or ObjectSet in the DefinedType.
   ActualParameter corresponding to the DummyReference.

   If the ActualParameter corresponding to a DefinedType DummyReference is not a ParameterizedType,
   ParameterizedValueSetType or
   ValueSet, then the substitute definition for that DummyReference and is not subject
   the notional constrained type equivalent to a
   TYPE-REF or REF-AS-TYPE encoding instruction then the translation ValueSet; the
   ElementSetSpecs of the DefinedType is either ValueSet contributes to the attribute form translation constraint of a type
   reference, or the element form translation of a
   constrained type reference.

   The attribute form translation and the governor of a type reference the Parameter corresponding to
   the ActualParameter is an attribute
   item with used as the [local name] "type". parent type that is constrained.

   Definition (interchangeable): The [normalized value] contexts of this
   attribute item is the qualified name referencing the type and
   referenced modules are interchangeable with respect to interpreting
   the substitute definition
   (see Section 5.1).  The attribute form translation SHALL NOT be used
   if if:

   (a) the qualified name is shared by two or more type definitions in
   separate modules, i.e., is ambiguous.



Legg                       Expires 11 May 2006                 [Page 17]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


   The element form translation of a type reference referenced module is the referencing module and does not
       contain an element item
   with XER encoding control section, or

   (b) the [local name] "type".  An attribute item with referenced module and referencing module have the
   [local name] "ref" SHALL same
       TagDefault (where an absent TagDefault is taken to be added equivalent
       to "EXPLICIT TAGS"), the [attributes] of the <type>
   element item.  The [normalized value] of this attribute item is the
   qualified name referenced module and referencing module
       have the type definition.  If the qualified
   name same ExtensionDefault, and neither module has an XER
       encoding control section.

      Aside: A module with an XER encoding control section is shared not
      considered to have a context interchangeable with another module,
      including itself, because the typereference by two or more which a substitute
      type definitions definition is identified may appear in a TargetList in separate modules
   then an attribute item with the [local name] "context" SHALL be added
   to the [attributes]
      XER encoding control section of the <type> element item.  The
   [normalized value] of this attribute item is referenced module, and because
      the character string
   value in-line expansion of a substitute definition may cause its
      text to come within the AnyURIValue scope of a TargetList in the SCHEMA-IDENTITY XER encoding instruction
   for
      control section of the referencing module containing the type definition referenced by the
   DefinedType.

      ASIDE: that would not apply
      otherwise.

   Definition (recursively contained): A SCHEMA-IDENTITY encoding instruction ParameterizedType is obligatory in
      such cases (see Section 5.1).

   An element item with the [local name] "annotation" MAY
   recursively contained if its translation will be added to nested within the [children]
   translation (i.e., in-line expansion) of the <type> element item.

   An attribute item with the [local name] "embedded" and
   [normalized value] "false" or "0" MAY be added another ParameterizedType to
   which it is equivalent.  A ParameterizedValueSetType is recursively
   contained if its translation will be nested within the [attributes] translation of
   another ParameterizedValueSetType to which it is equivalent.

      Aside: ASN.1 does not permit the <type> element item. other kinds of parameterized
      reference to be recursive.




Legg                      Expires 20 April 2007                [Page 18]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   The translation of the DefinedType a DummyReference, a ParameterizedType that is the same whether the type
   definition not
   recursively contained, a ParameterizedValue, a
   ParameterizedValueSetType that is referenced by not recursively contained, a typereference
   ParameterizedObjectClass, a ParameterizedObject or an
   ExternalTypeReference.

   If a DefinedType
   ParameterizedObjectSet is subject to a TYPE-REF encoding instruction then either:

   (1) the translation of the DefinedType is either substitute definition, or

   (2) an element item with the attribute form
   translation of [local name] "type" if the substitute
       definition is a foreign type reference, or Type, "value" if the element form
   translation of substitute definition is a foreign type reference.  The attribute form
   translation SHALL NOT be used
       Value, "class" if the referenced type substitute definition is an ASN.1 type ObjectClass or
       DefinedObjectClass, "object" if the RefParameters in the TYPE-REF encoding instruction is not
   empty.

   The attribute form translation of a foreign type reference substitute definition is an
   attribute item with
       Object, or "objectSet" if the [local name] "type".  The [normalized value]
   of this attribute item substitute definition is an
       ObjectSet.  A fully expanded reference (described shortly) SHALL
       be added to the RXER character data translation [children] of the
   QNameValue from the TYPE-REF encoding instruction.

   The element form item.

   The translation of a foreign type in case (2) is always allowed and provides
   information to identify the referenced module and the referenced
   definition.

   The translation in case (1) MAY be used instead if and only if the
   contexts of the referencing and referenced modules are
   interchangeable, or the contexts of the referencing and referenced
   modules are not interchangeable but the difference between them does
   not affect how the substitute definition is interpreted.

      Aside: There are many ways in which the substitute definition can
      be unaffected by a difference between the contexts of the
      referencing and referenced modules.  One example would be where
      the referencing and referenced modules differ only in their
      TagDefault, but the substitute definition does not contain any
      TaggedType notation.

   Note that if the translation in case (1) is used, then the
   referencing module is still the referencing module when considering a
   nested in-line expansion.  If the translation in case (2) is used,
   then the referenced module becomes the referencing module when
   considering a nested in-line expansion.

   A fully expanded reference is an element item with the [local name] "type".  An
   "expanded".  Except in the case of a DummyReference, the reference
   name is indicated by an attribute item with the [local name] "ref" SHALL be "name"
   added to the [attributes] of the
   <type> <expanded> element item.  The

   In the case of a ParameterizedType or ParameterizedValueSetType, the
   [normalized value] of this attribute item is the RXER character data translation typereference of the QNameValue from the
   TYPE-REF encoding instruction.  If the ContextParameter is present in
   the RefParameters in the TYPE-REF encoding instruction then an
   attribute item with the [local name] "context" SHALL be added to the
   ParameterizedType or ParameterizedValueSetType.




Legg                      Expires 11 May 2006 20 April 2007                [Page 18] 19]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


   [attributes]       October 20, 2006


   In the case of a ParameterizedValue, the <type> element item.  The [normalized value] of this
   attribute item is the string value valuereference of the AnyURIValue in ParameterizedValue.

   In the
   ContextParameter.  If case of a ParameterizedObjectClass, the referenced type [normalized value] of
   this attribute item is an ASN.1 type then an the objectclassreference of the
   ParameterizedObjectClass,

   In the case of a ParameterizedObject, the [normalized value] of this
   attribute item with is the objectreference of the ParameterizedObject.

   In the case of a ParameterizedObjectSet, the [local name] "embedded" and [normalized value] "true" or "1" SHALL be added to of
   this attribute item is the [attributes] objectsetreference of the <type> element item, otherwise such an
   ParameterizedObjectSet.

   The "name" attribute item MAY be
   added to omitted if:

   (a) the [attributes] conditions permitting the use of the <type> element item.

      ASIDE: The embedded attribute item indicates whether a type is
      directly referenced as a DefinedType translation in the
       aforementioned case (1) are satisfied, or indirectly referenced
      through a TYPE-REF encoding instruction.  An ASN.1 type can be
      referenced either way.  If

   (b) the embedded attribute item reference is absent
      and not a typereference, or

   (c) the reference is to an ASN.1 type then a DefinedType is
      assumed.  Type definitions typereference that does not appear in other schema languages cannot be
      directly referenced.  If any
       TargetList in an XER encoding control section of the embedded referenced
       module.

   The "name" attribute item is absent and SHALL NOT appear in the translation of a
   DummyReference.

   The referenced type module is not indicated by an ASN.1 type then a TYPE-REF encoding
      instruction is assumed.

   An element item with the
   [local name] "annotation" MAY be "module" added to the [children] of the <type> <expanded>
   element item.

   Usually  The <module> element item MAY be omitted if the translator is free to choose either
   conditions permitting the use of the attribute form or
   element form translation for a type reference or foreign type
   reference, however in some contexts attribute forms of Type the
   aforementioned case (1) are
   explicitly disallowed.

   If a DefinedType satisfied, or if the referencing module
   is subject to a REF-AS-TYPE encoding instruction
   then the translation of referenced module.  When the DefinedType is an <module> element item with the
   [local name] "type". is present:

   (a) An attribute item with the [local name]
   "elementType" SHALL be "name" SHOULD be added to
       the [attributes] of the <type> <module> element item.  The
       [normalized value] of this attribute item is the
   RXER character data translation of modulereference
       in the NameValue from ModuleIdentifier in the REF-AS-TYPE
   encoding instruction. ModuleDefinition of the referenced
       module.

   (b) If the ContextParameter is present DefinitiveIdentifier in the
   RefParameters ModuleIdentifier in the REF-AS-TYPE encoding instruction
       ModuleDefinition of the referenced module is not empty, then an
       attribute item with the [local name] "context" "identifier" SHALL be added
       to the [attributes] of the <type> <module> element item.  The
       [normalized value] of this attribute item is the string value RXER character
       data translation of the AnyURIValue in DefinitiveIdentifier.




Legg                      Expires 20 April 2007                [Page 20]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   (c) If the
   ContextParameter.  An element referenced module has a schema identity URI, then an
       attribute item with the [local name] "annotation"
   MAY "schemaIdentity" SHALL be
       added to the [attributes] of the <module> element item.  The
       [normalized value] of this attribute item is the schema identity
       URI of the referenced module.

   At least one of the attribute items specified in cases (a), (b) and
   (c) MUST appear in the [attributes] of the <module> element item.

   The translation of the substitute definition SHALL be added to the
   [children] or [attributes] of the <type> <expanded> element item.

   Example

      CHOICE

      Consider these module definitions:

         Templates
         DEFINITIONS
         AUTOMATIC TAGS ::=
         BEGIN

         CollectionOfThings {
          one    Foo,
          two    [RXER:TYPE-REF Thing } ::= SEQUENCE OF thing Thing

         END

         ProtocolDefinitions
         DEFINITIONS
         AUTOMATIC TAGS ::=
         BEGIN

         IMPORTS
             CollectionOfThings{}
                 FROM Templates
             ;

         CollectionOfIntegers ::= CollectionOfThings { namespace-name "http://www.example.com/PO1",
                       local-name "PurchaseOrderType" INTEGER }
                 ] AnyType,

         END

      The Type on the right hand side of the TypeAssignment for
      CollectionOfIntegers is a ParameterizedType.  Thing is a
      DummyReference.

      Without using the translation in case (1), the translations of
      these modules are:

         <asnx:module name="Templates"/>




Legg                      Expires 11 May 2006 20 April 2007                [Page 19] 21]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


          three  [RXER:REF-AS-TYPE "product"
                     CONTEXT "http://www.example.com/inventory"
                 ] AnyType
      }

      <type xmlns:po="http://www.example.com/PO1">
       <choice>
        <element name="one" type="tns:Foo"/>
        <element name="two" type="po:PurchaseOrderType"/>       October 20, 2006


         <asnx:module xmlns:asnx="urn:ietf:params:xml:ns:asnx"
                      name="ProtocolDefinitions">

          <namedType name="CollectionOfIntegers">
           <type>
            <expanded name="CollectionOfThings">
             <module name="Templates"/>
             <type>
              <sequenceOf>
               <element name="three"> name="thing">
                <type>
                 <expanded>
                  <module name="ProtocolDefinitions"/>
                  <type elementType="product"
               context="http://www.example.com/inventory"/> ref="asnx:INTEGER"/>
                 </expanded>
                </type>
               </element>
       </choice>
              </sequenceOf>
             </type>

   If a DefinedType is a DummyReference then the
            </expanded>
           </type>
          </namedType>

         </asnx:module>

      The translation of the Type Templates module is empty because the translation of the Type in the ActualParameter corresponding
   to the DummyReference.

   If a DefinedType is a ParameterizedType then the translation of the
   DefinedType is the translation of the ParameterizedType.

   If a DefinedType is a ParameterizedValueSetType then the translation
   of the DefinedType is the translation of the
   ParameterizedValueSetType.

   Definition: A ParameterizedType is recursively contained if its
   translation will be nested within the translation of another
   ParameterizedType to which it is equivalent.  A
   ParameterizedValueSetType is recursively contained if its translation
   will be nested within the translation of another
   ParameterizedValueSetType to which it is equivalent.

   If
      module contains only a ParameterizedType is not recursively contained then the
   translation of the ParameterizedType is the translation of the Type
   on parameterized assignment.

      Since the right hand side contexts of the referenced ParameterizedTypeAssignment.

   If Templates and ProtocolDefinitions
      modules are interchangeable, a ParameterizedValueSetType is not recursively contained then the
   translation of the ParameterizedValueSetType is the simpler translation of the constrained Type on the right hand side of the notional
   ParameterizedTypeAssignment equivalent to the referenced
   ParameterizedValueSetTypeAssignment (see Clause 15.8 of X.680
   [X.680]).

      ASIDE: The Type that substitutes for a ParameterizedType,
      ParameterizedValueSetType or DummyReference is potentially in a
      different
      ProtocolDefinitions module scope to the surrounding translation, therefore



Legg                       Expires 11 May 2006                 [Page 20]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


      the translation of the Type may require a tagDefault or
      extensibilityImplied attribute item, according to the provisions
      of Section 6.14. is permitted:

         <asnx:module xmlns:asnx="urn:ietf:params:xml:ns:asnx"
                      name="ProtocolDefinitions">

          <namedType name="CollectionOfIntegers">
           <type>
            <sequenceOf>
             <element name="thing" type="asnx:INTEGER"/>
            </sequenceOf>
           </type>
          </namedType>

         </asnx:module>

   If a ParameterizedType or ParameterizedValueSetType is recursively
   contained
   contained, then its translation is an element item with the
   [local name] "type".  An attribute item with the [local name]



Legg                      Expires 20 April 2007                [Page 22]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   "ancestor" SHALL be added to the [attributes] of the <type> element
   item.  The [normalized value] of this attribute item is the decimal
   digit string representing the integer value of one plus the number of
   intermediate enclosing <type> element items between the <type>
   element items resulting from the translations of the two equivalent
   instances of ParameterizedType or ParameterizedValueSetType.  An
   element item with the [local name] "annotation" MAY be added to the
   [children] of the <type> element item.

   A <type> element item with an ancestor attribute item is a reference
   to an ancestor <type> element item.  This form for a <type> element
   item SHOULD NOT be used in original specifications written in ASN.X.

      ASIDE:

      Aside: The form is only intended for the purpose of handling
      recursive parameterized type definitions in an ASN.1 specification
      being translated into ASN.X.  Such definitions are
      self-referencing but have no obvious name.  It is also not easy to
      construct a suitable name from the surrounding context because
      recursive parameterized types can be embedded in other constructs,
      such as information objects, which that are themselves unnamed.

   Example

      Consider these type definitions: definitions, assumed to be defined in a module
      that does not have an XER encoding control section:

         Tree { ValueType } ::= SEQUENCE {
             value          [0] ValueType,
             left-subtree   [1] Tree { ValueType } OPTIONAL,
             right-subtree  [2] Tree { ValueType } OPTIONAL
         }

         NumberTree ::= [APPLICATION 13] Tree { INTEGER }

      The assignment for "Tree" is not directly translated because it is
      a ParameterizedAssignment.  The translation for the "NumberTree"
      assignment, up to but not yet including the Type in the
      TaggedType, is as follows:

         <namedType name="NumberTree">
          <type>
           <tagged tagClass="application" number="13"/>



Legg                       Expires 11 May 2006                 [Page 21]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
          </type>
         </namedType>

      The Type in the TaggedType is a ParameterizedType.  Since the
      ParameterizedType is not recursively contained the translation of
      the ParameterizedType is the ParameterizedType, using the translation in case (1) above, is



Legg                      Expires 20 April 2007                [Page 23]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


      the translation of the Type on the right hand side of the
      referenced ParameterizedTypeAssignment, namely this type:

         SEQUENCE {
             value          [0] ValueType,
             left-subtree   [1] Tree { ValueType } OPTIONAL,
             right-subtree  [2] Tree { ValueType } OPTIONAL
         }

      ValueType is a DummyReference.  The translation of the actual
      parameter substitutes for the DummyReference.  In this case the
      actual parameter is the type INTEGER.

      The translation for the SEQUENCE type, up to the first component,
      is added to the <tagged> element:

         <namedType name="NumberTree">
          <type>
           <tagged tagClass="application" number="13">
            <type><!-- Tree { INTEGER } -->
             <sequence>
              <element name="value">
               <type>
                <tagged number="0">
                 <type ref="asn1:INTEGER"/><!-- ref="asnx:INTEGER"/><!-- ValueType -->
                </tagged>
               </type>
              </element>
             </sequence>
            </type>
           </tagged>
          </type>
         </namedType>

      The Type in the TaggedType for the second component is a
      ParameterizedType.  Since this ParameterizedType is recursively
      contained its translation is a <type> element with the ancestor
      attribute.  The value of the ancestor attribute is "2" because
      there is one intermediate <type> element (for a TaggedType).  Put
      another way, the translations of the equivalent instances of
      ParameterizedType are two <type> steps apart.




Legg                       Expires 11 May 2006                 [Page 22]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005

      The translation of the third component of the SEQUENCE type
      follows the same pattern as the second component.  The completed
      translation is as follows:

         <namedType name="NumberTree">
          <type>



Legg                      Expires 20 April 2007                [Page 24]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


           <tagged tagClass="application" number="13">
            <type><!-- Tree { INTEGER } -->
             <sequence>
              <element name="value">
               <type>
                <tagged number="0">
                 <type ref="asn1:INTEGER"/><!-- ref="asnx:INTEGER"/><!-- ValueType -->
                </tagged>
               </type>
              </element>
              <optional>
               <element name="left-subtree">
                <type>
                 <tagged number="1">
                  <type ancestor="2"/><!-- Tree { ValueType } -->
                 </tagged>
                </type>
               </element>
              </optional>
              <optional>
               <element name="right-subtree">
                <type>
                 <tagged number="2">
                  <type ancestor="2"/><!-- Tree { ValueType } -->
                 </tagged>
                </type>
               </element>
              </optional>
             </sequence>
            </type>
           </tagged>
          </type>
         </namedType>

6.3.

6.  Translation of Predefined Types

   If a Type comprises one of

   The rules for translating the productions different varieties of Type are
   detailed in Table 1 then this section.

   Note that the
   translation notation of the ASN.1 is ambiguous where a Type is either both
   prefixed [X.680-1] (e.g., tagged) and constrained.  For example, the attribute form
   notation "[0] INTEGER (0..10)" could be interpreted either as a
   tagged ConstrainedType or element form
   translation of that type.

   The attribute form translation of a Type comprising one constrained TaggedType.  For the purposes
   of the
   productions in Table 1 translation into ASN.X the constraint is an attribute item with assumed to have
   higher precedence than the [local name] prefix, so the above notation would be
   taken to be a tagged ConstrainedType.

6.1.  Identifier Replacement



Legg                      Expires 11 May 2006 20 April 2007                [Page 23] 25]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


   "type".       October 20, 2006


   Various RXER encoding instructions can be used to override an
   identifier in an ASN.1 specification with an NCName [XMLNS10].  The [normalized value]
   NCName is given pre-eminence in the ASN.X representation and the
   identifier is not explicitly given if it is algorithmically related
   to the NCName.  The cases where an NCName overrides an identifier are
   covered individually in other parts of this attribute item specification and make
   use of the following definition.

   Definition (reduction): The reduction of an NCName is a qualified
   name with the namespace name "http://xmled.info/ns/ASN.1" and string of
   characters resulting from the
   local part as indicated following operations performed in Table 1.

   Table 1: Reference Names for Predefined Types

      +----------------------------------+-------------------+
      | ASN.1 Production                 | local part        |
      +==================================+===================+
      | BitStringType                    |                   |
      |    without order
   on the NCName:

   (1) replace each "." (U+002E) and "_" (U+005F) character with a NamedBitList        | BIT-STRING        |
      +----------------------------------+-------------------+
      | BooleanType                      | BOOLEAN           |
      | EmbeddedPDVType                  | EMBEDDED-PDV      |
      | ExternalType                     | EXTERNAL          |
      +----------------------------------+-------------------+
      | IntegerType                      |                   |
      |    without "-"
       (U+002D) character,

   (2) remove every character except latin letters (U+0041-U+005A,
       U+0061-U+007A), decimal digits (U+0030-U+0039) and hyphens
       (U+002D),

   (3) remove leading and trailing hyphen characters,

   (4) replace sequences of two or more hyphen characters with a NamedNumberList     | INTEGER           |
      +----------------------------------+-------------------+
      | NullType                         | NULL              |
      | ObjectIdentifierType             | OBJECT-IDENTIFIER |
      | OctetStringType                  | OCTET-STRING      |
      | RealType                         | REAL              |
      | RelativeOIDType                  | RELATIVE-OID      |
      +----------------------------------+-------------------+
      | RestrictedCharacterStringType    |                   |
      |    BMPString                     | BMPString         |
      |    GeneralString                 | GeneralString     |
      |    GraphicString                 | GraphicString     |
      |    IA5String                     | IA5String         |
      |    ISO646String                  | ISO646String      |
      |    NumericString                 | NumericString     |
      |    PrintableString               | PrintableString   |
      |    TeletexString                 | TeletexString     |
      |    T61String                     | T61String         |
      |    UniversalString               | UniversalString   |
      |    UTF8String                    | UTF8String        |
      |    VideotexString                | VideotexString    |
      |    VisibleString                 | VisibleString     |
      +----------------------------------+-------------------+
      | UnrestrictedCharacterStringType  | CHARACTER-STRING  |
      +----------------------------------+-------------------+
      | UsefulType                       |                   |
      |    GeneralizedTime               | GeneralizedTime   |
      |    UTCTime                       | UTCTime           |
      |    ObjectDescriptor              | ObjectDescriptor  |
      +----------------------------------+-------------------+ single
       hyphen, and

   (5) convert the first character to lowercase if it is an uppercase
       letter.

      Aside: If the reduction of an NCName is not the same as the
      identifier that the NCName replaces, then the identifier will be
      explicitly given in the translation into ASN.X.

6.2.  DefinedType Translation

   If a Type is a DefinedType in a ReferencedType, then the translation
   of the Type is the translation of the DefinedType.

   If a DefinedType is not a ParameterizedType,
   ParameterizedValueSetType or DummyReference and is not subject to a
   TYPE-REF or REF-AS-TYPE encoding instruction, then the translation of
   the DefinedType is either the attribute form translation of a type
   reference, or the element form translation of a type reference.

   The attribute form translation of a type reference is an attribute
   item with the [local name] "type".  The [normalized value] of this
   attribute item is the qualified name referencing the type definition
   (see Section 5.1).  The attribute form translation SHALL NOT be used
   if the qualified name is shared by two or more type definitions in
   separate modules, i.e., is ambiguous.



Legg                      Expires 11 May 2006 20 April 2007                [Page 24] 26]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005       October 20, 2006


   The element form translation of a Type comprising one of the
   productions in Table 1 type reference is an element item
   with the [local name] "type".  An attribute item with the
   [local name] "ref" SHALL be added to the [attributes] of the <type>
   element item.  The [normalized value] of this attribute item is a the
   qualified name with referencing the namespace type definition.  If this reference
   name "http://xmled.info/ns/ASN.1" is not distinct with respect to the current module and the local part as
   indicated in Table 1.  An
   modules referenced by its <import> element items (see Section 5.1),
   then an attribute item with the [local name]
   "annotation" MAY "context" SHALL be added
   to the [children] [attributes] of the <type> element
   item.

   Example

      BOOLEAN

      <type ref="asn1:BOOLEAN"/>

   Usually item, otherwise if the translator is free to choose either
   module containing the attribute form or
   element form translation for referenced type definition has a Type, however in some contexts schema
   identity URI, then an attribute forms item with the [local name] "context"
   MAY be added to the [attributes] of Type are explicitly disallowed.

6.4.  BitStringType Translation the <type> element item.  The translation
   [normalized value] of this attribute item is the schema identity URI
   of the module containing the type definition referenced by the
   DefinedType.

      Aside: If a BitStringType with a NamedBitList reference name is an element
   item with not distinct, then the [local name] "type". module
      containing the referenced definition must have a schema identity
      URI (see Section 5.1).

   An element item with the [local name] "annotation" MAY be added to
   the [children] of the <type> element item.

   An element attribute item with the [local name]
   "namedBitList" SHALL "embedded" and
   [normalized value] "false" or "0" MAY be appended added to the [children] [attributes] of
   the <type> element item.

   The translation of each NamedBit in the NamedBitList
   SHALL be appended to DefinedType is the [children] of same whether the type
   definition is referenced by a typereference or an
   ExternalTypeReference.

   If a DefinedType is subject to a TYPE-REF encoding instruction, then
   the <namedBitList> element
   item.

   The translation of a NamedBit the DefinedType is an element item with the
   [local name] "namedBit". "type".  An attribute item with the [local name]
   "name" "ref"
   SHALL be added to the [attributes] of the <namedBit> <type> element item.  If the BitStringType is subject to a VALUES encoding
   instruction then the  The
   [normalized value] of this attribute item is the
   replacement name [RXEREI] for the identifier of the NamedBit,
   otherwise it is the identifier RXER character data
   translation of the NamedBit.  If QNameValue from the BitStringType
   is subject to a VALUES TYPE-REF encoding instruction and the reduction of instruction.
   If the
   replacement name (see Section 6.1) ContextParameter is not present in the same as RefParameters in the identifier
   TYPE-REF encoding instruction, then an attribute item with the
   [local name] "identifier" "context" SHALL be added to the [attributes] of the <namedBit> element item, otherwise
   an attribute item with the [local name] "identifier" MAY be added to
   the [attributes] of the <namedBit>
   <type> element item.  The [normalized value] of this attribute item
   is the identifier string value of the
   NamedBit. AnyURIValue in the ContextParameter.  An
   attribute item with the [local name] "bit" "embedded" and
   [normalized value] "true" or "1" SHALL be added to the [attributes]
   of the <namedBit> <type> element item.

      Aside: The
   [normalized value] of this embedded attribute item indicates whether a type is the digit string
      directly referenced as a DefinedType or indirectly referenced



Legg                      Expires 11 May 2006 20 April 2007                [Page 25] 27]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


   representation of       October 20, 2006


      through a TYPE-REF encoding instruction.  An ASN.1 type can be
      referenced either way.  Type definitions in other schema languages
      cannot be directly referenced.

   An element item with the integer value of [local name] "annotation" MAY be added to
   the number or DefinedValue [children] of the NamedBit.

   Examples

      BIT STRING { zero(0), one(1), two(2) }

      <type>
       <namedBitList>
        <namedBit name="zero" bit="0"/>
        <namedBit name="one" bit="1"/>
        <namedBit name="two" bit="2"/>
       </namedBitList>
      </type>

      [RXER:VALUES ALL CAPITALIZED wednesday AS "Midweek"]
          BIT STRING {
              monday(0), tuesday(1), wednesday(2),
              thursday(3), friday(4)
          } <type>
       <namedBitList>
        <namedBit name="Monday" bit="0"/>
        <namedBit name="Tuesday" bit="1"/>
        <namedBit name="Midweek" identifier="wednesday" bit="2"/>
        <namedBit name="Thursday" bit="3"/>
        <namedBit name="Friday" bit="4"/>
       </namedBitList>
      </type>

6.5.  IntegerType Translation

   The element item.

   If a DefinedType is subject to a REF-AS-TYPE encoding instruction,
   then the translation of an IntegerType with a NamedNumberList the DefinedType is an element item with the
   [local name] "type".  An element attribute item with the [local name] "annotation" MAY
   "elementType" SHALL be added to the [children] [attributes] of the <type>
   element item.  An element  The [normalized value] of this attribute item is the
   RXER character data translation of the NameValue from the REF-AS-TYPE
   encoding instruction.  If the Namespace is present in the REF-AS-TYPE
   encoding instruction, then an attribute item with the [local name]
   "namedNumberList"
   "namespace" SHALL be appended added to the [children] [attributes] of the <type> element
   item.  The translation [normalized value] of each NamedNumber this attribute item is the string
   value of the AnyURIValue in the
   NamedNumberList Namespace.  If the ContextParameter
   is present in the RefParameters in the REF-AS-TYPE encoding
   instruction, then an attribute item with the [local name] "context"
   SHALL be appended added to the [children] [attributes] of the
   <namedNumberList> <type> element item.  The translation
   [normalized value] of a NamedNumber is an element this attribute item with is the
   [local name] "namedNumber". string value of the
   AnyURIValue in the ContextParameter.  An attribute element item with the
   [local name]
   "name" SHALL "annotation" MAY be added to the [attributes] [children] of the <namedNumber>
   <type> element item.

   Example

      CHOICE {
          one    Foo,
          two    [RXER:TYPE-REF
                     { namespace-name "http://www.example.com/PO1",
                       local-name "PurchaseOrderType" }
                 ] Markup,
          three  [RXER:REF-AS-TYPE "product"
                     CONTEXT "http://www.example.com/inventory"
                 ] Markup
      }

      <type xmlns:po="http://www.example.com/PO1">
       <choice>
        <element name="one" type="tns:Foo"/>
        <element name="two" type="po:PurchaseOrderType"/>
        <element name="three">
         <type elementType="product"
               context="http://www.example.com/inventory"/>
        </element>
       </choice>



Legg                      Expires 20 April 2007                [Page 28]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


      </type>

   If a DefinedType is a DummyReference, ParameterizedType or
   ParameterizedValueSetType, then the translation of the Type is the
   translation of that DummyReference, ParameterizedType or
   ParameterizedValueSetType (see Section 5.9).

6.3.  Translation of Predefined Types

   If a Type is a BuiltinType or ReferencedType comprising one of the
   productions in Table 1, then the translation of the Type is either
   the attribute form or element form translation of that type.

   The attribute form translation of a Type comprising of one of the IntegerType
   productions in Table 1 is subject to a VALUES encoding
   instruction then an attribute item with the [local name]
   "type".  The [normalized value] of this attribute item is the
   replacement a qualified
   name [RXEREI] for with the identifier of namespace name "urn:ietf:params:xml:ns:asnx" and the NamedNumber,
   local part as indicated in Table 1.

   Table 1: Reference Names for Predefined Types

      +------------------------------------+-------------------+
      | ASN.1 Production                   | local part        |
      +====================================+===================+
      | BitStringType                      |                   |
      |    without a NamedBitList          | BIT-STRING        |
      +------------------------------------+-------------------+
      | BooleanType                        | BOOLEAN           |
      | EmbeddedPDVType                    | EMBEDDED-PDV      |
      | ExternalType                       | EXTERNAL          |
      +------------------------------------+-------------------+
      | IntegerType                        |                   |
      |    without a NamedNumberList       | INTEGER           |
      +------------------------------------+-------------------+
      | NullType                           | NULL              |
      | ObjectIdentifierType               | OBJECT-IDENTIFIER |
      | OctetStringType                    | OCTET-STRING      |
      | RealType                           | REAL              |
      | RelativeOIDType                    | RELATIVE-OID      |
      +------------------------------------+-------------------+
      | CharacterStringType                |                   |
      |    RestrictedCharacterStringType   |                   |
      |       BMPString                    | BMPString         |
      |       GeneralString                | GeneralString     |
      |       GraphicString                | GraphicString     |
      |       IA5String                    | IA5String         |
      |       ISO646String                 | ISO646String      |
      |       NumericString                | NumericString     |



Legg                      Expires 11 May 2006 20 April 2007                [Page 26] 29]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


   otherwise it is the identifier       October 20, 2006


      |       PrintableString              | PrintableString   |
      |       TeletexString                | TeletexString     |
      |       T61String                    | T61String         |
      |       UniversalString              | UniversalString   |
      |       UTF8String                   | UTF8String        |
      |       VideotexString               | VideotexString    |
      |       VisibleString                | VisibleString     |
      +------------------------------------+-------------------+
      |    UnrestrictedCharacterStringType | CHARACTER-STRING  |
      +------------------------------------+-------------------+
      | UsefulType                         |                   |
      |    GeneralizedTime                 | GeneralizedTime   |
      |    UTCTime                         | UTCTime           |
      |    ObjectDescriptor                | ObjectDescriptor  |
      +------------------------------------+-------------------+

   The element form translation of the NamedNumber.  If the
   IntegerType is subject to a VALUES encoding instruction and the
   reduction of the replacement name (see Section 6.1) is not the same
   as Type comprising one of the identifier then
   productions in Table 1 is an attribute element item with the [local name]
   "identifier" SHALL be added to the [attributes] of the <namedNumber>
   element item, otherwise an
   "type".  An attribute item with the [local name]
   "identifier" MAY "ref" SHALL be added
   to the [attributes] of the <namedNumber> <type> element item.  The
   [normalized value] of this attribute item is a qualified name with
   the
   identifier of namespace name "urn:ietf:params:xml:ns:asnx" and the NamedNumber. local part
   as indicated in Table 1.  An attribute element item with the [local name] "number" SHALL
   "annotation" MAY be added to the [attributes] [children] of the
   <namedNumber> <type> element
   item.  The [normalized value] of this attribute
   item is the digit string representation of

   Example

      BOOLEAN

      <type ref="asnx:BOOLEAN"/>

   Usually the integer value of translator is free to choose either the
   SignedNumber attribute form or DefinedValue of the NamedNumber.

   Examples

      INTEGER { nothing(0), a-little(1), a-lot(100) }

      <type>
       <namedNumberList>
        <namedNumber name="nothing" number="0"/>
        <namedNumber name="a-little" number="1"/>
        <namedNumber name="a-lot" number="100"/>
       </namedNumberList>
      </type>

      [RXER:VALUES ALL CAPITALIZED very-high AS "DANGEROUS"]
          INTEGER { low(25), medium(50), high(75), very-high(100) }

      <type>
       <namedNumberList>
        <namedNumber name="Low" number="25"/>
        <namedNumber name="Medium" number="50"/>
        <namedNumber name="High" number="75"/>
        <namedNumber name="DANGEROUS" identifier="very-high"
                     number="100"/>
       </namedNumberList>
      </type>

6.6.  EnumeratedType
   element form translation for a Type, however in some contexts
   attribute forms for a Type are explicitly disallowed.

6.4.  BitStringType Translation

   The translation of an EnumeratedType a BitStringType with a NamedBitList is an element
   item with the [local name] "type".  An element item with the
   [local name] "annotation" MAY be added to the [children] of the
   <type> element item.  An element item with the [local name] "enumerated"
   "namedBitList" SHALL be appended to the [children] of the <type>
   element item.  The
   translation of each EnumerationItem in the RootEnumeration SHALL be
   appended to the [children] of the <enumerated> element item.



Legg                       Expires 11 May 2006                 [Page 27]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


   If the ellipsis ("...") is present then an element item with the
   [local name] "extension" SHALL be appended to the [children] of the
   <enumerated> element item, and the translation of the ExceptionSpec
   (possibly empty) SHALL be added to the [children] of the <extension>
   element item.  If an AdditionalEnumeration is present then the item.  The translation of each EnumerationItem NamedBit in the AdditionalEnumeration NamedBitList
   SHALL be appended to the [children] of the <extension> <namedBitList> element
   item.

   The translation of an EnumerationItem a NamedBit is an element item with the



Legg                      Expires 20 April 2007                [Page 30]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   [local name] "enumeration".

   If the EnumerationItem is of the "identifier" form then an "namedBit".  An attribute item with the [local name]
   "name" SHALL be added to the [attributes] of the <enumeration> <namedBit> element
   item.  If the EnumeratedType BitStringType is subject to a VALUES encoding instruction
   instruction, then the [normalized value] of this attribute item is
   the replacement name [RXEREI] for the identifier, identifier of the NamedBit,
   otherwise it is the identifier. identifier of the NamedBit.  If the EnumeratedType BitStringType
   is subject to a VALUES encoding instruction and the reduction of the
   replacement name (see Section 6.1) is not the same as the identifier identifier,
   then an attribute item with the [local name] "identifier" SHALL be
   added to the [attributes] of the <enumeration> <namedBit> element item, otherwise
   an attribute item with the [local name] "identifier" MAY [local name] "identifier" MAY be added to
   the [attributes] of the <namedBit> element item.  The
   [normalized value] of this attribute item is the identifier of the
   NamedBit.  An attribute item with the [local name] "bit" SHALL be
   added to the [attributes] of the <namedBit> element item.  The
   [normalized value] of this attribute item is the digit string
   representation of the integer value of the number or DefinedValue of
   the NamedBit.

   Examples

      BIT STRING { zero(0), one(1), two(2) }

      <type>
       <namedBitList>
        <namedBit name="zero" bit="0"/>
        <namedBit name="one" bit="1"/>
        <namedBit name="two" bit="2"/>
       </namedBitList>
      </type>

      [RXER:VALUES ALL CAPITALIZED, wednesday AS "Midweek"]
          BIT STRING {
              monday(0), tuesday(1), wednesday(2),
              thursday(3), friday(4)
          }

      <type>
       <namedBitList>
        <namedBit name="Monday" bit="0"/>
        <namedBit name="Tuesday" bit="1"/>
        <namedBit name="Midweek" identifier="wednesday" bit="2"/>
        <namedBit name="Thursday" bit="3"/>
        <namedBit name="Friday" bit="4"/>
       </namedBitList>
      </type>

6.5.  IntegerType Translation



Legg                      Expires 20 April 2007                [Page 31]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   The translation of an IntegerType with a NamedNumberList is an
   element item with the [local name] "type".  An element item with the
   [local name] "annotation" MAY be added to the [children] of the
   <type> element item.  An element item with the [local name]
   "namedNumberList" SHALL be appended to the [children] of the <type>
   element item.  The translation of each NamedNumber in the
   NamedNumberList SHALL be added appended to the
   [attributes] [children] of the <enumeration>
   <namedNumberList> element item.

   The
   [normalized value] translation of this attribute item is the identifier.

   If the EnumerationItem a NamedNumber is of the "NamedNumber" form then an element item with the
   [local name] "namedNumber".  An attribute item with the [local name]
   "name" SHALL be added to the [attributes] of the <enumeration> <namedNumber>
   element item.  If the EnumeratedType IntegerType is subject to a VALUES encoding instruction
   instruction, then the [normalized value] of this attribute item is
   the replacement name [RXEREI] for the identifier of the NamedNumber,
   otherwise it is the identifier of the NamedNumber.  If the EnumeratedType
   IntegerType is subject to a VALUES encoding instruction and the
   reduction of the replacement name (see Section 6.1) is not the same
   as the
   identifier identifier, then an attribute item with the [local name]
   "identifier" SHALL be added to the [attributes] of the <enumeration> <namedNumber>
   element item, otherwise an attribute item with the [local name]
   "identifier" MAY be added to the [attributes] of the <enumeration> <namedNumber>
   element item.  The [normalized value] of this attribute item is the
   identifier of the NamedNumber.  An attribute item with the
   [local name] "number" SHALL be added to the [attributes] of the <enumeration>
   <namedNumber> element item.  The [normalized value] of this attribute
   item is the digit string representation of the integer value of the
   SignedNumber or DefinedValue of the NamedNumber.

   Example

      ENUMERATED

   Examples

      INTEGER { red(0), green(1), ..., blue(2) nothing(0), a-little(1), a-lot(100) }




Legg                       Expires 11 May 2006                 [Page 28]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005

      <type>
       <enumerated>
        <enumeration name="red"
       <namedNumberList>
        <namedNumber name="nothing" number="0"/>
        <enumeration name="green"
        <namedNumber name="a-little" number="1"/>
        <extension>
         <enumeration name="blue" number="2"/>
        </extension>
       </enumerated>
        <namedNumber name="a-lot" number="100"/>
       </namedNumberList>
      </type>

      [RXER:VALUES ALL CAPITALIZED red CAPITALIZED, very-high AS "Crimson"]
          ENUMERATED "DANGEROUS"]
          INTEGER { red, yellow, green, blue low(25), medium(50), high(75), very-high(100) }

      <type>
       <enumerated>
        <enumeration name="Crimson" identifier="red"/>
        <enumeration name="Yellow"/>
        <enumeration name="Green"/>
        <enumeration name="Blue"/>
       </enumerated>
       <namedNumberList>
        <namedNumber name="Low" number="25"/>
        <namedNumber name="Medium" number="50"/>



Legg                      Expires 20 April 2007                [Page 32]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


        <namedNumber name="High" number="75"/>
        <namedNumber name="DANGEROUS" identifier="very-high"
                     number="100"/>
       </namedNumberList>
      </type>

6.7.  PrefixedType

6.6.  EnumeratedType Translation

   The translation of a PrefixedType [X.680-1] that an EnumeratedType is a TaggedType an element item with the
   [local name] "type".  An element item with the [local name]
   "annotation" MAY be added to the [children] of the <type> element
   item.  An element item with the [local name] "enumerated" SHALL be
   appended to the [children] of the <type> element item.  The
   translation of each EnumerationItem in the RootEnumeration SHALL be
   appended to the [children] of the <enumerated> element item.

   If the ellipsis ("...") is present, then an element item with the
   [local name] "extension" SHALL be appended to the [children] of the
   <enumerated> element item, and the translation of the TaggedType.

   If a PrefixedType is an EncodingPrefixedType and the
   EncodingReference is RXER, or the EncodingReference is empty and ExceptionSpec
   (possibly empty) SHALL be added to the
   default encoding reference [X.680-1] for [children] of the module <extension>
   element item.  If an AdditionalEnumeration is RXER, present, then the
   translation of each EnumerationItem in the PrefixedType is AdditionalEnumeration
   SHALL be appended to the translation [children] of the Type in the
   EncodingPrefixedType.

      ASIDE: This is not suggesting that RXER encoding instructions are
      ignored.  Encoding instructions for RXER are not explicitly
      represented in ASN.X, but rather affect how <extension> element item.

   The translation of an ASN.1 specification EnumerationItem is translated into an ASN.X document (since element item with the content of an
      ASN.X document is also
   [local name] "enumeration".

   If the RXER encoding EnumerationItem is of the "identifier" form, then an abstract value of attribute
   item with the ModuleDefinition ASN.1 type in Appendix A).  The individual
      effects [local name] "name" SHALL be added to the [attributes]
   of RXER the <enumeration> element item.  If the EnumeratedType is subject
   to a VALUES encoding instructions on instruction, then the translation are
      addressed in other parts [normalized value] of this specification.

      Encoding instructions for other encoding rules have explicit
      representations in ASN.X.

   If a PrefixedType
   attribute item is an EncodingPrefixedType and the
   EncodingReference replacement name [RXEREI] for the identifier,
   otherwise it is not RXER, or the EncodingReference identifier.  If the EnumeratedType is empty subject to
   a VALUES encoding instruction and the default encoding reference for reduction of the module replacement
   name (see Section 6.1) is not RXER, then the



Legg                       Expires 11 May 2006                 [Page 29]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


   translation of same as the PrefixedType is identifier, then an element
   attribute item with the
   [local name] "prefixed".  The translation of the EncodingPrefix in with the EncodingPrefixedType [local name] "identifier" SHALL be added to
   the [children] [attributes] of the
   <prefixed> <enumeration> element item.

   If the EncodingReference of an EncodingPrefix is not empty then the
   translation of the EncodingPrefix is item, otherwise an element
   attribute item with the
   encodingreference of the EncodingReference as the [local name].  The
   translation of the EncodingInstruction in the EncodingPrefix SHALL name] "identifier" MAY be added to the [children]
   [attributes] of this the <enumeration> element item.

   If the EncodingReference  The
   [normalized value] of an EncodingPrefix this attribute item is empty then the
   translation of identifier.

   If the EncodingPrefix EnumerationItem is of the "NamedNumber" form, then an element
   attribute item with the default
   encoding reference for the module as the [local name].  The
   translation of the EncodingInstruction in the EncodingPrefix name] "name" SHALL be added to the [children]
   [attributes] of this the <enumeration> element item.

   The EncodingInstruction notation is different for each set of
   encoding instructions, and their translations into ASN.X are
   specified in separate documents [GSEREIT][XEREIT].  At  If the time of
   writing, only three sets of
   EnumeratedType is subject to a VALUES encoding instructions have been defined
   (for RXER [RXEREI], GSER [GSEREI] and EXTENDED-XER [X.693-1]).

   If instruction, then the child <type> element item
   [normalized value] of a <prefixed> element item has no this attribute items and has a child <prefixed> element item then that
   child <type> element item MAY be replaced by is the content (both
   attribute items and child element items) of replacement name
   [RXEREI] for the inner <prefixed>
   element item.

   If two consecutive child element items identifier of a <prefixed> element item
   have the same [local name] (which will be an encodingreference) then the second child element item MAY be removed and have its [children]
   appended to NamedNumber, otherwise it is the [children]
   identifier of the first child element item.

   These two rewriting steps MAY be applied NamedNumber.  If the EnumeratedType is subject to the result of a previous
   rewriting step if the necessary conditions still hold.

   Example

      These three definitions are equivalent.

      [XER:ATTRIBUTE] [XER:USE-UNION] [GSER:CHOICE-OF-STRINGS]
          MyChoiceType

      <type>
       <prefixed>
        <XER><attribute/></XER>
        <type>



Legg                      Expires 11 May 2006 20 April 2007                [Page 30] 33]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


         <prefixed>
          <XER><useUnion/></XER>
          <type>
           <prefixed type="tns:MyChoiceType">
            <GSER><choiceOfStrings/></GSER>
           </prefixed>
          </type>
         </prefixed>
        </type>
       </prefixed>
      </type>

      <type>
       <prefixed type="tns:MyChoiceType">
        <XER><attribute/><useUnion/></XER>
        <GSER><choiceOfStrings/></GSER>
       </prefixed>
      </type>

6.7.1.  TaggedType Translation

   The translation       October 20, 2006


   VALUES encoding instruction and the reduction of a TaggedType the replacement name
   is not the same as the identifier, then an element attribute item with the
   [local name] "type".  An "identifier" SHALL be added to the [attributes] of the
   <enumeration> element item, otherwise an attribute item with the
   [local name]
   "annotation" "identifier" MAY be added to the [children] [attributes] of the <type>
   <enumeration> element item.  The [normalized value] of this attribute
   item is the identifier of the NamedNumber.  An element attribute item with
   the [local name] "tagged" "number" SHALL be
   appended added to the [children] [attributes] of the
   <enumeration> element item.  The [normalized value] of this attribute
   item is the digit string representation of the integer value of the
   SignedNumber or DefinedValue of the NamedNumber.

   Example

      ENUMERATED { red(0), green(1), ..., blue(2) }

      <type>
       <enumerated>
        <enumeration name="red" number="0"/>
        <enumeration name="green" number="1"/>
        <extension>
         <enumeration name="blue" number="2"/>
        </extension>
       </enumerated>
      </type>

      [RXER:VALUES ALL CAPITALIZED, red AS "Crimson"]
          ENUMERATED { red, yellow, green, blue }

      <type>
       <enumerated>
        <enumeration name="Crimson" identifier="red"/>
        <enumeration name="Yellow"/>
        <enumeration name="Green"/>
        <enumeration name="Blue"/>
       </enumerated>
      </type>

6.7.  PrefixedType Translation

   The translation of a PrefixedType [X.680-1] that is a TaggedType is
   either the short form translation (Section 6.7.1) or long form
   translation (Section 6.7.2) of the TaggedType.

      Aside: The short form translation is provided because TaggedType
      notation is heavily used in existing ASN.1 specifications.  The
      long form translation has the same structure as the translation of
      an EncodingPrefixedType and can be simplified where there is a



Legg                      Expires 20 April 2007                [Page 34]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


      series of the <type> element item. nested PrefixedType instances.

   If a PrefixedType is an EncodingPrefixedType and the Class
   of
   EncodingReference is RXER, or the Tag EncodingReference is not empty then an attribute item with and the [local name]
   "tagClass" SHALL be added to
   default encoding reference [X.680-1] for the [attributes] of module is RXER, then the <tagged> element
   item.  The [normalized value]
   translation of this attribute item the PrefixedType is the Class translation of the Tag, with all letters downcased, i.e., either "universal",
   "application" or "private".

   If Type in the TaggedType
   EncodingPrefixedType.

      Aside: This is of the "Tag IMPLICIT Type" form then not suggesting that RXER encoding instructions are
      ignored.  Encoding instructions for RXER are not explicitly
      represented in ASN.X, but rather affect how an
   attribute item with the [local name] "tagging" and [normalized value]
   "implicit" SHALL be added to ASN.1 specification
      is translated into an ASN.X document (since the [attributes] content of the <tagged> element
   item.

   If the TaggedType an
      ASN.X document is of also the "Tag EXPLICIT Type" form then RXER encoding of an
   attribute item with the [local name] "tagging" and [normalized value]
   "explicit" SHALL be added to abstract value of
      the [attributes] ModuleDefinition ASN.1 type in Appendix A).  The individual
      effects of RXER encoding instructions on the <tagged> element
   item. translation are
      addressed in other parts of this specification.  Encoding
      instructions for other encoding rules have explicit
      representations in ASN.X.

   If a PrefixedType is an EncodingPrefixedType and the TaggedType
   EncodingReference is of not RXER, or the "Tag Type" form EncodingReference is empty and
   the Type in default encoding reference for the
   TaggedType module is a DummyReference not RXER, then the
   translation of the PrefixedType is an attribute element item with the
   [local name] "tagging" and [normalized value] "explicit" "prefixed".  The translation of the EncodingPrefix in
   the EncodingPrefixedType SHALL be added to the [attributes] [children] of the <tagged>
   <prefixed> element item.

   If the EncodingReference of an EncodingPrefix is not empty, then the
   translation of the EncodingPrefix is an element item with the
   encodingreference of the EncodingReference as the [local name].  The
   translation of the Type EncodingInstruction in the TaggedType EncodingPrefix SHALL be
   added to the



Legg                       Expires 11 May 2006                 [Page 31]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


   content [children] of the <tagged> this element item.

   Examples

      [0] INTEGER

      <type>
       <tagged number="0" type="asn1:INTEGER"/>
      </type>

      [APPLICATION 10] IMPLICIT BOOLEAN

      <type>
       <tagged tagClass="application" number="10" tagging="implicit"
               type="asn1:BOOLEAN"/>
      </type>

6.7.2.  Insertion Encoding Instructions

   If a Type the EncodingReference of an EncodingPrefix is subject to a NO-INSERTIONS, HOLLOW-INSERTIONS,
   SINGULAR-INSERTIONS, UNIFORM-INSERTIONS or MULTIFORM-INSERTIONS
   encoding instruction empty, then an attribute form the
   translation of the Type
   SHALL NOT be used, and EncodingPrefix is an attribute element item with the default
   encoding reference for the module as the [local name]
   "insertions" name].  The
   translation of the EncodingInstruction in the EncodingPrefix SHALL be
   added to the [attributes] [children] of the <type> this element
   item resulting from the translation of the Type. item.

   The
   [normalized value] of this attribute item EncodingInstruction notation is "none" in the case different for each set of a
   NO-INSERTIONS
   encoding instruction, "hollow" instructions, and their translations into ASN.X are
   specified in separate documents [GSEREIT][XEREIT].  At the case time of
   writing, only three sets of a
   HOLLOW-INSERTIONS encoding instruction, "singular" in instructions have been defined
   (for RXER [RXEREI], GSER [GSEREI] and EXTENDED-XER [X.693-1]).

   If the case child <type> element item of a
   SINGULAR-INSERTIONS encoding instruction, "uniform" in <prefixed> element item has no
   attribute items and has a child <prefixed> element item, then that
   child <type> element item MAY be replaced by the case [children] and



Legg                      Expires 20 April 2007                [Page 35]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   [attributes] of the inner <prefixed> element item.  Note that the
   long form translation of a
   UNIFORM-INSERTIONS encoding instruction, and "multiform" in TaggedType is also eligible for this
   rewriting step.  This rewriting step MAY be applied to the case result of
   a MULTIFORM-INSERTIONS encoding instruction. previous rewriting step if the necessary condition still holds.

   Example

      [NO-INSERTIONS]

      These three definitions are equivalent.

      [XER:ATTRIBUTE] [XER:USE-UNION] [GSER:CHOICE-OF-STRINGS] CHOICE {
          one  [RXER:GROUP] [RXER:SINGULAR-INSERTIONS] MyChoiceType,
          ...  PrintableString,
          two  UTF8String
      }

      <type insertions="none">

      <type>
       <prefixed>
        <XER><attribute/></XER>
        <type>
         <prefixed>
          <XER><useUnion/></XER>
          <type>
           <prefixed>
            <GSER><choiceOfStrings/></GSER>
            <type>
             <choice>
        <group name="one">
         <type ref="tns:MyChoiceType" insertions="singular"/>
        </group>
        <extension/>
              <element name="one" type="asnx:PrintableString"/>
              <element name="two" type="asnx:UTF8String"/>
             </choice>
            </type>
           </prefixed>
          </type>
         </prefixed>
        </type>
       </prefixed>
      </type>

      <type>
       <prefixed>
        <XER><attribute/></XER>
        <XER><useUnion/></XER>
        <GSER><choiceOfStrings/></GSER>
        <choice>
         <element name="one" type="asnx:PrintableString"/>
         <element name="two" type="asnx:UTF8String"/>
        </choice>
       </prefixed>
      </type>




Legg                      Expires 11 May 2006 20 April 2007                [Page 32] 36]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


6.8.  SelectionType       October 20, 2006


6.7.1.  Short Form TaggedType Translation

   The short form translation of a SelectionType TaggedType is an element item with
   the [local name] "type".  An element item with the [local name]
   "annotation" MAY be added to the [children] of the <type> element
   item.  An element item with the [local name] "selection" "tagged" SHALL be
   appended to the [children] of the <type> element item.

   The identifier in a SelectionType identifies a NamedType in

   If the
   definition Class of the Type Tag in the SelectionType.  The translation of that
   NamedType will be TaggedType is not empty, then an element
   attribute item with the [local name] "tagClass" SHALL be added to the
   [attributes] of the <tagged> element item.  The [normalized value] of
   this attribute item is the Class of the Tag, with all letters
   downcased, i.e., either
   "attribute", "element", "group" "universal", "application" or "member".  An "private".

   If the Tag is immediately followed by the "IMPLICIT" keyword, then an
   attribute item with the same [local name] as the translation of the NamedType "tagging" and [normalized value]
   "implicit" SHALL be added to the [attributes] of the <selection> <tagged> element
   item.  The

   If the Tag is immediately followed by the "EXPLICIT" keyword, then an
   attribute item with the [local name] "tagging" and [normalized value]
   "explicit" SHALL be added to the [attributes] of this the <tagged> element
   item.

   If the Tag is not immediately followed by either the "IMPLICIT" or
   "EXPLICIT" keyword and the Type in the TaggedType is a
   DummyReference, then an attribute item is with the RXER character data
   translation of [local name]
   "tagging" and [normalized value] "explicit" SHALL be added to the effective name [RXEREI]
   [attributes] of the NamedType. <tagged> element item.

   The translation of the Type in the SelectionType TaggedType SHALL be added to the content
   [children] or [attributes] of the <selection> <tagged> element item.

   Example

      field1 < MyChoiceType

      <type>
       <selection element="field1" type="tns:MyChoiceType"/>
      </type>

      field2 < CHOICE {
          field2  [RXER:ATTRIBUTE][RXER:NAME AS "field-two"]

   Examples

      [0] INTEGER
      }

      <type>
       <selection attribute="field-two">

      <type>
         <choice>
          <attribute name="field-two" identifier="field2"
                     type="asn1:INTEGER"/>
         </choice>
       <tagged number="0" type="asnx:INTEGER"/>
      </type>
       </selection>

      [APPLICATION 10] IMPLICIT BOOLEAN

      <type>
       <tagged tagClass="application" number="10" tagging="implicit"
               type="asnx:BOOLEAN"/>
      </type>

6.9.  InstanceOfType




Legg                      Expires 20 April 2007                [Page 37]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


6.7.2.  Long Form TaggedType Translation

   The long form translation of an InstanceOfType a TaggedType is an element item with the
   [local name] "type".  An element item with the [local name]
   "annotation" MAY be added to the [children] of the <type> element



Legg                       Expires 11 May 2006                 [Page 33]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
   item.  An element item with the [local name] "instanceOf" "prefixed" SHALL be
   appended to the [children] of the <type> element item.  The content
   of the <instanceOf> element item is the
   translation of the
   DefinedObjectClass Tag in the InstanceOfType.

   Example

      INSTANCE OF TYPE-IDENTIFIER

      <type>
       <instanceOf class="asn1:TYPE-IDENTIFIER"/>
      </type>

6.10.  ObjectClassFieldType Translation TaggedType SHALL be added to the
   [children] of the <prefixed> element item.

   The translation of an ObjectClassFieldType a Tag is an element item with the [local name] "type".  An element item with the [local name]
   "annotation" MAY be added to
   "TAG".

   If the [children] Class of the <type> element
   item.  An element Tag is not empty, then an attribute item with the
   [local name] "fromClass" "tagClass" SHALL be
   appended added to the [children] [attributes] of the <type>
   <TAG> element item.  The content [normalized value] of the <fromClass> element this attribute item is
   the translation Class of the
   DefinedObjectClass in Tag, with all letters downcased, i.e., either
   "universal", "application" or "private".

   If the ObjectClassFieldType Tag is immediately followed by the
   translation of the FieldName (see Section 9.2.6).

   Example

      OPERATION.&Linked.&ArgumentType

      <type>
       <fromClass class="tns:OPERATION"
                  fieldName="Linked/ArgumentType"/>
      </type>

6.11.  TypeFromObject and ValueSetFromObjects Translation

   The translation of a TypeFromObject or ValueSetFromObjects is "IMPLICIT" keyword, then an
   element item with the [local name] "type".  An element
   attribute item with the [local name] "annotation" MAY "tagging" and [normalized value]
   "implicit" SHALL be added to the [children] [attributes] of the
   <type> <TAG> element
   item.  An element

   If the Tag is immediately followed by the "EXPLICIT" keyword, then an
   attribute item with the [local name]
   "fromObjects" "tagging" and [normalized value]
   "explicit" SHALL be appended added to the [children] [attributes] of the <type> <TAG> element
   item.

   The translation of

   If the ReferencedObjects in Tag is not immediately followed by either the TypeFromObject "IMPLICIT" or
   ValueSetFromObjects
   "EXPLICIT" keyword and the Type in the TaggedType is a
   DummyReference, then an attribute item with the [local name]
   "tagging" and [normalized value] "explicit" SHALL be added to the content
   [attributes] of the
   <fromObjects> <TAG> element item.

   The translation of the FieldName Type in the TypeFromObject or
   ValueSetFromObjects TaggedType SHALL be appended added to the content
   [children] or [attributes] of the <prefixed> element item.

   Examples

      [0] INTEGER

      <type>
       <prefixed type="asnx:INTEGER">
        <TAG number="0"/>
       </prefixed>
      </type>




Legg                      Expires 11 May 2006 20 April 2007                [Page 34] 38]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


   <fromObjects> element item.

   Example

      invertMatrix.&Errors.&errorCode       October 20, 2006


      [APPLICATION 10] IMPLICIT BOOLEAN

      <type>
       <fromObjects object="tns:invertMatrix"
                    fieldName="Errors/errorCode"/>
       <prefixed type="asnx:BOOLEAN">
        <TAG tagClass="application" number="10" tagging="implicit"/>
       </prefixed>
      </type>

6.12.

6.8.  SelectionType Translation of Combining Types

   This section details the translation of the ASN.1 combining types:
   SET, SEQUENCE, CHOICE, SET OF and SEQUENCE OF.

   The combining type
   definitions all make use of the NamedType notation.

6.12.1.  NamedType Translation

   A NamedType is translated in one of three ways depending on the
   context.  These are the normal translation, the member translation
   and the item translation.  These translations are not
   interchangeable.  One of the three will be explicitly invoked as part
   of the translation of an enclosing combining type.

   If a NamedType is subject to an ATTRIBUTE or ATTRIBUTE-REF encoding
   instruction then the normal translation of the NamedType SelectionType is an element item with the
   [local name] "attribute", otherwise if the
   NamedType is subject to a GROUP encoding instruction then the normal
   translation of the NamedType is an "type".  An element item with the [local name]
   "group", otherwise
   "annotation" MAY be added to the normal translation [children] of the NamedType is an <type> element
   item.  An element item with the [local name] "element".

   The member translation "selection" SHALL be
   appended to the [children] of the <type> element item.

   The identifier in a SelectionType identifies a NamedType is an element item with in the
   [local name] "member".
   definition of the Type in the SelectionType.  The item translation of a that
   NamedType is will be an element item with the [local name] "item". either
   "attribute", "element", "group" or "member".  An element attribute item with
   the same [local name] "annotation" MAY as the translation of the NamedType SHALL be
   added to the [children] [attributes] of the <attribute>, <group>, <element>, <member> or
   <item> <selection> element item.

      ASIDE: A Namedtype for which the member or  The
   [normalized value] of this attribute item translation is
      invoked will never the RXER character data
   translation of the effective name of the NamedType.

   The translation of the Type in the SelectionType SHALL be subject added to an ATTRIBUTE, ATTRIBUTE-REF,
      GROUP
   the [children] or TYPE-AS-VERSION encoding instruction.  These encoding
      instructions are also mutually exclusive [RXEREI]. [attributes] of the <selection> element item.

   Example

      field1 < MyChoiceType

      <type>
       <selection element="field1" type="tns:MyChoiceType"/>
      </type>

      field2 < CHOICE {
          field2  [RXER:ATTRIBUTE][RXER:NAME AS "field-two"] INTEGER
      }

      <type>
       <selection attribute="field-two">
        <type>
         <choice>
          <attribute name="field-two" identifier="field2"
                     type="asnx:INTEGER"/>
         </choice>
        </type>



Legg                      Expires 11 May 2006 20 April 2007                [Page 35] 39]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


   If a NamedType is subject to a TYPE-AS-VERSION encoding instruction
   then       October 20, 2006


       </selection>
      </type>

6.9.  InstanceOfType Translation

   The translation of an attribute item with the [local name] "typeAsVersion" and
   [normalized value] "true" or "1" SHALL be added to the <element>
   element item.  For the normal translation, if a NamedType InstanceOfType is not
   subject to an ATTRIBUTE, ATTRIBUTE-REF, GROUP or TYPE-AS-VERSION
   encoding instruction then an attribute item with the [local name]
   "typeAsVersion" and [normalized value] "false" or "0" MAY be added to
   the <element> element item.

   For the normal, member and item translations, if a NamedType is not
   subject to an ATTRIBUTE-REF, ELEMENT-REF or REF-AS-ELEMENT encoding
   instruction then an attribute with the
   [local name] "type".  An element item with the [local name] "name" SHALL
   "annotation" MAY be added to the [attributes] [children] of the <attribute>, <group>, <element>,
   <member> or <item> <type> element
   item.  The [normalized value] of this
   attribute  An element item is the value of the local-name component of the
   effective name [RXEREI] of with the NamedType.

      ASIDE: If there are no NAME, ATTRIBUTE-REF, ELEMENT-REF or
      REF-AS-ELEMENT encoding instructions then [local name] "instanceOf" SHALL be
   appended to the value [children] of the
      local-name component <type> element item.  The
   translation of the effective name of a NamedType is its
      identifier.

   If DefinedObjectClass in the reduction of InstanceOfType SHALL be
   added to the local-name component (an NCName) [children] or [attributes] of the
   effective name <instanceOf> element
   item.

   Example

      INSTANCE OF TYPE-IDENTIFIER

      <type>
       <instanceOf class="asnx:TYPE-IDENTIFIER"/>
      </type>

6.10.  ObjectClassFieldType Translation

   The translation of the NamedType an ObjectClassFieldType is not the same as the identifier of
   the NamedType then an attribute element item with
   the [local name]
   "identifier" SHALL "type".  An element item with the [local name]
   "annotation" MAY be added to the [attributes] [children] of the <attribute>,
   <group>, <element>, <member> or <item> <type> element
   item.  otherwise an
   attribute  An element item with the [local name] "identifier" MAY "fromClass" SHALL be added
   appended to the
   [attributes] [children] of the <attribute>, <group>, <element>, <member> or
   <item> <type> element item.  The [normalized value]
   translation of this attribute item
   is the identifier DefinedObjectClass in the ObjectClassFieldType and
   the translation of the NamedType.

   If a NamedType is subject to an ATTRIBUTE-REF or ELEMENT-REF encoding
   instruction then an attribute item with FieldName (see Section 9.2.6) in the [local name] "ref"
   ObjectClassFieldType SHALL be added to the [children] and/or
   [attributes] of the <attribute> or <element> <fromClass> element item.

   Example

      OPERATION.&Linked.&ArgumentType

      <type>
       <fromClass class="tns:OPERATION"
                  fieldName="Linked/ArgumentType"/>
      </type>

6.11.  TypeFromObject and ValueSetFromObjects Translation

   The [normalized value] of this attribute item is the RXER
   character data translation of a TypeFromObject or ValueSetFromObjects is an
   element item with the QNameValue from the encoding
   instruction. [local name] "type".  An attribute element item with the
   [local name] "embedded" and
   [normalized value] "true" or "1" "annotation" MAY be added to the [attributes] [children] of the <attribute> or <element>



Legg                      Expires 20 April 2007                [Page 40]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   <type> element item.

   If a NamedType is subject to a REF-AS-ELEMENT encoding instruction
   then an attribute  An element item with the [local name] "elementType"
   "fromObjects" SHALL be
   added appended to the [attributes] [children] of the <element> <type>
   element item.

   The
   [normalized value] of this attribute item is the RXER character data translation of the NameValue from ReferencedObjects in the REF-AS-ELEMENT encoding
   instruction.




Legg                       Expires 11 May 2006                 [Page 36]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


   If TypeFromObject or
   ValueSetFromObjects SHALL be added to the ContextParameter is present in [children] or [attributes]
   of the RefParameters <fromObjects> element item.

   The translation of the FieldName in the
   ATTRIBUTE-REF, ELEMENT-REF TypeFromObject or REF-AS-ELEMENT encoding instruction
   then an attribute item with the [local name] "context"
   ValueSetFromObjects SHALL be added to the [children] or [attributes]
   of the <attribute> or <element> <fromObjects> element item.

   Example

      invertMatrix.&Errors.&errorCode

      <type>
       <fromObjects object="tns:invertMatrix"
                    fieldName="Errors/errorCode"/>
      </type>

6.12.  Translation of Combining Types

   This section details the translation of the ASN.1 combining types:
   SET, SEQUENCE, CHOICE, SET OF and SEQUENCE OF.  The [normalized value] combining type
   definitions all make use of this attribute item the NamedType notation.

6.12.1.  NamedType Translation

   A NamedType is translated in one of three ways depending on the string value
   context.  These are the normal translation, the member translation
   and the item translation.  These translations are not
   interchangeable.  One of the AnyURIValue in three will be explicitly invoked as part
   of the ContextParameter. translation of an enclosing combining type.

   If a NamedType is subject to an ATTRIBUTE or ATTRIBUTE-REF encoding
   instruction and
   the VersionIndicator is present in the encoding instruction then an
   attribute item with the [local name] "versionIndicator" and
   [normalized value] "true" or "1" SHALL be added to the <attribute>
   element item.  If or subject to a COMPONENT-REF encoding instruction that
   references a top-level NamedType that is subject to an ATTRIBUTE
   encoding
   instruction and instruction, then the VersionIndicator is not present in normal translation of the encoding
   instruction then NamedType is
   an attribute element item with the [local name]
   "versionIndicator" and [normalized value] "false" or "0" MAY be added
   to "attribute", otherwise if the <attribute> element item.

   If a
   NamedType is not subject to an ATTRIBUTE-REF, ELEMENT-REF or
   REF-AS-ELEMENT a GROUP encoding instruction instruction, then the normal
   translation of the Type
   in the NamedType SHALL be added to the content of the <attribute>,
   <group>, <element>, <member> or <item> element item.  If the
   enclosing combining type is a SEQUENCE, SET or CHOICE type and an element item with the
   Type in [local name]
   "group", otherwise if the NamedType is subject to a DummyReference and the TagDefault for the
   module containing the NamedType is "AUTOMATIC TAGS" SIMPLE-CONTENT
   encoding instruction, then an attribute
   form the normal translation of the Type in the NamedType SHALL NOT be used, and is
   an attribute element item with the [local name] "explicit" and
   [normalized value] "true" or "1" SHALL be added to the [attributes]
   of the <type> element item resulting from "simpleContent", otherwise the
   normal translation of the Type
   in the NamedType.  Where the automatic tagging transformation applies
   [X.680], this attribute item indicates that explicit tagging applies
   to the Type in the NamedType instead of is an element item with the usual implicit tagging.

   Example

      CHOICE {
          one    INTEGER,
          two    [RXER:ATTRIBUTE] BOOLEAN,
          three  [RXER:ATTRIBUTE-REF
                     { namespace-name "http://www.example.com/schema",
                       local-name "foo" }]
                 AnyType,
          bar    [RXER:ELEMENT-REF
                     { namespace-name "http://www.example.com/schema",
                       local-name "bar" }]
                 AnyType,
          five   [RXER:REF-AS-ELEMENT "product"
                     CONTEXT "http://www.example.com/inventory"]
                 AnyType,



Legg                       Expires 11 May 2006                 [Page 37]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


          six    [RXER:GROUP] MySequence
      }

      <type>
       <choice xmlns:ex="http://www.example.com/schema">
        <element name="one" type="asn1:INTEGER"/>
        <attribute name="two" type="asn1:BOOLEAN"/>
        <attribute ref="ex:foo" identifier="three"/>
        <element ref="ex:bar"/>
        <element elementType="product"
                 context="http://www.example.com/inventory"
                 identifier="five"/>
        <group name="six" type="tns:MySequence"/>
       </choice>
      </type>

6.12.2.  SequenceType Translation
   [local name] "element" or "component" (translator's choice).




Legg                      Expires 20 April 2007                [Page 41]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


      Aside: The local names "element" and "component" are synonymous.
      The "component" alternative is offered for specifying applications
      that don't use RXER (except for the ASN.X specification itself, of
      course), where referring to parts of an encoding as elements would
      seem incongruous.

   The member translation of a SequenceType NamedType is an element item with the
   [local name] "type".  An "member".

   The item translation of a NamedType is an element item with the
   [local name]
   "annotation" MAY be added to the [children] of the <type> element
   item. "item".

   An element item with the [local name] "sequence" SHALL "annotation" MAY be
   appended added to
   the [children] of the <type> <attribute>, <group>, <element>, <component>,
   <member> or <item> element item.  The
   translation of each ComponentType in the ComponentTypeList of

      Aside: A Namedtype for which the
   initial RootComponentTypeList, if present, SHALL member or item translation is
      invoked will never be appended subject to the
   [children] of the <sequence> element item. an ATTRIBUTE, ATTRIBUTE-REF,
      COMPONENT-REF, GROUP or SIMPLE-CONTENT encoding instruction.
      These encoding instructions are also mutually exclusive [RXEREI].

   If the ExtensionAndException a NamedType is present subject to a TYPE-AS-VERSION encoding instruction,
   then an element attribute item with the [local name] "extension" SHALL be appended to the [children] of the
   <sequence> element item, "typeAsVersion" and the translation of the ExceptionSpec
   (possibly empty)
   [normalized value] "true" or "1" SHALL be added to the [children] of the <extension>
   element item.

   The translation of each ExtensionAdditionGroup <element> or ComponentType
   nested in the ExtensionAdditions (if any) SHALL be appended to the
   [children] of the <extension>
   <component> element item.

   If  For the ExtensionEndMarker normal translation, if a NamedType
   is present then the translation of each
   ComponentType in the final RootComponentTypeList SHALL be appended not subject to
   the [children] of the <sequence> element item.

   The translation of an ExtensionAdditionGroup is ATTRIBUTE, ATTRIBUTE-REF, COMPONENT-REF GROUP,
   SIMPLE-CONTENT or TYPE-AS-VERSION encoding instruction, then an element
   attribute item with the [local name] "extensionGroup".  If "typeAsVersion" and
   [normalized value] "false" or "0" MAY be added to the <element> or
   <component> element item.

   For the VersionNumber normal, member and item translations, if a NamedType is present not
   subject to an ATTRIBUTE-REF, COMPONENT-REF, ELEMENT-REF or
   REF-AS-ELEMENT encoding instruction, then an attribute item with the
   [local name] "version" "name" SHALL be added to the [attributes] of the <extensionGroup>
   <attribute>, <group>, <element>, <component>, <member> or <item>
   element item.  The [normalized value] of this attribute item is the number
   value of the
   VersionNumber.  The translation local-name component of each ComponentType in the
   ExtensionAdditionGroup SHALL be appended to effective name [RXEREI] of
   the [children] NamedType.

      Aside: If there are no NAME, ATTRIBUTE-REF, COMPONENT_REF,
      ELEMENT-REF or REF-AS-ELEMENT encoding instructions, then the
      value of the local-name component of the effective name of a
      NamedType is its identifier.

   If the reduction of the local-name component (an NCName) of the
   effective name of the NamedType is not the same as the identifier of
   the NamedType, then an attribute item with the [local name]



Legg                      Expires 11 May 2006 20 April 2007                [Page 38] 42]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


   <extensionGroup>       October 20, 2006


   "identifier" SHALL be added to the [attributes] of the <attribute>,
   <group>, <element>, <component>, <member> or <item> element item.

   The translation of a ComponentType of
   otherwise an attribute item with the "NamedType" form is [local name] "identifier" MAY be
   added to the
   normal translation [attributes] of the NamedType. aforementioned element item.  The translation
   [normalized value] of a ComponentType this attribute item is the identifier of the "NamedType OPTIONAL" form
   NamedType.

   If a NamedType is subject to a COMPONENT-REF encoding instruction,
   then an element attribute item with the [local name] "optional".  The normal
   translation of the NamedType "ref" SHALL be added to
   the [children] [attributes] of the
   <optional> <attribute>, <element> or <component> element
   item.  The [normalized value] of this attribute item is the RXER
   character data translation of a ComponentType the effective name of the "NamedType DEFAULT Value"
   form top-level
   NamedType referenced by the encoding instruction.  If the effective
   name is not distinct with respect to the current module and the
   modules referenced by its <import> element items (see Section 5.1),
   then an element attribute item with the [local name] "optional".  The normal
   translation of the NamedType "context" SHALL be added
   to the [children] [attributes] of the
   <optional> element item.  An <attribute>, <element> or <component>
   element item, otherwise if the module containing the referenced
   top-level NamedType has a schema identity URI, then an attribute item
   with the [local name]
   "default" SHALL "context" MAY be appended added to the [children] [attributes] of
   the <optional> <attribute>, <element> or <component> element item.  The content
   [normalized value] of the <default> element this attribute item is the
   translation schema identity URI
   of the Value.

   The translation of a ComponentType of module containing the "COMPONENTS OF Type" form referenced top-level NamedType.

      Aside: If an effective name is not distinct, then the module
      containing the referenced top-level NamedType must have a schema
      identity URI (see Section 5.1).

   If a NamedType is subject to a COMPONENT-REF encoding instruction,
   then an element attribute item with the [local name] "componentsOf".  The
   translation "embedded" and
   [normalized value] "false" or "0" MAY be added to the [attributes] of
   the Type <attribute>, <element> or <component> element item.

   If a NamedType is subject to an ATTRIBUTE-REF or ELEMENT-REF encoding
   instruction, then an attribute item with the [local name] "ref" SHALL
   be added to the content [attributes] of the
   <componentsOf> <attribute>, <element> or
   <component> element item.

   Example

      SEQUENCE {
          one    INTEGER,
          two    [RXER:ATTRIBUTE] BOOLEAN OPTIONAL,
          ...,
          [[ 2:
              four   NULL
          ]],
          COMPONENTS OF MySequence,
          ...,
          three   PrintableString DEFAULT "third"
      }

      <type>
       <sequence>
        <element name="one" type="asn1:INTEGER"/>
        <optional>
         <attribute name="two" type="asn1:BOOLEAN"/>
        </optional>
        <extension>
         <extensionGroup version="2">
          <element name="four" type="asn1:NULL"/>
         </extensionGroup>
         <componentsOf type="tns:MySequence"/>



Legg                       Expires 11 May 2006                 [Page 39]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


        </extension>
        <optional>
         <element name="three" type="asn1:PrintableString"/>
         <default literalValue="third"/>
        </optional>
       </sequence>
      </type>

6.12.3.  SetType Translation  The [normalized value] of this attribute
   item is the RXER character data translation of a SetType follows the same procedure as a
   SequenceType except that SetType replaces SequenceType, "SET"
   replaces "SEQUENCE", and QNameValue from
   the encoding instruction.  An attribute item with the [local name] "set" is used instead of
   "sequence".

6.12.4.  ChoiceType Translation

   The translation
   "embedded" and [normalized value] "true" or "1" MUST be added to the
   [attributes] of the <attribute>, <element> or <component> element
   item.

   If a ChoiceType that NamedType is not subject to a UNION REF-AS-ELEMENT encoding instruction is instruction,
   then an element attribute item with the [local name] "type".
   An "elementType" SHALL be
   added to the [attributes] of the <element> or <component> element
   item.  The [normalized value] of this attribute item is the RXER
   character data translation of the NameValue from the REF-AS-ELEMENT



Legg                      Expires 20 April 2007                [Page 43]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   encoding instruction.  If the Namespace is present in the
   REF-AS-ELEMENT encoding instruction, then an attribute item with the
   [local name] "annotation" MAY "namespace" SHALL be added to the [children] [attributes] of the <type>
   <element> or <component> element item.  An element  The [normalized value] of
   this attribute item is the string value of the AnyURIValue in the
   Namespace.

   If the ContextParameter is present in the RefParameters in the
   ATTRIBUTE-REF, ELEMENT-REF or REF-AS-ELEMENT encoding instruction,
   then an attribute item with the [local name] "choice" "context" SHALL be appended added
   to the [children] [attributes] of the
   <type> <attribute>, <element> or <component>
   element item.  The normal translation [normalized value] of each NamedType in this attribute item is the
   AlternativeTypeList
   string value of the AnyURIValue in the RootAlternativeTypeList ContextParameter.

   If a NamedType is subject to an ATTRIBUTE encoding instruction and a
   VERSION-INDICATOR encoding instruction, then an attribute item with
   the [local name] "versionIndicator" and [normalized value] "true" or
   "1" SHALL be appended added to the [children] of the <choice> <attribute> element item.  If the ExtensionAndException a NamedType
   is present subject to an ATTRIBUTE encoding instruction and not subject to a
   VERSION-INDICATOR encoding instruction, then an element attribute item with
   the [local name] "extension" is appended "versionIndicator" and [normalized value] "false" or
   "0" MAY be added to the [children] of the
   <choice> <attribute> element item, and item.

   If a NamedType is not subject to an ATTRIBUTE-REF, COMPONENT-REF,
   ELEMENT-REF or REF-AS-ELEMENT encoding instruction, then the
   translation of the ExceptionSpec
   (possibly empty) is Type in the NamedType SHALL be added to the
   [children] or [attributes] of the <extension> <attribute>, <group>, <element>,
   <component>, <member> or <item> element item.

   The translation of each ExtensionAdditionAlternativesGroup  If the enclosing
   combining type is a SEQUENCE, SET or
   NamedType CHOICE type and the Type in the ExtensionAdditionAlternatives (if any) SHALL be
   appended to
   NamedType is a DummyReference and the [children] of TagDefault for the <extension> element item.  The
   normal translation of module
   containing the NamedType is used.

   The "AUTOMATIC TAGS", then an attribute form
   translation of an ExtensionAdditionAlternativesGroup is an
   element item with the [local name] "extensionGroup".  If Type in the
   VersionNumber is present then NamedType SHALL NOT be used, and an
   attribute item with the [local name]
   "version" "explicit" and
   [normalized value] "true" or "1" SHALL be added to the [attributes]
   of the <extensionGroup> <type> element item.  The [normalized value] item resulting from the translation of the Type
   in the NamedType.  Where the automatic tagging transformation applies
   [X.680], this attribute item is indicates that explicit tagging applies
   to the
   number Type in the NamedType instead of the VersionNumber.  The normal usual implicit tagging.

   If a NamedType is subject to an ATTRIBUTE-REF, COMPONENT-REF,
   ELEMENT-REF or REF-AS-ELEMENT encoding instruction, then the
   translation of each
   NamedType in EncodingPrefix (Section 6.7) and Tag
   (Section 6.7.2) textually within the ExtensionAdditionAlternativesGroup NamedType SHALL be appended added in
   order to the [children] of the <extensionGroup> <attribute>, <element> or <component>
   element item.

   Example




Legg                      Expires 11 May 2006 20 April 2007                [Page 40] 44]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005       October 20, 2006


      CHOICE {
          one    INTEGER,
          two  [RXER:NAME AS "Two"]    [RXER:ATTRIBUTE] BOOLEAN,
          ...,
          [[ 2:
          three  NULL
          ]],
          four  PrintableString,
          ...  [RXER:ATTRIBUTE-REF
                     { namespace-name "http://www.example.com/schema",
                       local-name "foo" }]
                 UTF8String,
          bar    [RXER:ELEMENT-REF
                     { namespace-name "http://www.example.com/schema",
                       local-name "bar" }]
                 Markup,
          five   [0] [RXER:REF-AS-ELEMENT "product"
                     CONTEXT "http://www.example.com/inventory"]
                 Markup,
          six    [RXER:GROUP] MySequence
      }

      <type>
       <choice>
       <choice xmlns:ex="http://www.example.com/schema">
        <element name="one" type="asn1:INTEGER"/>
        <element name="Two" type="asn1:BOOLEAN"/>
        <extension>
         <extensionGroup version="2"> type="asnx:INTEGER"/>
        <attribute name="two" type="asnx:BOOLEAN"/>
        <attribute ref="ex:foo" identifier="three" embedded="true"/>
        <element name="three" type="asn1:NULL"/>
         </extensionGroup> ref="ex:bar" embedded="true"/>
        <element name="four" type="asn1:PrintableString"/>
        </extension> elementType="product"
                 context="http://www.example.com/inventory"
                 identifier="five">
         <TAG number="0"/>
        </element>
        <group name="six" type="tns:MySequence"/>
       </choice>
      </type>

6.12.5.

6.12.2.  SequenceType Translation of UNION Types

   The translation of a ChoiceType that SequenceType is subject to a UNION encoding
   instruction follows an element item with the same procedure as a ChoiceType that is not
   subject
   [local name] "type".  An element item with the [local name]
   "annotation" MAY be added to a UNION encoding instruction except that the [children] of the <type> element
   item.  An element item with the [local name]
   "union" is used instead "sequence" SHALL be
   appended to the [children] of "choice", and the member <type> element item.  The
   translation of each NamedType is used instead ComponentType in the ComponentTypeList of the normal translation.

   In addition,
   initial RootComponentTypeList, if present, SHALL be appended to the UNION encoding instruction has a PrecedenceList
   [children] of the <sequence> element item.

   If the ExtensionAndException is present, then an attribute element item with
   the [local name] "precedence" "extension" SHALL be
   added appended to the [attributes] [children] of
   the <union> <sequence> element item.  The
   [normalized value] of this attribute item is the white space
   separated list of the RXER character data translations of item, and the
   effective names [RXEREI] translation of the NamedType instances corresponding ExceptionSpec
   (possibly empty) SHALL be added to the identifiers in [children] of the PrecedenceList.

   Example

      [RXER:UNION PRECEDENCE utf8 visible] CHOICE {
          printable  PrintableString,
          teletex    TeletexString,
          visible    [RXER:NAME AS "ascii"] VisibleString,
          ...,
          utf8       UTF8String <extension>
   element item.



Legg                      Expires 11 May 2006 20 April 2007                [Page 41] 45]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


      }

      <type>
       <union precedence="utf8 ascii">
        <member name="printable" type="asn1:PrintableString"/>
        <member name="teletex" type="asn1:TeletexString"/>
        <member name="ascii" identifier="visible"
                type="asn1:VisibleString"/>       October 20, 2006


   The translation of each ExtensionAdditionGroup or ComponentType
   nested in the ExtensionAdditions (if any) SHALL be appended to the
   [children] of the <extension>
         <member name="utf8" type="asn1:UTF8String"/>
        </extension>
       </union>
      </type>

6.12.6.  SequenceOfType Translation element item.

   If the ExtensionEndMarker is present, then the translation of each
   ComponentType in the final RootComponentTypeList SHALL be appended to
   the [children] of the <sequence> element item.

   The translation of a SequenceOfType that is not subject to a LIST
   encoding instruction an ExtensionAdditionGroup is an element item with
   the [local name] "type".
   An element "extensionGroup".  If the VersionNumber is present,
   then an attribute item with the [local name] "annotation" MAY "version" SHALL be added
   to the [children] [attributes] of the <type> <extensionGroup> element item.  An element  The
   [normalized value] of this attribute item with is the
   [local name] "sequenceOf" number of the
   VersionNumber.  The translation of each ComponentType in the
   ExtensionAdditionGroup SHALL be appended to the [children] of the
   <type>
   <extensionGroup> element item.

   If

   The translation of a ComponentType of the SequenceOfType "NamedType" form is the
   normal translation of the "SEQUENCE OF NamedType" NamedType.

   The translation of a ComponentType of the "NamedType OPTIONAL" form then
   is an element item with the [local name] "optional".  The normal
   translation of the NamedType SHALL be added to the content [children] of the <sequenceOf>
   <optional> element item.

   If the SequenceOfType is

   The translation of a ComponentType of the "SEQUENCE OF Type" "NamedType DEFAULT Value"
   form then is an element item with the [local name] "element" "optional".  The normal
   translation of the NamedType SHALL be added to the [children] of the <type>
   <optional> element item.  An attribute element item with the [local name] "name" and [normalized value] "item"
   "default" SHALL be added appended to the [attributes] [children] of the <element> <optional>
   element item.  An attribute item
   with  The translation of the [local name] "identifier" and empty [normalized value] Value SHALL be added to the
   [children] or [attributes] of the <element> <default> element item.

   The translation of a ComponentType of the "COMPONENTS OF Type" form
   is an element item with the [local name] "componentsOf".  The
   translation of the Type SHALL be added to the content [children] or
   [attributes] of the
   <element> <componentsOf> element item.

   Examples

      SEQUENCE OF INTEGER

      <type>
       <sequenceOf>
        <element name="item" identifier="" type="asn1:INTEGER"/>
       </sequenceOf>
      </type>

   Example

      SEQUENCE {
          one    INTEGER,
          two    [RXER:ATTRIBUTE] BOOLEAN OPTIONAL,
          ...,
          [[ 2:
              four   NULL
          ]],
          COMPONENTS OF counter INTEGER MySequence,



Legg                      Expires 11 May 2006 20 April 2007                [Page 42] 46]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005       October 20, 2006


          ...,
          three   PrintableString DEFAULT "third"
      }

      <type>
       <sequenceOf>
       <sequence>
        <element name="one" type="asnx:INTEGER"/>
        <optional>
         <attribute name="two" type="asnx:BOOLEAN"/>
        </optional>
        <extension>
         <extensionGroup version="2">
          <element name="four" type="asnx:NULL"/>
         </extensionGroup>
         <componentsOf type="tns:MySequence"/>
        </extension>
        <optional>
         <element name="counter" type="asn1:INTEGER"/>
       </sequenceOf> name="three" type="asnx:PrintableString"/>
         <default literalValue="third"/>
        </optional>
       </sequence>
      </type>

6.12.7.

6.12.3.  SetType Translation

   The translation of LIST Types a SetType follows the same procedure as a
   SequenceType except that SetType replaces SequenceType, "SET"
   replaces "SEQUENCE", and the [local name] "set" is used instead of
   "sequence".

6.12.4.  ChoiceType Translation

   The translation of a SequenceOfType ChoiceType that is not subject to a LIST UNION
   encoding instruction is an element item with the [local name] "type".
   An element item with the [local name] "annotation" MAY be added to
   the [children] of the <type> element item.  An element item with the
   [local name] "list" "choice" SHALL be appended to the [children] of the
   <type> element item.  The item normal translation of the each NamedType in the
   AlternativeTypeList in the RootAlternativeTypeList SHALL be added appended
   to the content [children] of the <list> <choice> element item.

      ASIDE: SequenceOfType is necessarily of the
      "SEQUENCE OF NamedType" form for a LIST encoding instruction.

   Example

      [RXER:LIST] SEQUENCE OF number INTEGER

      <type>
       <list>
        <item name="number" type="asn1:INTEGER"/>
       </list>
      </type>

6.12.8.  SetOfType Translation

   The translation of a SetOfType follows

   If the same procedure as a
   SequenceOfType except that SetOfType replaces SequenceOfType, "SET"
   replaces "SEQUENCE", and ExtensionAndException is present, then an element item with
   the [local name] "setOf" is used instead of
   "sequenceOf".

6.13.  Translation of Constrained Types

   If a ConstrainedType "extension" is appended to the [children] of the "Type Constraint" form then
   <choice> element item, and the translation of the ConstrainedType ExceptionSpec
   (possibly empty) is an element item with added to the
   [local name] "type".  An [children] of the <extension>
   element item with item.

   The translation of each ExtensionAdditionAlternativesGroup or



Legg                      Expires 20 April 2007                [Page 47]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   NamedType in the [local name]
   "annotation" MAY ExtensionAdditionAlternatives (if any) SHALL be added
   appended to the [children] of the <type> <extension> element item.  An  The
   normal translation of the NamedType is used.

   The translation of an ExtensionAdditionAlternativesGroup is an
   element item with the [local name] "constrained" "extensionGroup".  If the
   VersionNumber is present, then an attribute item with the
   [local name] "version" SHALL be
   appended added to the [children] [attributes] of the <type>
   <extensionGroup> element item.  The content [normalized value] of the <constrained> element this
   attribute item is the number of the VersionNumber.  The normal
   translation of each NamedType in the Type
   followed by
   ExtensionAdditionAlternativesGroup SHALL be appended to the translation
   [children] of the Constraint. <extensionGroup> element item.

   Example

      CHOICE {
          one  INTEGER,
          two  [RXER:NAME AS "Two"] BOOLEAN,
          ...,
          [[ 2:
              three  NULL
          ]],
          four  PrintableString,
          ...
      }

      <type>
       <choice>
        <element name="one" type="asnx:INTEGER"/>
        <element name="Two" type="asnx:BOOLEAN"/>
        <extension>
         <extensionGroup version="2">
          <element name="three" type="asnx:NULL"/>
         </extensionGroup>
         <element name="four" type="asnx:PrintableString"/>
        </extension>
       </choice>
      </type>

6.12.5.  Translation of UNION Types

   The translation of a ContainedType ChoiceType that is subject to a TypeWithConstraint is



Legg                       Expires 11 May 2006                 [Page 43]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


   the translation of UNION encoding
   instruction follows the TypeWithConstraint.

   Definition: A LowerEndpoint or UpperEndpoint is same procedure as a simple endpoint if
   it is closed and its value ChoiceType that is "MIN", "MAX" or a SignedNumber in an
   IntegerValue in not
   subject to a BuiltinValue in the Value of UNION encoding instruction except that the endpoint.

   Definition: A SizeConstraint [local name]
   "union" is a simple range if the Constraint in
   the SizeConstraint contains only a ValueRange (i.e., a ValueRange in
   a SubtypeElements in an Elements in a single IntersectionElements in
   a single Intersections in a Unions in an ElementSetSpec in a lone
   RootElementSetSpec in an ElementSetSpecs in a SubtypeConstraint in a
   lone ConstraintSpec in the Constraint) used instead of "choice", and both endpoints are simple.

   Definition: A Constraint is a simple range if contains only a
   SizeConstraint that the member translation of
   each NamedType is a simple range (i.e., a simple range
   SizeConstraint in a SubtypeElements in an Elements in a single
   IntersectionElements in a single Intersections in a Unions in an
   ElementSetSpec in a lone RootElementSetSpec in an ElementSetSpecs in
   a SubtypeConstraint in a lone ConstraintSpec in used instead of the Constraint).

   If normal translation.




Legg                      Expires 20 April 2007                [Page 48]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   In addition, if the Constraint or SizeConstraint in a TypeWithConstraint is UNION encoding instruction has a
   simple range PrecedenceList,
   then an attribute item with the compact translation of the TypeWithConstraint
   MAY [local name] "precedence" SHALL be used, otherwise
   added to the full translation [attributes] of the TypeWithConstraint
   is used. <union> element item.  The compact translation
   [normalized value] of a TypeWithConstraint this attribute item is the translation white space
   separated list of the parent type.  If RXER character data translations of the value
   effective names [RXEREI] of the lower endpoint NamedType instances corresponding to
   the identifiers in the PrecedenceList.

   Example

      [RXER:UNION PRECEDENCE utf8 visible] CHOICE {
          printable  PrintableString,
          teletex    TeletexString,
          visible    [RXER:NAME AS "ascii"] VisibleString,
          ...,
          utf8       UTF8String
      }

      <type>
       <union precedence="utf8 ascii">
        <member name="printable" type="asnx:PrintableString"/>
        <member name="teletex" type="asnx:TeletexString"/>
        <member name="ascii" identifier="visible"
                type="asnx:VisibleString"/>
        <extension>
         <member name="utf8" type="asnx:UTF8String"/>
        </extension>
       </union>
      </type>

6.12.6.  SequenceOfType Translation

   The translation of a SequenceOfType that is not "MIN" or
   "0" then subject to a LIST
   encoding instruction is an attribute element item with the [local name] "minSize" SHALL "type".
   An element item with the [local name] "annotation" MAY be added to
   the [attributes] [children] of the <sequenceOf>, <setOf> or <list> <type> element item.  An element item from with the translation of
   [local name] "sequenceOf" SHALL be appended to the parent type.  The
   [normalized value] [children] of this attribute item the
   <type> element item.

   If the SequenceOfType is of the value "SEQUENCE OF NamedType" form, then
   the normal translation of the lower
   endpoint.  If NamedType SHALL be added to the value
   [children] of the lower endpoint <sequenceOf> element item.

   If the SequenceOfType is "MIN" or "0" of the "SEQUENCE OF Type" form, then an
   element item with the [local name] "element" or "component"
   (translator's choice) SHALL be added to the [children] of the <type>
   element item.  An attribute item with the [local name] "minSize" "name" and
   [normalized value]
   "0" MAY "item" SHALL be added to the [attributes] of the <sequenceOf>, <setOf>



Legg                      Expires 20 April 2007                [Page 49]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   <element> or
   <list> <component> element item.  If the value of the upper endpoint is not "MAX"
   then an  An attribute item with the
   [local name] "maxSize" "identifier" and empty [normalized value] SHALL be added
   to the [attributes] of the <sequenceOf>, <setOf> <element> or <list> <component> element item.
   The [normalized value] translation of this attribute item is the value Type SHALL be added to the [children] or
   [attributes] of the upper endpoint. <element> or <component> element item.

   Examples

      SEQUENCE OF INTEGER

      <type>
       <sequenceOf>
        <element name="item" identifier="" type="asnx:INTEGER"/>
       </sequenceOf>
      </type>

      SEQUENCE OF counter INTEGER

      <type>
       <sequenceOf>
        <element name="counter" type="asnx:INTEGER"/>
       </sequenceOf>
      </type>

6.12.7.  Translation of LIST Types

   The full translation of a TypeWithConstraint SequenceOfType that is subject to a LIST
   encoding instruction is an element item with the [local name] "type".
   An element item with the [local name] "annotation" MAY be added to
   the [children] of the <type> element item.  An element item with the
   [local name] "constrained" "list" SHALL be appended to the [children] of the <type>
   element item.  The content
   of the <constrained> element item is the translation of the parent
   type followed by NamedType SHALL be added
   to the translation [children] of the Constraint or SizeConstraint.




Legg                       Expires 11 May 2006                 [Page 44]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


   Examples

      SEQUENCE (SIZE(1..MAX)) OF number INTEGER

      <type>
       <sequenceOf minSize="1">
        <element name="number" type="asn1:INTEGER"/>
       </sequenceOf>
      </type>

      SEQUENCE SIZE(0..10) <list> element item.

      Aside: SequenceOfType is necessarily of the
      "SEQUENCE OF number INTEGER

      <type>
       <sequenceOf maxSize="10">
        <element name="number" type="asn1:INTEGER"/>
       </sequenceOf>
      </type> NamedType" form for a LIST encoding instruction.

   Example

      [RXER:LIST] SEQUENCE SIZE(1..limit) OF number INTEGER

      <type>
       <constrained>
        <type>
         <sequenceOf>
          <element
       <list>
        <item name="number" type="asn1:INTEGER"/>
         </sequenceOf>
        </type>
        <size>
         <range>
          <minInclusive literalValue="1"/>
          <maxInclusive value="tns:limit"/>
         </range>
        </size>
       </constrained> type="asnx:INTEGER"/>
       </list>
      </type>

6.13.1.  Constraint

6.12.8.  SetOfType Translation

   The translation of a Constraint is the translation of the
   ConstraintSpec followed by the translation of the ExceptionSpec
   (possibly empty).

   The translation of a ConstraintSpec is the translation of the
   contained SubtypeConstraint or GeneralConstraint.

   The translation of a SubtypeConstraint is the translation of the
   contained ElementSetSpecs.



Legg                      Expires 11 May 2006 20 April 2007                [Page 45] 50]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005       October 20, 2006


   The translation of a GeneralConstraint is SetOfType follows the translation of same procedure as a
   SequenceOfType except that SetOfType replaces SequenceOfType, "SET"
   replaces "SEQUENCE", and the
   contained UserDefinedConstraint, TableConstraint or
   ContentsConstraint.

6.13.2.  UserDefinedConstraint Translation

   The translation [local name] "setOf" is used instead of
   "sequenceOf".

6.12.9.  Insertion Encoding Instructions

   If a UserDefinedConstraint Type is subject to a NO-INSERTIONS, HOLLOW-INSERTIONS,
   SINGULAR-INSERTIONS, UNIFORM-INSERTIONS or MULTIFORM-INSERTIONS
   encoding instruction, then an element item with
   the [local name] "constrainedBy".  An element attribute item with the [local name] "annotation" MAY
   "insertions" SHALL be added to the [children] [attributes] of the
   <constrainedBy> <choice>,
   <sequence> or <set> element item.  The translation of each
   UserDefinedConstraintParameter SHALL be appended to item in the [children] of the <constrainedBy> <type>
   element item.

   The item resulting from the translation of a UserDefinedConstraintParameter of the
   "Governor : Value" form is an element item with the [local name]
   "valueParameter". Type.  The content
   [normalized value] of the <valueParameter> element this attribute item is "none" in the translation case of a
   NO-INSERTIONS encoding instruction, "hollow" in the Type case of a
   HOLLOW-INSERTIONS encoding instruction, "singular" in the Governor followed by case of a
   SINGULAR-INSERTIONS encoding instruction, "uniform" in the
   translation case of a
   UNIFORM-INSERTIONS encoding instruction, and "multiform" in the Value.

   The translation case
   of a UserDefinedConstraintParameter MULTIFORM-INSERTIONS encoding instruction.

   Example

      [NO-INSERTIONS] CHOICE {
          one  [RXER:GROUP] [RXER:SINGULAR-INSERTIONS] CHOICE {
              two  INTEGER,
              ...
          },
          ...
      }

      <type>
       <choice insertions="none">
        <group name="one">
         <type>
          <choice insertions="singular">
           <element name="two" type="asnx:INTEGER"/>
           <extension/>
          </choice>
         </type>
        </group>
        <extension/>
       </choice>
      </type>

6.13.  Translation of Constrained Types

   If a ConstrainedType is of the
   "Governor : ValueSet" form "Type Constraint" form, then the
   translation of the ConstrainedType is an element item with the



Legg                      Expires 20 April 2007                [Page 51]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   [local name] "type".  An element item with the [local name]
   "annotation" MAY be added to the [children] of the <type> element
   item.  An element item with the [local name]
   "valueSetParameter".  The content "constrained" SHALL be
   appended to the [children] of the <valueSetParameter> <type> element
   item is the item.  The
   translation of the Type in the Governor followed by SHALL be added to the
   translation [children] or
   [attributes] of the ValueSet. <constrained> element item.  The translation of a UserDefinedConstraintParameter of
   the
   "Governor : Object" form is an element item with Constraint SHALL be added to the [local name]
   "objectParameter".  The content [children] of the <objectParameter> <constrained>
   element item item.

   The translation of a ContainedType that is a TypeWithConstraint is
   the translation of the DefinedObjectClass TypeWithConstraint.

   Definition (simple endpoint): A LowerEndpoint or UpperEndpoint is a
   simple endpoint if it is closed and its value is "MIN", "MAX" or a
   SignedNumber in an IntegerValue in a BuiltinValue in the Governor followed
   by the translation Value of the Object.

   The translation of
   endpoint.

   Definition (simple range SizeContraint): A SizeConstraint is a UserDefinedConstraintParameter of simple
   range if the
   "Governor : ObjectSet" form Constraint in the SizeConstraint contains only a
   ValueRange (i.e., a ValueRange in a SubtypeElements in an Elements in
   a single IntersectionElements in a single Intersections in a Unions
   in an ElementSetSpec in a lone RootElementSetSpec in an
   ElementSetSpecs in a SubtypeConstraint in a lone ConstraintSpec in
   the Constraint) and both endpoints are simple.

   Definition (simple range Contraint): A Constraint is a simple range
   if contains only a SizeConstraint that is a simple range (i.e., a
   simple range SizeConstraint in a SubtypeElements in an element item with Elements in a
   single IntersectionElements in a single Intersections in a Unions in
   an ElementSetSpec in a lone RootElementSetSpec in an ElementSetSpecs
   in a SubtypeConstraint in a lone ConstraintSpec in the [local name]
   "objectSetParameter".  The content of Constraint).

   If the <objectSetParameter>
   element item Constraint or SizeConstraint in a TypeWithConstraint is a
   simple range, then the compact translation of the DefinedObjectClass in the
   Governor followed by TypeWithConstraint
   MAY be used, otherwise the full translation of the ObjectSet. TypeWithConstraint
   is used.

   The compact translation of a UserDefinedConstraintParameter that TypeWithConstraint is a Type the translation of
   the parent type.  If the value of the lower endpoint is not "MIN" or
   "0", then an element attribute item with the [local name] "typeParameter".  The
   translation of the Type "minSize" SHALL be
   added to the content [attributes] of the
   <typeParameter> <sequenceOf>, <setOf> or <list>
   element item.

   The item from the translation of a UserDefinedConstraintParameter that the parent type.  The
   [normalized value] of this attribute item is a
   DefinedObjectClass the value of the lower
   endpoint.  If the value of the lower endpoint is "MIN" or "0", then
   an element attribute item with the [local name]
   "classParameter".  The translation of the DefinedObjectClass SHALL "minSize" and
   [normalized value] "0" MAY be added to the content [attributes] of the <classParameter>
   <sequenceOf>, <setOf> or <list> element item.

   Example



Legg                       Expires 11 May 2006                 [Page 46]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


      OCTET STRING
          (CONSTRAINED BY {
              -- contains the hash of  If the value -- MyType:myValue })

      <type>
       <constrained type="asn1:OCTET-STRING">
        <constrainedBy>
         <annotation> contains the hash of the value </annotation>
         <valueParameter type="tns:MyType" value="tns:myValue"/>
        </constrainedBy>
       </constrained>
      </type>

6.13.3.  TableConstraint Translation

   The translation of a TableConstraint that is a SimpleTableConstraint
   upper endpoint is not "MAX", then an element attribute item with the



Legg                      Expires 20 April 2007                [Page 52]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   [local name] "table".  The translation of
   the ObjectSet in the SimpleTableConstraint "maxSize" SHALL be added to the
   content [attributes] of the <table>
   <sequenceOf>, <setOf> or <list> element item.  The translation [normalized value]
   of a TableConstraint that this attribute item is the value of the upper endpoint.

   The full translation of a
   ComponentRelationConstraint TypeWithConstraint is an element item with
   the [local name]
   "table".  The translation of the DefinedObjectSet in the
   ComponentRelationConstraint SHALL be added to the content of the
   <table> "type".  An element item.  The translation of each AtNotation SHALL item with the [local name]
   "annotation" MAY be
   appended added to the [children] of the <table> <type> element
   item.

   The translation of an AtNotation is an  An element item with the [local name] "restrictBy".  The [children] property of the
   <restrictBy> element item is set "constrained" SHALL be
   appended to the sequence of character items
   for the character string formed by the concatenation of zero, one or
   more "../" strings, one for each Level in the AtNotation (including
   the empty one), followed by a "/" (U+002F) separated list of the RXER
   character data translations of the effective names [RXEREI] [children] of the
   NamedType instances identified by the ComponentIdList identifiers.
   If a NamedType is subject to an ATTRIBUTE or ATTRIBUTE-REF encoding
   instruction then the <type> element item.  The
   translation of the effective name is prefixed
   with the "@" (U+0040) character.  Leading and/or trailing white space
   character items MAY parent type SHALL be added to the [children] or
   [attributes] of the <restrictBy> <constrained> element item.  White space character items MAY  The translation of
   the Constraint or SizeConstraint SHALL be added immediately
   before and/or after any character item for the "/" character.

   The <restrictBy> element item is required to be self-contained
   [RXER].

      ASIDE: An element item is self-contained if all namespace prefixes
      used by the element item and its contents are declared within [children] of
   the <constrained> element item.



Legg                       Expires 11 May 2006                 [Page 47]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005

   Examples

      ERROR.&Type({Errors}{@severity,@...errorId})

      <type>
       <constrained>

      SEQUENCE (SIZE(1..MAX)) OF number INTEGER

      <type>
         <fromClass class="tns:ERROR" fieldName="Type"/>
        </type>
        <table objectset="tns:Errors">
         <restrictBy>severity</restrictBy>
         <restrictBy>../../../errorId</restrictBy>
        </table>
       </constrained>
       <sequenceOf minSize="1">
        <element name="number" type="asnx:INTEGER"/>
       </sequenceOf>
      </type>

      SEQUENCE {
          iD     [RXER:NAME AS "ID"] [RXER:ATTRIBUTE]
                     TYPE-IDENTIFIER.&id({AllTypes}),
          value  TYPE-IDENTIFIER.&Type({AllTypes}{@iD})
      }

      <type>
       <sequence>
        <attribute name="ID">
         <type>
          <constrained> SIZE(0..10) OF number INTEGER

      <type>
            <fromClass class="asn1:TYPE-IDENTIFIER" fieldName="id"/>
           </type>
           <table objectset="tns:AllTypes"/>
          </constrained>
         </type>
        </attribute>
       <sequenceOf maxSize="10">
        <element name="value"> name="number" type="asnx:INTEGER"/>
       </sequenceOf>
      </type>

      SEQUENCE SIZE(1..limit) OF number INTEGER

      <type>
       <constrained>
        <type>
            <fromClass class="asn1:TYPE-IDENTIFIER" fieldName="Type"/>
         <sequenceOf>
          <element name="number" type="asnx:INTEGER"/>
         </sequenceOf>
        </type>
           <table objectset="tns:AllTypes">
            <restrictBy>@ID</restrictBy>
           </table>
        <size>
         <range>
          <minInclusive literalValue="1"/>
          <maxInclusive value="tns:limit"/>
         </range>
        </size>
       </constrained>
         </type>
        </element>
       </sequence>
      </type>



Legg                      Expires 11 May 2006 20 April 2007                [Page 48] 53]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


6.13.4.  ContentsConstraint       October 20, 2006


      </type>

6.13.1.  Constraint Translation

   The translation of a ContentsConstraint Constraint is the translation of the
   ConstraintSpec followed by the translation of the ExceptionSpec
   (possibly empty).

   The translation of a ConstraintSpec is the translation of the
   contained SubtypeConstraint or GeneralConstraint.

   The translation of a SubtypeConstraint is the translation of the
   contained ElementSetSpecs.

   The translation of a GeneralConstraint is the translation of the
   contained UserDefinedConstraint, TableConstraint or
   ContentsConstraint.

6.13.2.  UserDefinedConstraint Translation

   The translation of a UserDefinedConstraint is an element item with
   the [local name] "contents".

   If the ContentsConstraint is of the "CONTAINING Type" form then an "constrainedBy".  An element item with the
   [local name] "containing" SHALL "annotation" MAY be added to the [children] of the <contents>
   <constrainedBy> element item.  The translation of the
   Type each
   UserDefinedConstraintParameter SHALL be added appended to the contents [children] of
   the <containing> <constrainedBy> element item.

   If the ContentsConstraint is

   The translation of a UserDefinedConstraintParameter of the "ENCODED BY
   "Governor : Value" form then is an element item with the [local name] "encodedBy" SHALL be added to the
   [children]
   "valueParameter".  The translation of the <contents> element item.  The Type in the Governor and
   the translation of the Value SHALL be added to the contents [children] and/or
   [attributes] of the <encodedBy> <valueParameter> element item.

   If the ContentsConstraint is

   The translation of the
   "CONTAINING Type ENCODED BY Value" form then the content a UserDefinedConstraintParameter of the
   <contents> element item
   "Governor : ValueSet" form is an element item with the [local name]
   "containing" followed by an element item with the [local name]
   "encodedBy".
   "valueSetParameter".  The translation of the Type in the Governor
   SHALL be added to the
   contents [children] or [attributes] of the <containing>
   <valueSetParameter> element item, and the item.  The translation of the
   Value ValueSet
   SHALL be added to the contents [children] of the <encodedBy> <valueSetParameter> element
   item.

   Example

      OCTET STRING
          (CONTAINING MyType
           ENCODED BY { joint-iso-itu-t asn1(1) basic-encoding(1) })

      <type>
       <constrained type="asn1:OCTET-STRING">
        <contents>
         <containing type="tns:MyType/>
         <encodedBy literalValue="2.1.1"/>
        </contents>
       </constrained>
      </type>

6.13.5.  ExceptionSpec Translation

   The translation of an empty ExceptionSpec is empty.

   The translation a UserDefinedConstraintParameter of a non-empty ExceptionSpec the
   "Governor : Object" form is an element item with the [local name] "exception".

   If
   "objectParameter".  The translation of the ExceptionSpec is a SignedNumber then DefinedObjectClass in the content
   Governor and the translation of the
   <exception> element item is Object SHALL be added to the translation
   [children] and/or [attributes] of a notional INTEGER
   Type followed by the <objectParameter> element item.

   The translation of a notional Value UserDefinedConstraintParameter of the INTEGER



Legg                      Expires 11 May 2006 20 April 2007                [Page 49] 54]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


   type       October 20, 2006


   "Governor : ObjectSet" form is an element item with the IntegerValue [local name]
   "objectSetParameter".  The translation of SignedNumber.

   If the ExceptionSpec is a DefinedValue then DefinedObjectClass in
   the content Governor and the translation of the
   <exception> element item is ObjectSet SHALL be added to
   the [children] and/or [attributes] of the <objectSetParameter>
   element item.

   The translation of a notional INTEGER UserDefinedConstraintParameter that is a Type followed by is
   an element item with the [local name] "typeParameter".  The
   translation of the DefinedValue.

   If Type SHALL be added to the ExceptionSpec is [children] or
   [attributes] of the "Type : Value" form then the content <typeParameter> element item.

   The translation of the <exception> a UserDefinedConstraintParameter that is a
   DefinedObjectClass is an element item is with the [local name]
   "classParameter".  The translation of the Type
   followed by DefinedObjectClass SHALL be
   added to the translation [children] or [attributes] of the Value.

   Examples

      !10

      <exception type="asn1:INTEGER" literalValue="10"/>

      !myValue

      <exception type="asn1:INTEGER" value="tns:myValue"/>

      !PrintableString:"failure"

      <exception type="asn1:PrintableString" literalValue="failure"/>

6.14.  Tag Defaults and Extension Defaults

   When a DummyReference or parameterized reference is replaced by <classParameter>
   element item.

   Example

      OCTET STRING
          (CONSTRAINED BY {
              -- contains the
   definition it references, hash of the TagDefault and ExtensionDefault
   applying to any nested type definitions may no longer accord with value -- MyType:myValue })

      <type>
       <constrained type="asnx:OCTET-STRING">
        <constrainedBy>
         <annotation> contains the
   original ASN.1 specification.  This section describes attribute items
   that are added to hash of the value </annotation>
         <valueParameter type="tns:MyType" value="tns:myValue"/>
        </constrainedBy>
       </constrained>
      </type>

6.13.3.  TableConstraint Translation

   The translation of a type definition so that the
   appropriate defaults for tagging and extensibility are applied.

   Definition: For encoding rules TableConstraint that use type tagging, a tag default
   affects how those tags are constructed.  Its value is either
   EXPLICIT, IMPLICIT or AUTOMATIC.  If the TagDefault in the
   ModuleDefinition for a module SimpleTableConstraint
   is empty then the tag default for an element item with the
   module is EXPLICIT, otherwise [local name] "table".  The translation of
   the tag default for ObjectSet in the module is SimpleTableConstraint SHALL be added to the
   first keyword in
   [children] or [attributes] of the TagDefault. <table> element item.

   The tag default for translation of a Type TableConstraint that is a
   ComponentRelationConstraint is an element item with the
   tag default [local name]
   "table".  The translation of the module containing DefinedObjectSet in the Type.

   Definition: An extension default indicates whether types are assumed
   to
   ComponentRelationConstraint SHALL be extensible in added to the absence of an explicit extension marker
   (which translates into an <extension> element item).  Its value is
   either TRUE [children] or FALSE.  If the ExtensionDefault in the
   ModuleDefinition for a module is empty then the extension default for
   [attributes] of the module is FALSE, otherwise <table> element item.  The translation of each
   AtNotation SHALL be appended to the extension default for [children] of the module
   is TRUE. <table> element
   item.

   The extension default for a Type translation of an AtNotation is an element item with the extension default



Legg                      Expires 11 May 2006 20 April 2007                [Page 50] 55]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005       October 20, 2006


   [local name] "restrictBy".  The [children] property of the module containing the Type.

   Definition: The contributing Type for a <type>
   <restrictBy> element item is set to the
   Type whose translation produces sequence of character items
   for the character string formed by the concatenation of zero, one or
   more "../" strings, one for each Level in the AtNotation (including
   the empty one), followed by a "/" (U+002F) separated list of the content RXER
   character data translations of that <type> element
   item.

      ASIDE: The translation the effective names [RXEREI] of the
   NamedType instances identified by the ComponentIdList identifiers.
   If a Type that NamedType is a DummyReference,
      ParameterizedType subject to an ATTRIBUTE or ParameterizedValueSetType (in ATTRIBUTE-REF encoding
   instruction, or subject to a DefinedType
      in COMPONENT-REF encoding instruction that
   references a ReferencedType) top-level NamedType that is normally subject to an ATTRIBUTE
   encoding instruction, then the translation of the referenced
      Type.  In such cases, the referencing Type is therefore not a
      contributing Type.

   Definition: If a <type> element item effective name is not enclosed by another
   <type> element item then
   prefixed with the inherited tag default for that <type>
   element item is "@" (U+0040) character.  Leading and/or trailing
   white space character items MAY be added to the tag default [children] of the module whose translation
   contains the <type>
   <restrictBy> element item, otherwise the inherited tag default item.  White space character items MAY be added
   immediately before and/or after any character item for the "/"
   character.

   Examples

      ERROR.&Type({Errors}{@severity,@...errorId})

      <type>
       <constrained>
        <type>
         <fromClass class="tns:ERROR" fieldName="Type"/>
        </type>
        <table objectset="tns:Errors">
         <restrictBy>severity</restrictBy>
         <restrictBy>../../../errorId</restrictBy>
        </table>
       </constrained>
      </type>

      SEQUENCE {
          iD     [RXER:NAME AS "ID"] [RXER:ATTRIBUTE]
                     TYPE-IDENTIFIER.&id({AllTypes}),
          value  TYPE-IDENTIFIER.&Type({AllTypes}{@iD})
      }

      <type>
       <sequence>
        <attribute name="ID">
         <type>
          <constrained>
           <type>
            <fromClass class="asnx:TYPE-IDENTIFIER" fieldName="id"/>
           </type>
           <table objectset="tns:AllTypes"/>



Legg                      Expires 20 April 2007                [Page 56]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


          </constrained>
         </type>
        </attribute>
        <element name="value">
         <type>
          <constrained>
           <type>
            <fromClass class="asnx:TYPE-IDENTIFIER" fieldName="Type"/>
           </type>
           <table objectset="tns:AllTypes">
            <restrictBy>@ID</restrictBy>
           </table>
          </constrained>
         </type>
        </element>
       </sequence>
      </type>

   The <restrictBy> element item is the tag default of the contributing
   Type for the innermost enclosing <type> required to be self-contained
   [RXER].

      Aside: An element item.

   If a contributing Type is not a DefinedType and item is not one of self-contained if all namespace prefixes
      used by the
   productions in Table 1 (see Section 6.3) element item and the inherited tag
   default for its associated <type> contents are declared within the
      element item item.

6.13.4.  ContentsConstraint Translation

   The translation of a ContentsConstraint is not an element item with the same as
   [local name] "contents".

   If the
   tag default ContentsConstraint is of the contributing Type "CONTAINING Type" form, then an attribute
   element item with the [local name] "tagDefault" "containing" SHALL be added to the
   [children] of the <contents> element item.  The translation of the
   Type SHALL be added to the [children] or [attributes] of the
   <type>
   <containing> element item, otherwise item.

   If the ContentsConstraint is of the "ENCODED BY Value" form, then an attribute
   element item with the [local name] "tagDefault" MAY "encodedBy" SHALL be added to the [attributes]
   [children] of the
   <type> <contents> element item.  The [normalized value] translation of this attribute item
   is the tag default
   Value SHALL be added to the [children] or [attributes] of the contributing Type.

   Definition: If a <type>
   <encodedBy> element item item.

   If the ContentsConstraint is not enclosed by another
   <type> of the
   "CONTAINING Type ENCODED BY Value" form, then an element item then with
   the inherited extension default for that
   <type> [local name] "containing" and an element item is with the extension default
   [local name] "encodedBy" SHALL be added to the [children] of the module whose
   <contents> element item.  The translation contains of the <type> element item, otherwise Type SHALL be added
   to the inherited
   extension default for [children] or [attributes] of the <type> <containing> element item is the extension
   default item.



Legg                      Expires 20 April 2007                [Page 57]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   The translation of the contributing Type for Value SHALL be added to the innermost enclosing <type> [children] or
   [attributes] of the <encodedBy> element item.

   If a contributing Type

   Example

      OCTET STRING
          (CONTAINING MyType
           ENCODED BY { joint-iso-itu-t asn1(1) basic-encoding(1) })

      <type>
       <constrained type="asnx:OCTET-STRING">
        <contents>
         <containing type="tns:MyType/>
         <encodedBy literalValue="2.1.1"/>
        </contents>
       </constrained>
      </type>

6.13.5.  ExceptionSpec Translation

   The translation of an empty ExceptionSpec is not empty.

   The translation of a DefinedType and non-empty ExceptionSpec is not one of the
   productions in Table 1 and the inherited extension default for its
   associated <type> an element item with
   the [local name] "exception".

   If the ExceptionSpec is not a SignedNumber, then the same as translation of a
   notional INTEGER Type and the extension
   default translation of a notional Value of the contributing Type then an attribute item
   INTEGER type with the
   [local name] "extensibilityImplied" IntegerValue of SignedNumber SHALL be added to
   the [children] and/or [attributes] of the <type> <exception> element item, otherwise an attribute item
   with item.

   If the [local name] "extensibilityImplied" MAY ExceptionSpec is a DefinedValue, then the translation of a
   notional INTEGER Type and the translation of the DefinedValue SHALL
   be added to the [children] and/or [attributes] of the <type> <exception>
   element item.

   If the extension default ExceptionSpec is
   TRUE of the "Type : Value" form, then the [normalized value]
   translation of this attribute item is "true" or
   "1", otherwise it is "false" or "0". the Type and the translation of the Value SHALL be
   added to the [children] and/or [attributes] of the <exception>
   element item.

   Examples

      !10

      <exception type="asnx:INTEGER" literalValue="10"/>

      !myValue




Legg                      Expires 11 May 2006 20 April 2007                [Page 51] 58]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005       October 20, 2006


      <exception type="asnx:INTEGER" value="tns:myValue"/>

      !PrintableString:"failure"

      <exception type="asnx:PrintableString" literalValue="failure"/>

7.  Translation of Values

   A Value in an ASN.1 specification is a mix of literal values (e.g.,
   numbers and character strings) and notations for referencing defined
   values.  Likewise, the ASN.X translation of a Value is a mix of
   markup for literal values and markup for referencing notations
   (notational values).  A Value is categorized by the following
   definitions.

   Definition:

   Definition (literal value): A Value is a literal value if and only if
   it is not a notational value.

   Definition:

   Definition (notational value): A Value is a notational value if and
   only if:

   (a) the Value is a BuiltinValue, and

       (1) the BuiltinValue is a TaggedValue and the Value in the
           TaggedValue is a notational value, or

       (2) the BuiltinValue is a SequenceValue or SetValue and the
           ComponentValueList of the SequenceValue or SetValue contains
           a NamedValue where the translation of the corresponding
           NamedType (from the governing type of the Value) is not an
           <element> or <component> element item and the Value of the
           NamedValue is a notational value, or

       (3) the BuiltinValue is a ChoiceValue where the translation of
           the NamedType corresponding to the identifier of the
           ChoiceValue is not an <element> or <component> element item
           and the Value of the ChoiceValue is a notational value, or

       (4) the BuiltinValue is a SequenceOfValue with a NamedValueList
           that contains a NamedValue where the translation of the
           corresponding NamedType (from the governing type of the
           Value) is not an <element> or <component> element item and
           the Value of the NamedValue is a notational value, or

   (b) the Value is a ReferencedValue, and

       (1) the ReferencedValue is a ValueFromObject, or




Legg                      Expires 20 April 2007                [Page 59]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


       (2) the ReferencedValue is a DefinedValue, and

           (i)   the DefinedValue is a valuereference (not a
                 DummyReference) or an ExternalValueReference, or

           (ii)  the DefinedValue is a DummyReference or
                 ParameterizedValue and the Value in
                 the ActualParameter corresponding to substitute definition for
                 the DummyReference



Legg                       Expires 11 May 2006                 [Page 52]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005 or ParameterizedValue is a
                 notational value, value (see Section 5.9), or

           (iii) the DefinedValue is a DummyReference or
                 ParameterizedValue and the Value
                 on where the right hand side translation of the referenced
                 ParameterizedValueAssignment is
                 DummyReference or ParameterizedValue will use a notational value, fully
                 expanded reference (see Section 5.9), or

   (c) the Value is an ObjectClassFieldValue, and

       (1) the ObjectClassFieldValue is an OpenTypeFieldVal, or

       (2) the ObjectClassFieldValue is a FixedTypeFieldVal, and

           (i)  the FixedTypeFieldVal is a BuiltinValue that satisfies
                case (a), or

           (ii) the FixedTypeFieldVal is a ReferencedValue that
                satisfies case (b).

   A literal value that is a BuiltinValue that is a a SequenceValue,
   SetValue, ChoiceValue, SequenceOfValue or SetOfValue MAY be
   translated as a notational value.

   Definition:

   Definition (directly nested): A notational value is directly nested
   (within a literal value) if the innermost enclosing Value is a
   literal value.

7.1.  Translation of Literal Values

   The translation of a literal value is either the attribute form
   translation of a literal value, or the element form translation of a
   literal value.

   The attribute form translation of a literal value is an attribute
   item with the [local name] "literalValue" whose [normalized value] is
   the RXER character data translation [RXER] of the Value.

   The attribute form translation of a literal value SHALL NOT be used
   if:




Legg                      Expires 20 April 2007                [Page 60]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   (a) the RXER Infoset translation of the Value is not a character data
       translation [RXER] or is a character data translation that
       contains qualified names [XMLNS10], or

   (b) attribute forms of Value have been explicitly disallowed, or

   (c) the Value has a nested notational value.

   The element form translation of a literal value is an element item
   with the [local name] "literalValue" whose content is [children] and
   [attributes] are the RXER



Legg                       Expires 11 May 2006                 [Page 53]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005 Infoset translation of the Value, except
   that a value of the EXTERNAL type (or a subtype thereof) is
   translated according to the associated type defined in Clause 34.5 of
   X.680 [X.680].  In addition, where the
   content [children] and [attributes] of
   an element item in the translation corresponds correspond to a directly nested
   notational value value, the translation specified in Section 7.2. MUST be
   used instead for the content [children] and [attributes] of that element item, and an
   attribute item with the [local name] "literal", [namespace name] "http://xmled.info/ns/ASN.1"
   "urn:ietf:params:xml:ns:asnx" and [normalized value] "false" or "0"
   (e.g., asn1:literal="false") asnx:literal="false") MUST be added to the [attributes] of
   that element item.

   Each outermost <literalValue> element item, and each nested element
   item that corresponds to a top level top-level NamedType from a module with a
   target namespace, is required to be self-contained [RXER].

      ASIDE:

      Aside: An element item is self-contained if all namespace prefixes
      used by the element item and its contents are declared within the
      element item.

      ASIDE:

      Aside: A <literalValue> element item nested within another
      <literalValue> element item is not required to be self-contained.

   An attribute item with the [local name] "literal", [namespace name]
   "http://xmled.info/ns/ASN.1"
   "urn:ietf:params:xml:ns:asnx" and [normalized value] "true" or "1"
   (e.g., asn1:literal="true") asnx:literal="true") MAY be added to the [attributes] of the
   <literalValue> element item and/or any nested element item whose
   content corresponds and attributes correspond to a literal value.

      ASIDE:

      Aside: The asn1:literal asnx:literal attribute operates as a switch that
      indicates whether the content and other attributes of the element
      containing the attribute is are interpreted as ASN.X notation (a
      notational value) or as an RXER encoding (a literal value).

   From the perspective of an ASN.X document as the RXER encoding of an
   abstract value of the ModuleDefinition type in Appendix A, the type
   of the <literalValue> element is an unconstrained AnyType Markup [RXER], not the
   governing type of the Value.  This means that the Infoset



Legg                      Expires 20 April 2007                [Page 61]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   representation of the <literalValue> element must be preserved in
   re-encodings of the ASN.X document, except where an element item
   corresponds to a top level NamedType from a module with a target
   namespace, in which case it is sufficient to preserve only the
   abstract value.  The top level NamedType could be one defined in the
   same ASN.X document.

   Similarly, the type of the literalValue attribute is a UTF8String,
   not the governing type of the Value.  This means that the exact
   characters of the [normalized value] of the attribute must be
   preserved in re-encodings of the ASN.X document.



Legg                       Expires 11 May 2006                 [Page 54]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005

7.2.  Translation of Notational Values

   The translation of a notational value is the translation of either a
   BuiltinValue, a ReferencedValue or an ObjectClassFieldValue.

   The translation of a ReferencedValue is the translation of either a
   DefinedValue or a ValueFromObject.

   The translation for each these cases is described as creating an
   element item with the [local name] "value", which is appropriate for
   a notational value that stands on its own.  However, a notational
   value may also be directly nested within a literal value, in which
   case the [local name] will be determined according to RXER and the
   governing ASN.1 type of the enclosing literal value.

      ASIDE:

      Aside: In the latter case the element item will also have a
      literal attribute item with the [normalized value] "false" or "0".

   A notational value that is not directly nested within a literal value
   MAY instead have the [local name] "literalValue" provided an
   attribute item with the [local name] "literal", [namespace name]
   "http://xmled.info/ns/ASN.1"
   "urn:ietf:params:xml:ns:asnx" and [normalized value] "false" or "0"
   is added to the [attributes] of the <literalValue> element item.

   Examples

      zero INTEGER ::= 0

      <namedValue name="zero" type="asn1:INTEGER" type="asnx:INTEGER" literalValue="0"/>

          OR

      <namedValue name="zero" type="asn1:INTEGER"> type="asnx:INTEGER">
       <literalValue>0</literalValue>
      </namedValue>

      nothing INTEGER ::= zero

      <namedValue name="nothing" type="asn1:INTEGER" type="asnx:INTEGER" value="tns:zero"/>




Legg                      Expires 20 April 2007                [Page 62]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


          OR

      <namedValue name="nothing" type="asn1:INTEGER"> type="asnx:INTEGER">
       <value ref="tns:zero"/><!-- A notational value. -->
      </namedValue>

          OR




Legg                       Expires 11 May 2006                 [Page 55]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005

      <namedValue name="nothing" type="asn1:INTEGER"> type="asnx:INTEGER">
       <literalValue xmlns:asn1="http://xmled.info/ns/ASN.1" xmlns:asnx="urn:ietf:params:xml:ns:asnx"
                     xmlns:tns="http://example.com/ns/MyModule"
                     asn1:literal="false"
                     asnx:literal="false"
                     ref="tns:zero"/><!-- A notational value. -->
      </namedValue>

      integerList SEQUENCE OF number INTEGER ::= { zero, 3, 7 }

      <namedValue name="integerList">
       <type>
        <sequenceOf>
         <element name="number" type="asn1:INTEGER"/> type="asnx:INTEGER"/>
        </sequenceOf>
       </type>
       <literalValue xmlns:asn1="http://xmled.info/ns/ASN.1" xmlns:asnx="urn:ietf:params:xml:ns:asnx"
                     xmlns:tns="http://example.com/ns/MyModule">
        <number asn1:literal="false" asnx:literal="false"
                ref="tns:zero"/><!-- A notational value. -->
        <number>3</number><!-- A literal value. -->
        <number>7</number><!-- A literal value. -->
       </literalValue>
      </namedValue>

7.2.1.  DefinedValue Translation

   If a DefinedValue is a valuereference (not a DummyReference) or an
   ExternalValueReference
   ExternalValueReference, then the translation of the DefinedValue is
   either the attribute form translation of a value reference, or the
   element form translation of a value reference.

   The attribute form translation of a value reference is an attribute
   item with the [local name] "value".  The [normalized value] of this
   attribute item is the qualified name referencing the value definition
   (see Section 5.1).  The attribute form translation SHALL NOT be used
   if the qualified name is shared by two or more value definitions in
   separate modules, i.e., is ambiguous.

   The element form translation of a value reference is an element item
   with the [local name] "value".  An attribute item with the



Legg                      Expires 20 April 2007                [Page 63]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   [local name] "ref" SHALL be added to the [attributes] of the <value>
   element item.  The [normalized value] of this attribute item is the
   qualified name referencing the value definition (see Section 5.1).
   If the qualified this reference name is shared by two or more value definitions in
   separate not distinct with respect to the current
   module and the modules referenced by its <import> element items (see
   Section 5.1), then an attribute item with the [local name] "context"
   SHALL be added to the [attributes] of the <value> element item,
   otherwise if the module containing the referenced value definition
   has a schema identity URI, then an attribute item with the
   [local name] "context" MAY be added to the [attributes] of the
   <value> element item.  The [normalized value] of this attribute item
   is the character
   string value of the AnyURIValue schema identity URI of the SCHEMA-IDENTITY encoding



Legg                       Expires 11 May 2006                 [Page 56]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


   instruction for the module containing the value
   definition referenced by the DefinedValue.

      ASIDE: A SCHEMA-IDENTITY encoding instruction

      Aside: If a reference name is obligatory in
      such cases not distinct, then the module
      containing the referenced definition must have a schema identity
      URI (see Section 5.1).

   An element item with the [local name] "annotation" MAY be added to
   the [children] of the <value> element item.

   Usually the translator is free to choose either an attribute form or
   element form translation for a DefinedValue, however in some contexts
   attribute forms of Value are explicitly disallowed.  In particular,
   the attribute form translation SHALL NOT be used for a DefinedValue
   that is directly nested in a literal value.

   If a DefinedValue is a DummyReference then the translation of the
   DefinedValue is the translation of the Value in the ActualParameter
   corresponding to the DummyReference.

   If a DefinedValue is a ParameterizedValue DummyReference or ParameterizedValue, then the
   translation of the
   Value DefinedValue is the translation of the Value on the right hand side of the
   referenced ParameterizedValueAssignment.

      ASIDE: The Value that substitutes for a
   DummyReference or ParameterizedValue in a DefinedValue in a ReferencedValue in a
      notational value is necessarily also a notational value. (see Section 5.9).

7.2.2.  BuiltinValue Translation

   The translation of a BuiltinValue is the translation of either a
   ChoiceValue, a SequenceValue, a SequenceOfValue, a SetValue or a
   TaggedValue.

      ASIDE:

      Aside: There are other possibilities for a BuiltinValue, but these
      will all be literal values.  This section applies to a
      BuiltinValue that is a notational value.

   The translation of a TaggedValue is the translation of the contained
   Value (which is necessarily a notational value).

   The translation of a ChoiceValue is an element item with the
   [local name] "value".  An element item with the [local name]
   "annotation" MAY be added to the [children] of the <value> element
   item.  An element item with the same [local name] (i.e., "attribute",



Legg                      Expires 20 April 2007                [Page 64]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   "element", "group" or "member") as the translation of the NamedType
   corresponding to the identifier in the ChoiceValue SHALL be appended
   to the [children] of the <value> element item.  An attribute item
   with the [local name] "name" SHALL be added to the [attributes] of



Legg                       Expires 11 May 2006                 [Page 57]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
   the <attribute>, <element>, <component>, <group> or <member> element
   item.  The [normalized value] of this attribute item is the RXER
   character data translation of the effective name of the NamedType.
   The translation of the Value in the ChoiceValue SHALL be added to the content
   [children] or [attributes] of the <attribute>, <element>,
   <component>, <group> or <member> element item.

   The translation of a SequenceValue or SetValue is an element item
   with the [local name] "value".  An element item with the [local name]
   "annotation" MAY be added to the [children] of the <value> element
   item.  The translation of each NamedValue in the ComponentValueList
   of the SequenceValue or SetValue SHALL be appended to the [children]
   of the <value> element item, in the order in which their
   corresponding NamedType instances appear in the definition of the
   governing type.

   The translation of a SequenceOfValue is an element item with the
   [local name] "value".  An element item with the [local name]
   "annotation" MAY be added to the [children] of the <value> element
   item.

   If the SequenceOfValue has a NamedValueList NamedValueList, then the translation of
   each NamedValue in the NamedValueList SHALL be appended to the
   [children] of the <value> element item.

   If the SequenceOfValue has a ValueList ValueList, then an element item with the
   [local name] "element" or "component" (translator's choice) SHALL be
   appended to the [children] of the <value> element item for each Value
   in the ValueList.  An attribute item with the [local name] "name" and
   [normalized value] "item" SHALL be added to the [attributes] of the
   <element> or <component> element item.  The translation of the Value
   (from the ValueList) SHALL be added to the
   content [children] or [attributes]
   of the <element> or <component> element item.

   The translation of a NamedValue is an element item with the same
   [local name] as the translation of the corresponding NamedType, i.e.,
   "attribute", "element", "group" or "item".  An attribute item with
   the [local name] "name" SHALL be added to the [attributes] of the
   element item.  The [normalized value] of this attribute item is the
   RXER character data translation of the effective name of the
   NamedType.  The translation of the Value in the NamedValue SHALL be
   added to the content [children] or [attributes] of the element item.

   Examples



Legg                      Expires 20 April 2007                [Page 65]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


      -- This is the governing type.
      MyType ::= SEQUENCE {
           one    [ATTRIBUTE] INTEGER,
           two    INTEGER,
           three  [ATTRIBUTE][LIST] SEQUENCE OF number INTEGER



Legg                       Expires 11 May 2006                 [Page 58]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
      }

      <namedType name="MyType">
       <type>
        <sequence>
         <attribute name="one" type="asn1:INTEGER"/> type="asnx:INTEGER"/>
         <element name="two" type="asn1:INTEGER"/> type="asnx:INTEGER"/>
         <attribute name="three">
          <type>
           <list>
            <item name="number" type="asn1:INTEGER"/> type="asnx:INTEGER"/>
           </list>
          </type>
         </attribute>
        </sequence>
       </type>
      </namedType>

      myValue1 MyType ::= {
          one     456,
          two     123,
          three   { number 123, number 456 }
      }
      -- All literal values.

      <namedValue name="myValue1" type="tns:MyType">
       <literalValue one="456" three="123 456">
        <two>123</two>
       </literalValue>
      </namedValue>

      myValue2 MyType ::= {
          one     456,
          two     myObject.&number,
            -- only the value for component "two" is a notational value
          three   { number 123, number 456 }
      }

      <namedValue name="myValue2" type="tns:MyType">
       <literalValue xmlns:asn1="http://xmled.info/ns/ASN.1" xmlns:asnx="urn:ietf:params:xml:ns:asnx"
                     xmlns:tns="http://example.com/ns/MyModule"
                     one="456" three="123 456">
        <two asn1:literal="false">
         <fromObjects object="tns:myObject" fieldName="number"/>
        </two>
       </literalValue>
      </namedValue> asnx:literal="false">



Legg                      Expires 11 May 2006 20 April 2007                [Page 59] 66]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005       October 20, 2006


         <fromObjects object="tns:myObject" fieldName="number"/>
        </two>
       </literalValue>
      </namedValue>

      myValue3 MyType ::= {
          one     myObject.&number,
          two     123,
          three   { number 123, number myObject.&number }
      }

      <namedValue name="myValue3" type="tns:MyType">
       <value>
        <attribute name="one">
         <value>
          <fromObjects object="tns:myObject" fieldName="number"/>
         </value>
        </attribute>
        <element name="two" literalValue="123"/>
        <attribute name="three">
         <value>
          <item name="number" literalValue="123"/>
          <item name="number">
           <value>
            <fromObjects object="tns:myObject" fieldName="number"/>
           </value>
          </item>
         </value>
        </attribute>
       </value>
      </namedValue>

7.2.3.  ValueFromObject Translation

   The translation of a ValueFromObject is an element item with the
   [local name] "value".  An element item with the [local name]
   "annotation" MAY be added to the [children] of the <value> element
   item.  An element item with the [local name] "fromObjects" SHALL be
   appended to the [children] of the <value> element item.

   The translation of the ReferencedObjects in the ValueFromObject SHALL
   be added to the content of and
   the <fromObjects> element item.

   The translation of the FieldName in the ValueFromObject SHALL be
   appended
   added to the content [children] and/or [attributes] of the <fromObjects>
   element item.

7.2.4.  ObjectClassFieldValue Translation

   If an ObjectClassFieldValue is a BuiltinValue in a FixedTypeFieldVal FixedTypeFieldVal,



Legg                      Expires 20 April 2007                [Page 67]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   then the translation of the ObjectClassFieldValue is the translation
   of the BuiltinValue.

   If an ObjectClassFieldValue is a ReferencedValue in a



Legg                       Expires 11 May 2006                 [Page 60]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


   FixedTypeFieldVal
   FixedTypeFieldVal, then the translation of the ObjectClassFieldValue
   is the translation of the ReferencedValue.

   If an ObjectClassFieldValue is an OpenTypeFieldVal OpenTypeFieldVal, then the
   translation of the ObjectClassFieldValue is an element item with the
   [local name] "value".  An element item with the [local name]
   "annotation" MAY be added to the [children] of the <value> element
   item.  An element item with the [local name] "openTypeValue" SHALL be
   appended to the [children] of the <value> element item.  The
   translation of the Type in the OpenTypeFieldVal SHALL be added to the
   content of and the <openTypeValue> element item.  The translation
   of the Value in the OpenTypeFieldVal SHALL be appended added to the content [children]
   and/or [attributes] of the <openTypeValue> element item.

   Example

      myValue TYPE-IDENTIFIER.&Type ::= INTEGER:123

      <namedValue name="myValue">
       <type>
        <fromClass class="asn1:TYPE-IDENTIFIER" class="asnx:TYPE-IDENTIFIER" fieldName="Type"/>
       </type>
       <value>
        <openTypeValue type="asn1:INTEGER" type="asnx:INTEGER" literalValue="123"/>
       </value>
      </namedValue>

8.  Translation of Value Sets

   The translation of a ValueSet is an element item with the
   [local name] "valueSet".  An element item with the [local name]
   "annotation" MAY be added to the [children] of the <valueSet> element
   item.  The translation of the ElementSetSpecs in the ValueSet SHALL
   be appended to the [children] of the <valueSet> element item.

   Example

      { 1 | 3..7, ..., 9..19 EXCEPT ( 11 | 12 ) }

      <valueSet>
       <union>
        <literalValue>1</literalValue>
        <range>
         <minInclusive literalValue="3"/>
         <maxInclusive literalValue="7"/>
        </range>
       </union>
       <extension>



Legg                      Expires 11 May 2006 20 April 2007                [Page 61] 68]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005       October 20, 2006


        </range>
       </union>
       <extension>
        <all>
         <range>
          <minInclusive literalValue="9"/>
          <maxInclusive literalValue="19"/>
         </range>
         <except>
          <union>
           <literalValue>11</literalValue>
           <literalValue>12</literalValue>
          </union>
         </except>
        </all>
       </extension>
      </valueSet>

8.1.  ElementSetSpecs Translation

   The translation of an ElementSetSpecs where the ellipsis ("...") is
   not present is the translation of the ElementSetSpec in the
   RootElementSetSpec.

   The translation of an ElementSetSpecs where the ellipsis ("...") is
   present is the translation of the ElementSetSpec in the
   RootElementSetSpec followed by an element item with the [local name]
   "extension".  If an AdditionalElementSetSpec is present present, then the
   translation of the ElementSetSpec in the AdditionalElementSetSpec
   SHALL be added to the [children] of the <extension> element item.

8.2.  ElementSetSpec Translation

   If the ElementSetSpec is of the "ALL Exclusions" form form, then the
   translation of the ElementSetSpec is an element item with the
   [local name] "all".  An element item with the [local name] "except"
   SHALL be added to the [children] of the <all> element item.  The
   translation of the Elements in the Exclusions SHALL be added to the
   [children] of the <except> element item.

   If the ElementSetSpec is of the "Unions" form form, then the translation
   of the ElementSetSpec is the translation of the Unions.

   If the Unions has only one Intersections Intersections, then the translation of the
   Unions is the translation of that Intersections, otherwise the
   translation of the Unions is an element item with the [local name]
   "union".  The translation of each Intersections SHALL be appended to
   the [children] of the <union> element item.



Legg                      Expires 20 April 2007                [Page 69]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   If the Intersections has only one IntersectionElements IntersectionElements, then the
   translation of the Intersections is the translation of that



Legg                       Expires 11 May 2006                 [Page 62]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
   IntersectionElements, otherwise the translation of the Intersections
   is an element item with the [local name] "intersection".  The
   translation of each IntersectionElements SHALL be appended to the
   [children] of the <intersection> element item.

   If the IntersectionElements is of the "Elems Exclusions" form form, then
   the translation of the IntersectionElements is an element item with
   the [local name] "all".  The content of the <all> element item is the translation of the Elements in the Elems followed by
   and an element item with the [local name] "except". "except" SHALL be added to
   the [children] of the <all> element item.  The translation of the
   Elements in the Exclusions SHALL be added to the [children] of the
   <except> element item.

   If the IntersectionElements is of the "Elements" form form, then the
   translation of the IntersectionElements is the translation of the
   Elements.

   The translation of an Elements is the translation of the
   SubtypeElements, ObjectSetElements or ElementSetSpec, as appropriate.

8.3.  SubtypeElements Translation

   If a SubtypeElements is a SingleValue SingleValue, then the translation of the
   SubtypeElements is the translation of the Value, except that an
   attribute form of the Value translation SHALL NOT be used.

   If a SubtypeElements is a ContainedSubtype ContainedSubtype, then the translation of
   the SubtypeElements is an element item with the [local name]
   "includes".  The translation of the Type in the ContainedSubtype
   SHALL be added to the content [children] or [attributes] of the <includes>
   element item.

   If a SubtypeElements is a ValueRange ValueRange, then the translation of the
   SubtypeElements is the translation of the ValueRange.

   If a SubtypeElements is a SizeConstraint SizeConstraint, then the translation of the
   SubtypeElements is an element item with the [local name] "size".  The
   content of the <size> element item is the
   translation of the Constraint in the SizeConstraint. SizeConstraint SHALL be added to
   the [children] of the <size> element item.

   If a SubtypeElements is a TypeConstraint TypeConstraint, then the translation of the
   SubtypeElements is an element item with the [local name]
   "typeConstraint".  The content of the <typeConstraint> element item
   is the translation of the Type in the TypeConstraint. TypeConstraint
   SHALL be added to the [children] or [attributes] of the
   <typeConstraint> element item.




Legg                      Expires 20 April 2007                [Page 70]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   If a SubtypeElements is a PermittedAlphabet PermittedAlphabet, then the translation of
   the SubtypeElements is an element item with the [local name] "from".
   The content of the <from> element item is the translation of the Constraint in the PermittedAlphabet.



Legg                       Expires 11 May 2006                 [Page 63]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005 PermittedAlphabet SHALL be
   added to the [children] of the <from> element item.

   If a SubtypeElements is an InnerTypeConstraints InnerTypeConstraints, then the translation
   of the SubtypeElements is the translation of the
   InnerTypeConstraints.

   If a SubtypeElements is a PatternConstraint PatternConstraint, then the translation of
   the SubtypeElements is an element item with the [local name]
   "pattern".  The content of the <pattern> element item is the translation of the Value in the PatternConstraint. PatternConstraint
   SHALL be added to the [children] or [attributes] of the <pattern>
   element item.

8.3.1.  ValueRange Translation

   The translation of a ValueRange is an element item with the
   [local name] "range".

   If the LowerEndpoint in the ValueRange is of the "LowerEndValue <"
   form
   form, then an element item with the [local name] "minExclusive" SHALL
   be added to the [children] of the <range> element item.  If the
   LowerEndValue is not "MIN" "MIN", then the content of the <minExclusive>
   element item is the translation of the Value in the LowerEndValue.
   LowerEndValue SHALL be added to the [children] or [attributes] of the
   <minExclusive> element item.

   If the LowerEndpoint in the ValueRange is of the "LowerEndValue" form
   and the LowerEndValue is not "MIN" "MIN", then an element item with the
   [local name] "minInclusive" SHALL be added to the [children] of the
   <range> element item.  The content of the <minInclusive> element item
   is the translation of the Value in the LowerEndValue.
   LowerEndValue SHALL be added to the [children] or [attributes] of the
   <minInclusive> element item.

   If the LowerEndpoint in the ValueRange is of the "LowerEndValue" form
   and the LowerEndValue is "MIN" "MIN", then an element item with the
   [local name] "minInclusive" MAY be added to the [children] of the
   <range> element item.

   If the UpperEndpoint in the ValueRange is of the "< UpperEndValue"
   form
   form, then an element item with the [local name] "maxExclusive" SHALL
   be added to the [children] of the <range> element item.  If the
   UpperEndValue is not "MAX" "MAX", then the content of the <maxExclusive>
   element item is the translation of the Value in the UpperEndValue.
   UpperEndValue SHALL be added to the [children] or [attributes] of the
   <maxExclusive> element item.

   If the UpperEndpoint in the ValueRange is of the "UpperEndValue" form
   and the UpperEndValue is not "MAX" "MAX", then an element item with the



Legg                      Expires 20 April 2007                [Page 71]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   [local name] "maxInclusive" SHALL be added to the [children] of the
   <range> element item.  The content of the <maxInclusive> element item
   is the translation of the Value in the UpperEndValue.
   UpperEndValue SHALL be added to the [children] or [attributes] of the
   <maxInclusive> element item.

   If the UpperEndpoint in the ValueRange is of the "UpperEndValue" form
   and the UpperEndValue is "MAX" "MAX", then an element item with the
   [local name] "maxInclusive" MAY be added to the [children] of the
   <range> element item.




Legg                       Expires 11 May 2006                 [Page 64]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005

   Examples

      1..10

      <range>
       <minInclusive literalValue="1"/>
       <maxInclusive literalValue="10"/>
      </range>

      0..MAX

      <range>
       <minInclusive literalValue="0"/>
      </range>

      0<..<MAX

      <range>
       <minExclusive literalValue="0"/>
       <maxExclusive/>
      </range>

8.3.2.  InnerTypeConstraints Translation

   The translation of an InnerTypeConstraints of the
   "WITH COMPONENT SingleTypeConstraint" form is an element item with
   the [local name] "withComponent".  The content of the <withComponent>
   element item is the translation of the Constraint
   in the
   SingleTypeConstraint. SingleTypeConstraint SHALL be added to the [children] of the
   <withComponent> element item.

   The translation of an InnerTypeConstraints of the
   "WITH COMPONENTS MultipleTypeConstraints" form is an element item
   with the [local name] "withComponents".

   If the MultipleTypeConstraints is a PartialSpecification PartialSpecification, then an
   attribute item with the [local name] "partial" and the
   [normalized value] "true" or "1" SHALL be added to the [attributes]
   of the <withComponents> element item.  If the MultipleTypeConstraints



Legg                      Expires 20 April 2007                [Page 72]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   is a FullSpecification FullSpecification, then an attribute item with the [local name]
   "partial" and the [normalized value] "false" or "0" MAY be added to
   the [attributes] of the <withComponents> element item.

   The translation of each NamedConstraint in the
   MultipleTypeConstraints SHALL be appended to the [children] of the
   <withComponents> element item.

   The translation of a NamedConstraint is an element item with the same
   [local name] (i.e., "component", "attribute", "element", "group" or
   "member") as



Legg                       Expires 11 May 2006                 [Page 65]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005 the translation of the NamedType corresponding to the
   identifier of the NamedConstraint.  An attribute item with the
   [local name] "name" SHALL be added to the [attributes] of the
   <attribute>, <element>, <component>, <group> or <member> element
   item, as appropriate. the case may be.  The [normalized value] of this attribute
   item is the RXER character data translation of the effective name of
   the NamedType corresponding to the identifier of the NamedConstraint.

   If the PresenceConstraint of the ComponentConstraint of the
   NamedConstraint is not empty empty, then an attribute item with the
   [local name] "use" SHALL be added to the [attributes] of the
   <component>
   <attribute>, <element>, <component>, <group> or <member> element item.
   item, as the case may be.  The [normalized value] of this attribute
   item is the text of the PresenceConstraint with all letters
   downcased, i.e., either "present", "absent" or "optional".

   If the ValueConstraint in the ComponentConstraint of the
   NamedConstraint is not empty empty, then the translation of the Constraint
   in the ValueConstraint SHALL be added to the [children] of the
   <attribute>, <element>, <component>, <group> or <member> element
   item, as
   appropriate. the case may be.

9.  Translation of Object Classes

   The translation of an ObjectClass is the translation of either a
   DefinedObjectClass, an ObjectClassDefn or a ParameterizedObjectClass.

   If an ObjectClass is a ParameterizedObjectClass then the translation
   of the ObjectClass is the

   The translation of the ObjectClass on the right
   hand side of the referenced ParameterizedObjectClassAssignment.

      ASIDE: The ObjectClass that substitutes for a ParameterizedObjectClass is potentially described in a different module
      scope to the surrounding translation, therefore the translation of
      a nested Type may require a tagDefault or extensibilityImplied
      attribute item, according to the provisions of
   Section 6.14. 5.9.

9.1.  DefinedObjectClass Translation

   If a DefinedObjectClass is an objectclassreference (not a
   DummyReference), an ExternalObjectClassReference or a
   UsefulObjectClassReference
   UsefulObjectClassReference, then the translation of the
   DefinedObjectClass is either the attribute form translation of an
   object class reference, or the element form translation of an object
   class reference.



Legg                      Expires 20 April 2007                [Page 73]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   The attribute form translation of an object class reference is an
   attribute item with the [local name] "class".  The [normalized value]
   of this attribute item is the qualified name referencing the object



Legg                       Expires 11 May 2006                 [Page 66]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
   class definition (see Section 5.1).  In the case of a
   UsefulObjectClassReference
   UsefulObjectClassReference, the namespace name is
   "http://xmled.info/ns/ASN.1"
   "urn:ietf:params:xml:ns:asnx" and the local part is either
   "TYPE-IDENTIFIER" or "ABSTRACT-SYNTAX", as appropriate.  The
   attribute form translation SHALL NOT be used if the qualified name is
   shared by two or more object class definitions in separate modules,
   i.e., is ambiguous.  Otherwise, the translator is free to choose
   either the attribute form or element form translation for an object
   class reference.

   The element form translation of an object class reference is an
   element item with the [local name] "class".  An attribute item with
   the [local name] "ref" SHALL be added to the [attributes] of the
   <class> element item.  The [normalized value] of this attribute item
   is the qualified name referencing the object class definition.  In
   the case of a UsefulObjectClassReference the namespace name is
   "http://xmled.info/ns/ASN.1"
   "urn:ietf:params:xml:ns:asnx" and the local part is either
   "TYPE-IDENTIFIER" or "ABSTRACT-SYNTAX", as appropriate. the case may be.  If the
   qualified
   reference name is shared not distinct with respect to the current module and
   the modules referenced by two or more its <import> element items (see
   Section 5.1), then an attribute item with the [local name] "context"
   SHALL be added to the [attributes] of the <class> element item,
   otherwise if the module containing the referenced object class definitions in
   separate modules
   definition has a schema identity URI, then an attribute item with the
   [local name] "context" SHALL MAY be added to the [attributes] of the
   <class> element item.  The [normalized value] of this attribute item
   is the character
   string value of the AnyURIValue schema identity URI of the SCHEMA-IDENTITY encoding
   instruction for the module containing the referenced
   object class definition
   referenced by the DefinedObjectClass.

      ASIDE: A SCHEMA-IDENTITY encoding instruction definition.

      Aside: If a reference name is obligatory in
      such cases not distinct, then the module
      containing the referenced definition must have a schema identity
      URI (see Section 5.1).

   An element item with the [local name] "annotation" MAY be added to
   the [children] of the <class> element item.

   The translation of the DefinedObjectClass is the same whether the
   object class definition is referenced by an objectclassreference or
   an ExternalObjectClassReference.

   If a DefinedObjectClass is a DummyReference DummyReference, then the translation of
   the DefinedObjectClass is the translation of the DefinedObjectClass
   in the ActualParameter corresponding to the DummyReference. DummyReference (see
   Section 5.9).

9.2.  ObjectClassDefn Translation



Legg                      Expires 20 April 2007                [Page 74]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   The translation of an ObjectClassDefn is an element item with the
   [local name] "class".  An element item with the [local name]
   "annotation" MAY be added to the [children] of the <class> element
   item.  The translation of each FieldSpec in the ObjectClassDefn SHALL
   be appended to the [children] of the <class> element item.




Legg                       Expires 11 May 2006                 [Page 67]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005

   The translation of a FieldSpec is the translation of either a
   TypeFieldSpec, a FixedTypeValueFieldSpec, a
   VariableTypeValueFieldSpec, a FixedTypeValueSetFieldSpec, a
   VariableTypeValueSetFieldSpec, an ObjectFieldSpec or an
   ObjectSetFieldSpec.

9.2.1.  TypeFieldSpec Translation

   The translation of a TypeFieldSpec where the TypeOptionalitySpec is
   absent is an element item with the [local name] "typeField".

   The translation of a TypeFieldSpec with a TypeOptionalitySpec of
   "OPTIONAL" is an element item with the [local name] "optional".  An
   element item with the [local name] "typeField" SHALL be added to the
   [children] of the <optional> element item.

   The translation of a TypeFieldSpec with a TypeOptionalitySpec of
   "DEFAULT" is an element item with the [local name] "optional".  An
   element item with the [local name] "typeField" SHALL be added to the
   [children] of the <optional> element item.  An element item with the
   [local name] "default" SHALL be appended to the [children] of the
   <optional> element item.  The content of the <default> element item
   is the translation of the Type in the TypeOptionalitySpec.
   TypeOptionalitySpec SHALL be added to the [children] or [attributes]
   of the <default> element item.

   An attribute item with the [local name] "name" SHALL be added to the
   [attributes] of the <typeField> element item.  The [normalized value]
   of this attribute item is the typefieldreference of the
   TypeFieldSpec, without the ampersand ("&", U+0026).  An element item
   with the [local name] "annotation" MAY be added to the [children] of
   the <typeField> element item.

   Example

      CLASS {
          &One,
          &Two    OPTIONAL,
          &Three  DEFAULT OBJECT IDENTIFIER
      }

      <class>
       <typeField name="One"/>



Legg                      Expires 20 April 2007                [Page 75]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


       <optional>
        <typeField name="Two"/>
       </optional>
       <optional>
        <typeField name="Three"/>
        <default type="asn1:OBJECT-IDENTIFIER"/> type="asnx:OBJECT-IDENTIFIER"/>
       </optional>



Legg                       Expires 11 May 2006                 [Page 68]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
      </class>

9.2.2.  FixedTypeValueFieldSpec Translation

   The translation of a FixedTypeValueFieldSpec where the
   ValueOptionalitySpec is absent is an element item with the
   [local name] "valueField".

   The translation of a FixedTypeValueFieldSpec with a
   ValueOptionalitySpec of "OPTIONAL" is an element item with the
   [local name] "optional".  An element item with the [local name]
   "valueField" SHALL be added to the [children] of the <optional>
   element item.

   The translation of a FixedTypeValueFieldSpec with a
   ValueOptionalitySpec of "DEFAULT" is an element item with the
   [local name] "optional".  An element item with the [local name]
   "valueField" SHALL be added to the [children] of the <optional>
   element item.  An element item with the [local name] "default" SHALL
   be appended to the [children] of the <optional> element item.  The
   content of the <default> element item is the
   translation of the Value in the ValueOptionalitySpec. ValueOptionalitySpec SHALL be added
   to the [children] or [attributes] of the <default> element item.

   An attribute item with the [local name] "name" SHALL be added to the
   [attributes] of the <valueField> element item.  The
   [normalized value] of this attribute item is the valuefieldreference
   of the FixedTypeValueFieldSpec, without the ampersand ("&", U+0026).
   If the "UNIQUE" keyword is present present, then an attribute item with the
   [local name] "unique" and [normalized value] "true" or "1" SHALL be
   added to the [attributes] of the <valueField> element item, otherwise
   an attribute item with the [local name] "unique" and
   [normalized value] "false" or "0" MAY be added to the [attributes] of
   the <valueField> element item.  An element item with the [local name]
   "annotation" MAY be added to the [children] of the <valueField>
   element item.  The translation of the Type in the
   FixedTypeValueFieldSpec SHALL be added to the content [children] or
   [attributes] of the <valueField> element item.

   Example

      CLASS {



Legg                      Expires 20 April 2007                [Page 76]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


          &one    OBJECT IDENTIFIER UNIQUE,
          &two    BOOLEAN OPTIONAL,
          &three  INTEGER DEFAULT 0
      }

      <class>
       <valueField name="one" unique="true"



Legg                       Expires 11 May 2006                 [Page 69]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


                   type="asn1:OBJECT-IDENTIFIER"/>
                   type="asnx:OBJECT-IDENTIFIER"/>
       <optional>
        <valueField name="two" type="asn1:BOOLEAN"/> type="asnx:BOOLEAN"/>
       </optional>
       <optional>
        <valueField name="three" type="asn1:INTEGER"/> type="asnx:INTEGER"/>
        <default literalValue="0"/>
       </optional>
      </class>

9.2.3.  FixedTypeValueSetFieldSpec Translation

   The translation of a FixedTypeValueSetFieldSpec where the
   ValueSetOptionalitySpec is absent is an element item with the
   [local name] "valueSetField".

   The translation of a FixedTypeValueSetFieldSpec with a
   ValueSetOptionalitySpec of "OPTIONAL" is an element item with the
   [local name] "optional".  An element item with the [local name]
   "valueSetField" SHALL be added to the [children] of the <optional>
   element item.

   The translation of a FixedTypeValueSetFieldSpec with a
   ValueSetOptionalitySpec of "DEFAULT" is an element item with the
   [local name] "optional".  An element item with the [local name]
   "valueSetField" SHALL be added to the [children] of the <optional>
   element item.  An element item with the [local name] "default" SHALL
   be appended to the [children] of the <optional> element item.  The
   content of the <default> element item is the
   translation of the ValueSet in the ValueSetOptionalitySpec. ValueSetOptionalitySpec SHALL be
   added to the [children] of the <default> element item.

   An attribute item with the [local name] "name" SHALL be added to the
   [attributes] of the <valueSetField> element item.  The
   [normalized value] of this attribute item is the
   valuesetfieldreference of the FixedTypeValueSetFieldSpec, without the
   ampersand ("&", U+0026).  An element item with the [local name]
   "annotation" MAY be added to the [children] of the <valueSetField>
   element item.  The translation of the Type in the
   FixedTypeValueSetFieldSpec SHALL be added to the content [children] or
   [attributes] of the <valueSetField> element item.




Legg                      Expires 20 April 2007                [Page 77]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   Example

      CLASS {
          &One    UTF8String,
          &Two    BOOLEAN OPTIONAL,
          &Three  INTEGER DEFAULT { 1 | 2 }
      }



Legg                       Expires 11 May 2006                 [Page 70]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005

      <class>
       <valueSetField name="One" type="asn1:UTF8String"/> type="asnx:UTF8String"/>
       <optional>
        <valueSetField name="Two" type="asn1:BOOLEAN"/> type="asnx:BOOLEAN"/>
       </optional>
       <optional>
        <valueSetField name="Three" type="asn1:INTEGER"/> type="asnx:INTEGER"/>
        <default>
         <valueSet>
          <union>
           <literalValue>1</literalValue>
           <literalValue>2</literalValue>
          </union>
         </valueSet>
        </default>
       </optional>
      </class>

9.2.4.  VariableTypeValueFieldSpec Translation

   The translation of a VariableTypeValueFieldSpec where the
   ValueOptionalitySpec is absent is an element item with the
   [local name] "valueField".

   The translation of a VariableTypeValueFieldSpec with a
   ValueOptionalitySpec of "OPTIONAL" is an element item with the
   [local name] "optional".  An element item with the [local name]
   "valueField" SHALL be added to the [children] of the <optional>
   element item.

   The translation of a VariableTypeValueFieldSpec with a
   ValueOptionalitySpec of "DEFAULT" is an element item with the
   [local name] "optional".  An element item with the [local name]
   "valueField" SHALL be added to the [children] of the <optional>
   element item.  An element item with the [local name] "default" SHALL
   be appended to the [children] of the <optional> element item.  The
   translation of the Value in the ValueOptionalitySpec SHALL be added
   to the content [children] or [attributes] of the <default> element item.

   An attribute item with the [local name] "name" SHALL be added to the



Legg                      Expires 20 April 2007                [Page 78]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   [attributes] of the <valueField> element item.  The
   [normalized value] of this attribute item is the valuefieldreference
   of the VariableTypeValueFieldSpec, without the ampersand ("&",
   U+0026).  An element item with the [local name] "annotation" MAY be
   added to the [children] of the <valueField> element item.  An element
   item with the [local name] "typeFromField" SHALL be appended to the
   [children] of the <valueField> element item.  The translation of the
   FieldName in the VariableTypeValueFieldSpec SHALL be added to the



Legg                       Expires 11 May 2006                 [Page 71]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


   content
   [children] or [attributes] of the <typeFromField> element item.

   Example

      CLASS {
          &Syntax DEFAULT INTEGER,
          &one    &Syntax,
          &two    &Syntax OPTIONAL,
          &three  &Syntax DEFAULT 0
      }

      <class>
       <optional>
        <typeField name="Syntax"/>
        <default type="asn1:INTEGER"/> type="asnx:INTEGER"/>
       </optional>
       <valueField name="one">
        <typeFromField fieldName="Syntax"/>
       </valueField>
       <optional>
        <valueField name="two">
         <typeFromField fieldName="Syntax"/>
        </valueField>
       </optional>
       <optional>
        <valueField name="three">
         <typeFromField fieldName="Syntax"/>
        </valueField>
        <default literalValue="0"/>
       </optional>
      </class>

9.2.5.  VariableTypeValueSetFieldSpec Translation

   The translation of a VariableTypeValueSetFieldSpec where the
   ValueSetOptionalitySpec is absent is an element item with the
   [local name] "valueSetField".

   The translation of a VariableTypeValueSetFieldSpec with a
   ValueSetOptionalitySpec of "OPTIONAL" is an element item with the



Legg                      Expires 20 April 2007                [Page 79]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   [local name] "optional".  An element item with the [local name]
   "valueSetField" SHALL be added to the [children] of the <optional>
   element item.

   The translation of a VariableTypeValueSetFieldSpec with a
   ValueSetOptionalitySpec of "DEFAULT" is an element item with the
   [local name] "optional".  An element item with the [local name]
   "valueSetField" SHALL be added to the [children] of the <optional>



Legg                       Expires 11 May 2006                 [Page 72]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
   element item.  An element item with the [local name] "default" SHALL
   be appended to the [children] of the <optional> element item.  The
   content of the <default> element item is the
   translation of the ValueSet in the ValueSetOptionalitySpec. ValueSetOptionalitySpec SHALL be
   added to the [children] of the <default> element item.

   An attribute item with the [local name] "name" SHALL be added to the
   [attributes] of the <valueSetField> element item.  The
   [normalized value] of this attribute item is the
   valuesetfieldreference of the VariableTypeValueSetFieldSpec, without
   the ampersand ("&", U+0026).  An element item with the [local name]
   "annotation" MAY be added to the [children] of the <valueSetField>
   element item.  An element item with the [local name] "typeFromField"
   SHALL be appended to the [children] of the <valueSetField> element
   item.  The translation of the FieldName in the
   VariableTypeValueSetFieldSpec SHALL be added to the content [children] or
   [attributes] of the <typeFromField> element item.

   Example

      CLASS {
          &Syntax DEFAULT INTEGER,
          &One    &Syntax,
          &Two    &Syntax OPTIONAL,
          &Three  &Syntax DEFAULT { 1 | 2 }
      }

      <class>
       <optional>
        <typeField name="Syntax"/>
        <default type="asn1:INTEGER"/> type="asnx:INTEGER"/>
       </optional>
       <valueSetField name="One">
        <typeFromField fieldName="Syntax"/>
       </valueSetField>
       <optional>
        <valueSetField name="Two">
         <typeFromField fieldName="Syntax"/>
        </valueSetField>
       </optional>
       <optional>



Legg                      Expires 20 April 2007                [Page 80]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


        <valueSetField name="Three">
         <typeFromField fieldName="Syntax"/>
        </valueSetField>
        <default>
         <valueSet>
          <union>
           <literalValue>1</literalValue>
           <literalValue>2</literalValue>



Legg                       Expires 11 May 2006                 [Page 73]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
          </union>
         </valueSet>
        </default>
       </optional>
      </class>

9.2.6.  FieldName Translation

   The translation of a FieldName is either, at the translator's option,
   an attribute item with the [local name] "fieldName" added to the
   [attributes] of the enclosing element item, or an element item with
   the [local name] "fieldName" appended to the [children] of the
   enclosing element item.

   The [normalized value] of the fieldName attribute item is a "/"
   (U+002F) separated list of the primitive field names without the
   ampersand characters ("&", U+0026).  Leading and/or trailing white
   space characters MAY be added to the [normalized value] of the
   attribute item.  White space characters MAY be added immediately
   before and/or after any "/" character in the [normalized value].

   The [children] property of the <fieldName> element item is set to the
   sequence of character items for a "/" (U+002F) separated list of the
   primitive field names without the ampersand characters ("&", U+0026).
   Leading and/or trailing white space character items MAY be added to
   the [children] of the <fieldName> element item.  White space
   character items MAY be added immediately before and/or after any
   character item for the "/" character.

   Example

      &Linked.&ArgumentType

      <fieldName>Linked/ArgumentType</fieldName>

9.2.7.  ObjectFieldSpec Translation

   The translation of an ObjectFieldSpec where the ObjectOptionalitySpec
   is absent is an element item with the [local name] "objectField".




Legg                      Expires 20 April 2007                [Page 81]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   The translation of a ObjectFieldSpec with a ObjectOptionalitySpec of
   "OPTIONAL" is an element item with the [local name] "optional".  An
   element item with the [local name] "objectField" SHALL be added to
   the [children] of the <optional> element item.

   The translation of a ObjectFieldSpec with a ObjectOptionalitySpec of
   "DEFAULT" is an element item with the [local name] "optional".  An
   element item with the [local name] "objectField" SHALL be added to



Legg                       Expires 11 May 2006                 [Page 74]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
   the [children] of the <optional> element item.  An element item with
   the [local name] "default" SHALL be appended to the [children] of the
   <optional> element item.  The content of the <default> element item
   is the translation of the Object in the ObjectOptionalitySpec.
   ObjectOptionalitySpec SHALL be added to the [children] or
   [attributes] of the <default> element item.

   An attribute item with the [local name] "name" SHALL be added to the
   [attributes] of the <objectField> element item.  The
   [normalized value] of this attribute item is the objectfieldreference
   of the ObjectFieldSpec, without the ampersand ("&", U+0026).  An
   element item with the [local name] "annotation" MAY be added to the
   [children] of the <objectField> element item.  The translation of the
   DefinedObjectClass in the ObjectFieldSpec SHALL be added to the
   content
   [children] or [attributes] of the <objectField> element item.

   Example

      CLASS {
          &one    TYPE-IDENTIFIER,
          &two    ABSTRACT-SYNTAX OPTIONAL,
          &three  TYPE-IDENTIFIER DEFAULT myObject
      }

      <class>
       <objectField name="one" class="asn1:TYPE-IDENTIFIER"/> class="asnx:TYPE-IDENTIFIER"/>
       <optional>
        <objectField name="two" class="asn1:ABSTRACT-SYNTAX"/> class="asnx:ABSTRACT-SYNTAX"/>
       </optional>
       <optional>
        <objectField name="three" class="asn1:TYPE-IDENTIFIER"/> class="asnx:TYPE-IDENTIFIER"/>
        <default object="tns:myObject"/>
       </optional>
      </class>

9.2.8.  ObjectSetFieldSpec Translation

   The translation of an ObjectSetFieldSpec where the
   ObjectSetOptionalitySpec is absent is an element item with the
   [local name] "objectSetField".




Legg                      Expires 20 April 2007                [Page 82]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   The translation of a ObjectSetFieldSpec with a
   ObjectSetOptionalitySpec of "OPTIONAL" is an element item with the
   [local name] "optional".  An element item with the [local name]
   "objectSetField" SHALL be added to the [children] of the <optional>
   element item.

   The translation of a ObjectSetFieldSpec with a
   ObjectSetOptionalitySpec of "DEFAULT" is an element item with the
   [local name] "optional".  An element item with the [local name]



Legg                       Expires 11 May 2006                 [Page 75]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
   "objectSetField" SHALL be added to the [children] of the <optional>
   element item.  An element item with the [local name] "default" SHALL
   be appended to the [children] of the <optional> element item.  The
   content of the <default> element item is the
   translation of the ObjectSet in the ObjectSetOptionalitySpec. ObjectSetOptionalitySpec SHALL be
   added to the [children] or [attributes] of the <default> element
   item.

   An attribute item with the [local name] "name" SHALL be added to the
   [attributes] of the <objectSetField> element item.  The
   [normalized value] of this attribute item is the
   objectsetfieldreference of the ObjectSetFieldSpec, without the
   ampersand ("&", U+0026).  An element item with the [local name]
   "annotation" MAY be added to the [children] of the <objectSetField>
   element item.  The translation of the DefinedObjectClass in the
   ObjectSetFieldSpec SHALL be added to the content [children] or [attributes]
   of the <objectSetField> element item.

   Example

      CLASS {
          &One    TYPE-IDENTIFIER,
          &Two    ABSTRACT-SYNTAX OPTIONAL,
          &Three  TYPE-IDENTIFIER DEFAULT { myObject }
      }

      <class>
       <objectSetField name="One" class="asn1:TYPE-IDENTIFIER"/> class="asnx:TYPE-IDENTIFIER"/>
       <optional>
        <objectSetField name="Two" class="asn1:ABSTRACT-SYNTAX"/> class="asnx:ABSTRACT-SYNTAX"/>
       </optional>
       <optional>
        <objectSetField name="Three" class="asn1:TYPE-IDENTIFIER"/> class="asnx:TYPE-IDENTIFIER"/>
        <default>
         <objectSet>
          <object ref="tns:myObject"/>
         </objectSet>
        </default>
       </optional>
      </class>



Legg                      Expires 20 April 2007                [Page 83]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


10.  Translation of Objects

   The translation of an Object is the translation of either a
   DefinedObject, an ObjectDefn, an ObjectFromObject or a
   ParameterizedObject.

   If an Object is a ParameterizedObject then the translation of the
   Object is the

   The translation of the Object on the right hand side of the
   referenced ParameterizedObjectAssignment.



Legg                       Expires 11 May 2006                 [Page 76]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


      ASIDE: The Object that substitutes for a ParameterizedObject is
      potentially described in a different module scope to the surrounding
      translation, therefore the translation of a nested Type may
      require a tagDefault or extensibilityImplied attribute item,
      according to the provisions of Section 6.14. 5.9.

10.1.  DefinedObject Translation

   If a DefinedObject is an objectreference (not a DummyReference) or an
   ExternalObjectReference
   ExternalObjectReference, then the translation of the DefinedObject is
   either the attribute form translation of an object reference, or the
   element form translation of an object reference.

   The attribute form translation of an object reference is an attribute
   item with the [local name] "object".  The [normalized value] of this
   attribute item is the qualified name referencing the object
   definition (see Section 5.1).  The attribute form translation SHALL
   NOT be used if the qualified name is shared by two or more object
   definitions in separate modules, i.e., is ambiguous.

   The element form translation of an object reference is an element
   item with the [local name] "object".  An attribute item with the
   [local name] "ref" SHALL be added to the [attributes] of the <object>
   element item.  The [normalized value] of this attribute item is the
   qualified name referencing the object definition.  If the qualified this reference
   name is shared by two or more object definitions in separate not distinct with respect to the current module and the
   modules referenced by its <import> element items (see Section 5.1),
   then an attribute item with the [local name] "context" SHALL be added
   to the [attributes] of the <object> element item, otherwise if the
   module containing the referenced object definition has a schema
   identity URI, then an attribute item with the [local name] "context"
   MAY be added to the [attributes] of the <object> element item.  The
   [normalized value] of this attribute item is the character string
   value schema identity URI
   of the AnyURIValue of module containing the SCHEMA-IDENTITY encoding instruction
   for referenced object definition.

      Aside: If a reference name is not distinct, then the module
      containing the object definition referenced by the
   DefinedObject.

      ASIDE: A SCHEMA-IDENTITY encoding instruction is obligatory in
      such cases definition must have a schema identity
      URI (see Section 5.1).

   An element item with the [local name] "annotation" MAY be added to
   the [children] of the <object> element item.

   The translation of the DefinedObject is the same whether the object
   definition is referenced by an objectreference or an
   ExternalObjectReference.




Legg                      Expires 20 April 2007                [Page 84]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   Usually the translator is free to choose either the attribute form or
   element form translation for an object reference, however in some
   contexts the attribute form is explicitly disallowed.

   If a DefinedObject is a DummyReference DummyReference, then the translation of the



Legg                       Expires 11 May 2006                 [Page 77]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
   DefinedObject is the translation of the Object in the ActualParameter
   corresponding to the DummyReference.

      ASIDE: The Object that substitutes for a DummyReference is
      potentially in a different module scope to the surrounding
      translation, therefore the translation of a nested Type may
      require a tagDefault or extensibilityImplied attribute item,
      according to the provisions of (see
   Section 6.14. 5.9).

10.2.  ObjectDefn Translation

   An ObjectDefn in the DefinedSyntax form is first converted to the
   equivalent DefaultSyntax and then translated.

   The translation of an ObjectDefn is an element item with the
   [local name] "object".  An element item with the [local name]
   "annotation" MAY be added to the [children] of the <object> element
   item.  The translation of each FieldSetting in the DefaultSyntax of
   the ObjectClassDefn SHALL be appended to the [children] of the
   <object> element item.

   The translation of a FieldSetting is an element item with the
   [local name] "field".  An attribute item with the [local name] "name"
   SHALL be added to the [attributes] of the <field> element item.  The
   [normalized value] of this attribute item is the PrimitiveFieldName
   without the ampersand ("&", U+0026).  The translation of the Type,
   Value, ValueSet, Object or ObjectSet in the Setting of the
   FieldSetting SHALL be added to the [children] of the <field> element
   item.

   Example

      -- This is the governing object class.
      ONE-OF-EVERYTHING ::= CLASS {
          &One,
          &two    INTEGER,
          &Three  INTEGER,
          &four   TYPE-IDENTIFIER,
          &Five   TYPE-IDENTIFIER
      }

      <namedClass name="ONE-OF-EVERYTHING">
       <class>
        <typeField name="One"/>
        <valueField name="two" type="asn1:INTEGER"/> type="asnx:INTEGER"/>
        <valueSetField name="Three" type="asn1:INTEGER"/> type="asnx:INTEGER"/>
        <objectField name="four" class="asn1:TYPE-IDENTIFIER"/> class="asnx:TYPE-IDENTIFIER"/>
        <objectSetField name="Five" class="asn1:TYPE-IDENTIFIER"/> class="asnx:TYPE-IDENTIFIER"/>
       </class>



Legg                      Expires 11 May 2006 20 April 2007                [Page 78] 85]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


       </class>       October 20, 2006


      </namedClass>

      mixedBag ONE-OF-EVERYTHING ::= {
          &One    BOOLEAN,
          &two    99,
          &Three  { 1 | 2 },
          &four   myObject,
          &Five   { myObject }
      }

      <namedObject name="mixedBag" class="tns:ONE-OF-EVERYTHING">
       <object>
        <field name="One" type="asn1:BOOLEAN"/> type="asnx:BOOLEAN"/>
        <field name="two" literalValue="99"/>
        <field name="Three">
         <valueSet>
          <union>
           <literalValue>1</literalValue>
           <literalValue>2</literalValue>
          </union>
         </valueSet>
        </field>
        <field name="four" object="tns:myObject"/>
        <field name="Five">
         <objectSet>
          <object ref="tns:myObject"/>
         </objectSet>
        </field>
       </object>
      </namedObject>

10.3.  ObjectFromObject Translation

   The translation of an ObjectFromObject is an element item with the
   [local name] "object".  An element item with the [local name]
   "annotation" MAY be added to the [children] of the <object> element
   item.  An element item with the [local name] "fromObjects" SHALL be
   appended to the [children] of the <object> element item.

   The translation of the ReferencedObjects in the ObjectFromObject
   SHALL be added to the content of and
   the <fromObjects> element item.

   The translation of the FieldName in the ObjectFromObject SHALL be
   appended
   added to the content [children] and/or [attributes] of the <fromObjects>
   element item.

11.  Translation of Object Sets




Legg                       Expires 11 May 2006                 [Page 79]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005

   If an ObjectSet matches the form "{ DefinedObjectSet }" (i.e., a
   DefinedObjectSet in an ObjectSetElements in an Elements in a single



Legg                      Expires 20 April 2007                [Page 86]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   IntersectionElements in a single Intersections in a Unions in an
   ElementSetSpec in a lone RootElementSetSpec in the ObjectSetSpec) ObjectSetSpec),
   then the translator MAY use the translation of the DefinedObjectSet
   as the translation of the ObjectSet, otherwise the translation of an
   ObjectSet is an element item with the [local name] "objectSet".  An
   element item with the [local name] "annotation" MAY be added to the
   [children] of the <objectSet> element item.  The translation of the
   ObjectSetSpec in the ObjectSet SHALL be appended to the [children] of
   the <objectSet> element item.

      ASIDE:

      Aside: An ObjectSet that is directly a DefinedObjectSet is a
      notational capability that does not exist in ASN.1 but is allowed
      in ASN.X to avoid excessive nesting of <objectSet> element items
      in the expansion of parameterized definitions.

   If an ObjectSetSpec contains only a RootElementSetSpec RootElementSetSpec, then the
   translation of the ObjectSetSpec is the translation of the
   ElementSetSpec in the RootElementSetSpec.

   If an ObjectSetSpec contains a RootElementSetSpec and the ellipsis
   ("...")
   ("..."), then the translation of the ObjectSetSpec is the translation
   of the ElementSetSpec in the RootElementSetSpec followed by an
   element item with the [local name] "extension".  If an
   AdditionalElementSetSpec is present present, then the translation of the
   ElementSetSpec in the AdditionalElementSetSpec SHALL be added to the
   [children] of the <extension> element item.

   If an ObjectSetSpec does not contain a RootElementSetSpec RootElementSetSpec, then the
   translation of the ObjectSetSpec is an element item with the
   [local name] "extension".  If an AdditionalElementSetSpec is present present,
   then the translation of the ElementSetSpec in the
   AdditionalElementSetSpec SHALL be added to the [children] of the
   <extension> element item.

   Contained within the ElementSetSpec will be one or more
   ObjectSetElements.

11.1.  DefinedObjectSet Translation

   If a DefinedObjectSet is an objectsetreference (not a DummyReference)
   or an ExternalObjectSetReference ExternalObjectSetReference, then the translation of the
   DefinedObjectSet is either the attribute form translation of an
   object set reference, or the element form translation of an object
   set reference.

   The attribute form translation of an object set reference is an



Legg                       Expires 11 May 2006                 [Page 80]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
   attribute item with the [local name] "objectSet".  The
   [normalized value] of this attribute item is the qualified name



Legg                      Expires 20 April 2007                [Page 87]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   referencing the object set definition (see Section 5.1).  The
   attribute form translation SHALL NOT be used if the qualified name is
   shared by two or more object set definitions in separate modules,
   i.e., is ambiguous.

   The element form translation of an object set reference is an element
   item with the [local name] "objectSet".  An attribute item with the
   [local name] "ref" SHALL be added to the [attributes] of the
   <objectSet> element item.  The [normalized value] of this attribute
   item is the qualified name referencing the object set definition.  If
   the qualified
   this reference name is shared not distinct with respect to the current
   module and the modules referenced by two or more its <import> element items (see
   Section 5.1), then an attribute item with the [local name] "context"
   SHALL be added to the [attributes] of the <objectSet> element item,
   otherwise if the module containing the referenced object set definitions in
   separate modules
   definition has a schema identity URI, then an attribute item with the
   [local name] "context" SHALL MAY be added to the [attributes] of the
   <objectSet> element item.  The [normalized value] of this attribute
   item is the
   character string value of the AnyURIValue of the SCHEMA-IDENTITY
   encoding instruction for schema identity URI of the module containing the
   referenced object set
   definition referenced by the DefinedObjectSet.

      ASIDE: A SCHEMA-IDENTITY encoding instruction definition.

      Aside: If a reference name is obligatory in
      such cases not distinct, then the module
      containing the referenced definition must have a schema identity
      URI (see Section 5.1).

   An element item with the [local name] "annotation" MAY be added to
   the [children] of the <objectSet> element item.

   The translation of the DefinedObjectSet is the same whether the
   object definition is referenced by an objectsetreference or an
   ExternalObjectSetReference.

   Usually the translator is free to choose either the attribute form or
   element form translation for an object set reference, however in some
   contexts the attribute form is explicitly disallowed.

   If a DefinedObjectSet is a DummyReference DummyReference, then the translation of
   the DefinedObjectSet is the translation of the ObjectSet in the
   ActualParameter corresponding to the DummyReference.

      ASIDE: The ObjectSet that substitutes for a DummyReference is
      potentially in a different module scope to the surrounding
      translation, therefore the translation of a nested Type may
      require a tagDefault or extensibilityImplied attribute item,
      according to the provisions of (see
   Section 6.14. 5.9).

11.2.  ObjectSetElements Translation

   If an ObjectSetElements is an Object Object, then the translation of the
   ObjectSetElements is the translation of the Object, except that the



Legg                       Expires 11 May 2006                 [Page 81]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
   attribute form of the DefinedObject translation SHALL NOT be used.

   If an ObjectSetElements is a DefinedObjectSet DefinedObjectSet, then the translation
   of the ObjectSetElements is the translation of the DefinedObjectSet,



Legg                      Expires 20 April 2007                [Page 88]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   except that the attribute form of the DefinedObjectSet translation
   SHALL NOT be used.

   If an ObjectSetElements is an ObjectSetFromObjects ObjectSetFromObjects, then the
   translation of the ObjectSetElements is the translation of the
   ObjectSetFromObjects.

   If an ObjectSetElements is a ParameterizedObjectSet ParameterizedObjectSet, then the
   translation of the ObjectSetElements is the translation of the
   ObjectSet on the right hand side
   ParameterizedObjectSet (see Section 5.9).

      Aside: The in-line expansion of the referenced
   ParameterizedObjectSetAssignment.

      ASIDE: a ParameterizedObjectSet results
      in an ObjectSet.  An ObjectSetElements that is an ObjectSet is a
      notational capability that does not exist in ASN.1 but is allowed
      in ASN.X to avoid the need to manufacture a reference name for the
      expanded parameterized definition.

      ASIDE: The ObjectSet that substitutes for a ParameterizedObjectSet
      is potentially in a different module scope to the surrounding
      translation, therefore the translation of a nested Type may
      require a tagDefault or extensibilityImplied attribute item,
      according to the provisions of Section 6.14.

11.2.1.  ObjectSetFromObjects Translation

   The translation of an ObjectSetFromObjects is an element item with
   the [local name] "objectSet".  An element item with the [local name]
   "annotation" MAY be added to the [children] of the <objectSet>
   element item.  An element item with the [local name] "fromObjects"
   SHALL be appended to the [children] of the <objectSet> element item.

   The translation of the ReferencedObjects in the ObjectSetFromObjects
   SHALL be added to the content of
   and the <fromObjects> element item.

   The translation of the FieldName in the ObjectSetFromObjects
   SHALL be
   appended added to the content [children] and/or [attributes] of the
   <fromObjects> element item.

12.  Translation of Information From Objects

   If a ReferencedObjects is a DefinedObject (not a DummyReference) DummyReference),
   then the translation of the ReferencedObjects is the translation of
   the DefinedObject.

   If a ReferencedObjects is a DefinedObjectSet (not a DummyReference)



Legg                       Expires 11 May 2006                 [Page 82]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005 DummyReference),
   then the translation of the ReferencedObjects is the translation of
   the DefinedObjectSet.

   If a ReferencedObjects is a DummyReference then the translation of
   the ReferencedObjects is the translation of the Object or ObjectSet
   in the ActualParameter corresponding to the DummyReference.

   If a ReferencedObjects is a DummyReference, ParameterizedObject or
   ParameterizedObjectSet, then the translation of the ReferencedObjects
   is the translation of the Object on the
   right hand side of the referenced ParameterizedObjectAssignment.

   If a ReferencedObjects is a ParameterizedObjectSet then the
   translation of the ReferencedObjects is the translation of the
   ObjectSet on the right hand side that DummyReference, ParameterizedObject or
   ParameterizedObjectSet (see Section 5.9).

      Aside: The in-line expansion of the referenced
   ParameterizedObjectSetAssignment.

      ASIDE: a ParameterizedObject or
      ParameterizedObjectSet results in an Object or ObjectSet.  A
      ReferencedObjects that is an Object or ObjectSet is a notational



Legg                      Expires 20 April 2007                [Page 89]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


      capability that does not exist in ASN.1 but is allowed in ASN.X to
      avoid the need to manufacture a reference name for an expanded
      parameterized definition.

      ASIDE: The Object or ObjectSet that substitutes for a
      ParameterizedObject, ParameterizedObjectSet or DummyReference is
      potentially in a different module scope to the surrounding
      translation, therefore the translation of a nested Type may
      require a tagDefault or extensibilityImplied attribute item,
      according to the provisions of Section 6.14.

13.  EncodingControlSections Translation

   If an EncodingControlSections contains at least one
   EncodingControlSection with an encodingreference that is not RXER RXER,
   then the translation of the EncodingControlSections is an element
   item with the [local name] "encodingControls".  The translation of
   each EncodingControlSection with an encodingreference that is not
   RXER SHALL be appended to the [children] of the <encodingControls>
   element item.

      ASIDE:

      Aside: This is not suggesting that RXER encoding control sections
      are ignored.  Encoding control sections for RXER are not
      explicitly represented in ASN.X, but rather affect how an ASN.1
      specification is translated into an ASN.X document.  The effect of
      an RXER encoding control section on the translation is addressed
      in other parts of this specification.

      Encoding control sections for other encoding rules will have
      explicit representations in ASN.X.




Legg                       Expires 11 May 2006                 [Page 83]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005

   If the encodingreference in an EncodingControlSection is GSER GSER, then
   the translation of the EncodingControlSection is an element item with
   the [local name] "GSER".  The translation of the
   EncodingInstructionAssignmentList SHALL be added to the content [children] or
   [attributes] of the <GSER> element item.

   The EncodingInstructionAssignmentList notation is different for each
   set of encoding instructions.  The translation into ASN.X of an
   EncodingInstructionAssignmentList for GSER is specified in a separate
   document [GSEREIT].

      ASIDE:

      Aside: The translation of an EncodingInstructionAssignmentList for
      GSER, as it is currently defined, is always empty.

   If the encodingreference in an EncodingControlSection is XER XER, then
   the translation of the EncodingControlSection is an element item with
   the [local name] "XER".  The translation of the
   EncodingInstructionAssignmentList SHALL be added to the content [children] or
   [attributes] of the <XER> element item.  The translation into ASN.X
   of an EncodingInstructionAssignmentList for XER is specified in a
   separate document [XEREIT].

14.  Security Considerations




Legg                      Expires 20 April 2007                [Page 90]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   The ASN.X translation of an ASN.1 specification is semantically
   equivalent to the original ASN.1 specification.  The security
   considerations that apply to an application built from the original
   ASN.1 specification apply equally to an application built from the
   ASN.X translation.

   An

   Syntax-based canonicalization for XML documents (e.g., Canonical XML
   [CXML]) depends on the Infoset of an XML document being preserved.
   However, the Infoset representation of an ASN.X document can (an abstract
   value of the ModuleDefinition ASN.1 type) potentially changes if it
   is decoded and re-encoded, disrupting the Canonical XML
   representation.  To avoid this problem, ASN.X documents must be re-encoded using any set
   normalized prior to the application of canonical
   encoding syntax-based canonicalization.
   The normalization rules can be found in Section 5.12 of the
   specification for RXER [RXER].

15.  Acknowledgements

   The technology described in this document is the product of a
   research project begun jointly by Adacel Technologies Limited and
   Deakin University, and subsequently refined and completed by eB2Bcom.

16.  IANA Considerations

   This document has no actions for IANA.

17.  References

17.1.  Normative References

   [BCP14]    Bradner, S., "Key words for use in RFCs to Indicate
              Requirement Levels", BCP 14, RFC 2119, March 1997.

   [URI]      Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform
              Resource Identifiers (URI): Generic Syntax", STD 66, RFC
              3986, January 2005.

   [GSER]     Legg, S., "Generic String Encoding Rules (GSER) for ASN.1.  Before such re-encoding it is necessary to
   normalize abstract values of the AnyType ASN.1 type [RXER].  The
   underlying ASN.1 type
              Types", RFC 3641, October 2003.

   [GSEREI]   Legg, S., "Encoding Instructions for the <literalValue> Generic String
              Encoding Rules (GSER)", draft-legg-ldap-gser-ei-xx.txt, a
              work in progress, August 2006.

   [RXER]     Legg, S. and <restrictBy>
   elements D. Prager, "Robust XML Encoding Rules (RXER)
              for Abstract Syntax Notation One (ASN.1)",
              draft-legg-xed-rxer-xx.txt, a work in the ASN.1 progress, October
              2006.



Legg                      Expires 20 April 2007                [Page 91]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   [RXEREI]   Legg, S., "Encoding Instructions for ASN.X is AnyType.  The normalization rules
   can be found the Robust XML
              Encoding Rules (RXER)", draft-legg-xed-rxer-ei-xx.txt, a
              work in Section 4.1.2 progress, October 2006.

   [GSEREIT]  Legg, S., "Abstract Syntax Notation X (ASN.X)
              Representation of the specification for RXER [RXER].

   Syntax-based canonicalization Encoding Instructions for XML documents (e.g., Canonical XML
   [CXML]) depends on the Infoset Generic
              String Encoding Rules (GSER)",
              draft-legg-xed-asd-gserei-xx.txt, a work in progress,
              October 2006.

   [XEREIT]   Legg, S., "Abstract Syntax Notation X (ASN.X)
              Representation of an XML document being preserved.
   However, Encoding Instructions for the Infoset representation XML
              Encoding Rules (XER)", draft-legg-xed-asd-xerei-xx.txt, a
              work in progress, October 2006.

   [X.680]    ITU-T Recommendation X.680 (07/02) | ISO/IEC 8824-1,
              Information technology - Abstract Syntax Notation One
              (ASN.1): Specification of an ASN.X document (an abstract
   value basic notation.

   [X.680-1]  ITU-T Recommendation X.680 (2002) Amendment 1 (10/03) |
              ISO/IEC 8824-1:2002/Amd 1:2004, Support for EXTENDED-XER.

   [X.681]    ITU-T Recommendation X.681 (07/02) | ISO/IEC 8824-2,
              Information technology - Abstract Syntax Notation One
              (ASN.1): Information object specification.

   [X.682]    ITU-T Recommendation X.682 (07/02) | ISO/IEC 8824-3,
              Information technology - Abstract Syntax Notation One
              (ASN.1): Constraint specification.

   [X.683]    ITU-T Recommendation X.683 (07/02) | ISO/IEC 8824-4,
              Information technology - Abstract Syntax Notation One
              (ASN.1): Parameterization of the ModuleDefinition ASN.1 type) potentially changes if it
   is decoded and re-encoded, disrupting the Canonical specifications.

   [X.693]    ITU-T Recommendation X.693 (12/01) | ISO/IEC 8825-4:2002,
              Information technology - ASN.1 encoding rules: XML
   representation.  To avoid this problem, ASN.X documents must be
   normalized prior to the application of syntax-based canonicalization.
   The normalization
              encoding rules can be found in Section 5.12 of the
   specification for RXER [RXER].

15.  Acknowledgements (XER)

   [X.693-1]  Amendment 1: (to ITU-T Rec. X.693 | ISO/IEC 8825-4) XER
              encoding instructions and EXTENDED-XER

   [XML10]    Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E. and
              F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fourth
              Edition)", W3C Recommendation,
              http://www.w3.org/TR/2006/REC-xml-20060816, August 2006.

   [XML11]    Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E.,
              Yergeau, F., and J. Cowan, "Extensible Markup Language



Legg                      Expires 11 May 2006 20 April 2007                [Page 84] 92]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


   This document       October 20, 2006


              (XML) 1.1 (Second Edition)", W3C Recommendation,
              http://www.w3.org/TR/2006/REC-xml11-20060816, August 2006.

   [XMLNS10]  Bray, T., Hollander, D., Layman, A., and the technology it describes are a product of a
   joint research project between Adacel Technologies Limited R. Tobin,
              "Namespaces in XML 1.0 (Second Edition)", W3C
              Recommendation,
              http://www.w3.org/TR/2006/REC-xml-names-20060816, August
              2006.

   [XMLNS11]  Bray, T., Hollander, D., Layman, A. and R. Tobin,
              "Namespaces in XML 1.1 (Second Edition)", W3C
              Recommendation,
              http://www.w3.org/TR/2004/REC-xml-names11-20040204, August
              2006.

   [ISET]     Cowan, J. and R. Tobin, "XML Information Set (Second
              Edition)", W3C Recommendation,
              http://www.w3.org/TR/2004/REC-xml-infoset-20040204,
              February 2004.

   [UNICODE]  The Unicode Consortium, "The Unicode Standard, Version
              4.0", Boston, MA, Addison-Wesley Developers Press, 2003.
              ISBN 0-321-18578-1.

17.2.  Informative References

   [CXML]     Boyer, J., "Canonical XML Version 1.0", W3C
              Recommendation,
              http://www.w3.org/TR/2001/REC-xml-c14n-20010315, March
              2001.

   [XSD1]     Thompson, H., Beech, D., Maloney, M. and Deakin
   University on leveraging existing directory technology to produce an
   XML-based directory service.

16.  IANA Considerations

   This document has no actions for IANA. N. Mendelsohn,
              "XML Schema Part 1: Structures Second Edition", W3C
              Recommendation,
              http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/,
              October 2004.

   [RNG]      Clark, J. and M. Makoto, "RELAX NG Tutorial", OASIS
              Committee Specification, http://www.oasis-
              open.org/committees/relax-ng/tutorial-20011203.html,
              December 2001.

Appendix A. ASN.1 for ASN.X

   This appendix is normative.

   AbstractSyntaxNotation-X
       { iso(1) identified-organization(3) dod(6)



Legg                      Expires 20 April 2007                [Page 93]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


         internet(1) private(4) enterprise(1)
         xmled(21472) asn1(1) asnx(1) module(0) notation(1) }

   -- Copyright (C) The Internet Society 2005. (2006). This version of
   -- this ASN.1 module is part of RFC XXXX; see the RFC itself
   -- for full legal notices.

   DEFINITIONS
   RXER INSTRUCTIONS
   AUTOMATIC TAGS
   EXTENSIBILITY IMPLIED ::= BEGIN

   IMPORTS
       AnyType,
       Markup,
       AnyURI,
       NCName,
       Name,
       QName
           FROM AdditionalBasicDefinitions
               { iso(1) identified-organization(3) dod(6)
                 internet(1) private(4) enterprise(1)
                 xmled(21472) asn1(1) asnx(1) module(0) basic(0) }
       GSER-EncodingInstruction,
       GSER-EncodingInstructionAssignmentList
           FROM GSER-EncodingInstructionNotation
               { iso(1) identified-organization(3) dod(6)
                 internet(1) private(4) enterprise(1)
                 xmled(21472) asn1(1) asnx(1) module(0) gser-ei-notation(2) }
       XER-EncodingInstruction,
       XER-EncodingInstructionAssignmentList
           FROM XER-EncodingInstructionNotation
               { iso(1) identified-organization(3) dod(6)
                 internet(1) private(4) enterprise(1)



Legg                       Expires 11 May 2006                 [Page 85]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
                 xmled(21472) asn1(1) asnx(1) module(0) xer-ei-notation(3) }
       ;

   ModuleDefinition ::= [HOLLOW-INSERTIONS] SEQUENCE {
       annotation            Annotation OPTIONAL,
       format                [ATTRIBUTE VERSION-INDICATOR]                [ATTRIBUTE] [VERSION-INDICATOR]
                                 UTF8String ("1.0", ...) DEFAULT "1.0",
       name                  [ATTRIBUTE] ModuleReference,
       identifier            [ATTRIBUTE] DefinitiveIdentifier OPTIONAL,
       schemaIdentity        [ATTRIBUTE] AnyURI OPTIONAL,
       targetNamespace       [ATTRIBUTE] AnyURI OPTIONAL,
       targetPrefix          [ATTRIBUTE] NCName OPTIONAL,
       tagDefault            [ATTRIBUTE] TagDefault DEFAULT automatic,
       extensibilityImplied  [ATTRIBUTE] BOOLEAN DEFAULT FALSE,
       export                SEQUENCE { } OPTIONAL,



Legg                      Expires 20 April 2007                [Page 94]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


           -- export is not used in this version
       imports               [GROUP] ImportList OPTIONAL,
       assignments           [GROUP] AssignmentList OPTIONAL,
       encodingControls      EncodingControlSections OPTIONAL
   }

   ModuleReference ::= TypeReference

   DefinitiveIdentifier ::= OBJECT IDENTIFIER

   TagDefault ::= ENUMERATED { explicit, implicit, automatic }

   Annotation ::= AnyType Markup

   ImportList ::= SEQUENCE SIZE (1..MAX) OF import Import

   Import ::= SEQUENCE {
       name            [ATTRIBUTE] ModuleReference OPTIONAL,
       identifier      [ATTRIBUTE] DefinitiveIdentifier OPTIONAL,
       schemaIdentity  [ATTRIBUTE] AnyURI OPTIONAL,
       namespace       [ATTRIBUTE] AnyURI OPTIONAL,
       schemaLocation  [ATTRIBUTE] AnyURI OPTIONAL
   }

   AssignmentList ::= SEQUENCE SIZE (1..MAX) OF
       assignment [GROUP] Assignment

   Assignment ::= [NO-INSERTIONS] CHOICE {
       namedType       TypeAssignment,
       namedValue      ValueAssignment,
       namedValueSet   ValueSetTypeAssignment,
       namedClass      ObjectClassAssignment,
       namedObject     ObjectAssignment,
       namedObjectSet  ObjectSetAssignment,
       component       [GROUP] TopLevelNamedType
   }



Legg                       Expires 11 May 2006                 [Page 86]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005

   TypeAssignment ::= SEQUENCE {
       annotation  Annotation OPTIONAL,
       name        [ATTRIBUTE] TypeReference,
       type        [GROUP] Type
   }

   TypeReference ::= UTF8String (PATTERN "[A-Z]\w*(-\w+)*")
                                 -- \w is equivalent to [a-zA-Z0-9]

   ValueAssignment ::= SEQUENCE {
       annotation  Annotation OPTIONAL,



Legg                      Expires 20 April 2007                [Page 95]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


       name        [ATTRIBUTE] ValueReference,
       type        [GROUP] Type,
       value       [GROUP] Value
   }

   ValueReference ::= Identifier

   Identifier ::= UTF8String (PATTERN "[a-z]\w(-\w+)*")

   ValueSetTypeAssignment ::= SEQUENCE {
       annotation  Annotation OPTIONAL,
       name        [ATTRIBUTE] TypeReference,
       type        [GROUP] Type,
       valueSet    [GROUP] ValueSet
   }

   ObjectClassAssignment ::= SEQUENCE {
       annotation   Annotation OPTIONAL,
       name         [ATTRIBUTE] ObjectClassReference,
       objectClass  [GROUP] ObjectClass
   }

   ObjectClassReference ::= UTF8String
                                (PATTERN "[A-Z][A-Z0-9]*(-[A-Z0-9]+)*")

   ObjectAssignment ::= SEQUENCE {
       annotation   Annotation OPTIONAL,
       name         [ATTRIBUTE] ObjectReference,
       objectClass  [GROUP] DefinedObjectClass,
       object       [GROUP] Object
   }

   ObjectReference ::= ValueReference

   ObjectSetAssignment ::= SEQUENCE {
       annotation   Annotation OPTIONAL,
       name         [ATTRIBUTE] ObjectSetReference,



Legg                       Expires 11 May 2006                 [Page 87]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
       objectClass  [GROUP] DefinedObjectClass,
       objectSet    [GROUP] ObjectSet
   }

   ObjectSetReference ::= TypeReference

   TopLevelNamedType ::= NamedType
       (WITH COMPONENTS { ...,
           attribute
           component (WITH COMPONENTS { ...,
               definition (WITH COMPONENTS { ..., reference ABSENT })
           }),



Legg                      Expires 20 April 2007                [Page 96]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


           element   (WITH COMPONENTS { ...,
               definition (WITH COMPONENTS { ..., reference ABSENT })
           }),
           attribute (WITH COMPONENTS { ...,
               definition (WITH COMPONENTS { ..., reference ABSENT })
           }),
           group     ABSENT,
           member    ABSENT,
           item      ABSENT })

   NamedType ::= [SINGULAR-INSERTIONS] CHOICE {
       attribute  Attribute,
       component  Element,
       element    Element,
       attribute  Attribute,
       group      InvisibleNamedType,
       member     InvisibleNamedType,
       item       InvisibleNamedType
   }

   Attribute ::= GenericNamedType
       (WITH COMPONENTS { ...,
           definition (WITH COMPONENTS { ...,
               local (WITH COMPONENTS { ...,
                   typeAsVersion ABSENT }) }) })

   Element ::= GenericNamedType
       (WITH COMPONENTS { ...,
           definition (WITH COMPONENTS { ...,
               local (WITH COMPONENTS { ...,
                   versionIndicator ABSENT }) }) })

   InvisibleNamedType ::= GenericNamedType
       (WITH COMPONENTS { ...,
           definition (WITH COMPONENTS { ...,
               reference  ABSENT,
               local (WITH COMPONENTS { ...,
                   typeAsVersion ABSENT,
                   versionIndicator ABSENT }) }) })

   GenericNamedType ::= [HOLLOW-INSERTIONS] SEQUENCE {
       annotation  Annotation OPTIONAL,
       identifier  [ATTRIBUTE] IdentifierOrEmpty OPTIONAL,
       definition  [GROUP] CHOICE {
           reference   [GROUP] TypeOrElementReference, DefinedComponent,
           local       [GROUP] LocalComponent
       }
   }




Legg                      Expires 11 May 2006 20 April 2007                [Page 88] 97]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005       October 20, 2006


   IdentifierOrEmpty ::= UTF8String (INCLUDES Identifier | "")

   DefinedComponent ::= [HOLLOW-INSERTIONS] SEQUENCE {
       name         [GROUP] [NO-INSERTIONS] CHOICE {
           ref          [ATTRIBUTE] QName,
           elementType  [ATTRIBUTE] Name
       },
       namespace    [ATTRIBUTE] AnyURI OPTIONAL,
       context      [ATTRIBUTE] AnyURI OPTIONAL,
       embedded     [ATTRIBUTE] BOOLEAN OPTIONAL,
       prefixes     [GROUP] EncodingPrefixes OPTIONAL
   }
   (WITH COMPONENTS { ...,
        name (WITH COMPONENTS { ref PRESENT }),
        namespace ABSENT } |
    WITH COMPONENTS { ...,
        name (WITH COMPONENTS { elementType PRESENT }),
        embedded ABSENT })

   LocalComponent ::= SEQUENCE {
       name              [ATTRIBUTE] NCName,
       typeAsVersion     [ATTRIBUTE] BOOLEAN OPTIONAL,
       versionIndicator  [ATTRIBUTE] BOOLEAN OPTIONAL,
       type              [GROUP] Type
   }

   TypeOrElementReference ::= SEQUENCE {
       name      [GROUP] [NO-INSERTIONS] CHOICE {
           ref          [ATTRIBUTE] QName,
           elementType  [ATTRIBUTE] Name
       },
       context   [ATTRIBUTE] AnyURI OPTIONAL,
       embedded  [ATTRIBUTE] BOOLEAN OPTIONAL
   }

   IdentifierOrEmpty ::= UTF8String (INCLUDES Identifier | "")

   Type ::= [NO-INSERTIONS] CHOICE {
       typeRef  [NAME AS "type"] [ATTRIBUTE] QName,
       type     ElementFormType
   }

   ElementFormType ::= [HOLLOW-INSERTIONS] SEQUENCE {
       annotation  Annotation OPTIONAL,
       tagDefault            [ATTRIBUTE] TagDefault OPTIONAL,
       extensibilityImplied  [ATTRIBUTE] BOOLEAN OPTIONAL,
       explicit    [ATTRIBUTE] BOOLEAN DEFAULT FALSE,
       definition  [GROUP] CHOICE {
           reference        [GROUP] TypeOrElementReference, DefinedType,
           expanded         ExpandedType,
           ancestor         [ATTRIBUTE] INTEGER (1..MAX),
           namedBitList     NamedBitList,
           namedNumberList  NamedNumberList,
           enumerated       EnumeratedType,
           tagged           TaggedType,
           prefixed         EncodingPrefixedType,
           selection        SelectionType,
           instanceOf       InstanceOfType,
           fromClass        ObjectClassFieldType,
           fromObjects      InformationFromObjects,
           sequence         SequenceType,



Legg                      Expires 20 April 2007                [Page 98]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


           set              SetType,
           choice           ChoiceType,
           union            UnionType,
           sequenceOf       SequenceOfType,
           setOf            SetOfType,
           list             ListType,



Legg                       Expires 11 May 2006                 [Page 89]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
           constrained      ConstrainedType
       }
   }

   DefinedType ::= SEQUENCE {
       name       [GROUP] [NO-INSERTIONS] CHOICE {
           ref          [ATTRIBUTE] QName,
           elementType  [ATTRIBUTE] Name
       },
       namespace  [ATTRIBUTE] AnyURI OPTIONAL,
       context    [ATTRIBUTE] AnyURI OPTIONAL,
       embedded   [ATTRIBUTE] BOOLEAN OPTIONAL
   }
   (WITH COMPONENTS { ...,
        name (WITH COMPONENTS { ref PRESENT }),
        namespace ABSENT } |
    WITH COMPONENTS { ...,
        name (WITH COMPONENTS { elementType PRESENT }),
        embedded ABSENT })

   ExpandedType ::= SEQUENCE {
       name    [ATTRIBUTE] NCName OPTIONAL,
       module  ReferencedModule OPTIONAL,
       type    [GROUP] Type
   }

   ReferencedModule ::= SEQUENCE {
       name            [ATTRIBUTE] ModuleReference OPTIONAL,
       identifier      [ATTRIBUTE] DefinitiveIdentifier OPTIONAL,
       schemaIdentity  [ATTRIBUTE] AnyURI OPTIONAL
   }

   NamedBitList ::= SEQUENCE SIZE (1..MAX) OF namedBit NamedBit

   NamedBit ::= SEQUENCE {
       name        [ATTRIBUTE] NCName,
       identifier  [ATTRIBUTE] Identifier OPTIONAL,
       bit         [ATTRIBUTE] INTEGER (0..MAX)
   }

   NamedNumberList ::= SEQUENCE SIZE (1..MAX) OF
       namedNumber NamedNumber



Legg                      Expires 20 April 2007                [Page 99]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   NamedNumber ::= SEQUENCE {
       name        [ATTRIBUTE] NCName,
       identifier  [ATTRIBUTE] Identifier OPTIONAL,
       number      [ATTRIBUTE] INTEGER
   }

   EnumeratedType ::= SEQUENCE {
       root       [GROUP] Enumeration,
       extension  SEQUENCE {
           exception  ExceptionSpec OPTIONAL,
           additions  [GROUP] Enumeration OPTIONAL
       } OPTIONAL
   }

   Enumeration ::= SEQUENCE SIZE (1..MAX) OF
       enumeration EnumerationItem

   EnumerationItem ::= SEQUENCE {
       name        [ATTRIBUTE] NCName,
       identifier  [ATTRIBUTE] Identifier OPTIONAL,
       number      [ATTRIBUTE] INTEGER OPTIONAL
   }

   TaggedType

   Tag ::= SEQUENCE {
       tagClass  [ATTRIBUTE] TagClass OPTIONAL,
       number    [ATTRIBUTE] INTEGER (0..MAX),
       tagging   [ATTRIBUTE] Tagging OPTIONAL, OPTIONAL
   }

   TaggedType ::= SEQUENCE {
       COMPONENTS OF Tag,
       type  [GROUP] Type
   }

   TagClass ::= ENUMERATED { universal, application, private }

   Tagging ::= ENUMERATED { explicit, implicit }




Legg                       Expires 11 May 2006                 [Page 90]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005

   EncodingPrefixedType ::= [HOLLOW-INSERTIONS] SEQUENCE {
       prefixes  [GROUP] EncodingPrefixes,
       type      [GROUP] Type
   }

   EncodingPrefixes ::= SEQUENCE SIZE (1..MAX) OF
       prefix [GROUP] EncodingPrefix

   EncodingPrefix ::= [SINGULAR-INSERTIONS] CHOICE {
       tag   [NAME AS "TAG"] Tag,



Legg                      Expires 20 April 2007               [Page 100]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


       gser  [NAME AS "GSER"] GSER-EncodingInstructions, GSER-EncodingInstruction,
       xer   [NAME AS "XER"] XER-EncodingInstructions XER-EncodingInstruction
       -- plus encoding instructions
       -- for other encoding rules in the future
   }

   GSER-EncodingInstructions ::= SEQUENCE SIZE (1..MAX) OF
       instruction [GROUP] GSER-EncodingInstruction

   XER-EncodingInstructions ::= SEQUENCE SIZE (1..MAX) OF
       instruction [GROUP] XER-EncodingInstruction

   SelectionType ::= SEQUENCE {
       alternative  [GROUP] [SINGULAR-INSERTIONS] CHOICE {
           attribute
           component    [ATTRIBUTE] QName,
           element      [ATTRIBUTE] QName,
           attribute    [ATTRIBUTE] QName,
           group        [ATTRIBUTE] QName,
           member       [ATTRIBUTE] QName
       },
       type         [GROUP] Type
   }

   InstanceOfType ::= DefinedObjectClass

   ObjectClassFieldType ::= SEQUENCE {
       objectClass  [GROUP] DefinedObjectClass,
       fieldName    [GROUP] FieldName
   }

   FieldName ::= [SINGULAR-INSERTIONS] CHOICE {
       fieldNameAtt  [NAME AS "fieldName"]
                         [ATTRIBUTE] PrimitiveFieldNames,
       fieldName     PrimitiveFieldNames
   }

   PrimitiveFieldNames ::= UTF8String

   InformationFromObjects ::= [HOLLOW-INSERTIONS] SEQUENCE {
       referencedObjects  [GROUP] ReferencedObjects,



Legg                       Expires 11 May 2006                 [Page 91]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
       fieldName          [GROUP] FieldName
   }

   ReferencedObjects ::= [SINGULAR-INSERTIONS] CHOICE {
       object     [GROUP] [NO-INSERTIONS] Object,
       objectSet  [GROUP] [NO-INSERTIONS] ObjectSet
   }

   Insertions ::=
       ENUMERATED { none, hollow, singular, uniform, multiform }

   SequenceType ::= [HOLLOW-INSERTIONS] SEQUENCE {
       insertions         [ATTRIBUTE] Insertions OPTIONAL,
       root               [GROUP] ComponentTypeList OPTIONAL,



Legg                      Expires 20 April 2007               [Page 101]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


       extensionAndFinal  [GROUP] [HOLLOW-INSERTIONS] SEQUENCE {
           extension          [HOLLOW-INSERTIONS] SEQUENCE {
               exception          ExceptionSpec OPTIONAL,
               additions          [GROUP] ExtensionAdditions OPTIONAL
           },
           root               [GROUP] ComponentTypeList OPTIONAL
       } OPTIONAL
   }

   ComponentTypeList ::= SEQUENCE SIZE (1..MAX) OF
       componentType [GROUP] ComponentType

   ComponentType ::= [NO-INSERTIONS] CHOICE {
       component     [GROUP] SequenceNamedType,
       optional      SEQUENCE {
           component     [GROUP] SequenceNamedType,
           default       Value OPTIONAL
       },
       componentsOf  Type
   }

   SequenceNamedType ::= NamedType
       (WITH COMPONENTS { ..., member ABSENT, item ABSENT })

   ExtensionAdditions ::= SEQUENCE SIZE (1..MAX) OF
       addition [GROUP] ExtensionAddition

   ExtensionAddition ::= [NO-INSERTIONS] CHOICE {
       extensionGroup  ExtensionAdditionGroup,
       componentType   [GROUP] ComponentType
   }

   ExtensionAdditionGroup ::= [HOLLOW-INSERTIONS] SEQUENCE {
       version         [ATTRIBUTE] VersionNumber OPTIONAL,
       componentTypes  [GROUP] ComponentTypeList
   }

   VersionNumber ::= INTEGER (2..MAX)



Legg                       Expires 11 May 2006                 [Page 92]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005

   SetType ::= SequenceType

   ChoiceOrUnionType ::= [HOLLOW-INSERTIONS] SEQUENCE {
       insertions  [ATTRIBUTE] Insertions OPTIONAL,
       precedence  [ATTRIBUTE] PrecedenceList OPTIONAL,
       root        [GROUP] AlternativeTypeList,
       extension   [HOLLOW-INSERTIONS] SEQUENCE {
           exception   ExceptionSpec OPTIONAL,
           additions   [GROUP] ExtensionAdditionAlternatives OPTIONAL



Legg                      Expires 20 April 2007               [Page 102]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


       } OPTIONAL
   }

   PrecedenceList ::= [LIST] SEQUENCE SIZE (1..MAX) OF member QName

   AlternativeTypeList ::= SEQUENCE SIZE (1..MAX) OF
       component [GROUP] ChoiceOrUnionNamedType

   ChoiceOrUnionNamedType ::= NamedType
       (WITH COMPONENTS { ..., item ABSENT })

   ExtensionAdditionAlternatives ::= SEQUENCE SIZE (1..MAX) OF
       addition [GROUP] ExtensionAdditionAlternative

   ExtensionAdditionAlternative ::= [NO-INSERTIONS] CHOICE {
       extensionGroup  ExtensionAdditionAlternativesGroup,
       component       [GROUP] ChoiceOrUnionNamedType
   }

   ExtensionAdditionAlternativesGroup ::= [HOLLOW-INSERTIONS] SEQUENCE {
       version       [ATTRIBUTE] VersionNumber OPTIONAL,
       alternatives  [GROUP] AlternativeTypeList
   }

   ChoiceType ::= ChoiceOrUnionType
       (WITH COMPONENTS { ...,
           precedence ABSENT,
           root (WITH COMPONENT (INCLUDES ChoiceNamedType)),
           extension (WITH COMPONENTS { ...,
               additions (WITH COMPONENT (WITH COMPONENTS { ...,
                   extensionGroup (WITH COMPONENTS { ...,
                       alternatives (WITH COMPONENT
                           (INCLUDES ChoiceNamedType)) }),
                   component (INCLUDES ChoiceNamedType) })) }) })

   ChoiceNamedType ::= ChoiceOrUnionNamedType
       (WITH COMPONENTS { ..., member ABSENT })

   UnionType ::= ChoiceOrUnionType
       (WITH COMPONENTS { ...,



Legg                       Expires 11 May 2006                 [Page 93]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
           insertions ABSENT,
           root (WITH COMPONENT (INCLUDES UnionNamedType)),
           extension (WITH COMPONENTS { ...,
               additions (WITH COMPONENT (WITH COMPONENTS { ...,
                   extensionGroup (WITH COMPONENTS { ...,
                       alternatives (WITH COMPONENT
                           (INCLUDES UnionNamedType)) }),
                   component (INCLUDES UnionNamedType) })) }) })



Legg                      Expires 20 April 2007               [Page 103]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   UnionNamedType ::= ChoiceOrUnionNamedType
       (WITH COMPONENTS { ...,
           attribute
           component ABSENT,
           element   ABSENT,
           attribute ABSENT,
           group     ABSENT })

   SequenceOfOrListType ::= SEQUENCE {
       minSize    [ATTRIBUTE] INTEGER (0..MAX) OPTIONAL,
       maxSize    [ATTRIBUTE] INTEGER (0..MAX) OPTIONAL,
       component  [GROUP] NamedType
                      (WITH COMPONENTS { ...,
                          attribute ABSENT, member ABSENT })
   }

   SequenceOfType ::= SequenceOfOrListType
       (WITH COMPONENTS { ...,
           component (WITH COMPONENTS { ..., item ABSENT }) })

   SetOfType ::= SequenceOfType

   ListType ::= SequenceOfOrListType
       (WITH COMPONENTS { ...,
           component (WITH COMPONENTS { ...,
                         component ABSENT,
                         element   ABSENT,
                         group     ABSENT }) })

   ConstrainedType ::= [HOLLOW-INSERTIONS] SEQUENCE {
       type        [GROUP] Type,
       constraint  [GROUP] Constraint
   }

   Constraint ::= SEQUENCE {
       constraintSpec  [GROUP] [NO-INSERTIONS] CHOICE {
           subtype         [GROUP] ElementSetSpecs,
           constrainedBy   UserDefinedConstraint,
           table           TableConstraint,
           contents        ContentsConstraint
       },
       exception       ExceptionSpec OPTIONAL
   }

   UserDefinedConstraint ::= [HOLLOW-INSERTIONS] SEQUENCE {
       annotation  Annotation OPTIONAL,
       parameters  [GROUP] ConstraintParameters OPTIONAL
   }




Legg                      Expires 11 May 2006 20 April 2007               [Page 94] 104]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


       parameters  [GROUP] ConstraintParameters OPTIONAL
   }       October 20, 2006


   ConstraintParameters ::= SEQUENCE SIZE (1..MAX) OF
       parameter [GROUP] UserDefinedConstraintParameter

   UserDefinedConstraintParameter ::= [SINGULAR-INSERTIONS] CHOICE {
       valueParameter      SEQUENCE {
           type                [GROUP] Type,
           value               [GROUP] Value
       },
       valueSetParameter   SEQUENCE {
           type                [GROUP] Type,
           valueSet            [GROUP] ValueSet
       },
       objectParameter     SEQUENCE {
           objectClass         [GROUP] DefinedObjectClass,
           object              [GROUP] Object
       },
       objectSetParameter  SEQUENCE {
           objectClass         [GROUP] DefinedObjectClass,
           objectSet           [GROUP] ObjectSet
       },
       typeParameter       SEQUENCE {
           type                [GROUP] Type
       },
       classParameter      SEQUENCE {
           objectClass         [GROUP] DefinedObjectClass
       }
   }

   TableConstraint ::= SEQUENCE {
       objectSet          [GROUP] ObjectSet,
       componentRelation  [GROUP] AtNotations OPTIONAL
   }

   AtNotations ::= SEQUENCE SIZE (1..MAX) OF
       restrictBy AtNotation

   AtNotation ::= AnyType Markup

   ContentsConstraint ::= SEQUENCE {
       containing  Type OPTIONAL,
       encodedBy   Value OPTIONAL
   } ((WITH COMPONENTS { ..., containing PRESENT }) |
      (WITH COMPONENTS { ..., encodedBy PRESENT }))

   ExceptionSpec ::= SEQUENCE {
       type   [GROUP] Type,
       value  [GROUP] Value
   }



Legg                      Expires 11 May 2006 20 April 2007               [Page 95] 105]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


       type   [GROUP] Type,
       value  [GROUP] Value
   }       October 20, 2006


   Value ::= [SINGULAR-INSERTIONS] [NO-INSERTIONS] CHOICE {
       literalValueAtt  [NAME AS "literalValue"] [ATTRIBUTE] UTF8String,
       literalValue     ElementFormLiteralValue,
       valueRef         [NAME AS "value"] [ATTRIBUTE] QName,
       value            ElementFormNotationalValue
   }

   ElementFormLiteralValue ::= AnyType Markup
   -- If asn1:literal="false" asnx:literal="false" then the governing type of
   -- ElementFormLiteralValue is ElementFormNotationalValue.

   ElementFormNotationalValue ::= [HOLLOW-INSERTIONS] SEQUENCE {
       annotation  Annotation OPTIONAL,
       definition  [GROUP] [NO-INSERTIONS] CHOICE {
           reference      [GROUP] Reference,
           expanded       ExpandedValue,
           fromObjects    InformationFromObjects,
           openTypeValue  SEQUENCE {
               type           [GROUP] Type,
               value          [GROUP] Value
           },
           components     [GROUP] ComponentValueList
       }
   }

   Reference ::= SEQUENCE {
       ref      [ATTRIBUTE] QName,
       context  [ATTRIBUTE] AnyURI OPTIONAL
   }

   ExpandedValue ::= SEQUENCE {
       name    [ATTRIBUTE] NCName OPTIONAL,
       module  ReferencedModule OPTIONAL,
       value   [GROUP] Value
   }

   ComponentValueList ::= SEQUENCE SIZE (1..MAX) OF
       component [GROUP] NamedValue

   NamedValue ::= [SINGULAR-INSERTIONS] CHOICE {
       attribute
       component  GenericNamedValue,
       element    GenericNamedValue,
       attribute  GenericNamedValue,
       group      GenericNamedValue,
       member     GenericNamedValue,
       item       GenericNamedValue
   }




Legg                      Expires 20 April 2007               [Page 106]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   GenericNamedValue ::= SEQUENCE {
       name   [ATTRIBUTE] QName,
       value  [GROUP] Value
   }



Legg                       Expires 11 May 2006                 [Page 96]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005

   ValueSet ::= [SINGULAR-INSERTIONS] [NO-INSERTIONS] CHOICE {
       valueSetRef  [NAME AS "valueSet"] [ATTRIBUTE] QName,
           -- valueSetRef is not used in this version
       valueSet     ElementFormValueSet
   }

   ElementFormValueSet ::= [HOLLOW-INSERTIONS] SEQUENCE {
       annotation  Annotation OPTIONAL,
       definition  [GROUP] [NO-INSERTIONS] CHOICE {
           elementSetSpecs  [GROUP] ElementSetSpecs
       }
   }

   ElementSetSpecs ::= [HOLLOW-INSERTIONS] SEQUENCE {
       root       [GROUP] ValueElementSetSpec,
       extension  [HOLLOW-INSERTIONS] SEQUENCE {
           additions  [GROUP] ValueElementSetSpec OPTIONAL
       } OPTIONAL
   }

   ValueElementSetSpec ::= ElementSetSpec
   (WITH COMPONENTS { ...,
       object        ABSENT,
       objectSet     ABSENT,
       union         (WITH COMPONENT (INCLUDES ValueElementSetSpec)),
       intersection  (WITH COMPONENT (INCLUDES ValueElementSetSpec)),
       all           (WITH COMPONENTS { ...,
           elements      (INCLUDES ValueElementSetSpec),
           except        (INCLUDES ValueElementSetSpec) }) })

   ElementSetSpec ::= [SINGULAR-INSERTIONS] CHOICE {
       literalValue    ElementFormLiteralValue,
       value           ElementFormNotationalValue,
       includes        Type,
       range           ValueRange,
       size            Constraint,
       typeConstraint  Type,
       from            Constraint,
       withComponent   Constraint,
       withComponents  MultipleTypeConstraints,
       pattern         Value,
       object          ElementFormObject,
       objectSet       ElementFormObjectSet,



Legg                      Expires 20 April 2007               [Page 107]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


       union           ElementSetSpecList,
       intersection    ElementSetSpecList,
       all             SEQUENCE {
           elements        [GROUP] ElementSetSpec OPTIONAL,
           except          ElementSetSpec
       }
   }



Legg                       Expires 11 May 2006                 [Page 97]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005

   ElementSetSpecList ::= SEQUENCE SIZE (2..MAX) OF
       elements [GROUP] ElementSetSpec

   ValueRange ::= SEQUENCE {
       minimum  [GROUP] [NO-INSERTIONS] CHOICE {
           minInclusive  EndValue,
           minExclusive  EndValue
       } DEFAULT minInclusive:{},
       maximum  [GROUP] [NO-INSERTIONS] CHOICE {
           maxInclusive  EndValue,
           maxExclusive  EndValue
       } DEFAULT maxInclusive:{}
   }

   EndValue ::= [HOLLOW-INSERTIONS] SEQUENCE {
       value  [GROUP] Value OPTIONAL
   }

   MultipleTypeConstraints ::= [HOLLOW-INSERTIONS] SEQUENCE {
       partial          [ATTRIBUTE] BOOLEAN DEFAULT FALSE,
       typeConstraints  [GROUP] TypeConstraints
   }

   TypeConstraints ::= SEQUENCE SIZE (1..MAX) OF
       namedConstraint [GROUP] NamedConstraint

   NamedConstraint ::= [SINGULAR-INSERTIONS] CHOICE {
       attribute
       component  GenericNamedConstraint,
       element    GenericNamedConstraint,
       attribute  GenericNamedConstraint,
       group      GenericNamedConstraint,
       member     GenericNamedConstraint,
       item       GenericNamedConstraint
   }

   GenericNamedConstraint ::= [HOLLOW-INSERTIONS] SEQUENCE {
       name        [ATTRIBUTE] QName,
       use         [ATTRIBUTE] PresenceConstraint OPTIONAL,
       constraint  [GROUP] Constraint OPTIONAL
   }



Legg                      Expires 20 April 2007               [Page 108]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   PresenceConstraint ::= ENUMERATED { present, absent, optional }

   ObjectClass ::= [SINGULAR-INSERTIONS] CHOICE {
       classRef  [NAME AS "class"] [ATTRIBUTE] QName,
       class     ElementFormObjectClass
   }

   DefinedObjectClass ::= ObjectClass



Legg                       Expires 11 May 2006                 [Page 98]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
       (WITH COMPONENTS { ...,
           class (WITH COMPONENTS { ...,
               definition (WITH COMPONENTS { ...,
                   objectClassDefn ABSENT }) }) })

   ElementFormObjectClass ::= [HOLLOW-INSERTIONS] SEQUENCE {
       annotation  Annotation OPTIONAL,
       definition  [GROUP] [NO-INSERTIONS] CHOICE {
           reference        [GROUP] Reference,
           expanded         ExpandedObjectClass,
           objectClassDefn  [GROUP] ObjectClassDefn
       }
   }

   ExpandedObjectClass ::= SEQUENCE {
       name         [ATTRIBUTE] NCName OPTIONAL,
       module       ReferencedModule OPTIONAL,
       objectClass  [GROUP] ObjectClass
   }

   ObjectClassDefn ::= SEQUENCE SIZE (1..MAX) OF
       fieldSpec [GROUP] FieldSpec

   FieldSpec ::= [SINGULAR-INSERTIONS] CHOICE {
       typeField       TypeField,
       valueField      ValueField,
       valueSetField   ValueSetField,
       objectField     ObjectField,
       objectSetField  ObjectSetField,
       optional        OptionalField
   }

   OptionalField ::= SEQUENCE {
       field    [GROUP] [SINGULAR-INSERTIONS] CHOICE {
           typeField       TypeField,
           valueField      ValueField,
           valueSetField   ValueSetField,
           objectField     ObjectField,
           objectSetField  ObjectSetField
       },



Legg                      Expires 20 April 2007               [Page 109]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


       default  Setting OPTIONAL
   } (WITH COMPONENTS { ...,
         field (WITH COMPONENTS { typeField PRESENT }),
         default (WITH COMPONENTS { ...,
             value ABSENT,
             valueSet ABSENT,
             object ABSENT,
             objectSet ABSENT }) } |
      WITH COMPONENTS { ...,
         field (WITH COMPONENTS { valueField PRESENT }),
         default (WITH COMPONENTS { ...,
             type ABSENT,
             valueSet ABSENT,
             object ABSENT,
             objectSet ABSENT }) } |



Legg                       Expires 11 May 2006                 [Page 99]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005 ABSENT,
             valueSet ABSENT,
             object ABSENT,
             objectSet ABSENT }) } |
      WITH COMPONENTS { ...,
         field (WITH COMPONENTS { valueSetField PRESENT }),
         default (WITH COMPONENTS { ...,
             type ABSENT,
             value ABSENT,
             object ABSENT,
             objectSet ABSENT }) } |
      WITH COMPONENTS { ...,
         field (WITH COMPONENTS { objectField PRESENT }),
         default (WITH COMPONENTS { ...,
             type ABSENT,
             value ABSENT,
             valueSet ABSENT,
             objectSet ABSENT }) } |
      WITH COMPONENTS { ...,
         field (WITH COMPONENTS { objectSetField PRESENT }),
         default (WITH COMPONENTS { ...,
             type ABSENT,
             value ABSENT,
             valueSet ABSENT,
             object ABSENT }) })

   TypeField ::= SEQUENCE {
       annotation  Annotation OPTIONAL,
       name        [ATTRIBUTE] TypeFieldReference
   }

   TypeFieldReference ::= TypeReference

   ValueField ::= SEQUENCE {
       annotation  Annotation OPTIONAL,
       name        [ATTRIBUTE] ValueFieldReference,
       unique      [ATTRIBUTE] BOOLEAN OPTIONAL,



Legg                      Expires 20 April 2007               [Page 110]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


       governor    [GROUP] [SINGULAR-INSERTIONS] CHOICE {
           type           [GROUP] Type,
           typeFromField  FieldName
       }
   } ((WITH COMPONENTS { ..., unique ABSENT }) |
      (WITH COMPONENTS { ...,
          governor (WITH COMPONENTS { ..., typeFromField ABSENT }) }))

   ValueFieldReference ::= ValueReference

   ValueSetField ::= SEQUENCE {
       annotation  Annotation OPTIONAL,
       name        [ATTRIBUTE] ValueSetFieldReference,
       governor    [GROUP] [SINGULAR-INSERTIONS] CHOICE {
           type           [GROUP] Type,



Legg                       Expires 11 May 2006                [Page 100]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
           typeFromField  FieldName
       }
   }

   ValueSetFieldReference ::= TypeReference

   ObjectField ::= SEQUENCE {
       annotation   Annotation OPTIONAL,
       name         [ATTRIBUTE] ObjectFieldReference,
       objectClass  [GROUP] DefinedObjectClass
   }

   ObjectFieldReference ::= ObjectReference

   ObjectSetField ::= SEQUENCE {
       annotation   Annotation OPTIONAL,
       name         [ATTRIBUTE] ObjectSetFieldReference,
       objectClass  [GROUP] DefinedObjectClass
   }

   ObjectSetFieldReference ::= ObjectSetReference

   Object ::= [SINGULAR-INSERTIONS] [NO-INSERTIONS] CHOICE {
       objectRef  [NAME AS "object"] [ATTRIBUTE] QName,
       object     ElementFormObject
   }

   ElementFormObject ::= [HOLLOW-INSERTIONS] SEQUENCE {
       annotation  Annotation OPTIONAL,
       definition  [GROUP] [SINGULAR-INSERTIONS] CHOICE {
           reference    [GROUP] Reference,
           expanded     ExpandedObject,
           fromObjects  InformationFromObjects,



Legg                      Expires 20 April 2007               [Page 111]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


           fields       [GROUP] ObjectDefn
       }
   }

   ExpandedObject ::= SEQUENCE {
       name    [ATTRIBUTE] NCName OPTIONAL,
       module  ReferencedModule OPTIONAL,
       object  [GROUP] Object
   }

   ObjectDefn ::= SEQUENCE OF field FieldSetting

   FieldSetting ::= [HOLLOW-INSERTIONS] SEQUENCE {
       name     [ATTRIBUTE] NCName,
       setting  [GROUP] Setting
   }

   Setting ::= CHOICE {
       type       [GROUP] Type,
       value      [GROUP] [NO-INSERTIONS] Value,
       valueSet   [GROUP] [NO-INSERTIONS] ValueSet,
       object     [GROUP] [NO-INSERTIONS] Object,



Legg                       Expires 11 May 2006                [Page 101]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
       objectSet  [GROUP] [NO-INSERTIONS] ObjectSet
   }

   ObjectSet ::= [SINGULAR-INSERTIONS] [NO-INSERTIONS] CHOICE {
       objectSetRef  [NAME AS "objectSet"] [ATTRIBUTE] QName,
       objectSet     ElementFormObjectSet
   }

   ElementFormObjectSet ::= [HOLLOW-INSERTIONS] SEQUENCE {
       annotation  Annotation OPTIONAL,
       definition  [GROUP] [NO-INSERTIONS] CHOICE {
           reference      [GROUP] Reference,
           expanded       ExpandedObjectSet,
           objectSetSpec  [GROUP] ObjectSetSpec,
           fromObjects    InformationFromObjects
       }
   }

   ExpandedObjectSet ::= SEQUENCE {
       name       [ATTRIBUTE] NCName OPTIONAL,
       module     ReferencedModule OPTIONAL,
       objectSet  [GROUP] ObjectSet
   }

   ObjectSetSpec ::= [HOLLOW-INSERTIONS] SEQUENCE {
       root       [GROUP] ObjectElementSetSpec OPTIONAL,



Legg                      Expires 20 April 2007               [Page 112]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


       extension  [HOLLOW-INSERTIONS] SEQUENCE {
           additions  [GROUP] ObjectElementSetSpec OPTIONAL
       } OPTIONAL
   } ((WITH COMPONENTS { ..., root PRESENT }) |
      (WITH COMPONENTS { ..., extension PRESENT }))

   ObjectElementSetSpec ::= ElementSetSpec
   (WITH COMPONENTS { ...,
       literalValue    ABSENT,
       value           ABSENT,
       includes        ABSENT,
       range           ABSENT,
       size            ABSENT,
       typeConstraint  ABSENT,
       from            ABSENT,
       withComponent   ABSENT,
       withComponents  ABSENT,
       pattern         ABSENT,
       union           (WITH COMPONENT (INCLUDES ObjectElementSetSpec)),
       intersection    (WITH COMPONENT (INCLUDES ObjectElementSetSpec)),
       all             (WITH COMPONENTS { ...,
           elements        (INCLUDES ObjectElementSetSpec),
           except          (INCLUDES ObjectElementSetSpec) }) })

   EncodingControlSections ::= SEQUENCE SIZE (1..MAX) OF
       section [GROUP] EncodingControlSection

   EncodingControlSection ::= [SINGULAR-INSERTIONS] CHOICE {
       gser  [NAME AS "GSER"] GSER-EncodingInstructionAssignmentList,



Legg                       Expires 11 May 2006                [Page 102]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
       xer   [NAME AS "XER"] XER-EncodingInstructionAssignmentList
       -- plus encoding control sections
       -- for other encoding rules in the future
   }

   ENCODING-CONTROL RXER

       SCHEMA-IDENTITY
           "http://xmled.info/id/ASN.1/AbstractSyntaxNotation-X" "urn:oid:1.3.6.1.4.1.21472.1.0.1"
       TARGET-NAMESPACE "http://xmled.info/ns/ASN.1" "urn:ietf:params:xml:ns:asnx" PREFIX "asnx"

       COMPONENT module ModuleDefinition

       COMPONENT literal [ATTRIBUTE] BOOLEAN

   END

Appendix B. ASN.X for ASN.X

   This appendix is non-normative.



Legg                      Expires 20 April 2007               [Page 113]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


   <?xml version="1.0"?>
   <asn1:module xmlns:asn1="http://xmled.info/ns/ASN.1"
                xmlns:gser="http://xmled.info/ns/ASN.1"
                xmlns:xer="http://xmled.info/ns/ASN.1"
   <asnx:module xmlns:asnx="urn:ietf:params:xml:ns:asnx"
                name="AbstractSyntaxNotation-X"
                identifier="1.3.6.1.4.1.21472.1.0.1"
                schemaIdentity=
                   "http://xmled.info/id/ASN.1/AbstractSyntaxNotation-X"
                xmlns:asnx="http://xmled.info/ns/ASN.1"
                targetNamespace="http://xmled.info/ns/ASN.1"
                schemaIdentity="urn:oid:1.3.6.1.4.1.21472.1.0.1"
                targetNamespace="urn:ietf:params:xml:ns:asnx"
                targetPrefix="asnx"
                extensibilityImplied="true">

    <annotation>
     Copyright (C) The Internet Society 2005. (2006). This version of
     this ASN.X document module is part of RFC XXXX; see the RFC itself
     for full legal notices.
    </annotation>

    <import name="GSER-EncodingInstructionNotation"
            identifier="1.3.6.1.4.1.21472.1.0.2"
        schemaIdentity=
           "http://xmled.info/id/ASN.1/GSER-EncodingInstructionNotation"
        namespace="http://xmled.info/ns/ASN.1"/>
            schemaIdentity="urn:oid:1.3.6.1.4.1.21472.1.0.2"
            namespace="urn:ietf:params:xml:ns:asnx"/>

    <import name="XER-EncodingInstructionNotation"



Legg                       Expires 11 May 2006                [Page 103]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
            identifier="1.3.6.1.4.1.21472.1.0.3"
        schemaIdentity=
           "http://xmled.info/id/ASN.1/XER-EncodingInstructionNotation"
        namespace="http://xmled.info/ns/ASN.1"/>
            schemaIdentity="urn:oid:1.3.6.1.4.1.21472.1.0.3"
            namespace="urn:ietf:params:xml:ns:asnx"/>

    <namedType name="ModuleDefinition">
     <type
     <type>
      <sequence insertions="hollow">
      <sequence>
       <optional>
        <element name="annotation" type="asnx:Annotation"/>
       </optional>
       <optional>
        <attribute name="format" versionIndicator="true">
         <type>
          <constrained type="asn1:UTF8String"> type="asnx:UTF8String">
           <literalValue>1.0</literalValue>
           <extension/>
          </constrained>
         </type>
        </attribute>
        <default literalValue="1.0"/>
       </optional>
       <attribute name="name" type="asnx:ModuleReference"/>
       <optional>
        <attribute name="identifier" type="asnx:DefinitiveIdentifier"/>
       </optional>
       <optional>
        <attribute name="schemaIdentity" type="asn1:AnyURI"/> type="asnx:AnyURI"/>



Legg                      Expires 20 April 2007               [Page 114]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


       </optional>
       <optional>
        <attribute name="targetNamespace" type="asn1:AnyURI"/> type="asnx:AnyURI"/>
       </optional>
       <optional>
        <attribute name="targetPrefix" type="asnx:NCName"/>
       </optional>
       <optional>
        <attribute name="tagDefault" type="asnx:TagDefault"/>
        <default literalValue="automatic"/>
       </optional>
       <optional>
        <attribute name="extensibilityImplied" type="asn1:BOOLEAN"/> type="asnx:BOOLEAN"/>
        <default literalValue="false"/>
       </optional>
       <optional>
        <element name="export">
         <annotation> export is not used in this version </annotation>
         <type>
          <sequence/>
         </type>
        </element>
       </optional>
       <optional>
        <group name="imports" type="asnx:ImportList"/>
       </optional>
       <optional>
        <group name="assignments" type="asnx:AssignmentList"/>
       </optional>
       <optional>
        <element name="encodingControls"



Legg                       Expires 11 May 2006                [Page 104]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
                 type="asnx:EncodingControlSections"/>
       </optional>
      </sequence>
     </type>
    </namedType>

    <namedType name="ModuleReference" type="asnx:TypeReference"/>

    <namedType name="DefinitiveIdentifier"
               type="asn1:OBJECT-IDENTIFIER"/>
               type="asnx:OBJECT-IDENTIFIER"/>

    <namedType name="TagDefault">
     <type>
      <enumerated>
       <enumeration name="explicit"/>
       <enumeration name="implicit"/>
       <enumeration name="automatic"/>



Legg                      Expires 20 April 2007               [Page 115]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


      </enumerated>
     </type>
    </namedType>

    <namedType name="Annotation" type="asn1:AnyType"/> type="asnx:Markup"/>

    <namedType name="ImportList">
     <type>
      <sequenceOf minSize="1">
       <element name="import" type="asnx:Import"/>
      </sequenceOf>
     </type>
    </namedType>

    <namedType name="Import">
     <type>
      <sequence>
       <optional>
        <attribute name="name" type="asnx:ModuleReference"/>
       </optional>
       <optional>
        <attribute name="identifier" type="asnx:DefinitiveIdentifier"/>
       </optional>
       <optional>
        <attribute name="schemaIdentity" type="asn1:AnyURI"/> type="asnx:AnyURI"/>
       </optional>
       <optional>
        <attribute name="namespace" type="asn1:AnyURI"/> type="asnx:AnyURI"/>
       </optional>
       <optional>
        <attribute name="schemaLocation" type="asn1:AnyURI"/>



Legg                       Expires 11 May 2006                [Page 105]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005 type="asnx:AnyURI"/>
       </optional>
      </sequence>
     </type>
    </namedType>

    <namedType name="AssignmentList">
     <type>
      <sequenceOf minSize="1">
       <group name="assignment" type="asnx:Assignment"/>
      </sequenceOf>
     </type>
    </namedType>

    <namedType name="Assignment">
     <type
     <type>
      <choice insertions="none">
      <choice>
       <element name="namedType" type="asnx:TypeAssignment"/>



Legg                      Expires 20 April 2007               [Page 116]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


       <element name="namedValue" type="asnx:ValueAssignment"/>
       <element name="namedValueSet"
                type="asnx:ValueSetTypeAssignment"/>
       <element name="namedClass" type="asnx:ObjectClassAssignment"/>
       <element name="namedObject" type="asnx:ObjectAssignment"/>
       <element name="namedObjectSet" type="asnx:ObjectSetAssignment"/>
       <group name="component" type="asnx:TopLevelNamedType"/>
      </choice>
     </type>
    </namedType>

    <namedType name="TypeAssignment">
     <type>
      <sequence>
       <optional>
        <element name="annotation" type="asnx:Annotation"/>
       </optional>
       <attribute name="name" type="asnx:TypeReference"/>
       <group name="type" type="asnx:Type"/>
      </sequence>
     </type>
    </namedType>

    <namedType name="TypeReference">
     <type>
      <constrained type="asn1:UTF8String"> type="asnx:UTF8String">
       <pattern literalValue="[A-Z]\w*(-\w+)*"/>
       <!-- \w is equivalent to [a-zA-Z0-9] -->
      </constrained>
     </type>
    </namedType>




Legg                       Expires 11 May 2006                [Page 106]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005

    <namedType name="ValueAssignment">
     <type>
      <sequence>
       <optional>
        <element name="annotation" type="asnx:Annotation"/>
       </optional>
       <attribute name="name" type="asnx:ValueReference"/>
       <group name="type" type="asnx:Type"/>
       <group name="value" type="asnx:Value"/>
      </sequence>
     </type>
    </namedType>

    <namedType name="ValueReference" type="asnx:Identifier"/>

    <namedType name="Identifier">



Legg                      Expires 20 April 2007               [Page 117]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


     <type>
      <constrained type="asn1:UTF8String"> type="asnx:UTF8String">
       <pattern literalValue="[a-z]\w(-\w+)*"/>
      </constrained>
     </type>
    </namedType>

    <namedType name="ValueSetTypeAssignment">
     <type>
      <sequence>
       <optional>
        <element name="annotation" type="asnx:Annotation"/>
       </optional>
       <attribute name="name" type="asnx:TypeReference"/>
       <group name="type" type="asnx:Type"/>
       <group name="valueSet" type="asnx:ValueSet"/>
      </sequence>
     </type>
    </namedType>

    <namedType name="ObjectClassAssignment">
     <type>
      <sequence>
       <optional>
        <element name="annotation" type="asnx:Annotation"/>
       </optional>
       <attribute name="name" type="asnx:ObjectClassReference"/>
       <group name="objectClass" type="asnx:ObjectClass"/>
      </sequence>
     </type>
    </namedType>




Legg                       Expires 11 May 2006                [Page 107]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
    </namedType>

    <namedType name="ObjectClassReference">
     <type>
      <constrained type="asn1:UTF8String"> type="asnx:UTF8String">
       <pattern literalValue="[A-Z][A-Z0-9]*(-[A-Z0-9]+)*"/>
      </constrained>
     </type>
    </namedType>

    <namedType name="ObjectAssignment">
     <type>
      <sequence>
       <optional>
        <element name="annotation" type="asnx:Annotation"/>
       </optional>
       <attribute name="name" type="asnx:ObjectReference"/>
       <group name="objectClass" type="asnx:DefinedObjectClass"/>



Legg                      Expires 20 April 2007               [Page 118]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


       <group name="object" type="asnx:Object"/>
      </sequence>
     </type>
    </namedType>

    <namedType name="ObjectReference" type="asnx:ValueReference"/>

    <namedType name="ObjectSetAssignment">
     <type>
      <sequence>
       <optional>
        <element name="annotation" type="asnx:Annotation"/>
       </optional>
       <attribute name="name" type="asnx:ObjectSetReference"/>
       <group name="objectClass" type="asnx:DefinedObjectClass"/>
       <group name="objectSet" type="asnx:ObjectSet"/>
      </sequence>
     </type>
    </namedType>

    <namedType name="ObjectSetReference" type="asnx:TypeReference"/>

    <namedType name="TopLevelNamedType">
     <type>
      <constrained type="asnx:NamedType">
       <withComponents partial="true">
        <element name="attribute"> name="component">
         <withComponents partial="true">
          <group name="definition">
           <withComponents partial="true">
            <group name="reference" use="absent"/>
           </withComponents>



Legg                       Expires 11 May 2006                [Page 108]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005
          </group>
         </withComponents>
        </element>
        <element name="element">
         <withComponents partial="true">
          <group name="definition">
           <withComponents partial="true">
            <group name="reference" use="absent"/>
           </withComponents>
          </group>
         </withComponents>
        </element>
        <element name="attribute">
         <withComponents partial="true">
          <group name="definition">
           <withComponents partial="true">



Legg                      Expires 20 April 2007               [Page 119]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


            <group name="reference" use="absent"/>
           </withComponents>
          </group>
         </withComponents>
        </element>
        <element name="group" use="absent"/>
        <element name="member" use="absent"/>
        <element name="item" use="absent"/>
       </withComponents>
      </constrained>
     </type>
    </namedType>

    <namedType name="NamedType">
     <type
     <type>
      <choice insertions="singular">
      <choice>
       <element name="attribute" type="asnx:Attribute"/> name="component" type="asnx:Element"/>
       <element name="element" type="asnx:Element"/>
       <element name="attribute" type="asnx:Attribute"/>
       <element name="group" type="asnx:InvisibleNamedType"/>
       <element name="member" type="asnx:InvisibleNamedType"/>
       <element name="item" type="asnx:InvisibleNamedType"/>
      </choice>
     </type>
    </namedType>

    <namedType name="Attribute">
     <type>
      <constrained type="asnx:GenericNamedType">
       <withComponents partial="true">
        <group name="definition">
         <withComponents partial="true">
          <group name="local">
           <withComponents partial="true">
            <attribute name="typeAsVersion" use="absent"/>
           </withComponents>
          </group>
         </withComponents>
        </group>
       </withComponents>
      </constrained>
     </type>
    </namedType>

    <namedType name="Element">
     <type>
      <constrained type="asnx:GenericNamedType">
       <withComponents partial="true">



Legg                      Expires 11 May 2006 20 April 2007               [Page 109] 120]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005       October 20, 2006


        <group name="definition">
         <withComponents partial="true">
          <group name="local">
           <withComponents partial="true">
            <attribute name="versionIndicator" use="absent"/>
           </withComponents>
          </group>
         </withComponents>
        </group>
       </withComponents>
      </constrained>
     </type>
    </namedType>

    <namedType name="Element" type="asnx:GenericNamedType"/>

    <namedType name="InvisibleNamedType">
     <type>
      <constrained type="asnx:GenericNamedType">
       <withComponents partial="true">
        <group name="definition">
         <withComponents partial="true">
          <group name="reference" use="absent"/>
          <group name="local">
           <withComponents partial="true">
            <attribute name="typeAsVersion" use="absent"/>
            <attribute name="versionIndicator" use="absent"/>
           </withComponents>
          </group>
         </withComponents>
        </group>
       </withComponents>
      </constrained>
     </type>
    </namedType>

    <namedType name="GenericNamedType">
     <type
     <type>
      <sequence insertions="hollow">
      <sequence>
       <optional>
        <element name="annotation" type="asnx:Annotation"/>
       </optional>
       <optional>
        <attribute name="identifier" type="asnx:IdentifierOrEmpty"/>
       </optional>
       <group name="definition">
        <type>
         <choice>
          <group name="reference" type="asnx:TypeOrElementReference"/> type="asnx:DefinedComponent"/>
          <group name="local" type="asnx:LocalComponent"/>
         </choice>
        </type>
       </group>
      </sequence>
     </type>
    </namedType>

    <namedType name="LocalComponent">
     <type>
      <sequence>
       <attribute name="name" type="asn1:NCName"/>



Legg                      Expires 11 May 2006 20 April 2007               [Page 110] 121]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


       <optional>
        <attribute name="typeAsVersion" type="asn1:BOOLEAN"/>
       </optional>
       <group name="type" type="asnx:Type"/>       October 20, 2006


         </choice>
        </type>
       </group>
      </sequence>
     </type>
    </namedType>

    <namedType name="TypeOrElementReference"> name="IdentifierOrEmpty">
     <type>
      <sequence>
      <constrained type="asnx:UTF8String">
       <union>
        <includes type="asnx:Identifier"/>
        <literalValue></literalValue>
       </union>
      </constrained>
     </type>
    </namedType>

    <namedType name="DefinedComponent">
     <type>
      <constrained>
       <type>
        <sequence insertions="hollow">
         <group name="name">
        <type
          <type>
           <choice insertions="none">
         <choice>
            <attribute name="ref" type="asn1:QName"/> type="asnx:QName"/>
            <attribute name="elementType" type="asn1:Name"/> type="asnx:Name"/>
           </choice>
          </type>
         </group>
         <optional>
          <attribute name="namespace" type="asnx:AnyURI"/>
         </optional>
         <optional>
          <attribute name="context" type="asn1:AnyURI"/> type="asnx:AnyURI"/>
         </optional>
         <optional>
          <attribute name="embedded" type="asn1:BOOLEAN"/> type="asnx:BOOLEAN"/>
         </optional>
         <optional>
          <group name="prefixes" type="asnx:EncodingPrefixes"/>
         </optional>
        </sequence>
       </type>
    </namedType>

    <namedType name="IdentifierOrEmpty">
     <type>
      <constrained type="asn1:UTF8String">
       <union>
        <includes type="asnx:Identifier"/>
        <literalValue></literalValue>
        <withComponents partial="true">
         <group name="name">



Legg                      Expires 20 April 2007               [Page 122]

INTERNET-DRAFT         Abstract Syntax Notation X       October 20, 2006


          <withComponents>
           <attribute name="ref" use="present"/>
          </withComponents>
         </group>
         <attribute name="namespace" use="absent"/>
        </withComponents>
        <withComponents partial="true">
         <group name="name">
          <withComponents>
           <attribute name="elementType" use="present"/>
          </withComponents>
         </group>
         <attribute name="embedded" use="absent"/>
        </withComponents>
       </union>
      </constrained>
     </type>
    </namedType>

    <namedType name="LocalComponent">
     <type>
      <sequence>
       <attribute name="name" type="asnx:NCName"/>
       <optional>
        <attribute name="typeAsVersion" type="asnx:BOOLEAN"/>
       </optional>
       <optional>
        <attribute name="versionIndicator" type="asnx:BOOLEAN"/>
       </optional>
       <group name="type" type="asnx:Type"/>
      </sequence>
     </type>
    </namedType>

    <namedType name="Type">
     <type
     <type>
      <choice insertions="none">
      <choice>
       <attribute name="type" identifier="typeRef" type="asn1:QName"/> type="asnx:QName"/>
       <element name="type" type="asnx:ElementFormType"/>
      </choice>
     </type>
    </namedType>

    <namedType name="ElementFormType">
     <type>
      <sequence insertions="hollow">
       <optional>
        <element name="annotation" type="asnx:Annotation"/>



Legg                      Expires 11 May 2006 20 April 2007               [Page 111] 123]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


    <namedType name="ElementFormType">
     <type insertions="hollow">
      <sequence>
       <optional>
        <element name="annotation" type="asnx:Annotation"/>
       </optional>
       <optional>
        <attribute name="tagDefault" type="asnx:TagDefault"/>
       </optional>
       <optional>
        <attribute name="extensibilityImplied" type="asn1:BOOLEAN"/>       October 20, 2006


       </optional>
       <optional>
        <attribute name="explicit" type="asn1:BOOLEAN"/> type="asnx:BOOLEAN"/>
        <default literalValue="false"/>
       </optional>
       <group name="definition">
        <type>
         <choice>
          <group name="reference" type="asnx:TypeOrElementReference"/> type="asnx:DefinedType"/>
          <element name="expanded" type="asnx:ExpandedType"/>
          <attribute name="ancestor">
           <type>
            <constrained type="asn1:INTEGER"> type="asnx:INTEGER">
             <range>
              <minInclusive literalValue="1"/>
             </range>
            </constrained>
           </type>
          </attribute>
          <element name="namedBitList" type="asnx:NamedBitList"/>
          <element name="namedNumberList" type="asnx:NamedNumberList"/>
          <element name="enumerated" type="asnx:EnumeratedType"/>
          <element name="tagged" type="asnx:TaggedType"/>
          <element name="prefixed" type="asnx:EncodingPrefixedType"/>
          <element name="selection" type="asnx:SelectionType"/>
          <element name="instanceOf" type="asnx:InstanceOfType"/>
          <element name="fromClass" type="asnx:ObjectClassFieldType"/>
          <element name="fromObjects"
                   type="asnx:InformationFromObjects"/>
          <element name="sequence" type="asnx:SequenceType"/>
          <element name="set" type="asnx:SetType"/>
          <element name="choice" type="asnx:ChoiceType"/>
          <element name="union" type="asnx:UnionType"/>
          <element name="sequenceOf" type="asnx:SequenceOfType"/>
          <element name="setOf" type="asnx:SetOfType"/>
          <element name="list" type="asnx:ListType"/>
          <element name="constrained" type="asnx:ConstrainedType"/>
         </choice>



Legg                       Expires 11 May 2006                [Page 112]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


        </type>
       </group>
      </sequence>
     </type>
    </namedType>

    <namedType name="NamedBitList">
     <type>
      <sequenceOf minSize="1">
       <element name="namedBit" type="asnx:NamedBit"/>
      </sequenceOf>
     </type>
    </namedType>

    <namedType name="NamedBit">
     <type>
      <sequence>
       <attribute name="name" type="asn1:NCName"/>
       <optional>
        <attribute name="identifier" type="asnx:Identifier"/>
       </optional>
       <attribute name="bit">
        <type>
         <constrained type="asn1:INTEGER">
          <range>
           <minInclusive literalValue="0"/>
          </range>
         </constrained>
        </type>
       </attribute>
      </sequence>
     </type>
    </namedType>

    <namedType name="NamedNumberList">
     <type>
      <sequenceOf minSize="1">
       <element name="namedNumber" type="asnx:NamedNumber"/>
      </sequenceOf>
     </type>
    </namedType>

    <namedType name="NamedNumber">
     <type>
      <sequence>
       <attribute name="name" type="asn1:NCName"/>
       <optional>
        <attribute name="identifier" type="asnx:Identifier"/>



Legg                       Expires 11 May 2006                [Page 113]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


       </optional>
       <attribute name="number" type="asn1:INTEGER"/>
      </sequence>
     </type>
    </namedType>

    <namedType name="EnumeratedType">
     <type>
      <sequence>
       <group name="root" type="asnx:Enumeration"/>
       <optional>
        <element name="extension">
         <type>
          <sequence>
           <optional>
            <element name="exception" type="asnx:ExceptionSpec"/>
           </optional>
           <optional>
            <group name="additions" type="asnx:Enumeration"/>
           </optional>
          </sequence>
         </type>
        </element>
       </optional>
      </sequence>
     </type>
    </namedType>

    <namedType name="Enumeration">
     <type>
      <sequenceOf minSize="1">
       <element name="enumeration" type="asnx:EnumerationItem"/>
      </sequenceOf>
     </type>
    </namedType>

    <namedType name="EnumerationItem">
     <type>
      <sequence>
       <attribute name="name" type="asn1:NCName"/>
       <optional>
        <attribute name="identifier" type="asnx:Identifier"/>
       </optional>
       <optional>
        <attribute name="number" type="asn1:INTEGER"/>
       </optional>
      </sequence>
     </type>



Legg                       Expires 11 May 2006                [Page 114]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


    </namedType>

    <namedType name="TaggedType">
     <type>
      <sequence>
       <optional>
        <attribute name="tagClass" type="asnx:TagClass"/>
       </optional>
       <optional>
        <attribute name="tagging" type="asnx:Tagging"/>
       </optional>
       <group name="type" type="asnx:Type"/>
      </sequence>
     </type>
    </namedType>

    <namedType name="TagClass">
     <type>
      <enumerated>
       <enumeration name="universal"/>
       <enumeration name="application"/>
       <enumeration name="private"/>
      </enumerated>
     </type>
    </namedType>

    <namedType name="Tagging">
     <type>
      <enumerated>
       <enumeration name="explicit"/>
       <enumeration name="implicit"/>
      </enumerated>
     </type>
    </namedType>

    <namedType name="EncodingPrefixedType">
     <type insertions="hollow">
      <sequence>
       <group name="prefixes" type="asnx:EncodingPrefixes"/>
       <group name="type" type="asnx:Type"/>
      </sequence>
     </type>
    </namedType>

    <namedType name="EncodingPrefixes">
     <type>
      <sequenceOf minSize="1">
       <group name="prefix" type="asnx:EncodingPrefix"/>



Legg                       Expires 11 May 2006                [Page 115]

INTERNET-DRAFT         Abstract Syntax Notation X      November 11, 2005


      </sequenceOf>
     </type>
    </namedType>

    <namedType name="EncodingPrefix">
     <type insertions="singular">
      <choice>
       <element name="GSER" identifier="gser"
                type="asnx:GSER-EncodingInstructions"/>
       <element name="XER" identifier="xer"
                type="asnx:XER-EncodingInstructions"/> name="list" type="asnx:ListType"/>
          <element name="constrained" type="asnx:ConstrainedType"/>
         </choice>
        </type>