view Side-By-Side changes
INTERNET-DRAFT S. Leggdraft-legg-xed-asd-06.txtdraft-legg-xed-asd-07.txt eB2Bcom Intended Category: Standards TrackOctober 20,December 22, 2006 Abstract Syntax Notation X (ASN.X) Copyright (C) TheInternet SocietyIETF Trust (2006). Status of 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. 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 on20 April22 June 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 numerous ambiguities inherent in the ASN.1 language, therefore specifications written in ASN.Xdocumentsare much easier to parse and manage than original ASN.1 specifications. ASN.X, together with the RobustXML Encoding RulesLegg Expires20 April22 June 2007 [Page 1] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006 XML Encoding Rules (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 2. Conventions .....................................................5 3. General Considerations ..........................................5 3.1. Annotations ................................................7 4. ModuleDefinition Translation ....................................8 5. Translation of Assignments .....................................10 5.1. Referencing Named Constructs ..............................11 5.2. Importing Namespaces ......................................12 5.3. TypeAssignment Translation ................................13 5.4. ValueAssignment and XMLValueAssignment Translation ........14 5.5. ValueSetTypeAssignment Translation ........................14 5.6. ObjectClassAssignment Translation .........................15 5.7. ObjectAssignment Translation ..............................15 5.8. ObjectSetAssignment Translation ...........................16 5.9.Parameterized Definitions .................................16ParameterizedAssignment Translation .......................17 6. Translation of Types...........................................16...........................................17 6.1. Identifier Replacement....................................25....................................17 6.2. DefinedType Translation...................................26...................................18 6.3. Translation ofPredefinedBuilt-in Types...........................29.............................20 6.4. BitStringType Translation.................................30.................................21 6.5. IntegerType Translation...................................31...................................22 6.6. EnumeratedType Translation................................33................................23 6.7. PrefixedType Translation..................................34..................................25 6.7.1. Short Form TaggedType Translation..................37..................27 6.7.2. Long Form TaggedType Translation...................38...................28 6.8. SelectionType Translation................................39.................................29 6.9. InstanceOfType Translation................................40................................30 6.10. ObjectClassFieldType Translation.........................40.........................31 6.11. TypeFromObject and ValueSetFromObjects Translation.......40.......31 6.12. Translation of Combining Types...........................41...........................32 6.12.1. NamedType Translation.............................41.............................32 6.12.2. SequenceType Translation..........................45..........................36 6.12.3. SetType Translation...............................47...............................38 6.12.4. ChoiceType Translation............................47............................38 6.12.5. Translation of UNION Types........................48........................39 6.12.6. SequenceOfType Translation........................49........................40 6.12.7. Translation of LIST Types.........................50.........................41 6.12.8. SetOfType Translation.............................50.............................41 6.12.9. Effect of Insertion Encoding Instructions...................51.........42 6.13. Translation of Constrained Types.........................51.........................42 6.13.1. Constraint Translation............................54............................45 6.13.2. UserDefinedConstraint Translation.................54.................45 Legg Expires20 April22 June 2007 [Page 2] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006 6.13.3. TableConstraint Translation.......................55.......................46 6.13.4. ContentsConstraint Translation....................57....................48 6.13.5. ExceptionSpec Translation.........................58.........................49 7. Translation of Values..........................................59..........................................50 7.1. Translation of Literal Values.............................60.............................51 7.2. Translation of Notational Values..........................62..........................53 7.2.1. DefinedValue Translation...........................63...........................54 7.2.2. BuiltinValue Translation...........................64...........................55 7.2.3. ValueFromObject Translation........................67........................59 7.2.4. ObjectClassFieldValue Translation..................67..................59 8. Translation of Value Sets......................................68......................................60 8.1. ElementSetSpecs Translation...............................69...............................60 8.2. ElementSetSpec Translation................................69................................61 8.3. SubtypeElements Translation...............................70...............................62 8.3.1. ValueRange Translation.............................71.............................63 8.3.2. InnerTypeConstraints Translation...................72...................64 9. Translation of Object Classes..................................73..................................65 9.1. DefinedObjectClass Translation............................73............................65 9.2. ObjectClassDefn Translation...............................74...............................66 9.2.1. TypeFieldSpec Translation..........................75..........................66 9.2.2. FixedTypeValueFieldSpec Translation................76................67 9.2.3. FixedTypeValueSetFieldSpec Translation.............77.............69 9.2.4. VariableTypeValueFieldSpec Translation.............78.............70 9.2.5. VariableTypeValueSetFieldSpec Translation..........79..........71 9.2.6. FieldName Translation..............................81..............................73 9.2.7. ObjectFieldSpec Translation........................81........................73 9.2.8. ObjectSetFieldSpec Translation.....................82.....................74 10. Translation of Objects........................................84........................................75 10.1. DefinedObject Translation................................84................................75 10.2. ObjectDefn Translation...................................85...................................76 10.3. ObjectFromObject Translation.............................86.............................78 11. Translation of Object Sets....................................86....................................78 11.1. DefinedObjectSet Translation.............................87.............................79 11.2. ObjectSetElements Translation............................88............................80 11.2.1. ObjectSetFromObjects Translation.................89.................81 12. Translation of Information From Objects.......................89.......................81 13.EncodingControlSectionsTranslation...........................90of Parameterized Definitions ......................82 14. EncodingControlSections Translation ...........................91 15. Security Considerations.......................................90 15. Acknowledgements ..............................................91.......................................92 16. Acknowledgements ..............................................92 17. IANA Considerations...........................................91 17............................................92 18. References....................................................91 17.1.....................................................92 18.1. Normative References.....................................91 17.2......................................92 18.2. Informative References...................................93...................................94 Appendix A. ASN.1 for ASN.X.......................................93.......................................95 Appendix B. ASN.X for ASN.X......................................113......................................115 1. Introduction Legg Expires20 April22 June 2007 [Page 3] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 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 resemblesInformationFromObjects.InformationFromObjects notation. Ingeneralgeneral, such ambiguities can only be resolved once the entire specification has been parsed. There are other notations 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). An ASN.X module is a well-formed and valid XML document conforming to XML namespaces [XMLNS10][XMLNS11]. ASN.X completely avoids the inherent ambiguities of the ASN.1 language, therefore specifications written in ASN.Xdocumentsare 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 offers, through other ASN.1 encoding rules, alternative compact binary encodings for XML instance documents conforming to an ASN.X specification. ASN.X definitions can also incorporate type, element and attribute definitions from XML Schema[XSD1],[XSD1] documents, RELAX NG [RNG] documents 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.Xdocumentmodule being written directly without a pre-existing ASN.1specification,module, however such an ASN.Xdocumentmodule is considered valid if and only if there exists, in principle, an ASN.1specificationmodule that when translated would yield the ASN.Xdocument.module. The format for ASN.X has also been designed so that the content of an ASN.Xdocumentmodule 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.Xdocumentmodule 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. ThusLegg Expires 20 April 2007 [Page 4] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006the "X" in ASN.X can be regarded as standing for either XML or RXER, Legg Expires 22 June 2007 [Page 4] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 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 describedin,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.Xdocumentmodule makes use of definitions from the XML Information Set (Infoset)[ISET].[INFOSET]. In particular, information item property names follow the Infoset convention of being shown in square brackets, e.g., [local name]. Literal values of Infoset properties are enclosed in double quotes, however the double quotes are not part of the property values. 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 "asnx:" to stand for the namespace name "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 Legg Expires 22 June 2007 [Page 5] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 ASN.X is defined in terms of rules for translating an ASN.1 moduleLegg Expires 20 April 2007 [Page 5] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006into a synthetic Infoset. This synthetic Infoset is then serialized into a well-formed and valid XML document (the ASN.Xdocument)module) in the same manner that the synthetic Infoset for a non-canonical RXER encoding is serialized into an XML document (see Section5.116.12 of the specification for RXER [RXER]). Aside: The serialization permits CDATA sections, character references and parsed entity references. However, note that an ASN.Xdocumentmodule 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.Xdocument,module, the translation of some ASN.1 construct belongs to the [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: White spacecharacter itemsin the [children] of <fieldName> and <restrictBy> element items is explicitly covered under their respective descriptions. Where the translation of the construct is an attributeitemitem, 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: 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 mostcasescases, 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: In mostcasescases, RXER itself permits comment and PI items in the [children] of the element items with the [local name]"literalValue".Legg Expires20 April22 June 2007 [Page 6] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006 "literalValue". Aside: Note that an ASN.Xdocumentmodule 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 Section5.96.10 of the specification for RXER [RXER]. The [in-scope namespaces] and [namespace attributes] for other element items in the translation are determined according to Section5.3.2.16.2.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 Section5.3.2.26.2.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 Section5.3.3.16.2.3.1 of the specification for RXER. 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 elementitemitem, the enclosing element item becomes the [parent] of the element item. Whenever an attribute item is added to the [attributes] of an elementitemitem, 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". Thecorresponding ASN.1 type for the <annotation> element item is the Markup type [RXER], and the[children] and [attributes] of the <annotation> element item 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 20 April 2007 [Page 7] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006Free text or XML comments in an <annotation> element will be Legg Expires 22 June 2007 [Page 7] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 preserved in a Canonical RXER (CRXER)encoding,encoding [RXER] (because the corresponding ASN.1 type for the <annotation> element item is the Markup type [RXER]), while XML comments outside <annotation> elements will notbe.be preserved. Vendors using the <annotation> element items to hold ASN.1 compiler directives (as attributes or child elements of the <annotation> element)are encouraged toSHOULD 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) isa document item. The [document element] of the document item isan element item with the [local name] "module" and the [namespace name]"urn:ietf:params:xml:ns:asnx"."urn:ietf:params:xml:ns:asnx" (i.e., an <asnx:module> element item). The element item is typically the [document element] of a document item. An attribute item with the [local name] "format" and [normalized value] "1.0" MAY be added to the [attributes] of the[document element].<asnx:module> element item. 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, then an attribute item with the [local name] "schemaIdentity" SHALL be added to the [attributes] of the[document element] (i.e., the<asnx:module> elementitem).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 caseIf the target namespaceis the character string specified by the AnyURIValue of the TARGET-NAMESPACE encoding instruction. If[RXEREI] for the ASN.1 modulebeing translated has a target namespace,is not absent, then an attribute item with the [local name] "targetNamespace" SHALL be added to the [attributes] of the[document element].<asnx:module> element item. The [normalized value] of this attribute item is the target namespace of the module. Aside: An ASN.1 module has a target namespace if it contains a TARGET-NAMESPACE encoding instruction. 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].<asnx:module> element item. The [normalized value] of this attribute item is the character string specified by theNCName value ofNCNameValue in the Prefix. Legg Expires20 April22 June 2007 [Page 8] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 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].<asnx:module> element item. The [normalized value] of this attribute item is the modulereference in the ModuleIdentifier in the ModuleDefinition. If the DefinitiveIdentifier in the ModuleIdentifier in the ModuleDefinition is not empty, then an attribute item with the [local name] "identifier" SHALL be added to the [attributes] of the[document element].<asnx:module> element item. 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, then an attribute item with the [local name] "tagDefault" and [normalized value] "explicit" SHALL be added to the [attributes] of the[document element].<asnx:module> element item. If the TagDefault in the ModuleDefinition is not empty and the first keyword in the TagDefault is not "AUTOMATIC", then an attribute item with the [local name] "tagDefault" SHALL be added to the [attributes] of the[document element].<asnx:module> element item. 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", then an attribute item with the [local name] "tagDefault" and [normalized value] "automatic" MAY be added to the [attributes] of the[document element].<asnx:module> element item. If the ExtensionDefault in the ModuleDefinition is not 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].<asnx:module> element item. If the ExtensionDefault in the ModuleDefinition is 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].<asnx:module> element item. An element item with the [local name] "annotation" MAY be added to the [children] of the[document element].<asnx:module> element item. The translation of each Assignment in the AssignmentList in the ModuleBody in the ModuleDefinition of the module being translated Legg Expires20 April22 June 2007 [Page 9] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006 SHALL be appended to the [children] of the[document element].<asnx:module> element item. If the EncodingControlSections instance in the ModuleDefinition contains an EncodingControlSection for RXER, then the translation of each NamedType in a TopLevelComponent [RXEREI]in a TopLevelComponentsnested in the EncodingInstructionAssignmentList SHALL be added to the [children] of the[document element].<asnx:module> element item. The relative order of the top-level components [RXEREI] SHOULD be preserved in the translation, however the translations of the top-level components MAY be interspersed with the translations of the assignments in the AssignmentList. The translation of the EncodingControlSections instance in the ModuleDefinition of the module being translated SHALL be appended to the [children] of the[document element].<asnx:module> element item. 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 <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="asnx:INTEGER"/> <element name="myElement" type="asnx:INTEGER"/> </asnx:module> 5. Translation of Assignments Legg Expires20 April22 June 2007 [Page 10] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006 5.1. Referencing Named Constructs An Assignment in ASN.1 associates a reference name with a Type, Value, ValueSet, ObjectClass, Object or ObjectSet.InFor ASN.X,the translation of thean Assignment is also regarded as associatinga qualifiedan expanded name [XMLNS10][XMLNS11] with the Type, Value, ValueSet, ObjectClass, Object or ObjectSet. ASN.X uses these expanded names, rendered as qualified names [XMLNS10][XMLNS11], in place of the references in an ASN.1 specification. In every case, the localpartname of thequalifiedexpanded 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 target namespace of the ASN.1 module in which the Assignment is definedhas ais not absent, then the namespace name of the expanded name is that target namespace,then this SHALL beotherwise the namespace name of the expanded name has no value. When the expanded name is rendered as a qualifiedname. Thename, the namespace prefix is determined according to Section5.6.11.16.7.11.1 of the specification forRXER. If the ASN.1 module in which the Assignment is defined does not have a target namespace, then the namespace name of the qualified name is absent (i.e., the name is unqualified).RXER [RXER]. If an ASN.1 specification contains two or more moduleswithoutwhere the targetnamespaces,namespace is absent, then there exists the possibility thatreferencethe expanded names definedinby the ASN.X translations of those modules are not distinct. Thereferenceexpanded names are not distinctifif: (1) two or more type or value set assignments define the sametypereferencetypereference, or (2) two or more value assignments define the samevaluereferencevaluereference, or (3) two or more object class assignments define the sameobjectclassreferenceobjectclassreference, or (4) two or more object assignments define the sameobjectreferenceobjectreference, or (5) two or more object set assignments define the sameobjectsetreferenceobjectsetreference, or (6) two or more top-levelNamedType instanceselement components [RXEREI]subject to an ATTRIBUTE encoding instructionhave the sameeffective name [RXEREI]local name, or (7) two or more top-levelNamedType instances not subject to an ATTRIBUTE encoding instructionattribute components [RXEREI] have the sameeffectivelocal name. If thereferenceexpanded names are not distinct, then an unambiguous Legg Expires 22 June 2007 [Page 11] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 translation into ASN.X does not exist unless each of the modules has a SCHEMA-IDENTITY encoding instruction. Consequently, if two or more moduleswithoutwhere the targetnamespacesnamespace is absent are being translated into ASN.X and the reference names defined in those modulesarewill not be 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 indistinctreferenceexpanded names and 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].Legg Expires 20 April 2007 [Page 11] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006Aside: Although this means that different translators might produce ASN.Xdocumentsmodules that are syntactically different for any given ASN.1 module, thosedocumentsASN.X modules will be semantically equivalent to each other and to the original ASN.1 module. TARGET-NAMESPACE and SCHEMA-IDENTITY encoding instructions are RECOMMENDED for every ASN.1 module. 5.2. Importing Namespaces An Assignment is referenced from an ASN.Xdocumentmodule if itsqualifiedassociated expanded name appears as a qualified name in the [normalized value] ofaan attribute item with the [local name] "type", "value", "class", "object" or "objectSet". These references are categorized as direct references. An Assignment or top-level component is also referenced from an ASN.Xdocumentmodule if itsqualifiedexpanded name appears as a qualified name in the [normalized value] of an attribute item with the [local name] "ref". This reference is only categorized as direct if the ref attribute is not the 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 item 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 Legg Expires 22 June 2007 [Page 12] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 [children] of the[document element]<asnx:module> element item for each external module containing Assignments or top-level components that are directly referenced from the ASN.Xdocument.module. An <import> element item MAY be added to the [children] of the[document element]<asnx:module> element item 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, then anLegg Expires 20 April 2007 [Page 12] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006attribute item with the [local name] "identifier" 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, 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 target namespace of the external modulehas a target namespace,is not absent, 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].<asnx:module> element item. Note that because of the way parameterized references are expanded inASN.X,ASN.X (see Section 13), the modules in the Importsofin the ModuleBody in the ModuleDefinition may not correspond exactly to the <import> element items. 5.3. TypeAssignment Translation The translation of a TypeAssignment is an element item with the Legg Expires 22 June 2007 [Page 13] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 [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 added to the [children] or [attributes] of the <namedType> element item. Example MyType ::= INTEGER <namedType name="MyType" type="asnx:INTEGER"/>Legg Expires 20 April 2007 [Page 13] INTERNET-DRAFT Abstract Syntax Notation X October 20, 20065.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 assignmentandSHALL be added to the [children] or [attributes] of the <namedValue> element item. The translation of the Value on the right hand side of the assignment SHALL be added to the [children]and/oror [attributes] of the <namedValue> element item. Example myValue INTEGER ::= 10 <namedValue name="myValue" 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 22 June 2007 [Page 14] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 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 added to the [children] or [attributes] of the <namedValueSet> element item. The translation of the ValueSet on the right hand side of the assignment SHALL be added to the [children] of the <namedValueSet> element item. Example MyValueSet INTEGER ::= { 10 } <namedValueSet name="MyValueSet" type="asnx:INTEGER"> <valueSet>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 added to the [children] or [attributes] of the <namedClass> element item. Example MY-CLASS ::= TYPE-IDENTIFIER <namedClass name="MY-CLASS" 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 Legg Expires 22 June 2007 [Page 15] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 objectreference on the left hand side of the assignment. 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 assignmentandSHALL be added to the [children] or [attributes] of the <namedObject> element item. The translation of the Object on the right hand side of the assignment SHALL be added to the [children]and/oror [attributes] of the <namedObject> element item. Example myObject TYPE-IDENTIFIER ::= {INTEGERNULL IDENTIFIED BY {2 5 131 3 14 3 2 26 } } <namedObject name="myObject" 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, 2006literalValue="1.3.14.3.2.26"/> <field name="Type"type="asnx:INTEGER"/>type="asnx:NULL"/> </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 assignmentandSHALL be added to the [children] or [attributes] of the <namedObjectSet> element item. The translation of the ObjectSet on the right hand side of the assignment SHALL be added to the [children]and/oror [attributes] of the <namedObjectSet> element item. Example MyObjectSet TYPE-IDENTIFIER ::= { myObject } <namedObjectSet name="MyObjectSet" class="asnx:TYPE-IDENTIFIER"> <objectSet> <object ref="tns:myObject"/> </objectSet> </namedObjectSet> Legg Expires 22 June 2007 [Page 16] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 5.9.Parameterized DefinitionsParameterizedAssignment Translation The translation of an ASN.1 specification into ASN.X replaces anyDummyReference [X.683] orreference to a parameterized definition [X.683] with the definition expandedin-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. Consequentlyin-line. Consequently, there is no direct translation for a ParameterizedAssignment, though its definition may come into play in the translation of references to the parameterizeddefinition. Thedefinitionthat substitutes(see Section 13). 6. Translation of Types The rules fora DummyReference or parameterized reference (e.g.,translating theObjectdifferent varieties of Type are detailed in this section. Note thatsubstitutes for a ParameterizedObject) potentially comes fromthe notation of ASN.1 is ambiguous where adifferent module fromType is both prefixed [X.680-1] (e.g., tagged) and constrained. For example, thereference. Expandingnotation "[0] INTEGER (0..10)" could be interpreted as either aDummyReferencetagged ConstrainedType orparameterized reference in-line puts the substitute definition intoa constrained TaggedType. For thecontextpurposes of themodule 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 oftranslation into ASN.X, thesubstitute definition. A type definitionconstraint ispotentially dependent onassumed to have higher precedence than theTagDefault and ExtensionDefault ofprefix, so themodule in which it appears, and may alsoabove notation would beaffected bytaken to be a tagged ConstrainedType. 6.1. Identifier Replacement Various RXER encoding instructions can be used to override an identifier in anXML Encoding Rules (XER) [X.693] encoding control section [X.693-1]. Other kinds of definitions are not dependent on the module context, however type definitions can be nested within the 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] (as they are currently defined), so the presence ofASN.1 specification with anencoding control section for RXER or GSER is not significant in a change of context.NCName [XMLNS10]. Theremainder of this section describes how and when a change of contextNCName isindicatedgiven pre-eminence in the ASN.Xtranslation of a DummyReference or parameterized reference. In any instance of use, the module containing the DummyReference or parameterized reference is the referencing module and the module providing the substitute definition is the referenced module. The referencedrepresentation andreferencing modules may be the same module. In the case of a ParameterizedType,thesubstitute definitionidentifier isthe Type on the right hand side of the referenced ParameterizedTypeAssignment. In the case of a ParameterizedValueSetType, the substitute definitionnot explicitly given if it isthe constrained type on the right hand side of the notional ParameterizedTypeAssignment equivalentalgorithmically related to thereferenced ParameterizedValueSetTypeAssignment (see Clause 15.8 of X.680 [X.680]). In the caseNCName. The cases where an NCName overrides an identifier are covered individually in other parts ofa ParameterizedValue, the substitute definition is the Value on the right hand sidethis specification and make use of thereferenced ParameterizedValueAssignment. In the casefollowing definition. Definition (reduction): The reduction ofa ParameterizedObjectClass, the substitute definitionan NCName is theObjectClass on the right hand side of the referenced ParameterizedObjectClassAssignment. In the casestring ofa ParameterizedObject, the substitute definition ischaracters resulting from theObjectfollowing operations performed in order on theright hand side of the referenced ParameterizedObjectAssignment. In the caseNCName: (1) replace each full stop ('.', U+002E) and low line ('_', U+005F) character with a hyphen character ('-', U+002D), (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 aParameterizedObjectSet, the substitute definition issingle hyphen, and Legg Expires20 April22 June 2007 [Page 17] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006 (5) convert theObjectSet onfirst character to lowercase if it is an uppercase letter. Aside: If theright hand sidereduction of an NCName is not thereferenced ParameterizedObjectSetAssignment. Ifsame as theActualParameter corresponding toidentifier that the NCName replaces, then the identifier will be explicitly given in the translation into ASN.X. 6.2. DefinedType Translation If aDummyReferenceType isnotaValueSet,DefinedType in a ReferencedType, then thesubstitute definition for that DummyReference istranslation of theType, Value, DefinedObjectClass, Object or ObjectSet inType is theActualParameter corresponding totranslation of theDummyReference.DefinedType. Ifthe ActualParameter corresponding toaDummyReferenceDefinedType is not aValueSet, then the substitute definition for thatParameterizedType, ParameterizedValueSetType or DummyReference and isthe notional constrained type equivalentnot subject to a TYPE-REF or REF-AS-TYPE encoding instruction, then theValueSet; the ElementSetSpecstranslation of theValueSet contributes toDefinedType is either theconstraintattribute form translation ofthe constraineda typeandreference, or thegovernorelement form translation ofthe Parameter corresponding to the ActualParameter is used as the parenta typethat is constrained. Definition (interchangeable):reference. Thecontextsattribute form translation ofthe referencing and referenced modules are interchangeablea type reference is an attribute item withrespect to interpretingthesubstitute definition if: (a)[local name] "type". The [normalized value] of this attribute item is a qualified name for the expanded name of the referencedmoduletype definition (see Section 5.1). The attribute form translation SHALL NOT be used if this expanded name isthe referencing module and doesnotcontain an XER encoding control section, or (b)distinct with respect to thereferencedcurrent module andreferencing module havethesame TagDefault (where an absent TagDefaultmodules referenced by its <import> element items (see Section 5.1). The element form translation of a type reference istaken toan element item with the [local name] "type". An element item with the [local name] "annotation" MAY beequivalentadded to"EXPLICIT TAGS"),thereferenced module and referencing module have[children] of thesame ExtensionDefault, and neither module has an XER encoding control section. Aside: A module<type> element item. An attribute item withan XER encoding control section is not consideredthe [local name] "ref" SHALL be added tohave a context interchangeable with another module, including itself, becausethetypereference by which a substitute type definition[attributes] of the <type> element item. The [normalized value] of this attribute item isidentified may appear inaTargetList inqualified name for theXER encoding control sectionexpanded name of the referencedmodule,type definition. If this expanded name is not distinct with respect to the current module andbecausethein-line expansion of a substitute definition may causemodules referenced by itstext<import> element items, then an attribute item with the [local name] "context" SHALL be added tocome withinthescope[attributes] ofa TargetList intheXER encoding control section of<type> element item, otherwise if thereferencingmodulethat would not apply otherwise. Definition (recursively contained): A ParameterizedType is recursively contained if its translation willcontaining the referenced type definition has a schema identity URI, then an attribute item with the [local name] "context" MAY benested withinadded to thetranslation (i.e., in-line expansion)[attributes] ofanother ParameterizedType to which it is equivalent. A ParameterizedValueSetType is recursively contained if its translation will be nested withinthetranslation<type> element item. The [normalized value] ofanother ParameterizedValueSetType to which itthis attribute item isequivalent. Aside: ASN.1 does not permittheother kindsschema identity URI ofparameterizedthe module containing the type definition referenced by the DefinedType. Aside: If a referenceto be recursive.name is not distinct, then the module containing the referenced definition must have a schema identity URI (see Section 5.1). Legg Expires20 April22 June 2007 [Page 18] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006 An attribute item with the [local name] "embedded" and [normalized value] "false" or "0" MAY be added to the [attributes] of the <type> element item. The translation ofa DummyReference, a ParameterizedType thatthe DefinedType isnot recursively contained, a ParameterizedValue, a ParameterizedValueSetType thatthe same whether the type definition isnot recursively contained, a ParameterizedObjectClass,referenced by aParameterizedObjecttypereference or an ExternalTypeReference. If aParameterizedObjectSetDefinedType iseither: (1)subject to a TYPE-REF encoding instruction, then the translation of thesubstitute definition, or (2)DefinedType is an element item with the [local name]"type" if"type". An element item with thesubstitute definition is a Type, "value" if[local name] "annotation" MAY be added to thesubstitute definition is a Value, "class" if[children] of thesubstitute definition is an ObjectClass or DefinedObjectClass, "object" if the substitute definition is an Object, or "objectSet" if<type> element item. An attribute item with thesubstitute definition is an ObjectSet. A fully expanded reference (described shortly)[local name] "ref" SHALL be added to the[children][attributes] of the <type> element item. Thetranslation 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[normalized value] ofthe referencing and referenced modules are not interchangeable but the difference between them does not affect how the substitute definitionthis attribute item isinterpreted. Aside: There are many ways in which the substitute definition can be unaffected by a difference betweenthecontextsRXER character data translation of thereferencing 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 translationQNameValue incase (1) is used, thenthereferencing module is still the referencing module when considering a nested in-line expansion.TYPE-REF encoding instruction. Ifthe translation in case (2) is used, then the referenced module becomes the referencing module when consideringanested in-line expansion. A fully expanded referenceContextParameter isan element item with the [local name] "expanded". Exceptpresent in thecase of a DummyReference,RefParameters in thereference name is indicated byTYPE-REF encoding instruction, then an attribute item with the [local name]"name""context" SHALL be added to the [attributes] of the<expanded><type> element item.In the case of a ParameterizedType or ParameterizedValueSetType, theThe [normalized value] of this attribute item is thetypereferencestring value of theParameterizedType or ParameterizedValueSetType. Legg Expires 20 April 2007 [Page 19] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006 InAnyURIValue in thecase of a ParameterizedValue,ContextParameter. An attribute item with the [local name] "embedded" and [normalized value] "true" or "1" SHALL be added to the [attributes] ofthisthe <type> element item. Aside: The embedded attribute item indicates whether a type isthe valuereference of the ParameterizedValue. In the case ofdirectly referenced as aParameterizedObjectClass,DefinedType or indirectly referenced 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. If a DefinedType is subject to a REF-AS-TYPE encoding instruction, then the[normalized value]translation ofthis attribute itemthe DefinedType is an element item with theobjectclassreference of[local name] "type". An element item with theParameterizedObjectClass, In[local name] "annotation" MAY be added to thecase[children] ofa ParameterizedObject,the[normalized value] of this<type> element item. An attribute itemis the objectreference ofwith theParameterizedObject. In[local name] "elementType" SHALL be added to thecase[attributes] ofa ParameterizedObjectSet,the <type> element item. The [normalized value] of this attribute item is theobjectsetreference of the ParameterizedObjectSet. The "name" attribute item MAY be omitted if: (a) the conditions permitting the useRXER character data translation of thetranslationNameValue in theaforementioned case (1) are satisfied, or (b) the reference is notREF-AS-TYPE encoding instruction. If atypereference, or (c) the referenceContextParameter isa typereference that does not appear in any TargetListpresent inan XER encoding control section ofthereferenced module. The "name" attribute SHALL NOT appearRefParameters in thetranslation of a DummyReference. The referenced module is indicated byREF-AS-TYPE encoding instruction, then anelementattribute item with the [local name]"module""context" SHALL be added to the[children][attributes] of the<expanded><type> element item. The<module> element[normalized value] of this attribute itemMAY be omitted if the conditions permittingis theusestring value of thetranslationAnyURIValue in theaforementioned case (1) are satisfied,ContextParameter. Example CHOICE { one Foo, Legg Expires 22 June 2007 [Page 19] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 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> <choice> <element name="one" type="tns:Foo"/> <element name="two" xmlns:po="http://www.example.com/PO1"> <type ref="po:PurchaseOrderType" embedded="true"/> </element> <element name="three"> <type elementType="product" context="http://www.example.com/inventory"/> </element> </choice> </type> If a DefinedType is a DummyReference, ParameterizedType orifParameterizedValueSetType, then thereferencing moduletranslation of the Type is thereferenced module. Whentranslation of that DummyReference, ParameterizedType or ParameterizedValueSetType (see Section 13). 6.3. Translation of Built-in Types If a Type is a BuiltinType or ReferencedType that is one of the<module>productions in Table 1 in Section 5 of the specification for RXER [RXER], then the translation of the Type is either the attribute form or elementitemform translation of that type. The attribute form translation of a Type that ispresent: (a) Ana BuiltinType or ReferencedType that is one of the productions in Table 1 is an attribute item with the [local name]"name" SHOULD be added to the [attributes] of the <module> element item."type". The [normalized value] of this attribute item is a qualified name for themodulereference in the ModuleIdentifier inexpanded name of theModuleDefinitionbuilt-in type (see Section 5 of thereferenced module. (b) Ifspecification for RXER [RXER]). The element form translation of a Type that is a BuiltinType or ReferencedType that is one of theDefinitiveIdentifierproductions in Table 1 is an element item with theModuleIdentifier in[local name] "type". An element item with theModuleDefinition[local name] "annotation" MAY be added to the [children] of thereferenced module is not empty, then an<type> element item. An attribute item with the [local name]"identifier""ref" SHALL be added to the [attributes] of the<module><type> element item. The [normalized value] of this attribute item is a qualified name for theRXER character data translation of the DefinitiveIdentifier.Legg Expires20 April22 June 2007 [Page 20] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006(c) Ifexpanded name of thereferenced module hasbuilt-in type. Example BOOLEAN <type ref="asnx:BOOLEAN"/> Usually the translator is free to choose either the attribute form or element form translation for aschema identity URI, then anType, however in some contexts attribute forms for a Type are explicitly disallowed. 6.4. BitStringType Translation The translation of a BitStringType with a NamedBitList is an element item with the [local name]"schemaIdentity" SHALL"type". An element item with the [local name] "annotation" MAY be added to the[attributes][children] of the<module><type> element item.The [normalized value] of this attributeAn element itemiswith theschema identity URI of[local name] "namedBitList" SHALL be appended to thereferenced module. At least one[children] of theattribute items specified in cases (a), (b) and (c) MUST appear<type> element item. The translation of each NamedBit in the[attributes]NamedBitList SHALL be appended to the [children] of the<module><namedBitList> element item. The translation of a NamedBit is an element item with thesubstitute definition[local name] "namedBit". An attribute item with the [local name] "name" SHALL be added to the[children] or[attributes] of the<expanded><namedBit> element item.Example Consider these module definitions: Templates DEFINITIONS AUTOMATIC TAGS ::= BEGIN CollectionOfThings { Thing } ::= SEQUENCE OF thing Thing END ProtocolDefinitions DEFINITIONS AUTOMATIC TAGS ::= BEGIN IMPORTS CollectionOfThings{} FROM Templates ; CollectionOfIntegers ::= CollectionOfThings { INTEGER } END The Type on the right hand side ofIf theTypeAssignment for CollectionOfIntegers is a ParameterizedType. ThingBitStringType is subject to aDummyReference. Without using the translation in case (1),VALUES encoding instruction, then thetranslations of these modules are: <asnx:module name="Templates"/> Legg Expires 20 April 2007 [Page 21] INTERNET-DRAFT Abstract Syntax Notation X 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="thing"> <type> <expanded> <module name="ProtocolDefinitions"/> <type ref="asnx:INTEGER"/> </expanded> </type> </element> </sequenceOf> </type> </expanded> </type> </namedType> </asnx:module> The translation[normalized value] of this attribute item is theTemplates modulereplacement name [RXEREI] for the identifier in the NamedBit, otherwise it isempty becausethemodule contains only a parameterized assignment. Sinceidentifier in thecontexts ofNamedBit. If theTemplates and ProtocolDefinitions modules are interchangeable,BitStringType is subject to asimpler translationVALUES encoding instruction and the reduction of theProtocolDefinitions module 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 ParameterizedValueSetTypereplacement name (see Section 6.1) isrecursively contained,not the same as the identifier, thenits translation isan attribute item with the [local name] "identifier" SHALL be added to the [attributes] of the <namedBit> element item, otherwise an attribute item with the [local name]"type"."identifier" MAY be added to the [attributes] of the <namedBit> element item. The [normalized value] of this attribute item is the identifier in the NamedBit. An attribute item with the [local name]Legg Expires 20 April 2007 [Page 22] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006 "ancestor""bit" SHALL be added to the [attributes] of the<type><namedBit> element item. The [normalized value] of this attribute item is thedecimaldigit stringrepresentingrepresentation of the integer value ofone plusthe numberof intermediate enclosing <type> element items betweenor DefinedValue in the NamedBit. Examples BIT STRING { zero(0), one(1), two(2) } <type>element items resulting from the translationsLegg Expires 22 June 2007 [Page 21] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 <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 translation of an IntegerType with a NamedNumberList is an element item with thetwo equivalent instances of ParameterizedType or ParameterizedValueSetType.[local name] "type". An element item with the [local name] "annotation" MAY be added to the [children] of the <type> element item.A <type>An element item withan ancestor attribute item is a referencethe [local name] "namedNumberList" SHALL be appended toan ancestorthe [children] of the <type> element item.This form forThe translation of each NamedNumber in the NamedNumberList SHALL be appended to the [children] of the <namedNumberList> element item. The translation of a<type>NamedNumber is an element itemSHOULD NOTwith the [local name] "namedNumber". An attribute item with the [local name] "name" SHALL beused in original specifications written in ASN.X. Aside: The form is only intended foradded to thepurpose[attributes] ofhandling recursive parameterized type definitions in an ASN.1 specification being translated into ASN.X. Such definitions are self-referencing but have no obvious name. Itthe <namedNumber> element item. If the IntegerType isalso not easysubject toconstructasuitableVALUES encoding instruction, then the [normalized value] of this attribute item is the replacement namefrom[RXEREI] for thesurrounding context because recursive parameterized types can be embeddedidentifier inother constructs, such as information objects, that are themselves unnamed. Example Consider these type definitions, assumed to be definedthe NamedNumber, otherwise it is the identifier in the NamedNumber. If the IntegerType is subject to amodule that does not have an XERVALUES encodingcontrol 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 includinginstruction and theType inreduction of theTaggedType,replacement name (see Section 6.1) is not the same asfollows: <namedType name="NumberTree"> <type> <tagged tagClass="application" number="13"/> </type> </namedType> The Type intheTaggedType is a ParameterizedType. Sinceidentifier, then an attribute item with theParameterizedType is not recursively contained[local name] "identifier" SHALL be added to thetranslation[attributes] of theParameterizedType, using<namedNumber> element item, otherwise an attribute item with thetranslation in case (1) above,[local name] "identifier" MAY be added to the [attributes] of the <namedNumber> element item. The [normalized value] of this attribute item is the Legg Expires20 April22 June 2007 [Page23]22] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006 identifier in thetranslation ofNamedNumber. An attribute item with theType on[local name] "number" SHALL be added to theright hand side[attributes] of thereferenced ParameterizedTypeAssignment, namely this type: SEQUENCE { value [0] ValueType, left-subtree [1] Tree { ValueType } OPTIONAL, right-subtree [2] Tree { ValueType } OPTIONAL } ValueType is a DummyReference.<namedNumber> element item. Thetranslation[normalized value] ofthe actual parameter substitutes for the DummyReference. Inthiscase the actual parameterattribute item is thetype INTEGER. The translation fordigit string representation of theSEQUENCE type, up tointeger value of thefirst component, is added toSignedNumber or DefinedValue in the<tagged> element: <namedType name="NumberTree"> <type> <tagged tagClass="application" number="13"> <type><!-- Tree {NamedNumber. Examples INTEGER { nothing(0), a-little(1), a-lot(100) }--> <sequence> <element name="value"><type><tagged number="0"> <type ref="asnx:INTEGER"/><!-- ValueType --> </tagged> </type> </element> </sequence><namedNumberList> <namedNumber name="nothing" number="0"/> <namedNumber name="a-little" number="1"/> <namedNumber name="a-lot" number="100"/> </namedNumberList> </type></tagged>[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></namedType>6.6. EnumeratedType Translation TheType in the TaggedType for the second component is a ParameterizedType. Since this ParameterizedType is recursively contained itstranslation of an EnumeratedType isa <type>an element item with theancestor attribute. The value[local name] "type". An element item with the [local name] "annotation" MAY be added to the [children] of theancestor attribute is "2" because there is one intermediate<type> element(for a TaggedType). Put another way,item. An element item with thetranslations of[local name] "enumerated" SHALL be appended to theequivalent instances[children] ofParameterizedType are twothe <type>steps apart.element item. The translation of each EnumerationItem nested in thethird componentRootEnumeration in the Enumerations instance in the EnumeratedType SHALL be appended to the [children] of theSEQUENCE type follows<enumerated> element item. If an ellipsis ("...") is present in thesame pattern asEnumerations instance, then an element item with the [local name] "extension" SHALL be appended to the [children] of the <enumerated> element item and thesecond component. The completedtranslation of the ExceptionSpec (possibly empty) SHALL be added to the [children] of the <extension> element item. If an AdditionalEnumeration isas follows: <namedType name="NumberTree"> <type>present in the Enumerations instance, then Legg Expires20 April22 June 2007 [Page24]23] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006<tagged tagClass="application" number="13"> <type><!-- Tree { INTEGER } --> <sequence> <element name="value"> <type> <tagged number="0"> <type 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. Translation of Types The rules for translatingthedifferent varietiestranslation ofType are detailedeach EnumerationItem nested inthis section. Note that the notation of ASN.1 is ambiguous where a Type is both prefixed [X.680-1] (e.g., tagged) and constrained. For example,thenotation "[0] INTEGER (0..10)" couldAdditionalEnumeration SHALL beinterpreted either as a tagged ConstrainedType or a constrained TaggedType. Forappended to thepurposes[children] of the <extension> element item. The translationinto ASN.X the constraint is assumed to have higher precedence than the prefix, so the above notation would be taken to be a tagged ConstrainedType. 6.1. Identifier Replacement Legg Expires 20 April 2007 [Page 25] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006 Various RXER encoding instructions can be used to overrideof anidentifier inEnumerationItem is anASN.1 specificationelement item withan NCName [XMLNS10]. The NCName is given pre-eminence intheASN.X representation and[local name] "enumeration". If theidentifier is not explicitly given if itEnumerationItem isalgorithmically related to the NCName. The cases where an NCName overrides an identifier are covered individually in other parts of this specification and make useof thefollowing definition. Definition (reduction): The reduction of"identifier" form, then anNCName is the string of characters resulting from the following operations performed in order on the NCName: (1) replace each "." (U+002E) and "_" (U+005F) character with 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 of two or more hyphen charactersattribute item witha single hyphen, and (5) convertthefirst character[local name] "name" SHALL be added tolowercase if it is an uppercase letter. Aside: Ifthereduction[attributes] ofan NCName is not the same as the identifier that the NCName replaces, then the identifier will be explicitly given inthetranslation into ASN.X. 6.2. DefinedType Translation<enumeration> element item. Ifa Typethe EnumeratedType is subject to aDefinedType in a ReferencedType,VALUES encoding instruction, then thetranslation[normalized value] ofthe Typethis attribute item is thetranslation ofreplacement name [RXEREI] for theDefinedType. If a DefinedTypeidentifier, otherwise it isnot a ParameterizedType, ParameterizedValueSetType or DummyReference andthe identifier. If the EnumeratedType isnotsubject to aTYPE-REF or REF-AS-TYPEVALUES encodinginstruction, theninstruction and thetranslationreduction of theDefinedTypereplacement name (see Section 6.1) iseithernot the same as the identifier, then an attributeform translationitem with the [local name] "identifier" SHALL be added to the [attributes] ofa type reference, orthe <enumeration> elementform translation of a type reference. The attribute form translation of a type reference isitem, otherwise an attribute item with the [local name]"type"."identifier" MAY be added to the [attributes] of the <enumeration> element item. The [normalized value] of this attribute item is thequalified name referencingidentifier. If thetype definition (see Section 5.1). TheEnumerationItem is of the "NamedNumber" form, then an attributeform translationitem with the [local name] "name" SHALLNOTbeused ifadded to thequalified name[attributes] of the <enumeration> element item. If the EnumeratedType isshared by two or more type definitions in separate modules, i.e., is ambiguous. Legg Expires 20 April 2007 [Page 26] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006 The element form translation of a type reference is an element item with the [local name] "type". An attribute item with the [local name] "ref" SHALL be addedsubject to a VALUES encoding instruction, then the[attributes] of the <type> element item. The[normalized value] of this attribute item is thequalifiedreplacement namereferencing[RXEREI] for thetype definition.identifier in the NamedNumber, otherwise it is the identifier in the NamedNumber. Ifthis referencethe EnumeratedType is subject to a VALUES encoding instruction and the reduction of the replacement name is notdistinct with respect tothecurrent module andsame as themodules referenced by its <import> element items (see Section 5.1),identifier, then an attribute item with the [local name]"context""identifier" SHALL be added to the [attributes] of the<type><enumeration> element item, otherwiseif the module containing the referenced type definition has a schema identity URI, thenan attribute item with the [local name]"context""identifier" MAY be added to the [attributes] of the<type><enumeration> element item. The [normalized value] of this attribute item is theschema identity URI of the module containing the type definition referenced by the DefinedType. Aside: If a reference name is not distinct, then the module containingidentifier in thereferenced definition must have a schema identity URI (see Section 5.1).NamedNumber. Anelementattribute item with the [local name]"annotation" MAY"number" SHALL be added to the[children][attributes] of the<type><enumeration> element item.AnThe [normalized value] of this attribute itemwithis the[local name] "embedded" and [normalized value] "false" or "0" MAY be added todigit string representation of the[attributes]integer value of the SignedNumber or DefinedValue in the NamedNumber. Examples ENUMERATED { red(0), green(1), ..., blue(2) } <type>element item.<enumerated> <enumeration name="red" number="0"/> <enumeration name="green" number="1"/> Legg Expires 22 June 2007 [Page 24] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 <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 theDefinedTypeshort 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 samewhetherstructure as thetype definitiontranslation of an EncodingPrefixedType and can be simplified where there isreferenced byatypereference or an ExternalTypeReference.series of nested PrefixedType instances. If aDefinedTypePrefixedType issubject to a TYPE-REF encoding instruction, thenan EncodingPrefixedType and thetranslation ofEncodingReference is RXER, or theDefinedTypeEncodingReference isan element item withempty and the[local name] "type". An attribute item withdefault encoding reference [X.680-1] for the[local name] "ref" SHALL be added tomodule is RXER, then the[attributes]translation of the<type> element item. The [normalized value] of this attribute itemPrefixedType is theRXER character datatranslation of theQNameValue from the TYPE-REF encoding instruction. If the ContextParameter is present in the RefParametersType in theTYPE-REFEncodingPrefixedType. Aside: This is not suggesting that RXER encodinginstruction, theninstructions are ignored. Encoding instructions for RXER are not explicitly represented in ASN.X, but rather affect how anattribute item with the [local name] "context" SHALL be added to the [attributes] ofASN.1 module is translated into an ASN.X module (since the<type> element item. The [normalized value]content ofthis attribute iteman ASN.X module is also thestringRXER encoding of an abstract value of theAnyURIValue in the ContextParameter. An attribute item with the [local name] "embedded" and [normalized value] "true" or "1" SHALL be added to the [attributes]ModuleDefinition ASN.1 type in Appendix A). The individual effects of RXER encoding instructions on the<type> element item. Aside: The embedded attribute item indicates whethertranslation are addressed in other parts of this specification. Encoding instructions for other encoding rules have explicit representations in ASN.X. If atypePrefixedType isdirectly referenced as a DefinedType or indirectly referencedan EncodingPrefixedType and the Legg Expires20 April22 June 2007 [Page27]25] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006through a TYPE-REFEncodingReference is not RXER, or the EncodingReference is empty and the default encodinginstruction. An ASN.1 type can be referenced either way. Type definitions in other schema languages cannot be directly referenced. Anreference for the module is not RXER, then the translation of the PrefixedType is an element item with the [local name]"annotation" MAY"prefixed". The translation of the EncodingPrefix in the EncodingPrefixedType SHALL be added to the [children] of the<type><prefixed> element item. Ifa DefinedTypethe EncodingReference of an EncodingPrefix issubject to a REF-AS-TYPE encoding instruction,not empty, then the translation of theDefinedTypeEncodingPrefix is an element item with the[local name] "type". An attribute item withencodingreference in the EncodingReference as the [localname] "elementType"name]. The translation of the EncodingInstruction in the EncodingPrefix SHALL be added to the[attributes][children] ofthe <type>this element item.The [normalized value]If the EncodingReference ofthis attribute iteman EncodingPrefix is empty, then theRXER character datatranslation of theNameValue fromEncodingPrefix is an element item with theREF-AS-TYPEdefault encodinginstruction. Ifreference for theNamespacemodule as the [local name]. The translation of the EncodingInstruction in the EncodingPrefix SHALL be added to the [children] of this element item. The EncodingInstruction notation ispresentdifferent for each set of encoding instructions, and their translations into ASN.X are specified in separate documents [GSEREIT][XEREIT]. At theREF-AS-TYPEtime of writing, only three sets of encodinginstruction,instructions have been defined (for RXER [RXEREI], GSER [GSEREI] and EXTENDED-XER [X.693-1]). If the child <type> element item of a <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 [children] and [attributes] of the inner <prefixed> element item. Note that the long form translation of a TaggedType is also eligible for this rewriting step. This rewriting step MAY be applied to the result of a previous rewriting step if the necessary condition still holds. Example These three definitions are equivalent. [XER:ATTRIBUTE] [XER:USE-UNION] [GSER:CHOICE-OF-STRINGS] CHOICE { one PrintableString, two UTF8String } <type> <prefixed> <XER><attribute/></XER> <type> <prefixed> <XER><useUnion/></XER> Legg Expires 22 June 2007 [Page 26] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 <type> <prefixed> <GSER><choiceOfStrings/></GSER> <type> <choice> <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> <type> <choice> <element name="one" type="asnx:PrintableString"/> <element name="two" type="asnx:UTF8String"/> </choice> </type> </prefixed> </type> 6.7.1. Short Form TaggedType Translation The short form translation of a TaggedType is anattributeelement item with the [local name]"namespace" SHALL"type". An element item with the [local name] "annotation" MAY be added to the[attributes][children] of the <type> element item.The [normalized value] of this attributeAn element itemiswith thestring value of[local name] "tagged" SHALL be appended to theAnyURIValue in[children] of theNamespace.<type> element item. If theContextParameter is presentClass in theRefParametersTag in theREF-AS-TYPE encoding instruction,TaggedType is not empty, then an attribute item with the [local name]"context""tagClass" SHALL be added to the [attributes] of the<type><tagged> element item. The [normalized value] of this attribute item is thestring valueClass of theAnyURIValue in the ContextParameter.Tag with all letters downcased, i.e., either "universal", "application" or "private". Anelementattribute item with the [local name]"annotation" MAY"number" SHALL be added to the[children][attributes] of the<type><tagged> 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>The [normalized value] of this attribute item is the digit string representation of the integer value of the number or DefinedValue in Legg Expires20 April22 June 2007 [Page28]27] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 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 oftheproductionsClassNumber inTable 1, thenthetranslation ofTag. If theTypeTag iseither the attribute form or element form translation of that type. The attribute form translation of a Type comprising of one ofimmediately followed by theproductions in Table 1 is"IMPLICIT" keyword, then an attribute item with the [local name]"type". The"tagging" and [normalized value]of this attribute item is a qualified name with"implicit" SHALL be added to thenamespace name "urn:ietf:params:xml:ns:asnx" and[attributes] of thelocal 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 20 April 2007 [Page 29] INTERNET-DRAFT Abstract Syntax Notation X 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<tagged> elementform translation of a Type comprising one ofitem. If theproductions in Table 1Tag isan element item withimmediately followed by the[local name] "type". An"EXPLICIT" keyword, then an attribute item with the [local name]"ref""tagging" and [normalized value] "explicit" SHALL be added to the [attributes] of the<type><tagged> element item. The[normalized value]translation ofthis attribute item is a qualified name with the namespace name "urn:ietf:params:xml:ns:asnx" andthelocal part as indicatedType inTable 1. An element item withthe[local name] "annotation" MAYTaggedType SHALL be added to the [children] or [attributes] of the<type><tagged> element item.ExampleExamples [0] INTEGER <type> <tagged number="0" type="asnx:INTEGER"/> </type> [APPLICATION 10] IMPLICIT BOOLEAN<type ref="asnx:BOOLEAN"/> Usually the translator is free to choose either the attribute form or element form translation for a Type, however in some contexts attribute forms for a Type are explicitly disallowed. 6.4. BitStringType<type> <tagged tagClass="application" number="10" tagging="implicit" type="asnx:BOOLEAN"/> </type> 6.7.2. Long Form TaggedType Translation The long form translation of aBitStringType with a NamedBitListTaggedType 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]"namedBitList""prefixed" SHALL be appended to the [children] of the <type> element item. The translation ofeach NamedBitthe Tag in theNamedBitListTaggedType SHALL beappendedadded to the [children] of the<namedBitList><prefixed> element item. The translation of aNamedBitTag is an element item with theLegg Expires 20 April 2007 [Page 30] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006[local name]"namedBit". An attribute item with"TAG". If the[local name] "name" SHALLClass of the Tag is not empty, then an attribute item with the [local name] "tagClass" SHALL be added to the [attributes] of the<namedBit><TAG> element item.If the BitStringType is subject to a VALUES encoding instruction, then theThe [normalized value] of this attribute item is thereplacement name [RXEREI] for the identifier of the NamedBit, otherwise it is the identifier of the NamedBit. If the BitStringType is subject to a VALUES encoding instruction and the reductionClass of thereplacement name (see Section 6.1) is not the same as the identifier, then anTag with all letters downcased, i.e., either "universal", "application" or "private". Legg Expires 22 June 2007 [Page 28] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 An attribute item with the [local name]"identifier""number" SHALL be added to the [attributes] of the<namedBit><TAG> elementitem, otherwiseitem. The [normalized value] of this attribute item is the digit string representation of the integer value of the number or DefinedValue in the ClassNumber in the Tag. If the Tag is immediately followed by the "IMPLICIT" keyword, then an attribute item with the [local name]"identifier" MAY"tagging" and [normalized value] "implicit" SHALL be added to the [attributes] of the<namedBit><TAG> element item.The [normalized value] of this attribute item isIf theidentifier ofTag is immediately followed by theNamedBit. An"EXPLICIT" keyword, then an attribute item with the [local name]"bit""tagging" and [normalized value] "explicit" SHALL be added to the [attributes] of the<namedBit><TAG> element item. The[normalized value]translation ofthis attribute item isthedigit string representation ofType in theinteger value ofTaggedType SHALL be added to thenumber[children] orDefinedValue[attributes] of theNamedBit.<prefixed> element item. ExamplesBIT STRING { zero(0), one(1), two(2) }[0] INTEGER <type><namedBitList> <namedBit name="zero" bit="0"/> <namedBit name="one" bit="1"/> <namedBit name="two" bit="2"/> </namedBitList><prefixed type="asnx:INTEGER"> <TAG number="0"/> </prefixed> </type>[RXER:VALUES ALL CAPITALIZED, wednesday AS "Midweek"] BIT STRING { monday(0), tuesday(1), wednesday(2), thursday(3), friday(4) }[APPLICATION 10] IMPLICIT BOOLEAN <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><prefixed type="asnx:BOOLEAN"> <TAG tagClass="application" number="10" tagging="implicit"/> </prefixed> </type>6.5. IntegerType6.8. SelectionType TranslationLegg Expires 20 April 2007 [Page 31] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006The translation ofan IntegerType withaNamedNumberListSelectionType 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""selection" SHALL be appended to the [children] of the <type> element item. Thetranslation of each NamedNumberidentifier in a SelectionType identifies a NamedType in theNamedNumberList SHALL be appended to the [children]definition of the<namedNumberList> element item.Type in the SelectionType. The translation ofa NamedNumber isthat NamedType will be an element item with the [local name]"namedNumber".either Legg Expires 22 June 2007 [Page 29] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 "attribute", "element", "component", "group" or "member". An attribute item with the same [local name]"name"as the translation of the NamedType SHALL be added to the [attributes] of the<namedNumber><selection> element item.If the IntegerType is subject to a VALUES encoding instruction, then theThe [normalized value] of this attribute item isthe replacementa qualified name[RXEREI]for theidentifierexpanded name of theNamedNumber, otherwise it is the identifierNamedType [RXEREI]. The translation of theNamedNumber. IfType in theIntegerType is subjectSelectionType SHALL be added toa VALUES encoding instruction andthereduction[children] or [attributes] of thereplacement name (see Section 6.1)<selection> element item. Examples 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> </selection> </type> 6.9. InstanceOfType Translation The translation of an InstanceOfType isnot the same as the identifier, thenanattributeelement 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<namedNumber><type> element item. An elementitem, otherwise an attributeitem with the [local name]"identifier" MAY"instanceOf" SHALL beaddedappended to the[attributes][children] of the<namedNumber><type> element item. The[normalized value]translation ofthis attribute item istheidentifier of the NamedNumber. An attribute item withDefinedObjectClass in the[local name] "number"InstanceOfType SHALL be added to the [children] or [attributes] of the<namedNumber><instanceOf> 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. 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) }Example INSTANCE OF TYPE-IDENTIFIER <type><namedNumberList> <namedNumber name="Low" number="25"/> <namedNumber name="Medium" number="50"/>Legg Expires20 April22 June 2007 [Page32]30] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006<namedNumber name="High" number="75"/> <namedNumber name="DANGEROUS" identifier="very-high" number="100"/> </namedNumberList><instanceOf class="asnx:TYPE-IDENTIFIER"/> </type>6.6. EnumeratedType6.10. ObjectClassFieldType Translation The translation of anEnumeratedTypeObjectClassFieldType 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""fromClass" SHALL be appended to the [children] of the <type> element item. The translation ofeach 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, andthetranslation ofDefinedObjectClass in theExceptionSpec (possibly empty)ObjectClassFieldType SHALL be added to the [children] or [attributes] of the<extension><fromClass> element item.If an AdditionalEnumeration is present, then theThe translation ofeach EnumerationItemthe FieldName (see Section 9.2.6) in theAdditionalEnumerationObjectClassFieldType SHALL beappendedadded to the [children] or [attributes] of the<extension><fromClass> element item. Example OPERATION.&Linked.&ArgumentType <type> <fromClass class="tns:OPERATION" fieldName="Linked/ArgumentType"/> </type> 6.11. TypeFromObject and ValueSetFromObjects Translation The translation ofan EnumerationItema TypeFromObject or ValueSetFromObjects is an element item with the [local name]"enumeration". If the EnumerationItem is of the "identifier" form, then an attribute"type". An element item with the [local name]"name" SHALL"annotation" MAY be added to the[attributes][children] of the<enumeration><type> element item.If the EnumeratedType is subject to a VALUES encoding instruction, then the [normalized value] of this attribute item is the replacement name [RXEREI] for the identifier, otherwise it is the identifier. If the EnumeratedType 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, then an attributeAn element item with the [local name]"identifier""fromObjects" SHALL beaddedappended to the[attributes][children] of the<enumeration><type> elementitem, otherwise an attribute item withitem. The translation of the[local name] "identifier" MAYReferencedObjects instance in the TypeFromObject or ValueSetFromObjects SHALL be added to the [children] or [attributes] of the<enumeration><fromObjects> element item. The[normalized value] of this attribute item is the identifier. If the EnumerationItem istranslation of the"NamedNumber" form, then an attribute item withFieldName in the[local name] "name"TypeFromObject or ValueSetFromObjects SHALL be added to the [children] or [attributes] of the<enumeration><fromObjects> element item.If the EnumeratedType is subject to a VALUES encoding 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 is subject to aExample invertMatrix.&Errors.&errorCode <type> <fromObjects object="tns:invertMatrix" Legg Expires20 April22 June 2007 [Page33]31] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006VALUES encoding instruction andfieldName="Errors/errorCode"/> </type> 6.12. Translation of Combining Types This section details thereductiontranslation of thereplacement nameASN.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 thesamethree will be explicitly invoked as part of theidentifier, thentranslation of anattributeenclosing combining type. The normal translation of a NamedType is an element item with the [local name]"identifier" SHALL be addeddetermined as follows: (1) if the NamedType is subject to an ATTRIBUTE or ATTRIBUTE-REF encoding instruction, or subject to a COMPONENT-REF encoding instruction that references a top-level NamedType that is subject to an ATTRIBUTE encoding instruction, then the[attributes][local name] is "attribute", (2) otherwise, if the NamedType is subject to a GROUP encoding instruction, then the [local name] is "group", (3) otherwise, if the NamedType is subject to a SIMPLE-CONTENT encoding instruction, then the [local name] is "simpleContent", (4) otherwise, the [local name] is "element" or "component" (translator's choice). 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 NamedType is an element item with the<enumeration>[local name] "member". The item translation of a NamedType is an elementitem, otherwiseitem with the [local name] "item". Aside: A Namedtype for which the member or item translation is Legg Expires 22 June 2007 [Page 32] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 invoked will never be subject to anattributeATTRIBUTE, ATTRIBUTE-REF, COMPONENT-REF, GROUP, SIMPLE-CONTENT or TYPE-AS-VERSION encoding instruction. These encoding instructions are also mutually exclusive [RXEREI]. An element item with the [local name]"identifier""annotation" MAY be added to the[attributes][children] of the<enumeration><attribute>, <element>, <component>, <group>, <item>, <member> or <simpleContent> element item.TheIf a NamedType is subject to a TYPE-AS-VERSION encoding instruction, then an attribute item with the [local name] "typeAsVersion" and [normalized value]of this"true" or "1" SHALL be added to the <element> or <component> element item. For the normal translation, if a NamedType is not subject to an ATTRIBUTE, ATTRIBUTE-REF, COMPONENT-REF, GROUP, SIMPLE-CONTENT or TYPE-AS-VERSION encoding instruction, then an attribute itemiswith theidentifier of[local name] "typeAsVersion" and [normalized value] "false" or "0" MAY be added to theNamedNumber. An<element> or <component> element item. For the normal, member and item translations, if a NamedType is not subject to an ATTRIBUTE-REF, COMPONENT-REF, ELEMENT-REF or REF-AS-ELEMENT encoding instruction, then an attribute item with the [local name]"number""name" SHALL be added to the [attributes] of the<enumeration><attribute>, <element>, <component>, <group>, <item>, <member> or <simpleContent> element item. The [normalized value] of this attribute item is thedigit string representationlocal name of theinteger valueexpanded name of theSignedNumberNamedType [RXEREI]. Aside: If there are no NAME, ATTRIBUTE-REF, COMPONENT_REF, ELEMENT-REF orDefinedValueREF-AS-ELEMENT encoding instructions, then the local name of theNamedNumber. 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 translationexpanded name of aPrefixedType [X.680-1] that is a TaggedTypeNamedType iseithertheshort form translation (Section 6.7.1) or long form translation (Section 6.7.2)same as the identifier in the NamedType. If the reduction of theTaggedType. Aside: The short form translation is provided because TaggedType notationlocal name (an NCName) of the expanded name of a NamedType isheavily used in existing ASN.1 specifications. The long form translation hasnot the samestructureas thetranslation ofidentifier in the NamedType, then anEncodingPrefixedType and canattribute item with the [local name] "identifier" SHALL besimplified where there is a Legg Expires 20 April 2007 [Page 34] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006 seriesadded to the [attributes] ofnested PrefixedType instances. If a PrefixedType is an EncodingPrefixedType andtheEncodingReference is RXER,<attribute>, <element>, <component>, <group>, <item>, <member> or <simpleContent> element item, otherwise an attribute item with theEncodingReference is empty and the default encoding reference [X.680-1] for the module is RXER, then[local name] "identifier" MAY be added to thetranslation[attributes] of thePrefixedType is the translationaforementioned element item. The [normalized value] of this attribute item is theTypeidentifier in theEncodingPrefixedType.NamedType. Aside:ThisThe identifier attribute is notsuggesting that RXER encoding instructions are ignored. Encoding instructions for RXER are not explicitly represented in ASN.X, but rather affect how an ASN.1 specification is translated intocontingent on there being a name attribute. That is, anASN.X document (since the content ofelement item can have anASN.X documentidentifier attribute item without having a name attribute item. If a NamedType isalso the RXERsubject to a COMPONENT-REF encodingofinstruction, Legg Expires 22 June 2007 [Page 33] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 then anabstract value ofattribute item with theModuleDefinition ASN.1 type in Appendix A). The individual effects[local name] "ref" SHALL be added to the [attributes] ofRXER encoding instructions onthetranslation are addressed in other parts<attribute>, <element> or <component> element item. The [normalized value] of thisspecification. Encoding instructions for other encoding rules have explicit representations in ASN.X. If a PrefixedTypeattribute item isan EncodingPrefixedType anda qualified name for theEncodingReference is not RXER, orexpanded name of theEncodingReference is empty andtop-level NamedType referenced by thedefaultencodingreference forinstruction. If themoduleexpanded name is notRXER, thendistinct with respect to thetranslation ofcurrent module and thePrefixedType is anmodules referenced by its <import> element items (see Section 5.1), then an attribute item with the [local name]"prefixed". The translation"context" SHALL be added to the [attributes] of theEncodingPrefix in<attribute>, <element> or <component> element item, otherwise if theEncodingPrefixedType SHALLmodule containing the referenced top-level NamedType has a schema identity URI, then an attribute item with the [local name] "context" MAY be added to the[children][attributes] of the<prefixed><attribute>, <element> or <component> element item.IfThe [normalized value] of this attribute item is theEncodingReferenceschema identity URI of the module containing the referenced top-level NamedType. Aside: If anEncodingPrefixexpanded name is notempty,distinct, then thetranslation ofmodule containing theEncodingPrefixreferenced 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 anelementattribute item with theencodingreference of the EncodingReference as the[localname]. The translation of the EncodingInstruction in the EncodingPrefix SHALLname] "embedded" and [normalized value] "false" or "0" MAY be added to the[children][attributes] ofthisthe <attribute>, <element> or <component> element item. Ifthe EncodingReference of an EncodingPrefixa NamedType isempty,subject to an ATTRIBUTE-REF or ELEMENT-REF encoding instruction, thenthe translation of the EncodingPrefix isanelementattribute item with thedefault encoding reference for[local name] "ref" SHALL be added to themodule as[attributes] of the[local name].<attribute>, <element> or <component> element item. The [normalized value] of this attribute item is the RXER character data translation of theEncodingInstructionQNameValue in theEncodingPrefixencoding instruction. An attribute item with the [local name] "embedded" and [normalized value] "true" or "1" SHALL be added to the[children][attributes] ofthisthe <attribute>, <element> or <component> element item.The EncodingInstruction notationIf a NamedType isdifferent for each set of encoding instructions, and their translations into ASN.X are specified in separate documents [GSEREIT][XEREIT]. At the time of writing, only three sets of encoding instructions have been defined (for RXER [RXEREI], GSER [GSEREI] and EXTENDED-XER [X.693-1]). If the child <type> element item of a <prefixed> element item has no attribute items and hassubject to achild <prefixed> element item,REF-AS-ELEMENT encoding instruction, thenthat child <type> elementan attribute itemMAYwith the [local name] "elementType" SHALL bereplaced byadded to the[children] and Legg Expires 20 April 2007 [Page 35] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006[attributes] of theinner <prefixed><element> or <component> element item.Note that the long form translationThe [normalized value] ofa TaggedType is also eligible forthisrewriting step. This rewriting step MAY be applied to the result of a previous rewriting step ifattribute item is thenecessary condition still holds. Example These three definitions are equivalent. [XER:ATTRIBUTE] [XER:USE-UNION] [GSER:CHOICE-OF-STRINGS] CHOICE { one PrintableString, two UTF8String } <type> <prefixed> <XER><attribute/></XER> <type> <prefixed> <XER><useUnion/></XER> <type> <prefixed> <GSER><choiceOfStrings/></GSER> <type> <choice> <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 20 April 2007 [Page 36] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006 6.7.1. Short Form TaggedType Translation The short formRXER character data translation of the NameValue in the REF-AS-ELEMENT encoding instruction. If aTaggedTypeNamespace isan element item withpresent in the[local name] "type". An elementREF-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 elementThe [normalized value] of this attribute itemwith the [local name] "tagged" SHALL be appended tois the[children]string value of the<type> element item. IfAnyURIValue in theClass ofNamespace. If a ContextParameter is present in theTagRefParameters in theTaggedType is not empty,Legg Expires 22 June 2007 [Page 34] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 ATTRIBUTE-REF, ELEMENT-REF or REF-AS-ELEMENT encoding instruction, then an attribute item with the [local name]"tagClass""context" SHALL be added to the [attributes] of the<tagged><attribute>, <element> or <component> element item. The [normalized value] of this attribute item is theClassstring value of theTag, with all letters downcased, i.e., either "universal", "application" or "private". IfAnyURIValue in theTagContextParameter. If a NamedType isimmediately followed by the "IMPLICIT" keyword,subject to both an ATTRIBUTE encoding instruction and a VERSION-INDICATOR encoding instruction, then an attribute item with the [local name]"tagging""versionIndicator" and [normalized value]"implicit""true" or "1" SHALL be added to the[attributes] of the <tagged><attribute> element item. Ifthe Taga NamedType isimmediately followed by the "EXPLICIT" keyword,subject to an ATTRIBUTE encoding instruction and not subject to a VERSION-INDICATOR encoding instruction, then an attribute item with the [local name]"tagging""versionIndicator" and [normalized value]"explicit" SHALL"false" or "0" MAY be added to the[attributes] of the <tagged><attribute> element item. Ifthe Taga NamedType is notimmediately followed by either the "IMPLICIT"subject to an ATTRIBUTE-REF, COMPONENT-REF, ELEMENT-REF or"EXPLICIT" keyword andREF-AS-ELEMENT encoding instruction, then the translation of the Type in theTaggedType is a DummyReference, then an attribute item with the [local name] "tagging" and [normalized value] "explicit"NamedType SHALL be added to the [children] or [attributes] of the<tagged><attribute>, <element>, <component>, <group>, <item>, <member> or <simpleContent> element item.TheIf a NamedType is subject to an ATTRIBUTE-REF, COMPONENT-REF, ELEMENT-REF or REF-AS-ELEMENT encoding instruction, then the translation of each EncodingPrefix (Section 6.7) and Tag (Section 6.7.2) textually within theType in the TaggedTypeNamedType SHALL be added in order to the [children]or [attributes]of the<tagged><attribute>, <element> or <component> element item.Examples [0] INTEGER <type> <tagged number="0" type="asnx:INTEGER"/> </type> [APPLICATION 10] IMPLICIT BOOLEAN <type> <tagged tagClass="application" number="10" tagging="implicit" type="asnx:BOOLEAN"/> </type>Example CHOICE { one INTEGER, two [RXER:ATTRIBUTE] BOOLEAN, three [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 } Legg Expires20 April22 June 2007 [Page37]35] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 20066.7.2. Long Form TaggedType<type> <choice xmlns:ex="http://www.example.com/schema"> <element name="one" type="asnx:INTEGER"/> <attribute name="two" type="asnx:BOOLEAN"/> <attribute ref="ex:foo" identifier="three" embedded="true"/> <element ref="ex:bar" embedded="true"/> <element elementType="product" context="http://www.example.com/inventory" identifier="five"> <TAG number="0"/> </element> <group name="six" type="tns:MySequence"/> </choice> </type> 6.12.2. SequenceType Translation Thelong formtranslation of aTaggedTypeSequenceType 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]"prefixed""sequence" SHALL be appended to the [children] of the <type> element item. The translation of each ComponentType nested in theTagComponentTypeList in theTaggedTypeinitial RootComponentTypeList, if present, SHALL beaddedappended to the [children] of the<prefixed><sequence> element item.The translation of a TagIf an ExtensionAndException is present, then an element item with the [local name]"TAG". If"extension" SHALL be appended to theClass[children] of theTag<sequence> element item. If an ExceptionSpec isnot empty,present in the ExtensionAndException, thenan attribute item withthe[local name] "tagClass"translation of the ExceptionSpec (possibly empty) SHALL be added to the[attributes][children] of the<TAG><extension> element item.The [normalized value] of this attribute itemIf an ExtensionAdditions instance is present, then theClasstranslation ofthe Tag, with all letters downcased, i.e., either "universal", "application"each ExtensionAdditionGroup or"private". If the Tag is immediately followed by the "IMPLICIT" keyword, then an attribute item withComponentType nested in the[local name] "tagging" and [normalized value] "implicit"ExtensionAdditions (if any) SHALL beaddedappended to the[attributes][children] of the<TAG><extension> element item. Ifthe Tagan ExtensionEndMarker isimmediately followed by the "EXPLICIT" keyword,present, thenan attribute item withthe[local name] "tagging" and [normalized value] "explicit"translation of each ComponentType nested in the ComponentTypeList in the final RootComponentTypeList SHALL beaddedappended to the[attributes][children] of the<TAG><sequence> element item.If the TagThe translation of an ExtensionAdditionGroup isnot immediately followed by eitheran element item with the"IMPLICIT" or "EXPLICIT" keyword and[local name] "extensionGroup". If theTypeVersionNumber in theTaggedTypeExtensionAdditionGroup isa DummyReference,not empty, then an attribute item with the [local name]"tagging" and [normalized value] "explicit""version" SHALL be added to the [attributes] of the<TAG><extensionGroup> element item. Thetranslation[normalized value] of this Legg Expires 22 June 2007 [Page 36] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 attribute item is theTypenumber in theTaggedTypeVersionNumber. The translation of each ComponentType nested in the ExtensionAdditionGroup SHALL beaddedappended to the [children]or [attributes]of the<prefixed><extensionGroup> element item.Examples [0] INTEGER <type> <prefixed type="asnx:INTEGER"> <TAG number="0"/> </prefixed> </type> Legg Expires 20 April 2007 [Page 38] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006 [APPLICATION 10] IMPLICIT BOOLEAN <type> <prefixed type="asnx:BOOLEAN"> <TAG tagClass="application" number="10" tagging="implicit"/> </prefixed> </type> 6.8. SelectionType TranslationThe translation of aSelectionTypeComponentType of the "NamedType" form is the normal translation of the NamedType. The translation of a ComponentType of the "NamedType OPTIONAL" form is an element item with the [local name]"type". An"optional". The normal translation of the NamedType SHALL be added to the [children] of the <optional> element item. The translation of a ComponentType of the "NamedType DEFAULT Value" form is an element item with the [local name]"annotation" MAY"optional". The normal translation of the NamedType SHALL be added to the [children] of the<type><optional> element item. An element item with the [local name]"selection""default" SHALL be appended to the [children] of the<type><optional> element item. Theidentifier in a SelectionType identifies a NamedType in the definitiontranslation of theType inValue SHALL be added to theSelectionType.[children] or [attributes] of the <default> element item. The translation ofthat NamedType will bea ComponentType of the "COMPONENTS OF Type" form is an element item with the [local name]either "attribute", "element", "group" or "member". An attribute item with the same [local name] as the"componentsOf". The translation of theNamedTypeType SHALL be added to the [children] or [attributes] of the<selection> 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 Type in the SelectionType SHALL be added to the [children] or [attributes] of the <selection><componentsOf> element item. Examplefield1 < MyChoiceType <type> <selection element="field1" type="tns:MyChoiceType"/> </type> field2 < CHOICESEQUENCE {field2 [RXER:ATTRIBUTE][RXER:NAME AS "field-two"] INTEGERone INTEGER, two [RXER:ATTRIBUTE] BOOLEAN OPTIONAL, ..., [[ 2: four NULL ]], COMPONENTS OF MySequence, ..., three PrintableString DEFAULT "third" } <type><selection attribute="field-two"> <type> <choice> <attribute name="field-two" identifier="field2"<sequence> <element name="one" type="asnx:INTEGER"/></choice> </type><optional> <attribute name="two" type="asnx:BOOLEAN"/> </optional> <extension> <extensionGroup version="2"> <element name="four" type="asnx:NULL"/> Legg Expires20 April22 June 2007 [Page39]37] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006</selection></extensionGroup> <componentsOf type="tns:MySequence"/> </extension> <optional> <element name="three" type="asnx:PrintableString"/> <default literalValue="third"/> </optional> </sequence> </type>6.9. InstanceOfType6.12.3. SetType Translation The translation ofan InstanceOfTypea SetType follows the same procedure as the translation of 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 ChoiceType that is not subject to a 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]"instanceOf""choice" SHALL be appended to the [children] of the <type> element item. The normal translation of each NamedType nested in theDefinedObjectClassAlternativeTypeList in theInstanceOfTypeRootAlternativeTypeList in the AlternativeTypeLists SHALL beaddedappended to the [children]or [attributes]of the<instanceOf><choice> element item.Example INSTANCE OF TYPE-IDENTIFIER <type> <instanceOf class="asnx:TYPE-IDENTIFIER"/> </type> 6.10. ObjectClassFieldType Translation The translation ofIf anObjectClassFieldTypeExtensionAndException isan element item withpresent in the[local name] "type". AnAlternativeTypeLists, then an element item with the [local name]"annotation" MAY"extension" SHALL beaddedappended to the [children] of the<type><choice> element item.An element item withIf an ExceptionSpec is present in the[local name] "fromClass" SHALL be appendedExtensionAndException, then the translation of the ExceptionSpec (possibly empty) is added to the [children] of the<type><extension> element item.The translation of the DefinedObjectClassIf an ExtensionAdditionAlternatives instance is present in theObjectClassFieldType andAlternativeTypeLists, then the translation ofthe FieldName (see Section 9.2.6)each ExtensionAdditionAlternativesGroup or NamedType (if any) nested in theObjectClassFieldTypeExtensionAdditionAlternatives SHALL beaddedappended in order to the [children]and/or [attributes]of the<fromClass><extension> element item.Example OPERATION.&Linked.&ArgumentType <type> <fromClass class="tns:OPERATION" fieldName="Linked/ArgumentType"/> </type> 6.11. TypeFromObject and ValueSetFromObjects TranslationThe normal translation ofa TypeFromObject or ValueSetFromObjectsthe NamedType is used. The translation of an ExtensionAdditionAlternativesGroup is an element item with the [local name]"type". An element"extensionGroup". If the VersionNumber in the ExtensionAdditionAlternativesGroup is not empty, then an attribute item with the [local name]"annotation" MAY"version" SHALL be added to the[children][attributes] of the <extensionGroup> element item. The Legg Expires20 April22 June 2007 [Page40]38] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006<type> element item. An element[normalized value] of this attribute itemwithis the[local name] "fromObjects"number in the VersionNumber. The normal translation of each NamedType nested in the AlternativeTypeList in the ExtensionAdditionAlternativesGroup SHALL be appended to the [children] of the<type><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 ChoiceType that is subject to a UNION encoding instruction follows theReferencedObjects insame procedure as theTypeFromObject or ValueSetFromObjects SHALL be addedtranslation of a ChoiceType that is not subject to a UNION encoding instruction except that the[children] or [attributes][local name] "union" is used instead of "choice", and the<fromObjects> element item. Themember translation of each NamedType is used instead of theFieldName innormal translation. In addition, if theTypeFromObject or ValueSetFromObjectsUNION encoding instruction has a PrecedenceList, then an attribute item with the [local name] "precedence" SHALL be added to the[children] or[attributes] of the<fromObjects><union> element item.Example invertMatrix.&Errors.&errorCode <type> <fromObjects object="tns:invertMatrix" fieldName="Errors/errorCode"/> </type> 6.12. TranslationThe [normalized value] ofCombining Types This section detailsthis attribute item is thetranslationwhite space separated list of qualified names for theASN.1 combining types: SET, SEQUENCE, CHOICE, SET OF and SEQUENCE OF. The combining type definitions all make useexpanded names of the NamedTypenotation. 6.12.1. NamedType Translationinstances [RXEREI] corresponding to the identifiers in the PrecedenceList. ANamedTypewhite space separator istranslated inoneof 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 partor more of the white Legg Expires 22 June 2007 [Page 39] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 space characters. 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 ofan enclosing combining type. IfaNamedTypeSequenceOfType that issubject to an ATTRIBUTE or ATTRIBUTE-REF encoding instruction ornot subject to aCOMPONENT-REFLIST encoding instructionthat references a top-level NamedType thatissubject toanATTRIBUTE encoding instruction, thenelement item with thenormal translation[local name] "type". An element item with the [local name] "annotation" MAY be added to the [children] of theNamedType is an<type> element item. An element item with the [local name]"attribute", otherwise if"sequenceOf" SHALL be appended to theNamedType[children] of the <type> element item. If the SequenceOfType issubject to a GROUP encoding instruction,of the "SEQUENCE OF NamedType" form, then the normal translation of the NamedType SHALL be added to the [children] of the <sequenceOf> element item. If the SequenceOfType is of the "SEQUENCE OF Type" form, then an element item with the [local name]"group", otherwise if the NamedType is subject"element" or "component" (translator's choice) SHALL be added toa SIMPLE-CONTENT encoding instruction, thenthenormal translation[children] of theNamedType is an<sequenceOf> element item. An attribute item with the [local name]"simpleContent", otherwise"name" and [normalized value] "item" SHALL be added to thenormal translation[attributes] of theNamedType is an<element> or <component> element item. An attribute item with the [local name]"element""identifier" and empty [normalized value] SHALL be added to the [attributes] of the <element> or"component" (translator's choice).<component> element item. The translation of the Type SHALL be added to the [children] or [attributes] of the <element> or <component> element item. Legg Expires20 April22 June 2007 [Page41]40] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006Aside: 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 partsExamples 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 ofan encoding as elements would seem incongruous.LIST Types Themembertranslation of aNamedTypeSequenceOfType that isan element item with the [local name] "member". The item translation ofsubject to aNamedTypeLIST encoding instruction is an element item with the [local name]"item"."type". An element item with the [local name] "annotation" MAY be added to the [children] of the<attribute>, <group>, <element>, <component>, <member> or <item><type> element item.Aside: A Namedtype for whichAn element item with themember or[local name] "list" SHALL be appended to the [children] of the <type> element item. The item translationis invoked will neverof the NamedType in the SequenceOfType SHALL besubjectadded toan ATTRIBUTE, ATTRIBUTE-REF, COMPONENT-REF, GROUP or SIMPLE-CONTENT encoding instruction. These encoding instructions are also mutually exclusive [RXEREI]. If a NamedType is subject to a TYPE-AS-VERSION encoding instruction, then an attribute item withthe[local name] "typeAsVersion" and [normalized value] "true" or "1" SHALL be added to[children] of the<element> or <component><list> element item.ForAside: A SequenceOfType is necessarily of thenormal translation, if"SEQUENCE OF NamedType" form for aNamedType is not subject to an ATTRIBUTE, ATTRIBUTE-REF, COMPONENT-REF GROUP, SIMPLE-CONTENT or TYPE-AS-VERSIONLIST encodinginstruction, then an attribute item with the [local name] "typeAsVersion" and [normalized value] "false" or "0" MAY be added toinstruction. Example [RXER:LIST] SEQUENCE OF number INTEGER <type> <list> <item name="number" type="asnx:INTEGER"/> </list> </type> 6.12.8. SetOfType Translation The translation of a SetOfType follows the<element> or <component> element item. Forsame procedure as thenormal, membertranslation of a SequenceOfType except that SetOfType replaces SequenceOfType, "SET" replaces "SEQUENCE", anditem translations, ifthe [local name] "setOf" is used instead of "sequenceOf". Legg Expires 22 June 2007 [Page 41] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 6.12.9. Effect of Insertion Encoding Instructions If aNamedTypeType isnotsubject toan ATTRIBUTE-REF, COMPONENT-REF, ELEMENT-REFa NO-INSERTIONS, HOLLOW-INSERTIONS, SINGULAR-INSERTIONS, UNIFORM-INSERTIONS orREF-AS-ELEMENTMULTIFORM-INSERTIONS encoding instruction, then an attribute item with the [local name]"name""insertions" SHALL be added to the [attributes] of the<attribute>, <group>, <element>, <component>, <member><choice>, <sequence> or<item><set> elementitem.item in the [children] of the <type> element item resulting from the translation of the Type. The [normalized value] of this attribute item is "none" in thevaluecase of a NO-INSERTIONS encoding instruction, "hollow" in thelocal-name componentcase of a HOLLOW-INSERTIONS encoding instruction, "singular" in theeffective name [RXEREI]case ofthe NamedType. Aside: If there are no NAME, ATTRIBUTE-REF, COMPONENT_REF, ELEMENT-REF or REF-AS-ELEMENTa SINGULAR-INSERTIONS encodinginstructions, theninstruction, "uniform" in thevaluecase of a UNIFORM-INSERTIONS encoding instruction, and "multiform" in thelocal-name componentcase ofthe effective namea 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 aNamedTypeConstrainedType isits identifier. If the reductionof thelocal-name component (an NCName) of"Type Constraint" form, then theeffective nametranslation of theNamedTypeConstrainedType isnot the same as the identifier of the NamedType, thenanattributeelement item with the [local name]Legg Expires 20 April 2007 [Page 42] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006 "identifier" SHALL be added to the [attributes] of the <attribute>, <group>, <element>, <component>, <member> or <item>"type". An elementitem. otherwise an attributeitem with the [local name]"identifier""annotation" MAY be added to the[attributes][children] of theaforementioned<type> element item.The [normalized value] of this attribute item is the identifier of the NamedType. If a NamedType is subject to a COMPONENT-REF encoding instruction, then an attributeAn element item with the [local name]"ref""constrained" SHALL beaddedappended to the[attributes][children] of the<attribute>, <element> or <component><type> element item. The[normalized value] of this attribute item is the RXER character datatranslation of theeffective name of the top-level NamedType referenced by the encoding instruction. If the effective name is not distinct with respectType SHALL be added to thecurrent module and[children] or Legg Expires 22 June 2007 [Page 42] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 [attributes] of themodules referenced by its <import><constrained> elementitems (see Section 5.1), then an attribute item withitem. The translation of the[local name] "context"Constraint SHALL be added to the[attributes][children] of the<attribute>, <element> or <component><constrained> elementitem, otherwiseitem. The translation of a ContainedType that is a TypeWithConstraint is the translation of the 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 themodule containingValue of thereferenced top-level NamedType hasendpoint. Definition (simple range SizeConstraint): A SizeConstraint is aschema identity URI,simple range if the Constraint in the SizeConstraint contains only a ValueRange (i.e., a ValueRange in a SubtypeElements instance in an Elements instance in a lone IntersectionElements instance in a lone Intersections instance in a Unions instance in an ElementSetSpec in a RootElementSetSpec in an ElementSetSpecs instance without an AdditionalElementSetSpec in a SubtypeConstraint in a ConstraintSpec in the Constraint) and both endpoints are simple. Definition (simple range Constraint): 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 instance in an Elements instance in a lone IntersectionElements instance in a lone Intersections instance in a Unions instance in an ElementSetSpec in a RootElementSetSpec in an ElementSetSpecs instance without an AdditionalElementSetSpec in a SubtypeConstraint in a ConstraintSpec in the Constraint). If the Constraint or SizeConstraint in a TypeWithConstraint is a simple range, then the compact translation of the TypeWithConstraint MAY be used, otherwise the full translation of the TypeWithConstraint is used. The compact translation of a TypeWithConstraint is initially the translation of its notional parent type. If the value of the lower endpoint is not "MIN" or "0", then an attribute item with the [local name]"context" MAY"minSize" SHALL be added to the [attributes] of the<attribute>, <element><sequenceOf>, <setOf> or<component><list> elementitem.item resulting from the translation of the parent type. The [normalized value] of this attribute item is theschema identity URIvalue of themodule containing the referenced top-level NamedType. Aside:lower endpoint. Ifan effective name is not distinct, thenthemodule containingvalue of thereferenced top-level NamedType must have a schema identity URI (see Section 5.1). If a NamedTypelower endpoint issubject to a COMPONENT-REF encoding instruction,"MIN" or "0", then an attribute item with the [local name]"embedded""minSize" and [normalized value]"false" or"0" MAY be added to the [attributes] of the<attribute>, <element><sequenceOf>, <setOf> or<component><list> element item. Ifa NamedTypethe value of the upper endpoint issubject to an ATTRIBUTE-REF or ELEMENT-REF encoding instruction,not "MAX", then an attribute item with the [local name]"ref""maxSize" SHALL be added to the [attributes] of the<attribute>, <element><sequenceOf>, <setOf> or<component><list> element item. The Legg Expires 22 June 2007 [Page 43] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 [normalized value] of this attribute item is theRXER character data translationvalue of theQNameValue fromupper endpoint. The full translation of a TypeWithConstraint is an element item with theencoding instruction.[local name] "type". Anattributeelement item with the [local name]"embedded" and [normalized value] "true" or "1" MUST"annotation" MAY be added to the[attributes][children] of the<attribute>, <element> or <component><type> element item.If a NamedType is subject to a REF-AS-ELEMENT encoding instruction, then an attributeAn element item with the [local name]"elementType""constrained" SHALL beaddedappended to the[attributes][children] of the<element> or <component><type> element item. The[normalized value] of this attribute item is the RXER character datatranslation of theNameValue 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 withnotional parent type of the[local name] "namespace"TypeWithConstraint SHALL be added to the [children] or [attributes] of the<element> or <component><constrained> element item. The[normalized value]translation ofthis attribute item isthestring value ofConstraint or SizeConstraint in theAnyURIValue inTypeWithConstraint SHALL be added to theNamespace. If[children] of theContextParameter<constrained> element item. Examples SEQUENCE (SIZE(1..MAX)) OF number INTEGER <type> <sequenceOf minSize="1"> <element name="number" type="asnx:INTEGER"/> </sequenceOf> </type> SEQUENCE SIZE(0..10) OF number INTEGER <type> <sequenceOf maxSize="10"> <element name="number" type="asnx:INTEGER"/> </sequenceOf> </type> SEQUENCE SIZE(1..limit) OF number INTEGER <type> <constrained> <type> <sequenceOf> <element name="number" type="asnx:INTEGER"/> </sequenceOf> </type> <size> <range> <minInclusive literalValue="1"/> <maxInclusive value="tns:limit"/> </range> </size> </constrained> Legg Expires 22 June 2007 [Page 44] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 </type> 6.13.1. Constraint Translation The translation of a Constraint ispresent intheRefParameterstranslation of the ConstraintSpec in theATTRIBUTE-REF, ELEMENT-REF or REF-AS-ELEMENT encoding instruction, then an attribute item withConstraint followed by the[local name] "context" SHALL be added totranslation of the[attributes]ExceptionSpec (possibly empty) in the Constraint. The translation of a ConstraintSpec is the<attribute>, <element>translation of the SubtypeConstraint or<component> element item.GeneralConstraint in the ConstraintSpec. The[normalized value]translation ofthis attribute itema SubtypeConstraint is thestring valuetranslation of theAnyURIValueElementSetSpecs in theContextParameter. IfSubtypeConstraint. The translation of aNamedTypeGeneralConstraint issubject to an ATTRIBUTE encoding instruction andthe translation of the UserDefinedConstraint, TableConstraint or ContentsConstraint in the GeneralConstraint. 6.13.2. UserDefinedConstraint Translation The translation of aVERSION-INDICATOR encoding instruction, thenUserDefinedConstraint is anattributeelement item with the [local name]"versionIndicator" and [normalized value] "true" or "1" SHALL be added to the <attribute>"constrainedBy". An elementitem. If a NamedType is subject to an ATTRIBUTE encoding instruction and not subject to a VERSION-INDICATOR encoding instruction, then an attributeitem with the [local name]"versionIndicator" and [normalized value] "false" or "0""annotation" MAY be added to the<attribute>[children] of the <constrainedBy> element item.IfThe translation of each UserDefinedConstraintParameter in the UserDefinedConstraint SHALL be appended to the [children] of the <constrainedBy> element item. The translation of aNamedTypeUserDefinedConstraintParameter of the "Governor : Value" form isnot subject toanATTRIBUTE-REF, COMPONENT-REF, ELEMENT-REF or REF-AS-ELEMENT encoding instruction, thenelement item with the [local name] "valueParameter". The translation of the Type in theNamedTypeGovernor SHALL be added to the [children] or [attributes] of the<attribute>, <group>, <element>, <component>, <member> or <item><valueParameter> element item.IfThe translation of theenclosing combining type is a SEQUENCE, SET or CHOICE type andValue SHALL be added to theType in[children] or [attributes] of theNamedType is<valueParameter> element item. The translation of aDummyReference and the TagDefault for the module containingUserDefinedConstraintParameter of theNamedType"Governor : ValueSet" form is"AUTOMATIC TAGS", thenanattribute formelement item with the [local name] "valueSetParameter". The translation of the Type in theNamedTypeGovernor SHALLNOTbeused, and an attribute item withadded to the[local name] "explicit" and [normalized value] "true"[children] or"1"[attributes] of the <valueSetParameter> element item. The translation of the ValueSet SHALL be added to the[attributes][children] of the<type><valueSetParameter> element item. The translation of a UserDefinedConstraintParameter of the "Governor : Object" form is an element itemresulting fromwith the [local name] "objectParameter". The translation of theTypeDefinedObjectClass in theNamedType. Where the automatic tagging transformation applies [X.680], this attribute item indicates that explicit tagging appliesGovernor SHALL be added to theType in the NamedType instead of the usual implicit tagging. If a NamedType is subject to an ATTRIBUTE-REF, COMPONENT-REF, ELEMENT-REF[children] orREF-AS-ELEMENT encoding instruction, then[attributes] of the <objectParameter> element item. The translation ofeach EncodingPrefix (Section 6.7) and Tag (Section 6.7.2) textually withintheNamedTypeObject SHALL be addedin orderto the [children] or [attributes] of the<attribute>, <element> or <component> element item. Example<objectParameter> Legg Expires20 April22 June 2007 [Page44]45] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006CHOICE { one INTEGER, two [RXER:ATTRIBUTE] BOOLEAN, three [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 xmlns:ex="http://www.example.com/schema"> <element name="one" type="asnx:INTEGER"/> <attribute name="two" type="asnx:BOOLEAN"/> <attribute ref="ex:foo" identifier="three" embedded="true"/> <element ref="ex:bar" embedded="true"/> <element elementType="product" context="http://www.example.com/inventory" identifier="five"> <TAG number="0"/> </element> <group name="six" type="tns:MySequence"/> </choice> </type> 6.12.2. SequenceType Translationelement item. The translation of aSequenceTypeUserDefinedConstraintParameter of the "Governor : ObjectSet" form is an element item with the [local name]"type". An element item with the [local name] "annotation" MAY be added to the [children]"objectSetParameter". The translation of the<type> element item. An element item withDefinedObjectClass in the[local name] "sequence"Governor SHALL beappendedadded to the [children] or [attributes] of the<type><objectSetParameter> element item. The translation ofeach ComponentType in the ComponentTypeList oftheinitial RootComponentTypeList, if present,ObjectSet SHALL beappendedadded to the [children] or [attributes] of the<sequence><objectSetParameter> element item.If the ExtensionAndExceptionThe translation of a UserDefinedConstraintParameter that is a Type ispresent, thenan element item with the [local name]"extension" SHALL be appended to the [children] of the <sequence> element item, and the"typeParameter". The translation of theExceptionSpec (possibly empty)Type SHALL be added to the [children]of the <extension> element item. Legg Expires 20 April 2007 [Page 45] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006 The translation of each ExtensionAdditionGrouporComponentType nested in the ExtensionAdditions (if any) SHALL be appended to the [children] of the <extension> element item. If the ExtensionEndMarker is present, then the translation of each ComponentType in the final RootComponentTypeList SHALL be appended to the [children][attributes] of the<sequence><typeParameter> element item. The translation ofan ExtensionAdditionGroupa UserDefinedConstraintParameter that is a DefinedObjectClass is an element item with the [local name]"extensionGroup". If the VersionNumber is present, then an attribute item with"classParameter". The translation of the[local name] "version"DefinedObjectClass SHALL be added to the [children] or [attributes] of the<extensionGroup><classParameter> element item.The [normalized value] of this attribute item is the number ofExample OCTET STRING (CONSTRAINED BY { -- contains theVersionNumber. The translationhash ofeach ComponentType intheExtensionAdditionGroup SHALL be appended tovalue -- MyType:myValue }) <type> <constrained type="asnx:OCTET-STRING"> <constrainedBy> <annotation> contains the[children]hash of the<extensionGroup> element item.value </annotation> <valueParameter type="tns:MyType" value="tns:myValue"/> </constrainedBy> </constrained> </type> 6.13.3. TableConstraint Translation The translation of aComponentType of the "NamedType" formTableConstraint that isthe normal translation of the NamedType. The translation ofaComponentType of the "NamedType OPTIONAL" formSimpleTableConstraint is an element item with the [local name]"optional"."table". Thenormaltranslation of theNamedTypeObjectSet in the SimpleTableConstraint SHALL be added to the [children] or [attributes] of the<optional><table> element item. The translation of aComponentType of the "NamedType DEFAULT Value" formTableConstraint that is a ComponentRelationConstraint is an element item with the [local name]"optional"."table". Thenormaltranslation of theNamedType SHALL be added to the [children] of the <optional> element item. An element item withDefinedObjectSet in the[local name] "default"ComponentRelationConstraint SHALL beappendedadded to the [children] or [attributes] of the<optional><table> element item. The translation of each Legg Expires 22 June 2007 [Page 46] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 AtNotation in theValueComponentRelationConstraint SHALL beaddedappended to the [children]or [attributes]of the<default><table> element item. The translation ofa ComponentType of the "COMPONENTS OF Type" forman AtNotation is an element item with the [local name]"componentsOf"."restrictBy". Thetranslation[children] property of theType SHALL be added<restrictBy> element item is set to the[children] or [attributes]sequence of character items for the<componentsOf> element item. Example SEQUENCE {character string formed by the concatenation of zero, oneINTEGER, two [RXER:ATTRIBUTE] BOOLEAN OPTIONAL, ..., [[ 2: four NULL ]], COMPONENTS OF MySequence, Legg Expires 20 April 2007 [Page 46] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006 ..., three PrintableString DEFAULT "third" } <type> <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="three" type="asnx:PrintableString"/> <default literalValue="third"/> </optional> </sequence> </type> 6.12.3. SetType Translation The translation of a SetType followsor more "../" strings, one for each Level in thesame procedure as a SequenceType except that SetType replaces SequenceType, "SET" replaces "SEQUENCE", andAtNotation (including the[local name] "set" is used insteadempty one), followed by a solidus ('/', U+002F) separated list of"sequence". 6.12.4. ChoiceType Translation The translationqualified names for the expanded names of the NamedType instances [RXEREI] identified by the identifiers in the ComponentIdList in the AtNotation. If aChoiceType thatNamedType isnotsubject to an ATTRIBUTE or ATTRIBUTE-REF encoding instruction, or subject to aUNIONCOMPONENT-REF encoding instruction that references a top-level NamedType that is subject to anelement item withATTRIBUTE encoding instruction, then the[local name] "type". An element itemqualified name for the expanded name is prefixed with the[local name] "annotation"commercial at character ('@', U+0040). Leading and/or trailing white space character items MAY be added to the [children] of the<type><restrictBy> element item. White space character items MAY be added immediately before and/or after any character item for the solidus character ('/', U+002F). 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-att [RXER:NAME AS "ID"] [RXER:ATTRIBUTE] TYPE-IDENTIFIER.&id({AllTypes}), value TYPE-IDENTIFIER.&Type({AllTypes}{@id-att}) } <type> <sequence> <attribute name="ID" identifier="id-att"> <type> <constrained> Legg Expires 22 June 2007 [Page 47] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 <type> <fromClass class="asnx:TYPE-IDENTIFIER" fieldName="id"/> </type> <table objectset="tns:AllTypes"/> </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 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 the element item. 6.13.4. ContentsConstraint Translation The translation of a ContentsConstraint is an element item with the [local name]"choice""contents". If the ContentsConstraint is of the "CONTAINING Type" form, then an element item with the [local name] "containing" SHALL beappendedadded to the [children] of the<type><contents> element item. Thenormaltranslation ofeach NamedType in the AlternativeTypeList intheRootAlternativeTypeListType SHALL beappendedadded to the [children] or [attributes] of the<choice><containing> element item. If theExtensionAndExceptionContentsConstraint ispresent,of the "ENCODED BY Value" form, then an element item with the [local name]"extension" is appended"encodedBy" SHALL be added to the [children] of the<choice><contents> elementitem, and theitem. The translation of theExceptionSpec (possibly empty) isValue SHALL be added to the [children] or [attributes] of the<extension><encodedBy> element item.The translationIf the ContentsConstraint is ofeach ExtensionAdditionAlternativesGroup orthe "CONTAINING Type ENCODED BY Value" form, then an element item with Legg Expires20 April22 June 2007 [Page47]48] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006NamedType intheExtensionAdditionAlternatives (if any)[local name] "containing" and an element item with the [local name] "encodedBy" SHALL beappendedadded to the [children] of the<extension><contents> element item. Thenormaltranslation of theNamedType is used.Type SHALL be added to the [children] or [attributes] of the <containing> element item. The translation of the Value SHALL be added to the [children] or [attributes] of the <encodedBy> element item. 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 anExtensionAdditionAlternativesGroupempty ExceptionSpec is empty. The translation of a non-empty ExceptionSpec is an element item with the [local name]"extensionGroup"."exception". If theVersionNumberExceptionIdentification in a non-empty ExceptionSpec ispresent,a SignedNumber, thenan attribute item withthe[local name] "version"translation of a notional INTEGER Type SHALL be added to the [children] or [attributes] of the<extensionGroup><exception> elementitem. The [normalized value] of this attributeitemis the number ofand theVersionNumber. The normaltranslation ofeach NamedType ina notional Value of theExtensionAdditionAlternativesGroupINTEGER type with the SignedNumber as its IntegerValue SHALL beappendedadded to the [children] or [attributes] of the<extensionGroup><exception> 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 ChoiceType that is subject to a UNION encoding instruction followsIf thesame procedure asExceptionIdentification in aChoiceType thatnon-empty ExceptionSpec isnot subject toaUNION encoding instruction except that the [local name] "union" is used instead of "choice", andDefinedValue, then themembertranslation ofeach NamedType is used instead of the normal translation. Legg Expires 20 April 2007 [Page 48] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006 In addition, if the UNION encoding instruction hasaPrecedenceList, then an attribute item with the [local name] "precedence"notional INTEGER Type SHALL be added to the [children] or [attributes] of the<union><exception> elementitem. The [normalized value] of this attributeitemis the white space separated list of the RXER character data translations of the effective names [RXEREI] of the NamedType instances corresponding to the identifiers inand thePrecedenceList. 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 Thetranslation ofa SequenceOfType that is not 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 withthe[local name] "sequenceOf"DefinedValue SHALL beappendedadded to the [children] or [attributes] of the<type><exception> element item. If theSequenceOfTypeExceptionIdentification in a non-empty ExceptionSpec is of the"SEQUENCE OF NamedType""Type : Value" form, then thenormaltranslation of theNamedTypeType SHALL be added to the [children] or [attributes] of the<sequenceOf><exception> elementitem. Ifitem and theSequenceOfType istranslation of the"SEQUENCE OF Type" form, then an element item with the [local name] "element" or "component" (translator's choice)Value SHALL be added to the [children] or [attributes] of the<type><exception> element item.An attribute item with the [local name] "name" and [normalized value] "item" SHALL be added to the [attributes] of theLegg Expires20 April22 June 2007 [Page 49] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006<element> or <component> element item. An attribute item with the [local name] "identifier" and empty [normalized value] SHALL be added to the [attributes] of the <element> or <component> element item. The translation of the Type SHALL be added to the [children] or [attributes] of the <element> or <component> element item.ExamplesSEQUENCE 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.!10 <exception type="asnx:INTEGER" literalValue="10"/> !myValue <exception type="asnx:INTEGER" value="tns:myValue"/> !PrintableString:"failure" <exception type="asnx:PrintableString" literalValue="failure"/> 7. Translation ofLIST Types TheValues 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 aSequenceOfType thatValue issubject toaLIST 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]mix of markup for literal values and markup for referencing notations (notational values). A Value is categorized by the<type> element item. An element item with the [local name] "list" SHALL be appended to the [children] of the <type> element item. The item translation of the NamedType SHALL be added to the [children] of the <list> element item. Aside: SequenceOfTypefollowing definitions. Definition (literal value): A Value isnecessarily of the "SEQUENCE OF NamedType" form foraLIST encoding instruction. Example [RXER:LIST] SEQUENCE OF number INTEGER <type> <list> <item name="number" type="asnx:INTEGER"/> </list> </type> 6.12.8. SetOfType Translation Legg Expires 20 April 2007 [Page 50] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006 The translation ofliteral value if and only if it is not aSetOfType follows the same procedure asnotational value. Definition (notational value): A Value is aSequenceOfType except that SetOfType replaces SequenceOfType, "SET" replaces "SEQUENCE",notational value if and only if: (1) the[local name] "setOf"Value isused instead of "sequenceOf". 6.12.9. Insertion Encoding Instructions IfaTypeBuiltinValue, and (a) the BuiltinValue issubject toaNO-INSERTIONS, HOLLOW-INSERTIONS, SINGULAR-INSERTIONS, UNIFORM-INSERTIONS or MULTIFORM-INSERTIONS encoding instruction, then an attribute item withTaggedValue and the[local name] "insertions" SHALL be added toValue in the[attributes] ofTaggedValue is a notational value, or (b) the<choice>, <sequence>BuiltinValue is a SequenceValue or<set> element item inSetValue with a ComponentValueList that contains a NamedValue where the[children] ofValue in the<type> element item resulting fromNamedValue is a notational value and the translation of theType. The [normalized value] of this attribute item is "none" incorresponding NamedType (from thecasegoverning type ofa NO-INSERTIONS encoding instruction, "hollow" inthecase of a HOLLOW-INSERTIONS encoding instruction, "singular" inouter Value) is not an <element> or <component> element item, or (c) thecase ofBuiltinValue is aSINGULAR-INSERTIONS encoding instruction, "uniform" inChoiceValue where thecaseValue of the ChoiceValue is aUNIFORM-INSERTIONS encoding instruction,notational value and"multiform" inthecase of a 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 istranslation of the"Type Constraint" form, thenNamedType corresponding to thetranslation ofidentifier in theConstrainedTypeChoiceValue is not an <element> or <component> elementitemitem, or (d) the BuiltinValue is a SequenceOfValue or SetOfValue with a NamedValueList that contains a NamedValue where the Value of Legg Expires20 April22 June 2007 [Page51]50] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 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] "constrained" SHALL be appended tothe[children] ofNamedValue is a notational value and the<type> element item. Thetranslation of theType SHALL be added tocorresponding NamedType (from the[children] or [attributes]governing type of the<constrained>outer Value) is not an <element> or <component> elementitem. The translation of the Constraint SHALL be added to the [children] ofitem, or (2) the<constrained> element item. The translation of a ContainedType thatValue is aTypeWithConstraint is the translation ofReferencedValue, and (a) theTypeWithConstraint. Definition (simple endpoint): A LowerEndpoint or UpperEndpointReferencedValue is asimple endpoint if itValueFromObject, or (b) the ReferencedValue iscloseda DefinedValue, andits value(i) the DefinedValue is"MIN", "MAX" oraSignedNumber invaluereference (not a DummyReference) or anIntegerValue inExternalValueReference, or (ii) the DefinedValue is aBuiltinValue inDummyReference or ParameterizedValue and theValue ofsubstitute definition for theendpoint. Definition (simple range SizeContraint): A SizeConstraintDummyReference or ParameterizedValue (see Section 13) is asimple range if the Constraint innotational value, or (iii) theSizeConstraint contains only a ValueRange (i.e., a ValueRange in a SubtypeElements in an Elements in a single IntersectionElements inDefinedValue is asingle Intersections inDummyReference or ParameterizedValue where the translation of the DummyReference or ParameterizedValue will use aUnions infully expanded reference (see Section 13), or (3) the Value is anElementSetSpec in a lone RootElementSetSpec inObjectClassFieldValue, and (a) the ObjectClassFieldValue is anElementSetSpecs in a SubtypeConstraint in a lone ConstraintSpec inOpenTypeFieldVal, or (b) theConstraint) and both endpoints are simple. Definition (simple range Contraint): A ConstraintObjectClassFieldValue is asimple range if contains onlyFixedTypeFieldVal, and (i) the FixedTypeFieldVal is aSizeConstraintBuiltinValue that satisfies case (1), or (ii) the FixedTypeFieldVal is asimple 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 inReferencedValue that satisfies case (2). A literal value that is aSubtypeConstraint inBuiltinValue that is alone ConstraintSpec in the Constraint). If the ConstraintSequenceValue, SetValue, ChoiceValue, SequenceOfValue orSizeConstraint inSetOfValue MAY be translated as aTypeWithConstraintnotational value. Definition (directly nested): A notational value is directly nested (within asimple range, thenliteral value) if thecompactinnermost enclosing Value is a literal value. 7.1. Translation of Literal Values The translation of a literal value is either theTypeWithConstraint MAY be used, otherwise the fullattribute form translation of a literal value, or theTypeWithConstraint is used. The compactelement form translation of aTypeWithConstraint is theLegg Expires 22 June 2007 [Page 51] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 literal value. The attribute form translation ofthe parent type. If thea literal valueof the lower endpointisnot "MIN" or "0", thenan attribute item with the [local name]"minSize" SHALL be added to the [attributes] of the <sequenceOf>, <setOf> or <list> element item from the translation of the parent type."literalValue". The [normalized value] of this attribute item is thevalue of the lower endpoint. If the valueRXER character data translation [RXER] of thelower endpoint is "MIN" or "0", then anliteral value. The attributeitem with the [local name] "minSize" and [normalized value] "0" MAYform translation of a literal value SHALL NOT beadded toused if: (1) the[attributes]RXER Infoset translation of the<sequenceOf>, <setOf> or <list> element item. If theliteral valueof the upper endpointis not"MAX", then ana character data translation [RXER] or is a character data translation that contains qualified names [XMLNS10][XMLNS11], or (2) attributeitem with the Legg Expires 20 April 2007 [Page 52] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006 [local name] "maxSize" SHALL be added to the [attributes]form translations of Value have been explicitly disallowed in the<sequenceOf>, <setOf> or <list> element item. The [normalized value] of this attribute item iscontext where the literal valueofappears, or (3) theupper endpoint.literal value has a nested notational value. Thefullelement form translation of aTypeWithConstraintliteral value is an element item with the [local name]"type". An element item with the [local name] "annotation" MAY be added to the"literalValue". The [children] and [attributes] of the<type> element item. An<literalValue> element itemwith the [local name] "constrained" SHALL be appendedare set to the[children] of the <type> element item. TheRXER Infoset translation of theparent type SHALL be addedliteral 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 [children]orand [attributes] ofthe <constrained>an elementitem. Theitem in the translation correspond to a directly nested notational value, the translation specified in Section 7.2 MUST be used for the [children] and [attributes] of that element item, and an attribute item with theConstraint[local name] "literal", [namespace name] "urn:ietf:params:xml:ns:asnx" and [normalized value] "false" orSizeConstraint SHALL"0" (i.e., asnx:literal="false") MUST be added to the[children][attributes] of that element item. Each outermost <literalValue> 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 the<constrained>element item.Examples SEQUENCE (SIZE(1..MAX)) OF number INTEGER <type> <sequenceOf minSize="1"> <element name="number" type="asnx:INTEGER"/> </sequenceOf> </type> SEQUENCE SIZE(0..10) OF number INTEGER <type> <sequenceOf maxSize="10"> <element name="number" type="asnx:INTEGER"/> </sequenceOf> </type> SEQUENCE SIZE(1..limit) OF number INTEGER <type> <constrained> <type> <sequenceOf> <element name="number" type="asnx:INTEGER"/> </sequenceOf> </type> <size> <range> <minInclusive literalValue="1"/> <maxInclusive value="tns:limit"/> </range> </size> </constrained>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] "urn:ietf:params:xml:ns:asnx" and [normalized value] "true" or "1" (i.e., asnx:literal="true") MAY be added to the [attributes] of the <literalValue> element item and/or any nested element item with Legg Expires20 April22 June 2007 [Page53]52] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006</type> 6.13.1. Constraint Translationcontent and attributes that correspond to a literal value. Aside: Thetranslation ofasnx:literal attribute operates as aConstraintswitch that indicates whether the content and other attributes of the element containing the attribute are interpreted as ASN.X notation (a notational value) or as an RXER encoding (a literal value). Example zero INTEGER ::= 0 <namedValue name="zero" type="asnx:INTEGER" literalValue="0"/> OR <namedValue name="zero" type="asnx:INTEGER"> <literalValue>0</literalValue> </namedValue> From the perspective of an ASN.X module as the RXER encoding of an ASN.1 value (an abstract value of the ModuleDefinition type in Appendix A), the type of the <literalValue> element is thetranslationunconstrained Markup type [RXER], not the governing type of theConstraintSpec followed byValue according to thetranslationASN.1 specification. This means that the Infoset representation of theExceptionSpec (possibly empty). The translation<literalValue> element must be preserved in re-encodings ofa ConstraintSpecthe ASN.X module. Similarly, the type of the literalValue attribute is a UTF8String, not thetranslationgoverning type of thecontained SubtypeConstraint or GeneralConstraint.Value according to the ASN.1 specification. This means that the exact characters of the [normalized value] of the attribute must be preserved in re-encodings of the ASN.X module. 7.2. Translation of Notational Values The translation of aSubtypeConstraintnotational value is the translation of thecontained ElementSetSpecs.BuiltinValue, ReferencedValue or ObjectClassFieldValue in the notational value. The translation of aGeneralConstraintReferencedValue is the translation of thecontained UserDefinedConstraint, TableConstraintDefinedValue orContentsConstraint. 6.13.2. UserDefinedConstraint TranslationValueFromObject in the ReferencedValue. The translation for each ofa UserDefinedConstraintthese cases is described as creating an element item with the [local name]"constrainedBy". An element item with"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]"annotation" MAYwill beaddeddetermined according to RXER and the[children] of the <constrainedBy> element item. The translationgoverning ASN.1 type ofeach UserDefinedConstraintParameter SHALL be appended tothe[children] ofenclosing literal value. Legg Expires 22 June 2007 [Page 53] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 Aside: In the latter case, the<constrainedBy>elementitem. The translation ofitem will also have aUserDefinedConstraintParameter ofliteral attribute item with the"Governor : Value" form[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 anelementattribute item with the [local name]"valueParameter". The translation of the Type in the Governor"literal", [namespace name] "urn:ietf:params:xml:ns:asnx" andthe translation of the Value SHALL be[normalized value] "false" or "0" is added to the[children] and/or[attributes] of the<valueParameter><literalValue> element item.TheExamples nothing INTEGER ::= zero <namedValue name="nothing" type="asnx:INTEGER" value="tns:zero"/> OR <namedValue name="nothing" type="asnx:INTEGER"> <value ref="tns:zero"/><!-- A notational value. --> </namedValue> OR <namedValue name="nothing" type="asnx:INTEGER"> <literalValue xmlns:asnx="urn:ietf:params:xml:ns:asnx" xmlns:tns="http://example.com/ns/MyModule" 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="asnx:INTEGER"/> </sequenceOf> </type> <literalValue xmlns:asnx="urn:ietf:params:xml:ns:asnx" xmlns:tns="http://example.com/ns/MyModule"> <number 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 Legg Expires 22 June 2007 [Page 54] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 If a DefinedValue is a valuereference (not a DummyReference) or an ExternalValueReference, then the translation ofa UserDefinedConstraintParameterthe DefinedValue is either the attribute form translation of a value reference, or the"Governor : ValueSet"element form translation of a value reference. The attribute form translation of a value reference is anelementattribute item with the [local name]"valueSetParameter"."value". Thetranslation[normalized value] of this attribute item is a qualified name for theType in the Governor SHALL be added to the [children] or [attributes]expanded name of the<valueSetParameter> element item.referenced value definition (see Section 5.1). The attribute form translationof the ValueSetSHALL NOT beaddedused if this expanded name is not distinct with respect to the[children] ofcurrent module and the<valueSetParameter>modules referenced by its <import> elementitem.items (see Section 5.1). The element form translation of aUserDefinedConstraintParameter of the "Governor : Object" formvalue reference is an element item with the [local name]"objectParameter". The translation of the DefinedObjectClass in the Governor and the translation of"value". An element item with theObject SHALL[local name] "annotation" MAY be added to the [children]and/or [attributes]of the<objectParameter><value> element item.The translation of a UserDefinedConstraintParameter of the Legg Expires 20 April 2007 [Page 54] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006 "Governor : ObjectSet" form is an elementAn attribute item with the [local name]"objectSetParameter". The translation of the DefinedObjectClass in the Governor and the translation of the ObjectSet"ref" SHALL be added to the[children] and/or[attributes] of the<objectSetParameter><value> element item. Thetranslation[normalized value] ofa UserDefinedConstraintParameter thatthis attribute item is aTypequalified name for the expanded name of the referenced value definition. If this expanded name isannot distinct with respect to the current module and the modules referenced by its <import> element items, then an attribute item with the [local name]"typeParameter". The translation of the Type"context" SHALL be added to the[children] or[attributes] of the<typeParameter><value> elementitem. The translation of a UserDefinedConstraintParameter that isitem, otherwise if the module containing the referenced value definition has aDefinedObjectClass isschema identity URI, then anelementattribute item with the [local name]"classParameter". The translation of the DefinedObjectClass SHALL"context" MAY be added to the[children] or[attributes] of the<classParameter><value> element item.Example OCTET STRING (CONSTRAINED BY { -- containsThe [normalized value] of this attribute item is thehashschema identity URI of the module containing the value-- MyType:myValue }) <type> <constrained type="asnx:OCTET-STRING"> <constrainedBy> <annotation> containsdefinition referenced by thehashDefinedValue. Aside: If a reference name is not distinct, then the module containing the referenced definition must have a schema identity URI (see Section 5.1). 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 in a ReferencedValue in a Value that is directly nested in a literal value. If a DefinedValue is a DummyReference or ParameterizedValue, then the translation of thevalue </annotation> <valueParameter type="tns:MyType" value="tns:myValue"/> </constrainedBy> </constrained> </type> 6.13.3. TableConstraintDefinedValue is the translation of that DummyReference or ParameterizedValue (see Section 13). 7.2.2. BuiltinValue Translation Legg Expires 22 June 2007 [Page 55] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 The translation of aTableConstraintBuiltinValue is the translation of the ChoiceValue, SequenceValue, SetValue, SequenceOfValue, SetOfValue or TaggedValue in the BuiltinValue. Aside: There are other possibilities for a BuiltinValue, but these will all be literal values. This section applies to a BuiltinValue that is aSimpleTableConstraintnotational value. The translation of a TaggedValue is the translation of the Value in the TaggedValue (which is necessarily a notational value). The translation of a ChoiceValue is an element item with the [local name]"table". The translation of the ObjectSet in"value". An element item with theSimpleTableConstraint SHALL[local name] "annotation" MAY be added to the [children]or [attributes]of the<table><value> element item.The translation of a TableConstraint that is a ComponentRelationConstraint is anAn element item with the same [local name]"table". The(i.e., "attribute", "element", "component", "group" or "member") as the translation of theDefinedObjectSetNamedType corresponding to the identifier in theComponentRelationConstraintChoiceValue SHALL beaddedappended to the [children]orof the <value> element item. An attribute item with the [local name] "name" SHALL be added to the [attributes] of the<table><attribute>, <element>, <component>, <group> or <member> element item. The [normalized value] of this attribute item is a qualified name for the expanded name of the NamedType. The translation ofeach AtNotationthe Value in the ChoiceValue SHALL beappendedadded to the [children] or [attributes] of the<table><attribute>, <element>, <component>, <group> or <member> element item. The translation ofan AtNotationa SequenceValue or SetValue is an element item with theLegg Expires 20 April 2007 [Page 55] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006[local name]"restrictBy". The [children] property of the <restrictBy>"value". An element itemis setwith the [local name] "annotation" MAY be added to thesequence[children] ofcharacter items forthecharacter string formed by<value> element item. If theconcatenation of zero, oneSequenceValue ormore "../" strings, one forSetValue has a ComponentValueList, then the translation of eachLevelNamedValue nested in theAtNotation (including the empty one), followed by a "/" (U+002F) separated list ofComponentValueList SHALL be appended to theRXER character data translations[children] of theeffective names [RXEREI] of<value> element item in the order in which their corresponding NamedType instancesidentified byappear in theComponentIdList identifiers. Ifdefinition of the governing type. The translation of aNamedType is subject to an ATTRIBUTE or ATTRIBUTE-REF encoding instruction,SequenceOfValue orsubject to a COMPONENT-REF encoding instruction that references a top-level NamedType thatSetOfValue issubject toanATTRIBUTE encoding instruction, then the translation ofelement item with theeffective name is prefixed[local name] "value". An element item with the"@" (U+0040) character. Leading and/or trailing white space character items[local name] "annotation" MAY be added to the [children] of the<restrictBy><value> element 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 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 the element item. 6.13.4. ContentsConstraint Translation The translation of a ContentsConstraint is an element item with the [local name] "contents".If theContentsConstraint is of the "CONTAINING Type" form,SequenceOfValue or SetOfValue has a NamedValueList, thenan element item with the [local name] "containing" SHALL be added tothe[children] of the <contents> element item. Thetranslation of each NamedValue nested in theTypeNamedValueList SHALL beaddedappended to the [children]or [attributes]of the<containing><value> element item. If theContentsConstraint is of the "ENCODED BY Value" form,SequenceOfValue or SetOfValue has a ValueList, then an element item with the same [local name]"encodedBy" SHALL be added to(i.e., "element" or "component") as the element item in the [children] of the<contents><sequenceOf> or <setOf> elementitem. Theitem in the translation of theValuegoverning type SHALL beaddedLegg Expires 22 June 2007 [Page 56] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 appended to the [children]or [attributes] of the <encodedBy> element item. If the ContentsConstraint isof the"CONTAINING Type ENCODED BY Value" form, then an<value> element itemwithfor each Value nested in the[local name] "containing" and an elementValueList. An attribute item with the [local name]"encodedBy" SHALL be added to the [children] of the <contents> element item. The translation of the Type"name" and [normalized value] "item" SHALL be added to the[children] or[attributes] of the<containing><element> or <component> element item.Legg Expires 20 April 2007 [Page 57] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006The translation of the Value (from the ValueList) SHALL be added to the [children] or [attributes] of the<encodedBy><element> or <component> element item.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 empty.The translation of anon-empty ExceptionSpecNamedValue is an element item with the same [local name]"exception". If the ExceptionSpec is a SignedNumber, then the translation of a notional INTEGER Type andas the translation ofa notional Value oftheINTEGER typecorresponding NamedType, i.e., "attribute", "element", "component", "group", "item" or "simpleContent". An attribute item with theIntegerValue of SignedNumber[local name] "name" SHALL be added to the[children] and/or[attributes] of the<exception>element item.If the 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]The [normalized value] ofthe <exception> element item. If the ExceptionSpecthis attribute item isof the "Type : Value" form, thena qualified name for thetranslationexpanded name of theType and theNamedType. The translation of the Value in the NamedValue SHALL be added to the [children]and/oror [attributes] of the<exception>element item. Examples!10 <exception type="asnx:INTEGER" literalValue="10"/> !myValue Legg Expires 20 April 2007 [Page 58] INTERNET-DRAFT Abstract Syntax Notation X 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-- This isa 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 (literal value): A Value is a literal value if and only if it is not a notational value. 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 (fromthe governingtype 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, ortype. MyType ::= SEQUENCE { one [ATTRIBUTE] INTEGER, two INTEGER, three [ATTRIBUTE][LIST] SEQUENCE OF number INTEGER } <namedType name="MyType"> <type> <sequence> <attribute name="one" type="asnx:INTEGER"/> <element name="two" type="asnx:INTEGER"/> <attribute name="three"> <type> <list> <item name="number" type="asnx:INTEGER"/> </list> </type> </attribute> </sequence> </type> </namedType> myValue1 MyType ::= { one 456, two 123, three { number 123, number 456 } } Legg Expires20 April22 June 2007 [Page59]57] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 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 substitute definition for the DummyReference or ParameterizedValue is a notational value (see Section 5.9), or (iii) the DefinedValue is a DummyReference or ParameterizedValue where the translation of the DummyReference or ParameterizedValue will use a 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 SequenceValue, SetValue, ChoiceValue, SequenceOfValue or SetOfValue MAY be translated as a notational value. 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-- All literalvalue, orvalues. <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 theelement form translation of a literal value. The attribute form translation of a literalvalue for component "two" isan attribute item with the [local name] "literalValue" whose [normalized value] is the RXER character data translation [RXER] of the Value. The attribute form translation ofaliteralnotational valueSHALL NOT be used if:three { number 123, number 456 } } <namedValue name="myValue2" type="tns:MyType"> <literalValue xmlns:asnx="urn:ietf:params:xml:ns:asnx" xmlns:tns="http://example.com/ns/MyModule" one="456" three="123 456"> <two asnx:literal="false"> <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> Legg Expires20 April22 June 2007 [Page60]58] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 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.</attribute> </value> </namedValue> 7.2.3. ValueFromObject Translation Theelement formtranslation of aliteral valueValueFromObject is an element item with the [local name]"literalValue" whose [children] and [attributes] are"value". An element item with theRXER Infoset translation of[local name] "annotation" MAY be added to theValue, except that a value[children] of theEXTERNAL type (or a subtype thereof) is translated according to<value> element item. An element item with theassociated type defined in Clause 34.5 of X.680 [X.680]. In addition, where[local name] "fromObjects" SHALL be appended to the [children]and [attributes]ofan element item inthe <value> element item. The translationcorrespond to a directly nested notational value,of thetranslation specifiedReferencedObjects instance inSection 7.2. MUSTthe ValueFromObject SHALL beused foradded to the [children]andor [attributes] ofthatthe <fromObjects> elementitem, and an attribute item withitem. The translation of the[local name] "literal", [namespace name] "urn:ietf:params:xml:ns:asnx" and [normalized value] "false" or "0" (e.g., asnx:literal="false") MUSTFieldName in the ValueFromObject SHALL be added to the [children] or [attributes] ofthatthe <fromObjects> element item.Each outermost <literalValue> element item, and each nested element item that corresponds to7.2.4. ObjectClassFieldValue Translation If an ObjectClassFieldValue is atop-level NamedType fromBuiltinValue in amodule withFixedTypeFieldVal, then the translation of the ObjectClassFieldValue is the translation of the BuiltinValue. If an ObjectClassFieldValue is atarget namespace,ReferencedValue in a FixedTypeFieldVal, then the translation of the ObjectClassFieldValue isrequired to be self-contained [RXER]. Aside: An element itemthe translation of the ReferencedValue. If an ObjectClassFieldValue isself-contained if all namespace prefixes used byan OpenTypeFieldVal, then theelement item and its contents are declared withintranslation of theelement item. Aside: A <literalValue> element item nested within another <literalValue>ObjectClassFieldValue is an element itemis not required to be self-contained.with the [local name] "value". Anattributeelement item with the [local name]"literal", [namespace name] "urn:ietf:params:xml:ns:asnx" and [normalized value] "true" or "1" (e.g., asnx:literal="true")"annotation" MAY be added to the[attributes][children] of the<literalValue><value> elementitem and/or any nesteditem. An element itemwhose content and attributes correspondwith the [local name] "openTypeValue" SHALL be appended toa literal value. Aside: The asnx:literal attribute operates as a switch that indicates whetherthecontent and other attributes[children] of the <value> elementcontainingitem. The translation of theattribute are interpreted as ASN.X notation (a notational value) or as an RXER encoding (a literal value). FromType in theperspective of an ASN.X document asOpenTypeFieldVal SHALL be added to theRXER encoding[children] or [attributes] ofan abstract valuethe <openTypeValue> element item. The translation of theModuleDefinition typeValue inAppendix A,thetype of the <literalValue> element is unconstrained Markup [RXER], notOpenTypeFieldVal SHALL be added to thegoverning type[children] or [attributes] of theValue. This means that the Infoset<openTypeValue> element item. Example myValue TYPE-IDENTIFIER.&Type ::= INTEGER:123 <namedValue name="myValue"> <type> <fromClass class="asnx:TYPE-IDENTIFIER" fieldName="Type"/> Legg Expires20 April22 June 2007 [Page61]59] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006representation of the <literalValue> element must be preserved in re-encodings</type> <value> <openTypeValue type="asnx:INTEGER" literalValue="123"/> </value> </namedValue> 8. Translation ofthe ASN.X document. Similarly, the typeValue Sets The translation ofthe literalValue attribute isaUTF8String, notValueSet is an element item with thegoverning type of[local name] "valueSet". An element item with theValue. This means that[local name] "annotation" MAY be added to theexact characters[children] of the[normalized value]<valueSet> element item. The translation of theattribute must be preservedElementSetSpecs instance inre-encodingsthe ValueSet SHALL be appended to the [children] of theASN.X document. 7.2.<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> <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 Translationof Notational ValuesThe translation ofa notational valuean ElementSetSpecs instance where the ellipsis ("...") is not present is the translation ofeither a BuiltinValue, a ReferencedValue or an ObjectClassFieldValue.the ElementSetSpec in the RootElementSetSpec. Legg Expires 22 June 2007 [Page 60] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 The translation ofa ReferencedValuean ElementSetSpecs instance where the ellipsis ("...") is present is the translation ofeither a DefinedValue or a ValueFromObject. The translation for each these cases is described as creatingthe ElementSetSpec in the RootElementSetSpec followed by an element item with the [local name]"value", which"extension". If an AdditionalElementSetSpec isappropriate for a notational value that stands on its own. However, a notational value may also be directly nested within a literal value,present inwhich casethe[local name] willElementSetSpecs, then the translation of the ElementSetSpec in the AdditionalElementSetSpec SHALL bedetermined accordingadded toRXER andthegoverning ASN.1 type[children] of theenclosing literal value. Aside: In<extension> element item. 8.2. ElementSetSpec Translation If an ElementSetSpec is of thelatter case"ALL Exclusions" form, then the translation of the ElementSetSpec is an element itemwill also have a literal attribute itemwith 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"all". An element item with the [local name]"literal", [namespace name] "urn:ietf:params:xml:ns:asnx" and [normalized value] "false" or "0" is"except" SHALL be added to the[attributes][children] of the<literalValue><all> element item. The translation of the Elements instance in the Exclusions SHALL be added to the [children] of the <except> element item.Examples zero INTEGER ::= 0 <namedValue name="zero" type="asnx:INTEGER" literalValue="0"/> OR <namedValue name="zero" type="asnx:INTEGER"> <literalValue>0</literalValue> </namedValue> nothing INTEGER ::= zero <namedValue name="nothing" 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="asnx:INTEGER"> <value ref="tns:zero"/><!-- A notational value. --> </namedValue> OR <namedValue name="nothing" type="asnx:INTEGER"> <literalValue xmlns:asnx="urn:ietf:params:xml:ns:asnx" xmlns:tns="http://example.com/ns/MyModule" 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="asnx:INTEGER"/> </sequenceOf> </type> <literalValue xmlns:asnx="urn:ietf:params:xml:ns:asnx" xmlns:tns="http://example.com/ns/MyModule"> <number 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 TranslationIfa DefinedValuean ElementSetSpec is avaluereference (not a DummyReference) or an ExternalValueReference,Unions instance, then the translation of theDefinedValueElementSetSpec iseithertheattribute formtranslation of the Unions instance. If avalue reference, orUnions instance has only one nested Intersections instance, then theelement formtranslation ofa value reference. The attribute formthe Unions instance is the translation ofa value referencethat Intersections instance, otherwise the translation of the Unions instance is anattributeelement item with the [local name]"value". The [normalized value] of this attribute item is"union". In thequalified name referencinglatter case, thevalue definition (see Section 5.1). The attribute formtranslation of each nested Intersections instance SHALLNOTbeused ifappended to thequalified name is shared by two or more value definitions in separate modules, i.e., is ambiguous. The[children] of the <union> elementformitem. If an Intersections instance has only one nested IntersectionElements instance, then the translation ofa value referencethe Intersections instance is the translation of that IntersectionElements instance, otherwise the translation of the Intersections instance is an element item with the [local name]"value". An attribute item with"intersection". In theLegg Expires 20 April 2007 [Page 63] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006 [local name] "ref"latter case, the translation of each nested IntersectionElements instance SHALL beaddedappended to the[attributes][children] of the<value><intersection> element item.The [normalized value] of this attribute item is the qualified name referencing the value definition (see Section 5.1).Ifthis reference namean IntersectionElements instance isnot distinct with respect to the current module andof themodules referenced by its <import> element items (see Section 5.1),"Elems Exclusions" form, then the translation of the IntersectionElements instance is anattributeelement item with the [local name]"context""all". The translation of the Elements instance in the Elems SHALL be added to the[attributes][children] of the<value><all> element item. An elementitem, otherwise if the module containing the referenced value definition has a schema identity URI, then an attributeitem with the [local name]"context" MAY"except" SHALL beaddedappended to the[attributes][children] of the<value><all> element item. The[normalized value] of this attribute item is the schema identity URItranslation of themodule containing the value definition referenced by the DefinedValue. Aside: If a reference name is not distinct, then the module containing the referenced definition must have a schema identity URI (see Section 5.1). An element item withElements instance in the[local name] "annotation" MAYExclusions SHALL be added to the [children] of the<value><except> element item.UsuallyIf an IntersectionElements instance is an Elements instance, then thetranslatortranslation of the IntersectionElements instance isfree to choose eitherthe translation of the Elements instance. Legg Expires 22 June 2007 [Page 61] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 The translation of anattribute form or element formElements instance is the translationfor a DefinedValue, howeverof the SubtypeElements, ObjectSetElements or ElementSetSpec insome contexts attribute formsthe Elements instance. 8.3. SubtypeElements Translation If a SubtypeElements instance is a SingleValue, then the translation of the SubtypeElements instance is the translation of the Valueare explicitly disallowed. In particular,in the SingleValue, except that an attribute form of the Value translation SHALL NOT beused for a DefinedValue that is directly nested in a literal value.used. If aDefinedValueSubtypeElements instance is aDummyReference or ParameterizedValue,ContainedSubtype, then the translation of theDefinedValueSubtypeElements instance is an element item with thetranslation of that DummyReference or ParameterizedValue (see Section 5.9). 7.2.2. BuiltinValue Translation[local name] "includes". The translation ofa BuiltinValue isthetranslation of either a ChoiceValue, a SequenceValue, a SequenceOfValue, a SetValue or a TaggedValue. Aside: There are other possibilities for a BuiltinValue, but these will allType in the ContainedSubtype SHALL beliteral values. This section appliesadded to the [children] or [attributes] of the <includes> element item. If aBuiltinValue thatSubtypeElements instance is anotational value. TheValueRange, then the translation ofa TaggedValuethe SubtypeElements instance is the translation of thecontained Value (whichValueRange. If a SubtypeElements instance isnecessarilyanotational value). TheSizeConstraint, then the translation ofa ChoiceValuethe SubtypeElements instance is an element item with the [local name]"value". An element item with"size". The translation of the[local name] "annotation" MAYConstraint in the SizeConstraint SHALL be added to the [children] of the<value><size> element item.AnIf a SubtypeElements instance is a TypeConstraint, then the translation of the SubtypeElements instance is an element item with thesame[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"typeConstraint". The translation of theNamedType corresponding to the identifierType in theChoiceValueTypeConstraint SHALL beappendedadded to the [children] or [attributes] of the<value><typeConstraint> element item.An attributeIf a SubtypeElements instance is a PermittedAlphabet, then the translation of the SubtypeElements instance is an element item with the [local name]"name""from". The translation of the Constraint in the PermittedAlphabet SHALL be added to the[attributes][children] of the<attribute>, <element>, <component>, <group> or <member><from> element item.The [normalized value]If a SubtypeElements instance is an InnerTypeConstraints instance, then the translation ofthis attribute itemthe SubtypeElements instance is theRXER character datatranslation of theeffective nameInnerTypeConstraints instance. If a SubtypeElements instance is a PatternConstraint, then the translation of theNamedType.SubtypeElements instance is an element item with the [local name] "pattern". The translation of the Value in theChoiceValuePatternConstraint SHALL be added to the [children] or [attributes] of the<attribute>, <element>, <component>, <group> or <member><pattern> element item. Legg Expires 22 June 2007 [Page 62] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 8.3.1. ValueRange Translation The translation of aSequenceValue or SetValueValueRange is an element item with the [local name]"value". An"range". If the LowerEndpoint in the ValueRange is of the "LowerEndValue <" form, then an element item with the [local name]"annotation" MAY"minExclusive" SHALL be added to the [children] of the<value><range> element item.The translation of each NamedValue inIf theComponentValueListLowerEndValue is a Value, then the translation of theSequenceValue or SetValueValue SHALL beappendedadded to the [children] or [attributes] of the<value><minExclusive> elementitem, initem. If theorder in which their corresponding NamedType instances appearLowerEndpoint in thedefinitionValueRange is of thegoverning type. The translation of a SequenceOfValue"LowerEndValue" form and the LowerEndValue is a Value, then an element item with the [local name]"value". An element item with the [local name] "annotation" MAY"minInclusive" SHALL be added to the [children] of the<value><range> element item.If the SequenceOfValue has a NamedValueList, then theThe translation ofeach NamedValuethe Value in theNamedValueListLowerEndValue SHALL beappendedadded to the [children] or [attributes] of the<value><minInclusive> element item. If theSequenceOfValue has a ValueList,LowerEndpoint in the ValueRange is of the "LowerEndValue" form and the LowerEndValue is "MIN", then an element item with the [local name]"element" or "component" (translator's choice) SHALL"minInclusive" MAY beappendedadded to the [children] of the<value><range> elementitem for each Valueitem. If the UpperEndpoint in theValueList. An attributeValueRange is of the "< UpperEndValue" form, then an element item with the [local name]"name" and [normalized value] "item""maxExclusive" SHALL be added to the[attributes][children] of the<element> or <component><range> element item.TheIf the UpperEndValue is a Value, then the translation of the Value(from the ValueList)SHALL be added to the [children] or [attributes] of the<element> or <component><maxExclusive> element item.The translation of a NamedValue is an element item withIf thesame [local name] asUpperEndpoint in thetranslationValueRange is of thecorresponding NamedType, i.e., "attribute", "element", "group" or "item". An attribute"UpperEndValue" form and the UpperEndValue is a Value, then an element item with the [local name]"name""maxInclusive" SHALL be added to the[attributes][children] of the <range> element item. The[normalized value] of this attribute item is the RXER character data translation of the effective name of the NamedType. Thetranslation of the Value in theNamedValueUpperEndValue SHALL be added to the [children] or [attributes] of the <maxInclusive> element item.Examples Legg Expires 20 April 2007 [Page 65] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006 -- ThisIf the UpperEndpoint in the ValueRange is of thegoverning type. MyType ::= SEQUENCE { one [ATTRIBUTE] INTEGER, two INTEGER, three [ATTRIBUTE][LIST] SEQUENCE OF number INTEGER } <namedType name="MyType"> <type> <sequence> <attribute name="one" type="asnx:INTEGER"/> <element name="two" type="asnx:INTEGER"/> <attribute name="three"> <type> <list> <item name="number" 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"UpperEndValue" form and thevalue for component "two"UpperEndValue isa notational value three { number 123, number 456 } } <namedValue name="myValue2" type="tns:MyType"> <literalValue xmlns:asnx="urn:ietf:params:xml:ns:asnx" xmlns:tns="http://example.com/ns/MyModule" one="456" three="123 456"> <two asnx:literal="false"> Legg Expires 20 April 2007 [Page 66] INTERNET-DRAFT Abstract Syntax Notation X 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"MAX", then an element item with the [local name] "maxInclusive" MAY be added to the [children] of the <range> element item. Examples 1..10 <range> Legg Expires 22 June 2007 [Page 63] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 <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 instance that has aValueFromObjectSingleTypeConstraint is an element item with the [local name]"value". An"withComponent". The translation of the Constraint in the SingleTypeConstraint SHALL be added to the [children] of the <withComponent> element item. The translation of an InnerTypeConstraints instance that has a MultipleTypeConstraints instance is an element item with the [local name]"annotation" MAY"withComponents". If the MultipleTypeConstraints instance is a PartialSpecification, then an attribute item with the [local name] "partial" and the [normalized value] "true" or "1" SHALL be added to the[children][attributes] of the<value><withComponents> element item.An elementIf the MultipleTypeConstraints instance is a FullSpecification, then an attribute item with the [local name]"fromObjects""partial" and the [normalized value] "false" or "0" MAY be added to the [attributes] of the <withComponents> element item. The translation of each NamedConstraint nested in the TypeConstraints instance in the FullSpecification or PartialSpecification SHALL be appended to the [children] of the<value><withComponents> element item. The translation of a NamedConstraint is an element item with theReferencedObjects in the ValueFromObject andsame [local name] (i.e., "attribute", "element", "component", "group", "member" or "simpleContent") as the translation of theFieldNameNamedType corresponding to the identifier in theValueFromObjectNamedConstraint. An attribute item with the [local name] "name" SHALL be added to the[children] and/or[attributes] of the<fromObjects><attribute>, <element>, <component>, <group>, <member> or <simpleContent> element item.7.2.4. ObjectClassFieldValue Translation If an ObjectClassFieldValueThe [normalized value] of this attribute item is aBuiltinValuequalified name for the expanded name of the NamedType corresponding to the identifier ina FixedTypeFieldVal,the NamedConstraint. Legg Expires20 April22 June 2007 [Page67]64] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006 If the PresenceConstraint in the ComponentConstraint in the NamedConstraint is not empty, then an attribute item with thetranslation[local name] "use" SHALL be added to the [attributes] of theObjectClassFieldValue<attribute>, <element>, <component>, <group>, <member> or <simpleContent> element item. The [normalized value] of this attribute item is thetranslationtext of theBuiltinValue.PresenceConstraint with all letters downcased, i.e., either "present", "absent" or "optional". If the ValueConstraint in the ComponentConstraint in the NamedConstraint is not empty, then the translation of the Constraint in the ValueConstraint SHALL be added to the [children] of the <attribute>, <element>, <component>, <group>, <member> or <simpleContent> element item. 9. Translation of Object Classes The translation of anObjectClassFieldValueObjectClass is the translation of the DefinedObjectClass, ObjectClassDefn or ParameterizedObjectClass in the ObjectClass. The translation of aReferencedValueParameterizedObjectClass is described in Section 13. 9.1. DefinedObjectClass Translation If aFixedTypeFieldVal,DefinedObjectClass is an objectclassreference (not a DummyReference), an ExternalObjectClassReference or a UsefulObjectClassReference, then the translation of theObjectClassFieldValueDefinedObjectClass is either the attribute form translation of an object class reference, or the element form translation of an object class reference. 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 a qualified name for the expanded name of the referenced object class definition (see Section 5.1). In the case of a UsefulObjectClassReference, the namespace name of the expanded name is "urn:ietf:params:xml:ns:asnx" and the local name is either "TYPE-IDENTIFIER" or "ABSTRACT-SYNTAX", as the case may be. The attribute form translation SHALL NOT be used if the expanded name is not distinct with respect to the current module and the modules referenced by its <import> element items (see Section 5.1). Otherwise, the translator is free to choose either the attribute form or element form translationof the ReferencedValue. If an ObjectClassFieldValue isfor anOpenTypeFieldVal, then theobject class reference. The element form translation ofthe ObjectClassFieldValuean object class reference is an element item with the [local name]"value"."class". An element item with the [local name] "annotation" MAY be added to the [children] of the<value>Legg Expires 22 June 2007 [Page 65] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 <class> element item. Anelementattribute item with the [local name]"openTypeValue""ref" SHALL beappendedadded to the[children][attributes] of the<value><class> element item. Thetranslation[normalized value] of this attribute item is a qualified name for theType inexpanded name of theOpenTypeFieldVal andreferenced object class definition. In thetranslationcase of a UsefulObjectClassReference, theValue innamespace name of theOpenTypeFieldVal SHALL be addedexpanded name is "urn:ietf:params:xml:ns:asnx" and the local name is either "TYPE-IDENTIFIER" or "ABSTRACT-SYNTAX", as the case may be. If the expanded name is not distinct with respect to the[children] and/or [attributes] ofcurrent module and the<openTypeValue>modules referenced by its <import> elementitem. Example myValue TYPE-IDENTIFIER.&Type ::= INTEGER:123 <namedValue name="myValue"> <type> <fromClass class="asnx:TYPE-IDENTIFIER" fieldName="Type"/> </type> <value> <openTypeValue type="asnx:INTEGER" literalValue="123"/> </value> </namedValue> 8. Translation of Value Sets The translation of a ValueSet isitems, then anelementattribute item with the [local name]"valueSet". An"context" SHALL be added to the [attributes] of the <class> element item, otherwise if the module containing the referenced object class definition has a schema identity URI, then an attribute item with the [local name]"annotation""context" MAY be added to the[children][attributes] of the<valueSet><class> element item. Thetranslation[normalized value] of this attribute item is theElementSetSpecs in the ValueSet SHALL be appended to the [children]schema identity URI 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"/> Legg Expires 20 April 2007 [Page 68] INTERNET-DRAFT Abstract Syntax Notation X 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 wheremodule containing theellipsis ("...")referenced object class definition. Aside: If a reference name is notpresent is the translation ofdistinct, then theElementSetSpec inmodule containing theRootElementSetSpec.referenced definition must have a schema identity URI (see Section 5.1). The translation ofan ElementSetSpecs wheretheellipsis ("...") is presentDefinedObjectClass is thetranslation of the ElementSetSpec insame whether theRootElementSetSpec followedobject class definition is referenced by anelement item with the [local name] "extension". Ifobjectclassreference or anAdditionalElementSetSpecExternalObjectClassReference. If a DefinedObjectClass ispresent,a DummyReference, then the translation of theElementSetSpec in the AdditionalElementSetSpec SHALL be added toDefinedObjectClass is the[children]translation of the<extension> element item. 8.2. ElementSetSpecDummyReference (see Section 13). 9.2. ObjectClassDefn TranslationIf the ElementSetSpec is of the "ALL Exclusions" form, then theThe translation ofthe ElementSetSpecan ObjectClassDefn is an element item with the [local name]"all"."class". An element item with the [local name]"except" SHALL"annotation" MAY be added to the [children] of the<all><class> element item. The translation ofthe Elementseach FieldSpec in theExclusionsObjectClassDefn SHALL beaddedappended to the [children] of the<except><class> element item.If the ElementSetSpec is of the "Unions" form, then theThe translation ofthe ElementSetSpeca FieldSpec is the translation of theUnions. If the Unions has only one Intersections, thenTypeFieldSpec, FixedTypeValueFieldSpec, VariableTypeValueFieldSpec, FixedTypeValueSetFieldSpec, VariableTypeValueSetFieldSpec, ObjectFieldSpec or ObjectSetFieldSpec in the FieldSpec. 9.2.1. TypeFieldSpec Translation The translation of a TypeFieldSpec where theUnionsTypeOptionalitySpec isthe translation of that Intersections, otherwise the translation of the Unionsabsent is an element item with the [local name]"union"."typeField". The translation ofeach Intersections SHALL be appended to the [children]a TypeFieldSpec with a TypeOptionalitySpec of the<union> element item.Legg Expires20 April22 June 2007 [Page69]66] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006If the Intersections has only one IntersectionElements, then the translation of the Intersections is the translation of that IntersectionElements, otherwise the translation of the Intersections"OPTIONAL" form is an element item with the [local name]"intersection". The translation of each IntersectionElements"optional". An element item with the [local name] "typeField" SHALL beappendedadded to the [children] of the<intersection><optional> element item.If the IntersectionElements is of the "Elems Exclusions" form, then theThe translation of a TypeFieldSpec with a TypeOptionalitySpec of theIntersectionElements"DEFAULT Type" form is an element item with the [local name]"all". The translation of"optional". An element item with theElements in[local name] "typeField" SHALL be added to theElems and an[children] of the <optional> element item. An element item with the [local name]"except""default" SHALL beaddedappended to the [children] of the<all><optional> element item. The translation of theElementsType in theExclusionsTypeOptionalitySpec SHALL be added to the [children] or [attributes] of the<except><default> element item.If the IntersectionElements is of the "Elements" form, then the translation ofAn attribute item with theIntersectionElements is[local name] "name" SHALL be added to thetranslation[attributes] of theElements.<typeField> element item. Thetranslation[normalized value] ofan Elementsthis attribute item is thetranslation oftypefieldreference in theSubtypeElements, ObjectSetElements or ElementSetSpec, as appropriate. 8.3. SubtypeElements Translation If a SubtypeElements is a SingleValue, thenTypeFieldSpec, without thetranslation ofampersand character ('&', U+0026). An element item with theSubtypeElements is[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"/> <optional> <typeField name="Two"/> </optional> <optional> <typeField name="Three"/> <default type="asnx:OBJECT-IDENTIFIER"/> </optional> </class> 9.2.2. FixedTypeValueFieldSpec Translation The translation of a FixedTypeValueFieldSpec where theValue, except thatValueOptionalitySpec is absent is anattribute form ofelement item with theValue[local name] "valueField". The translationSHALL NOT be used. Ifof aSubtypeElements isFixedTypeValueFieldSpec with aContainedSubtype, then the translationValueOptionalitySpec of theSubtypeElements"OPTIONAL" form is an element item with the [local name]"includes". The translation of the Type in"optional". An element item with theContainedSubtype[local name] Legg Expires 22 June 2007 [Page 67] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 "valueField" SHALL be added to the [children]or [attributes]of the<includes><optional> element item.If a SubtypeElements is a ValueRange, then the translation of the SubtypeElements is theThe translation ofthe ValueRange. IfaSubtypeElements isFixedTypeValueFieldSpec with aSizeConstraint, then the translationValueOptionalitySpec of theSubtypeElements"DEFAULT Value" form is an element item with the [local name]"size". The translation of the Constraint in"optional". An element item with theSizeConstraint[local name] "valueField" SHALL be added to the [children] of the<size><optional> element item.If a SubtypeElements is a TypeConstraint, then the translation of the SubtypeElements is anAn element item with the [local name]"typeConstraint"."default" SHALL be appended to the [children] of the <optional> element item. The translation of theTypeValue in theTypeConstraintValueOptionalitySpec SHALL be added to the [children] or [attributes] of the<typeConstraint><default> element item.Legg Expires 20 April 2007 [Page 70] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006An 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 in the FixedTypeValueFieldSpec, without the ampersand character ('&', U+0026). Ifa SubtypeElementsthe "UNIQUE" keyword isa PermittedAlphabet,present, then an attribute item with thetranslation[local name] "unique" and [normalized value] "true" or "1" SHALL be added to the [attributes] of theSubtypeElements is<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]"from"."annotation" MAY be added to the [children] of the <valueField> element item. The translation of theConstraintType in thePermittedAlphabetFixedTypeValueFieldSpec SHALL be added to the [children] or [attributes] of the<from><valueField> element item.If a SubtypeElements is an InnerTypeConstraints, then theExample CLASS { &one OBJECT IDENTIFIER UNIQUE, &two BOOLEAN OPTIONAL, &three INTEGER DEFAULT 0 } <class> <valueField name="one" unique="true" type="asnx:OBJECT-IDENTIFIER"/> <optional> <valueField name="two" type="asnx:BOOLEAN"/> </optional> <optional> <valueField name="three" type="asnx:INTEGER"/> <default literalValue="0"/> </optional> </class> Legg Expires 22 June 2007 [Page 68] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 9.2.3. FixedTypeValueSetFieldSpec Translation The translation of a FixedTypeValueSetFieldSpec where theSubtypeElementsValueSetOptionalitySpec is absent is an element item with the [local name] "valueSetField". The translation ofthe InnerTypeConstraints. IfaSubtypeElements isFixedTypeValueSetFieldSpec with aPatternConstraint, then the translationValueSetOptionalitySpec of theSubtypeElements"OPTIONAL" form is an element item with the [local name]"pattern". The translation of the Value in"optional". An element item with thePatternConstraint[local name] "valueSetField" SHALL be added to the [children]or [attributes]of the<pattern><optional> element item.8.3.1. ValueRange TranslationThe translation of aValueRangeFixedTypeValueSetFieldSpec with a ValueSetOptionalitySpec of the "DEFAULT ValueSet" form is an element item with the [local name]"range". If the LowerEndpoint in the ValueRange is of the "LowerEndValue <" form, then an"optional". 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", then the translation of the Value in the LowerEndValue"valueSetField" SHALL be added to the [children]or [attributes]of the<minExclusive><optional> element item.If the LowerEndpoint in the ValueRange is of the "LowerEndValue" form and the LowerEndValue is not "MIN", then anAn element item with the [local name]"minInclusive""default" SHALL beaddedappended to the [children] of the<range><optional> element item. The translation of theValueValueSet in theLowerEndValueValueSetOptionalitySpec SHALL be added to the [children]or [attributes]of the<minInclusive><default> element item.If the LowerEndpoint in the ValueRange is of the "LowerEndValue" form and the LowerEndValue is "MIN", then an elementAn attribute item with the [local name]"minInclusive" MAY"name" SHALL be added to the[children][attributes] of the<range><valueSetField> element item.IfThe [normalized value] of this attribute item is theUpperEndpointvaluesetfieldreference in theValueRange is ofFixedTypeValueSetFieldSpec, without the"< UpperEndValue" form, then anampersand character ('&', U+0026). An element item with the [local name]"maxExclusive" SHALL"annotation" MAY be added to the [children] of the<range><valueSetField> element item.If the UpperEndValue is not "MAX", then theThe translation of theValueType in theUpperEndValueFixedTypeValueSetFieldSpec SHALL be added to the [children] or [attributes] of the<maxExclusive><valueSetField> element item.If the UpperEndpoint in the ValueRange is of the "UpperEndValue" form and the UpperEndValue is not "MAX", then an element item with theExample CLASS { &One UTF8String, &Two BOOLEAN OPTIONAL, &Three INTEGER DEFAULT { 1 | 2 } } <class> <valueSetField name="One" type="asnx:UTF8String"/> <optional> <valueSetField name="Two" type="asnx:BOOLEAN"/> </optional> <optional> <valueSetField name="Three" type="asnx:INTEGER"/> <default> Legg Expires20 April22 June 2007 [Page71]69] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006[local name] "maxInclusive" SHALL be added to the [children] of the <range> element item.<valueSet> <union> <literalValue>1</literalValue> <literalValue>2</literalValue> </union> </valueSet> </default> </optional> </class> 9.2.4. VariableTypeValueFieldSpec Translation The translation of a VariableTypeValueFieldSpec where theValue in the UpperEndValue SHALL be added to the [children] or [attributes] of the <maxInclusive> element item. If the UpperEndpoint in the ValueRangeValueOptionalitySpec isof the "UpperEndValue" form and the UpperEndValueabsent is"MAX", thenan element item with the [local name]"maxInclusive" MAY be added to the [children] of the <range> element item. 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"valueField". The translation ofan InnerTypeConstraintsa VariableTypeValueFieldSpec with a ValueOptionalitySpec of the"WITH COMPONENT SingleTypeConstraint""OPTIONAL" form is an element item with the [local name]"withComponent". The translation of the Constraint in"optional". An element item with theSingleTypeConstraint[local name] "valueField" SHALL be added to the [children] of the<withComponent><optional> element item. The translation ofan InnerTypeConstraintsa VariableTypeValueFieldSpec with a ValueOptionalitySpec of the"WITH COMPONENTS MultipleTypeConstraints""DEFAULT Value" form is an element item with the [local name]"withComponents". If the MultipleTypeConstraints is a 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>"optional". An elementitem. If the MultipleTypeConstraints Legg Expires 20 April 2007 [Page 72] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006 is a FullSpecification, then an attributeitem 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"valueField" SHALL beappendedadded to the [children] of the<withComponents><optional> element item.The translation of a NamedConstraint is anAn element item with thesame[local name](i.e., "component", "attribute", "element", "group" or "member") as"default" SHALL be appended to the [children] of the <optional> element item. The translation of theNamedType correspondingValue in the ValueOptionalitySpec SHALL be added to theidentifier[children] or [attributes] of theNamedConstraint.<default> element item. An attribute item with the [local name] "name" SHALL be added to the [attributes] of the<attribute>, <element>, <component>, <group> or <member><valueField> elementitem, as the case may be.item. The [normalized value] of this attribute item is theRXER character data translation of the effective name of the NamedType corresponding to the identifier of the NamedConstraint. If the PresenceConstraint ofvaluefieldreference in theComponentConstraint ofVariableTypeValueFieldSpec, without theNamedConstraint is not empty, then an attributeampersand character ('&', U+0026). An element item with the [local name]"use" SHALL"annotation" MAY be added to the[attributes][children] of the<attribute>, <element>, <component>, <group> or <member><valueField> element item. An elementitem, as the case may be. The [normalized value] of this attributeitemis the text of the PresenceConstraintwithall letters downcased, i.e., either "present", "absent" or "optional". If the ValueConstraint in the ComponentConstraint of the NamedConstraint is not empty, then the translation of the Constraint intheValueConstraint[local name] "typeFromField" SHALL beaddedappended to the [children] of the<attribute>, <element>, <component>, <group> or <member><valueField> elementitem, as the case may be. 9. Translation of Object Classesitem. The translation ofan ObjectClass isthetranslation of either a DefinedObjectClass, an ObjectClassDefn or a ParameterizedObjectClass. The translation of a ParameterizedObjectClass is describedFieldName inSection 5.9. 9.1. DefinedObjectClass Translation If a DefinedObjectClass is an objectclassreference (not a DummyReference), an ExternalObjectClassReference or a UsefulObjectClassReference, then the translation oftheDefinedObjectClass is eitherVariableTypeValueFieldSpec SHALL be added to theattribute form translation of an object class reference,[children] or [attributes] of the <typeFromField> elementform translation of an object class reference.item. Example CLASS { &Syntax DEFAULT INTEGER, &one &Syntax, Legg Expires20 April22 June 2007 [Page73]70] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006 &two &Syntax OPTIONAL, &three &Syntax DEFAULT 0 } <class> <optional> <typeField name="Syntax"/> <default 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 Theattribute formtranslation ofan object class referencea VariableTypeValueSetFieldSpec where the ValueSetOptionalitySpec is absent is anattributeelement item with the [local name]"class"."valueSetField". The[normalized value] of this attribute item is the qualified name referencing the object class definition (see Section 5.1). In the casetranslation of aUsefulObjectClassReference, the namespace name is "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 eitherVariableTypeValueSetFieldSpec with a ValueSetOptionalitySpec of theattribute form or element form translation for an object class reference. The element"OPTIONAL" formtranslation of an object class referenceis an element item with the [local name]"class"."optional". Anattributeelement item with the [local name]"ref""valueSetField" SHALL be added to the[attributes][children] of the<class><optional> element item. The[normalized value] of this attribute item is the qualified name referencing the object class definition. In the casetranslation of aUsefulObjectClassReference the namespace name is "urn:ietf:params:xml:ns:asnx" andVariableTypeValueSetFieldSpec with a ValueSetOptionalitySpec of thelocal part"DEFAULT ValueSet" form iseither "TYPE-IDENTIFIER" or "ABSTRACT-SYNTAX", as the case may be. Ifan element item with thereference name is not distinct[local name] "optional". An element item withrespectthe [local name] "valueSetField" SHALL be added to thecurrent module and[children] of themodules referenced by its <import><optional> element item. An elementitems (see Section 5.1), then an attributeitem with the [local name]"context""default" SHALL beaddedappended to the[attributes][children] of the<class><optional> elementitem, otherwise ifitem. The translation of themodule containingValueSet in thereferenced object class definition has a schema identity URI, then anValueSetOptionalitySpec SHALL be added to the [children] of the <default> element item. An attribute item with the [local name]"context" MAY"name" SHALL be added to the Legg Expires 22 June 2007 [Page 71] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 [attributes] of the<class><valueSetField> element item. The [normalized value] of this attribute item is theschema identity URI of the module containing the referenced object class definition. Aside: If a reference name is not distinct, thenvaluesetfieldreference in themodule containingVariableTypeValueSetFieldSpec, without thereferenced definition must have a schema identity URI (see Section 5.1).ampersand character ('&', U+0026). An element item with the [local name] "annotation" MAY be added to the [children] of the<class><valueSetField> element item.The translation of the DefinedObjectClass isAn element item with thesame whether[local name] "typeFromField" SHALL be appended to theobject class definition is referenced by an objectclassreference or an ExternalObjectClassReference. If a DefinedObjectClass is a DummyReference, then[children] of the <valueSetField> element item. The translation of theDefinedObjectClass isFieldName in thetranslationVariableTypeValueSetFieldSpec SHALL be added to the [children] or [attributes] of theDummyReference (see Section 5.9). 9.2. ObjectClassDefn Translation<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="asnx:INTEGER"/> </optional> <valueSetField name="One"> <typeFromField fieldName="Syntax"/> </valueSetField> <optional> <valueSetField name="Two"> <typeFromField fieldName="Syntax"/> </valueSetField> </optional> <optional> <valueSetField name="Three"> <typeFromField fieldName="Syntax"/> </valueSetField> <default> <valueSet> <union> <literalValue>1</literalValue> <literalValue>2</literalValue> </union> </valueSet> </default> </optional> </class> Legg Expires20 April22 June 2007 [Page74]72] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006 9.2.6. FieldName Translation The translation ofan ObjectClassDefna FieldName is either, at the translator's option, anelementattribute item with the [local name]"class". An"fieldName" added to the [attributes] of the enclosing element item, or an element item with the [local name]"annotation" MAY be added"fieldName" appended to the [children] of the<class>enclosing element item. Thetranslation[normalized value] ofeach FieldSpecthe fieldName attribute item is a solidus ('/', U+002F) separated list of the PrimitiveFieldName instances in theObjectClassDefn SHALLFieldName, without the ampersand characters ('&', U+0026). Leading and/or trailing white space characters MAY beappendedadded to the[children][normalized value] of the<class> elementattribute item. White space characters MAY be added immediately before and/or after any solidus character ('/', U+002F) in the [normalized value]. Thetranslation[children] property ofa FieldSpecthe <fieldName> element item is set to thetranslationsequence ofeither a TypeFieldSpec, a FixedTypeValueFieldSpec, a VariableTypeValueFieldSpec, a FixedTypeValueSetFieldSpec,character items for aVariableTypeValueSetFieldSpec, ansolidus ('/', U+002F) separated list of the PrimitiveFieldName instances in the FieldName, 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 solidus character ('/', U+002F). Example &Linked.&ArgumentType <fieldName>Linked/ArgumentType</fieldName> 9.2.7. ObjectFieldSpecor an ObjectSetFieldSpec. 9.2.1. TypeFieldSpecTranslation The translation ofa TypeFieldSpecan ObjectFieldSpec where theTypeOptionalitySpecObjectOptionalitySpec is absent is an element item with the [local name]"typeField"."objectField". The translation of aTypeFieldSpecObjectFieldSpec with aTypeOptionalitySpecObjectOptionalitySpec of the "OPTIONAL" form is an element item with the [local name] "optional". An element item with the [local name]"typeField""objectField" SHALL be added to the [children] of the <optional> element item. The translation of aTypeFieldSpecObjectFieldSpec with aTypeOptionalitySpecObjectOptionalitySpec of"DEFAULT"the "DEFAULT Object" form is an element item with the [local name] "optional". An element item with the [local name]"typeField""objectField" 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 theTypeObject in theTypeOptionalitySpecObjectOptionalitySpec SHALL be added to the [children] Legg Expires 22 June 2007 [Page 73] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 or [attributes] of the <default> element item. An attribute item with the [local name] "name" SHALL be added to the [attributes] of the<typeField><objectField> element item. The [normalized value] of this attribute item is thetypefieldreference ofobjectfieldreference in theTypeFieldSpec,ObjectFieldSpec, without the ampersand("&",character ('&', U+0026). An element item with the [local name] "annotation" MAY be added to the [children] of the<typeField><objectField> element item. The translation of the DefinedObjectClass in the ObjectFieldSpec SHALL be added to the [children] or [attributes] of the <objectField> 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&one TYPE-IDENTIFIER, &two ABSTRACT-SYNTAX OPTIONAL, &three TYPE-IDENTIFIER DEFAULT myObject } <class> <objectField name="one" class="asnx:TYPE-IDENTIFIER"/> <optional><typeField name="Two"/><objectField name="two" class="asnx:ABSTRACT-SYNTAX"/> </optional> <optional><typeField name="Three"/><objectField name="three" class="asnx:TYPE-IDENTIFIER"/> <defaulttype="asnx:OBJECT-IDENTIFIER"/>object="tns:myObject"/> </optional> </class>9.2.2. FixedTypeValueFieldSpec9.2.8. ObjectSetFieldSpec Translation The translation ofa FixedTypeValueFieldSpecan ObjectSetFieldSpec where theValueOptionalitySpecObjectSetOptionalitySpec is absent is an element item with the [local name]"valueField"."objectSetField". The translation of aFixedTypeValueFieldSpecObjectSetFieldSpec witha ValueOptionalitySpecan ObjectSetOptionalitySpec of the "OPTIONAL" form is an element item with the [local name] "optional". An element item with the [local name]"valueField""objectSetField" SHALL be added to the [children] of the <optional> element item. The translation of aFixedTypeValueFieldSpecObjectSetFieldSpec witha ValueOptionalitySpecan ObjectSetOptionalitySpec of"DEFAULT"the "DEFAULT ObjectSet" form is an element item with the [local name] "optional". An element item with the [local name]"valueField""objectSetField" SHALL be added to the [children] of the <optional> element item. An element item with the [local name] Legg Expires 22 June 2007 [Page 74] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 "default" SHALL be appended to the [children] of the <optional> element item. The translation of theValueObjectSet in theValueOptionalitySpecObjectSetOptionalitySpec 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><objectSetField> element item. The [normalized value] of this attribute item is thevaluefieldreference ofobjectsetfieldreference in theFixedTypeValueFieldSpec,ObjectSetFieldSpec, without the ampersand("&",character ('&', U+0026).If the "UNIQUE" keyword is 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><objectSetField> element item. The translation of theTypeDefinedObjectClass in theFixedTypeValueFieldSpecObjectSetFieldSpec SHALL be added to the [children] or [attributes] of the<valueField><objectSetField> 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&One TYPE-IDENTIFIER, &Two ABSTRACT-SYNTAX OPTIONAL,&three INTEGER&Three TYPE-IDENTIFIER DEFAULT0{ myObject } } <class><valueField name="one" unique="true" type="asnx:OBJECT-IDENTIFIER"/><objectSetField name="One" class="asnx:TYPE-IDENTIFIER"/> <optional><valueField name="two" type="asnx:BOOLEAN"/><objectSetField name="Two" class="asnx:ABSTRACT-SYNTAX"/> </optional> <optional><valueField name="three" type="asnx:INTEGER"/> <default literalValue="0"/><objectSetField name="Three" class="asnx:TYPE-IDENTIFIER"/> <default> <objectSet> <object ref="tns:myObject"/> </objectSet> </default> </optional> </class>9.2.3. FixedTypeValueSetFieldSpec10. Translation of Objects The translation ofa FixedTypeValueSetFieldSpec where the ValueSetOptionalitySpec is absent isanelement item withObject is the[local name] "valueSetField".translation of the DefinedObject, ObjectDefn, ObjectFromObject or ParameterizedObject in the Object. The translation of aFixedTypeValueSetFieldSpec withParameterizedObject is described in Section 13. 10.1. DefinedObject Translation If aValueSetOptionalitySpecDefinedObject is an objectreference (not a DummyReference) or an Legg Expires 22 June 2007 [Page 75] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 ExternalObjectReference, then the translation of"OPTIONAL"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]"optional". An element"object". The [normalized value] of this attribute itemwithis a qualified name for the[local name] "valueSetField"expanded name of the referenced object definition (see Section 5.1). The attribute form translation SHALL NOT beaddedused if this expanded name is not distinct with respect to the[children] ofcurrent module and the<optional>modules referenced by its <import> elementitem.items (see Section 5.1). The element form translation ofa FixedTypeValueSetFieldSpec with a ValueSetOptionalitySpec of "DEFAULT"an object reference is an element item with the [local name]"optional"."object". An element item with the [local name]"valueSetField" SHALL"annotation" MAY be added to the [children] of the<optional><object> element item. Anelementattribute item with the [local name]"default""ref" SHALL beappendedadded to the[children][attributes] of the<optional><object> element item. Thetranslation[normalized value] of this attribute item is a qualified name for theValueSet inexpanded name of theValueSetOptionalitySpecreferenced object definition. If this expanded name is not distinct with respect to the current module and the modules referenced by its <import> element items, then an attribute item with the [local name] "context" SHALL be added to the[children][attributes] of the<default><object> elementitem. Anitem, otherwise if the module containing the referenced object definition has a schema identity URI, then an attribute item with the [local name]"name" SHALL"context" MAY be added to the [attributes] of the<valueSetField><object> element item. The [normalized value] of this attribute item is thevaluesetfieldreference ofschema identity URI of the module containing the referenced object definition. Aside: If a reference name is not distinct, then the module containing the referenced definition must have a schema identity URI (see Section 5.1). The translation of the DefinedObject is the same whether theFixedTypeValueSetFieldSpec, withoutobject definition is referenced by an objectreference or an ExternalObjectReference. Usually theampersand ("&", U+0026). Antranslator is free to choose either the attribute form or elementitem withform translation for an object reference, however in some contexts the[local name] "annotation" MAY be added toattribute form is explicitly disallowed. If a DefinedObject is a DummyReference, then the[children]translation of the<valueSetField> element item. TheDefinedObject is the translation of theType in the FixedTypeValueSetFieldSpec SHALL be addedDummyReference (see Section 13). 10.2. ObjectDefn Translation An ObjectDefn that is a DefinedSyntax is first converted to the[children] or [attributes] of the <valueSetField> element item.Legg Expires20 April22 June 2007 [Page77]76] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006Example CLASS { &One UTF8String, &Two BOOLEAN OPTIONAL, &Three INTEGER DEFAULT { 1 | 2 } } <class> <valueSetField name="One" type="asnx:UTF8String"/> <optional> <valueSetField name="Two" type="asnx:BOOLEAN"/> </optional> <optional> <valueSetField name="Three" type="asnx:INTEGER"/> <default> <valueSet> <union> <literalValue>1</literalValue> <literalValue>2</literalValue> </union> </valueSet> </default> </optional> </class> 9.2.4. VariableTypeValueFieldSpec Translationequivalent DefaultSyntax and then translated. The translation ofa VariableTypeValueFieldSpec where the ValueOptionalitySpec is absent isanelement item with the [local name] "valueField". The translation of a VariableTypeValueFieldSpec with a ValueOptionalitySpec of "OPTIONAL"ObjectDefn is an element item with the [local name]"optional"."object". An element item with the [local name]"valueField" SHALL"annotation" MAY be added to the [children] of the<optional><object> element item. The translation ofa VariableTypeValueFieldSpec with a ValueOptionalitySpec of "DEFAULT" is an element item witheach FieldSetting in the[local name] "optional". An element item withDefaultSyntax in the[local name] "valueField"ObjectClassDefn SHALL beaddedappended to the [children] of the<optional><object> element item.AnThe translation of a FieldSetting is 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 [children] or [attributes] of the <default> element item."field". An attribute item with the [local name] "name" SHALL be added to theLegg Expires 20 April 2007 [Page 78] INTERNET-DRAFT Abstract Syntax Notation X October 20, 2006[attributes] of the<valueField><field> element item. The [normalized value] of this attribute item is thevaluefieldreference ofPrimitiveFieldName in theVariableTypeValueFieldSpec,FieldSetting, without the ampersand("&",character ('&', 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 theFieldNameType, Value, ValueSet, Object or ObjectSet in theVariableTypeValueFieldSpecSetting in the FieldSetting SHALL be added to the [children] or [attributes] of the<typeFromField><field> element item. Example -- This is the governing object class. ONE-OF-EVERYTHING ::= CLASS {&Syntax DEFAULT INTEGER, &one &Syntax,&One, &two&Syntax OPTIONAL, &three &Syntax DEFAULT 0INTEGER, &Three INTEGER, &four TYPE-IDENTIFIER, &Five TYPE-IDENTIFIER } <namedClass name="ONE-OF-EVERYTHING"> <class><optional><typeFieldname="Syntax"/> <default type="asnx:INTEGER"/> </optional> <valueField name="one"> <typeFromField fieldName="Syntax"/> </valueField> <optional> <valueField name="two"> <typeFromField fieldName="Syntax"/> </valueField> </optional> <optional>name="One"/> <valueFieldname="three"> <typeFromField fieldName="Syntax"/> </valueField> <default literalValue="0"/> </optional>name="two" type="asnx:INTEGER"/> <valueSetField name="Three" type="asnx:INTEGER"/> <objectField name="four" class="asnx:TYPE-IDENTIFIER"/> <objectSetField name="Five" class="asnx:TYPE-IDENTIFIER"/> </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</namedClass> mixedBag ONE-OF-EVERYTHING ::= { &One BOOLEAN, &two 99, &Three { 1 | 2 }, &four myObject, &Five { myObject } } <namedObject name="mixedBag" class="tns:ONE-OF-EVERYTHING"> Legg Expires20 April22 June 2007 [Page79]77] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006[local name] "optional". An element item with the [local name] "valueSetField" SHALL be added to the [children] of the <optional> element item.<object> <field name="One" 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 ofa VariableTypeValueSetFieldSpec with a ValueSetOptionalitySpec of "DEFAULT"an ObjectFromObject is an element item with the [local name]"optional"."object". An element item with the [local name]"valueSetField" SHALL"annotation" MAY be added to the [children] of the<optional><object> element item. An element item with the [local name]"default""fromObjects" SHALL be appended to the [children] of the<optional><object> element item. The translation of theValueSetReferencedObjects instance in theValueSetOptionalitySpecObjectFromObject SHALL be added to the [children] or [attributes] of the<default><fromObjects> element item.An attribute item withThe translation of the[local name] "name"FieldName in the ObjectFromObject SHALL be added to the [children] or [attributes] of the<valueSetField><fromObjects> element item.The [normalized value]11. Translation ofthis attribute item isObject Sets If an ObjectSet matches thevaluesetfieldreferenceform "{ DefinedObjectSet }" (i.e., a DefinedObjectSet in an ObjectSetElements instance in an Elements instance in a lone IntersectionElements instance in a lone Intersections instance in a Unions instance in an ElementSetSpec in a RootElementSetSpec in an ObjectSetSpec without an AdditionalElementSetSpec), then the translator MAY use the translation of theVariableTypeValueSetFieldSpec, withoutDefinedObjectSet as theampersand ("&", U+0026).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<valueSetField>Legg Expires 22 June 2007 [Page 78] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 <objectSet> element item. The translation of the ObjectSetSpec in the ObjectSet SHALL be appended to the [children] of the <objectSet> element item. 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, then the translation of the ObjectSetSpec is the translation of the ElementSetSpec in the RootElementSetSpec. If an ObjectSetSpec contains a RootElementSetSpec and an 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]"typeFromField""extension". If an AdditionalElementSetSpec is present, then the translation of the ElementSetSpec in the AdditionalElementSetSpec SHALL beappendedadded to the [children] of the<valueSetField><extension> element item.TheIf an ObjectSetSpec does not contain a RootElementSetSpec, then the translation of theFieldNameObjectSetSpec is an element item with the [local name] "extension". If an AdditionalElementSetSpec is present, then the translation of the ElementSetSpec in theVariableTypeValueSetFieldSpecAdditionalElementSetSpec SHALL be added to the [children]or [attributes]of the<typeFromField><extension> element item.Example CLASS { &Syntax DEFAULT INTEGER, &One &Syntax, &Two &Syntax OPTIONAL, &Three &Syntax DEFAULT { 1 | 2 } } <class> <optional> <typeField name="Syntax"/> <default type="asnx:INTEGER"/> </optional> <valueSetField name="One"> <typeFromField fieldName="Syntax"/> </valueSetField> <optional> <valueSetField name="Two"> <typeFromField fieldName="Syntax"/> </valueSetField> </optional> <optional>Nested within the ElementSetSpec will be one or more ObjectSetElements instances. 11.1. DefinedObjectSet Translation If a DefinedObjectSet is an objectsetreference (not a DummyReference) or an 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 attribute item with the [local name] "objectSet". The [normalized value] of this attribute item is a qualified name for the expanded name of the referenced object set definition (see Section 5.1). The attribute form translation SHALL NOT be used if this expanded name is not distinct with respect to the current module and the modules referenced by its <import> element items (see Section 5.1). Legg Expires20 April22 June 2007 [Page80]79] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006<valueSetField name="Three"> <typeFromField fieldName="Syntax"/> </valueSetField> <default> <valueSet> <union> <literalValue>1</literalValue> <literalValue>2</literalValue> </union> </valueSet> </default> </optional> </class> 9.2.6. FieldName TranslationThe element form translation ofa FieldNamean object set reference iseither, at the translator's option,anattributeelement item with the [local name]"fieldName""objectSet". An element item with the [local name] "annotation" MAY be added to the[attributes][children] of theenclosing element item, or an<objectSet> element item. An attribute item with the [local name]"fieldName" appended"ref" SHALL be added to the[children][attributes] of theenclosing<objectSet> element item. The [normalized value] ofthe fieldNamethis attribute item is a"/" (U+002F) separated listqualified name for the expanded name of theprimitive field names withoutreferenced object set definition. If this expanded name is not distinct with respect to theampersand characters ("&", U+0026). Leading and/or trailing white space characters MAYcurrent module and the modules referenced by its <import> element items, then an attribute item with the [local name] "context" SHALL be added to the[normalized value][attributes] of the <objectSet> element item, otherwise if the module containing the referenced object set definition has a schema identity URI, then an attributeitem. White space charactersitem with the [local name] "context" MAY be addedimmediately before and/or after any "/" character into the[normalized value]. The [children] property[attributes] of the<fieldName><objectSet> element item. The [normalized value] of this attribute item isset tothesequenceschema identity URI ofcharacter items forthe module containing the referenced object set definition. Aside: If a"/" (U+002F) separated listreference name is not distinct, then the module containing the referenced definition must have a schema identity URI (see Section 5.1). The translation of theprimitive field names withoutDefinedObjectSet is theampersand characters ("&", U+0026). Leading and/or trailing white space character items MAY be added tosame whether the[children] ofobject definition is referenced by an objectsetreference or an ExternalObjectSetReference. Usually the<fieldName>translator is free to choose either the attribute form or elementitem. White space character items MAY be added immediately before and/or after any character itemform translation for an object set reference, however in some contexts the"/" character. Example &Linked.&ArgumentType <fieldName>Linked/ArgumentType</fieldName> 9.2.7. ObjectFieldSpecattribute form is explicitly disallowed. If a DefinedObjectSet is a DummyReference, then the translation of the DefinedObjectSet is the translation of the DummyReference (see Section 13). 11.2. ObjectSetElements TranslationTheIf an ObjectSetElements instance is an Object, then the translation of the ObjectSetElements instance is the translation of the Object, except that the attribute form of the DefinedObject translation SHALL NOT be used if the Object is a DefinedObject. If anObjectFieldSpec whereObjectSetElements instance is a DefinedObjectSet, then theObjectOptionalitySpectranslation of the ObjectSetElements instance isabsentthe translation of the DefinedObjectSet, except that the attribute form of the DefinedObjectSet translation SHALL NOT be used. If an ObjectSetElements instance is anelement item withObjectSetFromObjects, then the[local name] "objectField".translation of the ObjectSetElements instance is the translation of the ObjectSetFromObjects. Legg Expires20 April22 June 2007 [Page81]80] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006The translation of a ObjectFieldSpec with a ObjectOptionalitySpec of "OPTIONAL" isIf anelement item withObjectSetElements instance is a ParameterizedObjectSet, then the[local name] "optional". An element item withtranslation of the[local name] "objectField" SHALL be added toObjectSetElements instance is the[children]translation of the<optional> element item.ParameterizedObjectSet (see Section 13). Aside: Thetranslationin-line expansion of aObjectFieldSpec withParameterizedObjectSet results in an ObjectSet. An ObjectSetElements instance that is an ObjectSet is aObjectOptionalitySpecnotational 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. 11.2.1. ObjectSetFromObjects Translation The translation of"DEFAULT"an ObjectSetFromObjects instance is an element item with the [local name]"optional"."objectSet". An element item with the [localname] "objectField" SHALLname] "annotation" MAY be added to the [children] of the<optional><objectSet> element item. An element item with the [local name]"default""fromObjects" SHALL be appended to the [children] of the<optional><objectSet> element item. The translation of theObjectReferencedObjects instance in theObjectOptionalitySpecObjectSetFromObjects SHALL be added to the [children] or [attributes] of the<default><fromObjects> element item.An attribute item withThe translation of the[local name] "name"FieldName in the ObjectSetFromObjects SHALL be added to the [children] or [attributes] of the<objectField><fromObjects> element item.The [normalized value]12. Translation ofthis attribute itemInformation From Objects If a ReferencedObjects instance is a DefinedObject (not a DummyReference), then theobjectfieldreferencetranslation of theObjectFieldSpec, withoutReferencedObjects instance is theampersand ("&", U+0026). An element item withtranslation of the[local name] "annotation" MAY be added toDefinedObject. If a ReferencedObjects instance is a DefinedObjectSet (not a DummyReference), then the[children]translation of the<objectField> element item. TheReferencedObjects instance is the translation of theDefinedObjectClassDefinedObjectSet. If a ReferencedObjects instance is a DummyReference, ParameterizedObject or ParameterizedObjectSet, then the translation of the ReferencedObjects instance is the translation of that DummyReference, ParameterizedObject or ParameterizedObjectSet (see Section 13). Aside: The in-line expansion of a ParameterizedObject or ParameterizedObjectSet results in an Object or ObjectSet, respectively. A ReferencedObjects instance that is an Object or ObjectSet is a notational capability that does not exist in ASN.1, but is allowed in ASN.X to avoid theObjectFieldSpec SHALL be addedneed to manufacture a Legg Expires 22 June 2007 [Page 81] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 reference name for an expanded parameterized definition. 13. Translation of Parameterized 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[children]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. The definition that substitutes for a DummyReference or[attributes]parameterized reference (e.g., the Object that substitutes for a ParameterizedObject) potentially comes from a different module from the reference. Expanding a DummyReference or parameterized reference in-line puts the substitute definition into the context of the<objectField> element item. Example CLASS { &one TYPE-IDENTIFIER, &two ABSTRACT-SYNTAX OPTIONAL, &three TYPE-IDENTIFIER DEFAULT myObject } <class> <objectField name="one" class="asnx:TYPE-IDENTIFIER"/> <optional> <objectField name="two" class="asnx:ABSTRACT-SYNTAX"/> </optional> <optional> <objectField name="three" class="asnx:TYPE-IDENTIFIER"/> <default object="tns:myObject"/> </optional> </class> 9.2.8. ObjectSetFieldSpec Translationmodule containing the reference, which could therefore alter the interpretation of the substitute definition. A type definition is potentially dependent on the TagDefault and ExtensionDefault of the 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]. Other kinds of definitions are not dependent on the module context, however type definitions can be nested within the 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] (as they are currently defined), so the presence of an encoding control section for RXER or GSER is not significant in a change of context. The remainder of this section describes how and when a change of context is indicated in the ASN.X translation ofan ObjectSetFieldSpec wherea DummyReference or parameterized reference. In any instance of use, the module containing the DummyReference or parameterized reference is the referencing module and the module providing the substitute definition is the referenced module. The referenced and referencing modules may be the same module. In the case of a ParameterizedType, theObjectSetOptionalitySpecsubstitute definition isabsentthe Type on the right hand side of the referenced ParameterizedTypeAssignment. In the case of a ParameterizedValueSetType, the substitute definition isan element item withthe[local name] "objectSetField".constrained type on the right hand side of the notional Legg Expires20 April22 June 2007 [Page 82] INTERNET-DRAFT Abstract Syntax Notation XOctober 20,December 22, 2006The translationParameterizedTypeAssignment equivalent to the referenced ParameterizedValueSetTypeAssignment (see Clause 15.8 ofa ObjectSetFieldSpec with a ObjectSetOptionalitySpecX.680 [X.680]). In the case of"OPTIONAL" is an element item witha ParameterizedValue, the[local name] "optional". An element item withsubstitute definition is the[local name] "objectSetField" SHALL be added toValue on the[children]right hand side of the<optional> element item. The translationreferenced ParameterizedValueAssignment. In the case of aObjectSetFieldSpec with a ObjectSetOptionalitySpec of "DEFAULT"ParameterizedObjectClass, the substitute definition isan element item withthe[local name] "optional". An element item withObjectClass on the[local name] "objectSetField" SHALL be added toright hand side of the[children]referenced ParameterizedObjectClassAssignment. In the case of a ParameterizedObject, the<optional> element item. An element item withsubstitute definition is the[local name] "default" SHALL be appended toObject on the[children]right hand side of the<optional> element item. The translationreferenced ParameterizedObjectAssignment. In the case of a ParameterizedObjectSet, the substitute definition is the ObjectSetinon theObjectSetOptionalitySpec SHALL be addedright hand side of the referenced ParameterizedObjectSetAssignment. If the ActualParameter corresponding to a DummyReference is not a ValueSet, then the[children]substitute definition for that DummyReference is the Type, Value, DefinedObjectClass, Object or[attributes] ofObjectSet in the<default> element item. An attribute item withActualParameter. If the[local name] "name" SHALL be addedActualParameter corresponding to a DummyReference is a ValueSet, then the substitute definition for that DummyReference is the notional constrained type equivalent to the[attributes]ValueSet; the ElementSetSpecs of the<objectSetField> element item. The [normalized value]ValueSet contributes to the constraint ofthis attribute item istheobjectsetfieldreferenceconstrained type and the governor of theObjectSetFieldSpec, withoutParameter corresponding to theampersand ("&", U+0026). An element itemActualParameter is used as the parent type that is constrained. Definition (interchangeable): The contexts of the referencing and referenced modules are interchangeable with respect to interpreting the[local name] "annotation" MAYsubstitute definition if: (1) the referenced module is the referencing module and does not contain an XER encoding control section, or (2) the referenced module and referencing module have the same TagDefault (where an absent TagDefault is taken to beaddedequivalent to "EXPLICIT TAGS"), the[children]referenced module and referencing module have the same ExtensionDefault, and neither module has an XER encoding control section. Aside: A module with an XER encoding control section is not considered to have a context interchangeable with another module, including itself, because the typereference by which a substitute Legg Expires 22 June 2007 [Page 83] INTERNET-DRAFT Abstract Syntax Notation X December 22, 2006 type definition is identified may appear in a TargetList in the XER encoding control section of the<objectSetField> element item. The translationreferenced module, and because the in-line expansion of a substitute definition may cause its text to come within theDefinedObjectClassscope of a TargetList in theObjectSetFieldSpec SHALL be added toXER encoding control section of the referencing module that would not apply otherwise. Definition (recursively contained): A ParameterizedType is recursively contained if its translation will be nested within the[children] or [attributes]translation (i.e., in-line expansion) of another ParameterizedType to which it is equivalent. A ParameterizedValueSetType is recursively contained if its translation will be nested within the<objectSetField> element item. Example CLASS { &One TYPE-IDENTIFIER, &Two ABSTRACT-SYNTAX OPTIONAL, &Three TYPE-IDENTIFIER DEFAULT { myObject } } <class> <objectSetField name="One" class="asnx:TYPE-IDENTIFIER"/> <optional> <objectSetField name="Two" class="asnx:ABSTRACT-SYNTAX"/> </optional> <optional> <objectSetField name="Three" 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 Thetranslation ofan Objectanother ParameterizedValueSetType to which it is equivalent. Aside: ASN.1 does not permit thetranslationother kinds ofeither a DefinedObject, an ObjectDefn, an ObjectFromObject or a ParameterizedObject.parameterized reference to be recursive. The translation of aParameterizedObjectDummyReference, a ParameterizedType that isdescribed in Section 5.9. 10.1. DefinedObject Translation Ifnot recursively contained, aDefinedObjectParameterizedValue, a ParameterizedValueSetType that isan objectreference (notnot recursively contained, aDummyReference)