view Side-By-Side changes
INTERNET-DRAFT S. Leggdraft-legg-xed-asd-02.txt Adacel Technologiesdraft-legg-xed-asd-03.txt eB2Bcom Intended Category: Standards Track D. PragerDeakin University June 17, 2004April 11, 2005 ASN.1 Schema: An XML Representation forASN.1Abstract Syntax Notation One (ASN.1) Specifications Copyright (C) The Internet Society(2004). All Rights Reserved.(2005). Status of this MemoThis documentBy submitting this Internet-draft, each author represents that any applicable patent or other IPR claims of which he or she isan Internet-Draftaware have been or will be disclosed, andisany of which he or she becomes aware will be disclosed, infull conformanceaccordance withallSection 6 of BCP 79. By submitting this Internet-draft, I accept the provisions of Section103 ofRFC2026.BCP 78. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress". The list of current Internet-Drafts can be accessed athttp://www.ietf.org/ietf/1id-abstracts.txthttp://www.ietf.org/1id-abstracts.html The list of Internet-Draft Shadow Directories can be accessed athttp://www.ietf.org/shadow.html. Distribution of this document is unlimited.http://www.ietf.org/shadow.html Technical discussion of this document should take place on the XED developers mailing list<xeddev@adacel.com>.<xeddev@eb2bcom.com>. Please send editorial comments directly to the editor<steven.legg@adacel.com.au>.<steven.legg@eb2bcom.com>. Further information is available on the XED website: www.xmled.info. This Internet-Draft expires on17 December 2004.11 October 2005. Abstract This document defines a semantically equivalent Extensible Markup Legg & Prager Expires 11 October 2005 [Page 1] INTERNET-DRAFT ASN.1 Schema April 11, 2005 Language (XML) representation for Abstract Syntax Notation OneASN.1(ASN.1) specifications called ASN.1 Schema. ASN.1 Schema completely avoids the numerous ambiguities inherent in the ASN.1 language, therefore ASN.1 Schema documents are much easier to parse and manage thanLegg & Prager Expires 17 December 2004 [Page 1] INTERNET-DRAFT ASN.1 Schema June 17, 2004original ASN.1 specifications. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . .34 2. Conventions. . . . . . . . . . . . . . . . . . . . . . . . . .45 3. General Considerations . . . . . . . . . . . . . . . . . . . . 5 4. ModuleDefinition Translation . . . . . . . . . . . . . . . . .56 5. Translation of Assignments . . . . . . . . . . . . . . . . . .78 5.1. Referencing Named Constructs . . . . . . . . . . . . . .78 5.2. Importing Namespaces . . . . . . . . . . . . . . . . . .89 5.3. TypeAssignment Translation . . . . . . . . . . . . . . .910 5.4. ValueAssignment and XMLValueAssignment Translation . . .910 5.5. ValueSetTypeAssignment Translation . . . . . . . . . . .911 5.6. ObjectClassAssignment Translation. . . . . . . . . . . .1011 5.7. ObjectAssignment Translation . . . . . . . . . . . . . .1012 5.8. ObjectSetAssignment Translation. . . . . . . . . . . . .1112 5.9. Parameterized Assignments. . . . . . . . . . . . . . . .1113 6. Translation of Types . . . . . . . . . . . . . . . . . . . . .1213 6.1. Identifier Replacement . . . . . . . . . . . . . . . . . 14 6.2. DefinedType Translation. . . . . . . . . . . . . . . . .12 6.2.14 6.3. Translation of Predefined Types. . . . . . . . . . . . .13 6.3.20 6.4. BitStringType Translation. . . . . . . . . . . . . . . .15 6.4.22 6.5. IntegerType Translation. . . . . . . . . . . . . . . . .16 6.5.23 6.6. EnumeratedType Translation . . . . . . . . . . . . . . .16 6.6. TaggedType24 6.7. PrefixedType Translation . . . . . . . . . . . . . . . . 25 6.7.1. TaggedType Translation . . .17 6.7.. . . . . . . . . . 27 6.8. SelectionType Translation . . . . . . . . . . . . . . .18 6.8.28 6.9. InstanceOfType Translation . . . . . . . . . . . . . . .18 6.9.29 6.10. ObjectClassFieldType Translation . . . . . . . . . . . .19 6.10.29 6.11. TypeFromObject and ValueSetFromObjects Translation . . .19 6.11.30 6.12. Translation of Combining Types . . . . . . . . . . . . .20 6.11.1.30 6.12.1. NamedType Translation . . . . . . . . . . . . .20 6.11.2.30 6.12.2. SequenceType Translation. . . . . . . . . . . .20 6.11.3.33 6.12.3. SetType Translation . . . . . . . . . . . . . .22 6.11.4.35 6.12.4. ChoiceType Translation. . . . . . . . . . . . .22 6.11.5.35 6.12.5. Translation ofChoiceOfStringsUNION Types. . . . . .23 6.11.6.. . . . . 36 6.12.6. SequenceOfType Translation. . . . . . . . . . .24 6.11.7. SetOfType37 6.12.7. Translation of LIST Types . . . . . . . . . . .. . 25 6.12.38 6.12.8. SetOfType Translationof Constrained Types. . . . . . . . . . . .25 6.12.1.. 38 6.13. Translation ofAnyType.Constrained Types . . . . . . . . . . . .27 6.12.2.38 6.13.1. Constraint Translation. . . . . . . . . . . . .31 6.12.3.40 6.13.2. UserDefinedConstraint Translation . . . . . . .31 6.12.4.40 6.13.3. TableConstraint Translation . . . . . . . . . .32 6.12.5.41 Legg & Prager Expires 11 October 2005 [Page 2] INTERNET-DRAFT ASN.1 Schema April 11, 2005 6.13.4. ContentsConstraint Translation. . . . . . . . .32 6.12.6.43 6.13.5. ExceptionSpec Translation . . . . . . . . . . .33 7. Translation of Values. .43 6.14. Tag Defaults and Extension Defaults. . . . . . . . . . . 44 7. Translation of Values. . . . . . . . . .34 7.1. DefinedValue Translation. . . . . . . . . . . 45 7.1. Translation of Literal Values. . . . . . . . .34. . . . . 47 7.2.BuiltinValueTranslation of Meta-values . . . . . . . . . . . . . . . 48 7.2.1. DefinedValue Translation .35 7.3. ValueFromObject Translation.. . . . . . . . . . . 48 7.2.2. BuiltinValue Translation . . .36 Legg & Prager Expires 17 December 2004 [Page 2] INTERNET-DRAFT ASN.1 Schema June 17, 2004 7.4. ObjectClassFieldValue. . . . . . . . . 50 7.2.3. ValueFromObject Translation. . . . . . . . . . . 52 7.2.4. ObjectClassFieldValue Translation. . .36. . . . . 53 8. Translation of Value Sets. . . . . . . . . . . . . . . . . . .3653 8.1. ElementSetSpecs Translation. . . . . . . . . . . . . . .3754 8.2. ElementSetSpec Translation . . . . . . . . . . . . . . .3754 8.3. SubtypeElements Translation. . . . . . . . . . . . . . .3855 8.3.1. ValueRange Translation . . . . . . . . . . . . .3956 8.3.2. InnerTypeConstraints Translation . . . . . . . .4057 9. Translation of Object Classes. . . . . . . . . . . . . . . . .4158 9.1. DefinedObjectClass Translation . . . . . . . . . . . . .4159 9.2. ObjectClassDefn Translation. . . . . . . . . . . . . . .4260 9.2.1. TypeFieldSpec Translation. . . . . . . . . . . .4260 9.2.2. FixedTypeValueFieldSpec Translation. . . . . . .4361 9.2.3. FixedTypeValueSetFieldSpec Translation . . . . .4462 9.2.4. VariableTypeValueFieldSpec Translation . . . . .4563 9.2.5. VariableTypeValueSetFieldSpec Translation. . . .4664 9.2.6. FieldName Translation. . . . . . . . . . . . . .4865 9.2.7. ObjectFieldSpec Translation. . . . . . . . . . .4866 9.2.8. ObjectSetFieldSpec Translation . . . . . . . . .4967 10. Translation of Objects . . . . . . . . . . . . . . . . . . . .5068 10.1. DefinedObject Translation . . . . . . . . . . . . . . .5168 10.2. ObjectDefn Translation. . . . . . . . . . . . . . . . .5169 10.3. ObjectFromObject Translation. . . . . . . . . . . . . .5371 11. Translation of Object Sets . . . . . . . . . . . . . . . . . .5371 11.1. DefinedObjectSet Translation. . . . . . . . . . . . . .5472 11.2. ObjectSetElements Translation . . . . . . . . . . . . .5473 11.2.1. ObjectSetFromObjects Translation . . . . . . .5573 12. Translation of Information From Objects. . . . . . . . . . . .5574 13. EncodingControlSection Translation . . . . . . . . . . . . . . 74 14. Security Considerations. . . . . . . . . . . . . . . . . . . .56 14.75 15. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . .5675 16. IANA Considerations. . . . . . . . . . . . . . . . . . . . . . 75 Appendix A. ASN.1 for ASN.1 Schema . . . . . . . . . . . . . . . .5676 Appendix B. ASN.1 Schema for ASN.1 Schema. . . . . . . . . . . . .7293 Appendix C. An XML Schema for ASN.1 Schema . . . . . . . . . . ..118.134 Normative References . . . . . . . . . . . . . . . . . . . . . ..118.134 Informative Reference . . . . . . . . . . . . . . . . . . . . ..119.136 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . ..120.136 Full Copyright Statement . . . . . . . . . . . . . . . . . . . ..120.136 Legg & Prager Expires 11 October 2005 [Page 3] INTERNET-DRAFT ASN.1 Schema April 11, 2005 1. Introduction A full parser for the Abstract Syntax Notation One (ASN.1) language[X680][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 orSimpleTableConstraint, anSimpleTableConstraint. An ObjectClassAssignment, ObjectAssignment or ObjectSetAssignment resembles respectively a TypeAssignment, ValueAssignment orValueSetTypeAssignment, aValueSetTypeAssignment. A FixedTypeValueFieldSpec or FixedTypeValueSetFieldSpec resembles respectively an ObjectFieldSpecLegg & Prager Expires 17 December 2004 [Page 3] INTERNET-DRAFT ASN.1 Schema June 17, 2004or ObjectSetFieldSpec, and an ObjectClassFieldType resemblesanInformationFromObjects. In general such ambiguities can only be resolved once the entire specification has been parsed. The difficulty of parsing ASN.1 is an impediment to its wider adoption. This document defines a semantically equivalent Extensible Markup Language (XML) [XML] representation for ASN.1 specifications called ASN.1 Schema. ASN.1 Schema completely avoids the inherent ambiguities of the ASN.1 language, therefore ASN.1 Schema documents are much easier to parse and manage than original ASN.1 specifications. For example, any conformant XML processor forms the basis of an ASN.1 toolkit. An ASN.1 Schema document is a well-formed and valid XML document [XML] conforming to XML namespaces [XMLNS]. ASN.1 Schema, together with the Robust XML Encoding Rules (RXER) [RXER], constitutes a schema language for XML documents that automatically provides more compact binary encodings for XML instance documents conforming to ASN.1 Schema. ASN.1 Schema definitions can also incorporate type definitions from XML Schema [XSD1], RELAX NG [RNG] or Document Type Definitions (DTDs) [XML]. ASN.1 Schema is defined in terms of rules for translating from an ASN.1 specification. Thisspecification for translating ASN.1 specifications intodoes not preclude an ASN.1 Schemacaters for recursivedocument being written directly without a pre-existing ASN.1definitionsspecification, however such an ASN.1 Schema document is considered valid if andcaters for parameterized definitions, but does not allow for recursive parameterized definitions. Recursive parameterized definitions will be coveredonly if there exists ina revision of thisprinciple an ASN.1 specification which when translated would yield the ASN.1 Schema document. Theeffect offormat for ASN.1encoding instructions onSchema has also been designed so that thetranslationcontent of an ASN.1specification will be covered in a revision of this document. 2. Conventions The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", and "MAY" in thisSchema documentareconforms tobethe 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.1 Schema document using an RXER decoder and then re-encode the abstract value (for storage or transmission) using any of the other encoding rules for ASN.1. Legg & Prager Expires 11 October 2005 [Page 4] INTERNET-DRAFT ASN.1 Schema April 11, 2005 The ASN.1 Schema translation of the ASN.1 module in Appendix A is presented in Appendix B. 2. Conventions The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", and "MAY" in this document are to be interpreted as described in, BCP 14, RFC 2119 [BCP14]. The key word "OPTIONAL" is exclusively used with its ASN.1 meaning. Throughout this document "type" shall be taken to mean an ASN.1 type, and "value" shall be taken to mean an ASN.1 abstract value. A reference to an ASN.1 production[X680][X.680] (e.g., Type, NamedType) is a reference to the text in an ASN.1 specification corresponding to that production.Legg & Prager Expires 17 December 2004 [Page 4] INTERNET-DRAFT ASN.1 Schema June 17, 2004The description of the translation of an ASN.1 specification into ASN.1 Schema makes use of definitions from the XML Information Set (Infoset) [ISET]. In particular, information item property names are presented per the Infoset, e.g., [local name]. In the sections that follow, the term "element" shall be taken to mean an Infoset element information item and "attribute" shall be taken to mean an Infoset attribute information item. The [namespace name] of any element or attribute generated by the translation from an ASN.1 specification has no value unless specified otherwise. This document uses the namespace prefix "asn1:" to stand for the namespace name"http://xmled.info/ns/ASN.1" and uses the namespace prefix "xsi:" to stand for the namespace name "http://www.w3.org/2001/XMLSchema-instance","http://xmled.info/ns/ASN.1", though in practice any valid namespace prefix is permitted in ASN.1 Schema. 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. 3. General Considerations Apart from the [document element] of an ASN.1 Schema document information item, the translation of some ASN.1 construct belongs to the content of an enclosing element. Where the translation of the construct is an element, it is appended to the [children] of the enclosing element. Elements MUST be appended to the [children] of the enclosing element in the order described. Translators MAY addwhitespacewhite space character information items (i.e., U+0020, U+0009, U+000D and U+000A) to the [children] of the enclosing element to improve the Legg & Prager Expires 11 October 2005 [Page 5] INTERNET-DRAFT ASN.1 Schema April 11, 2005 layout. Where the translation of the construct is an attribute it is added to the [attributes] of the enclosing element. The order of attributes is not significant. An ASN.1 Schema document is permitted to contain XML comments, processing instructions (PIs), CDATA sections, character references and parsed entity references in any position allowed for a well- formed and valid XML document [XML]. However, note that an ASN.1 Schema definition may be transferred as data in a protocol and that some protocols disallow processing instructions and entity references. Any element in an ASN.1 Schema document is permitted to have namespace declaration attributes [XMLNS]. Namespace declarations for the namespace prefixes used in the translation of an ASN.1 module into an ASN.1 Schema document are REQUIRED. 4. ModuleDefinition Translation The translation of a ModuleDefinition[X680][X.680] (an ASN.1 module) is a document information item. The [document element] of the documentLegg & Prager Expires 17 December 2004 [Page 5] INTERNET-DRAFT ASN.1 Schema June 17, 2004information item is an element with the [local name] "schema" and the [namespace name] "http://xmled.info/ns/ASN.1". An ASN.1 module has anamespace nameschema identity URI if it has a SCHEMA-IDENTITY encoding instruction, in which case thespecification definingschema identity URI is themodule explicitly nominates a namespace name forcharacter string specified by themodule, or if a namespace name has been registered [XEDNS] forAnyURIValue of themodule.SCHEMA-IDENTITY encoding instruction. If the ASN.1 module being translated has anamespace nameschema identity URI then an attribute with the [local name]"targetNamespace""schemaIdentity" SHALL be added to the [attributes] of the [document element] (i.e., the <asn1:schema> element). The [normalized value] of this attribute is thenamespace nameschema identity URI of the module.In examplesAn ASN.1 module has a target namespace if it has a TARGET-NAMESPACE encoding instruction, in which case thefollowing sections thetarget namespaceprefix "tns:"isused to stand forthenamespace namecharacter string specified by the AnyURIValue of the TARGET-NAMESPACE encoding instruction. If the ASN.1 module being translated has a target namespace then an attribute with the [local name] "targetNamespace" SHALL be added to the [attributes] of the [document element] (i.e., the <asn1:schema> element). The [normalized value] of this attribute is the target namespace of the module. In examples in the following sections the namespace prefix "tns:" is used to stand for the target namespace of the module being Legg & Prager Expires 11 October 2005 [Page 6] INTERNET-DRAFT ASN.1 Schema April 11, 2005 translated. An attribute with the [local name] "name"MAYSHALL be added to the [attributes] of the [document element]. The [normalized value] of this attribute is the modulereference in the ModuleIdentifier in the ModuleDefinition. If the DefinitiveIdentifier in the ModuleIdentifier in the ModuleDefinition is not empty then an attribute with the [local name] "identifier"MAYSHALL be added to the [attributes] of the [document element]. The [normalized value] of this attribute is the RXER [RXER] encoding of the DefinitiveIdentifier. If the TagDefault in the ModuleDefinition is empty then an attribute with the [local name] "tagDefault" and [normalized value] "EXPLICIT" SHALL be added to the [attributes] of the [documentelement] (i.e., <asn1:schema> element).element]. If the TagDefault in the ModuleDefinition is not empty and the first keyword in the TagDefault is not "AUTOMATIC" then an attribute with the [local name] "tagDefault" SHALL be added to the [attributes] of the [document element]. The [normalized value] of this attribute is the first keyword in the TagDefault, 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 with the [local name] "tagDefault" and [normalized value] "AUTOMATIC" MAY be added to the [attributes] of the [document element]. If the ExtensionDefault in the ModuleDefinition is not empty then an attribute with the [local name] "extensibilityImplied" and [normalized value] "true" or "1" SHALL be added to the [attributes] of the [document element].Legg & Prager Expires 17 December 2004 [Page 6] INTERNET-DRAFT ASN.1 Schema June 17, 2004If the ExtensionDefault in the ModuleDefinition is empty then an attribute with the [local name] "extensibilityImplied" and [normalized value] "false" or "0" MAY be added to the [attributes] of the [document element]. The translation of each Assignment in the AssignmentList in the ModuleBody in the ModuleDefinition of the module being translatedisSHALL be appended to the [children] of the [document element]. If the EncodingControlSections in the ModuleDefinition contains an EncodingControlSection for RXER then the translation of each NamedType in a TopLevelComponent [RXEREI] in a TopLevelComponents in the EncodingInstructionAssignmentList SHALL be added to the [children] of the [document element]. The relative order of the top level components SHOULD be preserved in the translation, however the Legg & Prager Expires 11 October 2005 [Page 7] INTERNET-DRAFT ASN.1 Schema April 11, 2005 top level components MAY be interspersed with the translations of the assignments in the AssignmentList. The translation of each EncodingControlSection in the EncodingControlSections in the ModuleDefinition of the module being translated SHALL be appended to the [children] of the [document element]. Example MyModule DEFINITIONS IMPLICIT TAGS EXTENSIBILITY IMPLIED ::= BEGIN MyType ::= INTEGER ENCODING-CONTROL RXER SCHEMA-IDENTITY "http://example.com/id/MyModule" TARGET-NAMESPACE "http://example.com/ns/MyModule" COMPONENT myElement INTEGER END <asn1:schema xmlns:asn1="http://xmled.info/ns/ASN.1" name="MyModule" schemaIdentity="http://example.com/id/MyModule" targetNamespace="http://example.com/ns/MyModule" tagDefault="IMPLICIT" extensibilityImplied="true"> <namedType name="MyType" type="asn1:INTEGER"/> <element name="myElement" type="asn1:INTEGER"/> </asn1:schema> 5. Translation of Assignments 5.1. Referencing Named Constructs An Assignment in ASN.1 associates a reference name with a Type, Value, ValueSet, ObjectClass, Object or ObjectSet. In ASN.1 Schema, the translation of the Assignment is regarded as associating a qualified name [XMLNS] with the Type, Value, ValueSet, ObjectClass, Object or ObjectSet. ASN.1 Schema uses these qualified names in Legg & Prager Expires 11 October 2005 [Page 8] INTERNET-DRAFT ASN.1 Schema April 11, 2005 place of the references in an ASN.1 specification. In every case, the local part of the qualified name is the typereference, valuereference, objectclassreference, objectreference or objectsetreference in the Assignment (i.e., the [normalized value] of the name attribute in the translation of the Assignment). If the ASN.1 module in which the Assignment is defined has a target namespacenamethen this SHALL be the namespace name of the qualified name.Note that the namespace name is the same as the value of the targetNamespace attribute. Legg & Prager Expires 17 December 2004 [Page 7] INTERNET-DRAFT ASN.1 Schema June 17, 2004If the ASN.1 module in which the Assignment is defined does not have a target namespacenamethen the namespace name of the qualified name is absent (i.e., the name isunqualified), except if the module is the SchemaLanguageIntegration module [GLUE] in which case the namespace name of the qualified name SHALL be "http://xmled.info/ns/ASN.1".unqualified). If an ASN.1 specification contains two or more modules withoutnamespace namestarget namespaces then there exists the possibility of two or more distinct assignments in separate modules associated with the same ASN.1 Schema name. An unambiguous translation to ASN.1 Schema does not exist in such acase. For this reason it is RECOMMENDED thatcase unless each of the modulesin ASN.1 specificationshas a SCHEMA-IDENTITY encoding instruction. Consequently, if two or more modules without target namespaces are being translated into ASN.1 Schemaalland the effective names of the top level NamedType instances [RXEREI] in those modules are not distinct (across those modules) or the defined type, object class, value, object and object set references are not distinct across those modules then, as a local action prior to the translation, a SCHEMA-IDENTITY encoding instruction MUST be added to each of the modules which does not already have a SCHEMA-IDENTITY encoding instruction. The character string (a URI) specifiedor registered namespace name.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]. TARGET-NAMESPACE and SCHEMA-IDENTITY encoding instructions are RECOMMENDED for every ASN.1 module. 5.2. Importing Namespaces An element with the [local name] "import" is added to the [children] of the [document element] for each external module, except the AdditionalBasicDefinitions module [RXER], containing Assignments that are referenced from the definitions in the ASN.1 Schema document.If the external module has a namespace name then an attribute with the [local name] "namespace" SHALL be added to the [attributes] of the <import> element. The [normalized value] of this attribute is the namespace name of the external module.An attribute with the [local name] "name"MAYSHOULD be added to the [attributes] of the <import> element. The [normalized value] of this attribute is the modulereference in the ModuleIdentifier in the ModuleDefinition of the external module. If the DefinitiveIdentifier in the ModuleIdentifier in the Legg & Prager Expires 11 October 2005 [Page 9] INTERNET-DRAFT ASN.1 Schema April 11, 2005 ModuleDefinition of the external module is not empty then an attribute with the [local name] "identifier"MAYSHOULD be added to the [attributes] of the <import> element. The [normalized value] of this attribute is the RXER encoding of the DefinitiveIdentifier. If the external module has a schema identity URI then an attribute with the [local name] "schemaIdentity" SHALL be added to the [attributes] of the <import> element. The [normalized value] of this attribute is the schema identity URI of the external module. If the external module has a target namespace then an attribute with the [local name] "namespace" SHALL be added to the [attributes] of the <import> element. The [normalized value] of this attribute is the target namespace of the external module. An attribute with the [local name] "schemaLocation" MAY be added to the [attributes] of the <import> element. The [normalized value] of this attribute is a URI [URI] indicating the physical location of the ASN.1 Schema translation of the external module. The <import> elements MUSTbe beforeprecede any other elements in the [children] of the [document element].Legg & Prager Expires 17 December 2004 [Page 8] INTERNET-DRAFT ASN.1 Schema June 17, 2004Note that because of the way parameterized references are expanded in ASN.1 Schema, the modules in the Imports of the ModuleDefinition may not correspond exactly to the <import> elements. 5.3. TypeAssignment Translation The translation of a TypeAssignment is an element with the [local name] "namedType". An attribute with the [local name] "name"isSHALL be added to the [attributes] of the <namedType> element. The [normalized value] of this attribute is the typereference on the left hand side of the assignment. The content of the <namedType> element is the translation of the Type on the right hand side of the assignment. Example MyType ::= INTEGER <namedType name="MyType" type="asn1:INTEGER"/> 5.4. ValueAssignment and XMLValueAssignment Translation The translation of a ValueAssignment is an element with the [local name] "namedValue". An attribute with the [local name] "name"isSHALL be added to the [attributes] of the <namedValue> element. The Legg & Prager Expires 11 October 2005 [Page 10] INTERNET-DRAFT ASN.1 Schema April 11, 2005 [normalized value] of this attribute is the valuereference on the left hand side of the assignment. The content of the <namedValue> element is the translation of the Type on the left hand side of the assignment followed by the translation of the Value on the right hand side of the assignment. An XMLValueAssignment is converted into the equivalent ValueAssignment and then translated as a ValueAssignment. Note that the ASN.1 Schema representation for a Value is unrelated to XMLTypedValue. Example myValue INTEGER ::= 10 <namedValue name="myValue" type="asn1:INTEGER" literal="10"/> 5.5. ValueSetTypeAssignment Translation The translation of a ValueSetTypeAssignment is an element with the [local name] "namedValueSet". An attribute with the [local name] "name"isSHALL be added to the [attributes] of the <namedValueSet> element. The [normalized value] of this attribute is the typereference on theLegg & Prager Expires 17 December 2004 [Page 9] INTERNET-DRAFT ASN.1 Schema June 17, 2004left hand side of the assignment. The content of the <namedValueSet> element is the translation of the Type on the left hand side of the assignment followed by the translation of the ValueSet on the right hand side of the assignment. Example MyValueSet INTEGER ::= { 10 } <namedValueSet name="MyValueSet" type="asn1:INTEGER"> <valueSet> <value>10</value> </valueSet> </namedValueSet> 5.6. ObjectClassAssignment Translation The translation of an ObjectClassAssignment is an element with the [local name] "namedClass". An attribute with the [local name] "name"isSHALL be added to the [attributes] of the <namedClass> element. The [normalized value] of this attribute is the objectclassreference on the left hand side of the assignment. The content of the <namedClass> element is the translation of the ObjectClass on the right hand side of the assignment. Legg & Prager Expires 11 October 2005 [Page 11] INTERNET-DRAFT ASN.1 Schema April 11, 2005 Example MY-CLASS ::= TYPE-IDENTIFIER <namedClass name="MY-CLASS" class="asn1:TYPE-IDENTIFIER"/> 5.7. ObjectAssignment Translation The translation of an ObjectAssignment is an element with the [local name] "namedObject". An attribute with the [local name] "name"isSHALL be added to the [attributes] of the <namedObject> element. The [normalized value] of this attribute is the objectreference on the left hand side of the assignment. The content of the <namedObject> element is the translation of the DefinedObjectClass on the left hand side of the assignment followed by the translation of the Object on the right hand side of the assignment. Example myObject TYPE-IDENTIFIER ::= { INTEGER IDENTIFIED BY { 2 5 13 14 } } <namedObject name="myObject" class="asn1:TYPE-IDENTIFIER">Legg & Prager Expires 17 December 2004 [Page 10] INTERNET-DRAFT ASN.1 Schema June 17, 2004<object><id<field name="id" literal="2.5.13.14"/><Type<field name="Type" type="asn1:INTEGER/> </object> </namedObject> 5.8. ObjectSetAssignment Translation The translation of an ObjectSetAssignment is an element with the [local name] "namedObjectSet". An attribute with the [local name] "name"isSHALL be added to the [attributes] of the <namedObjectSet> element. The [normalized value] of this attribute is the objectsetreference on the left hand side of the assignment. The content of the <namedObjectSet> element is the translation of the DefinedObjectClass on the left hand side of the assignment followed by the translation of the ObjectSet on the right hand side of the assignment. Example MyObjectSet TYPE-IDENTIFIER ::= { myObject } <namedObjectSet name="MyObjectSet" class="asn1:TYPE-IDENTIFIER"> <objectSet> Legg & Prager Expires 11 October 2005 [Page 12] INTERNET-DRAFT ASN.1 Schema April 11, 2005 <object ref="tns:myObject"/> </objectSet> </namedObjectSet> 5.9. Parameterized Assignments The translation of an ASN.1 specification into ASN.1 Schema replacesany Dummyreferenceinstances of DummyReference [X.683] or references to parameterized definitions [X.683] with the definition expandedin-line.in-line (except for a special case involving recursive parameterized types). For example, aParameterizedTypeParameterizedObject is replaced by theTypeObject on the right hand side of the referencedParameterizedTypeAssignment. ThusParameterizedObjectAssignment. Consequently there is no direct translation for a ParameterizedAssignment, though its definition may come into play in the translation of references to the parameterized definition. The definition that substitutes for a DummyReference or parameterized reference (e.g., theTypeObject that substitutes for aParameterizedType)ParameterizedObject) is potentially in a different module scope to the parameterized reference.Given that an empty TagDefault is equivalent toExpanding aTagDefault of "EXPLICIT", if the TagDefault of the module of the substitute definition (a Type, ObjectClass, ObjectDummyReference orObjectSet) is not the same as the TagDefault of the module of theparameterized referenceand the translation ofin-line puts the substitute definitionis an element then an attribute with the [local name] "tagDefault" is added to that Legg & Prager Expires 17 December 2004 [Page 11] INTERNET-DRAFT ASN.1 Schema June 17, 2004 element. If the TagDefault ofinto the module scope of thesubstitute definition is empty then the [normalized value] of the attribute is "EXPLICIT", otherwise the [normalized value] of the attribute is the first keyword in the TagDefault ofparameterized reference, which could therefore alter themoduleinterpretation of the substitute definition.If the ExtensionDefault ofHowever, only type definitions have dependencies on the module scope. Other kinds ofthe substitutedefinitions are not affected. A type definition isnot empty anddependent on the TagDefault and ExtensionDefault of themodule of the parameterized reference is emptymodule, andthe translation of the substitute definition is an element thenmay also be affected by encoding instructions in anattribute with the [local name] "extensibilityImplied" and [normalized value] "true" or "1" isXML Encoding Rules (XER) encoding control section [X.693-1]. Section 6.14 describes attributes that are added tothat element. If the ExtensionDefault ofthemoduletranslation ofthe substitutea type definitionis empty and the ExtensionDefault ofto override the moduleof the parameterized reference is not emptydefaults and ensure thetranslation of the substitute definition is an element then an attributeappropriate interpretation withthe [local name] "extensibilityImplied"respect to tagging and[normalized value] "false" or "0" is added to that element.extensibility. Thecases where the addition ofsolution with respect to XER encoding instructions is described by thetagDefault and extensibilityImplied attributes may applyprocedure for translating XER encoding instructions into ASN.1 Schema [XEREIT]. ASIDE: Type definitions arecalled out in the description of the translation of each kind of definition.not dependent on their module's RXER or Generic String Encoding Rules (GSER) [GSER] encoding control section [GSEREI]. 6. Translation of Types The rules for translating the different varieties of Type are detailed in this section. Note that the notation of ASN.1 is ambiguous where a Type is bothtaggedprefixed [X.680-1] (e.g., tagged) and constrained. For example, the notation "[0] INTEGER (0..10)" could be interpreted either as a Legg & Prager Expires 11 October 2005 [Page 13] INTERNET-DRAFT ASN.1 Schema April 11, 2005 tagged ConstrainedType or a constrained TaggedType. For the purposes of the translation into ASN.1 Schema the constraint is assumed to have higher precedence than thetagging,prefix, so the above notation would be taken to be a tagged ConstrainedType. 6.1. Identifier Replacement Various RXER encoding instructions can be used to override an identifier in an ASN.1 specification with an NCName [XMLNS]. The NCName is given pre-eminence in the ASN.1 Schema representation and the identifier is not explicitly given if it is algorithmically related to the NCName. The cases where an NCName overrides an identifier are covered individually in other parts of this specification and make use of the following definition. Definition: The reduction of an NCName 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 characters with a single hyphen, and (5) convert the first character to lowercase if it is an uppercase letter. ASIDE: If the reduction of an NCName is not the same as the identifier the NCName replaces then the identifier will be explicitly given in the translation into ASN.1 Schema. 6.2. DefinedType Translation If a Type is a DefinedType in a ReferencedType then the translation of the Type is the translation of the DefinedType. If a DefinedType is not atypereference (not a DummyReference)ParameterizedType, ParameterizedValueSetType oran ExternalTypeReference (which contains a typereference)DummyReference andthe typereferenceisAnyType from the SchemaLanguageIntegration module [GLUE]not subject to a TYPE-REF or REF-AS-TYPE encoding instruction then the translation of the DefinedType is either the attribute form translation ofan anytypea type reference, or the element form translation ofan anytype reference (Section 6.12.1).a type reference. Legg & Prager Expires17 December 200411 October 2005 [Page12]14] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 IfApril 11, 2005 The attribute form translation of aDefinedType is a typereference (not a DummyReference) or an ExternalTypeReference, and the typereference is not AnyType then the translation of the DefinedType is either the attribute form translation of a type reference, or the element form translation of a type reference. The attribute form translation of a type referencetype reference is an attribute with the [local name] "type". The [normalized value] of this attribute is the qualified name referencing the type definition (see Section 5.1). The attribute form translation SHALL NOT be used if the qualified name is shared by two or more type definitions in separate modules, i.e., is ambiguous. The element form translation of a type reference is an element with the [local name] "type". An attribute with the [local name] "ref"isSHALL be added to the [attributes] of the <type> element. The [normalized value] of this attribute is the qualified name referencing the type definition. If the qualified name is shared by two or more type definitions in separate modules then an attribute with the [local name] "context" SHALL be added to the [attributes] of the <type> element. The [normalized value] of this attribute is the character string value of the AnyURIValue of the SCHEMA-IDENTITY encoding instruction for the module containing the type definition referenced by the DefinedType. ASIDE: A SCHEMA-IDENTITY encoding instruction is obligatory in such cases (see Section 5.1). The translation of the DefinedType is the same whether the type definition is referenced by a typereference or an ExternalTypeReference.Usually the translatorIf a DefinedType isfreesubject tochoosea TYPE-REF encoding instruction then the translation of the DefinedType is either the attribute form translation of a foreign type reference, or the element form translationforof a foreign typereference, however in some contexts attribute forms of Type are explicitly disallowed.reference. Ifa DefinedTypethe RefParameters in the TYPE-REF encoding instruction isa ParameterizedTypenot empty then the attribute form of a foreign type reference cannot be used. The attribute form translation ofthe Typea foreign type reference is an attribute with thetranslation[local name] "type". The [normalized value] of this attribute is theType on the right hand sideRXER encoding of thereferenced ParameterizedTypeAssignment. If a DefinedType is a ParameterizedValueSetType thenQNameValue from the TYPE-REF encoding instruction. The element form translation ofthe Typea foreign type reference is an element with thetranslation of the constrained Type on the right hand side of[local name] "type". An attribute with thenotional ParameterizedTypeAssignment equivalent[local name] "ref" SHALL be added to thereferenced ParameterizedValueSetTypeAssignment (see Clause 15.8[attributes] ofX.680 [X680]). If a DefinedType is a DummyReference thenthetranslation<type> element. The [normalized value] ofthe Typethis attribute is thetranslationRXER encoding of theType inQNameValue from theActualParameter corresponding toTYPE-REF encoding instruction. If theDummyReference. The Type that substitutes for a ParameterizedType, ParameterizedValueSetType or DummyReferenceContextParameter ispotentiallypresent ina different module scope tothesurrounding translation, thereforeRefParameters in thetranslation ofTYPE-REF encoding instruction then an attribute with theType may require a tagDefault or extensibilityImplied attribute, according[local name] "context" SHALL be added to theprovisions[attributes] ofSection 5.9. 6.2. Translationthe <type> element. The [normalized value] ofPredefined Typesthis attribute is the string value of the AnyURIValue in the ContextParameter. If the Legg & Prager Expires17 December 200411 October 2005 [Page13]15] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 If a Type comprises one ofApril 11, 2005 CanonicalizationParameter is present in theproductionsRefParameters inTable 1the TYPE-REF encoding instruction then an attribute with thetranslation[local name] "canonicalization" SHALL be added to the [attributes] of theType<type> element. The [normalized value] of this attribute is the string value of the AnyURIValue in the CanonicalizationParameter. Usually the translator is free to choose either the attribute form or element form translationof that type. Thefor a type reference or foreign type reference, however in some contexts attributeform translationforms ofaTypecomprising oneare explicitly disallowed. If a DefinedType is subject to a REF-AS-TYPE encoding instruction then the translation of theproductions in Table 1DefinedType is anattributeelement with the [local name] "type". An attribute with the [local name] "elementType" SHALL be added to the [attributes] of the <type> element. The [normalized value] of this attribute isa qualified name withthenamespace name "http://xmled.info/ns/ASN.1" andRXER encoding of thelocal part as indicatedNameValue from the REF-AS-TYPE encoding instruction. If the ContextParameter is present inTable 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 | +----------------------------------+-------------------+ | RestrictedCharacterStringType | | | BMPString | BMPString | | GeneralString | GeneralString | | GraphicString | GraphicString | | IA5String | IA5String | | ISO646String | ISO646String | | NumericString | NumericString | | PrintableString | PrintableString | | TeletexString | TeletexString | | T61String | T61String | | UniversalString | UniversalString | | UTF8String | UTF8String | | VideotexString | VideotexString | | VisibleString | VisibleString | +----------------------------------+-------------------+ | UnrestrictedCharacterStringType | CHARACTER-STRING | +----------------------------------+-------------------+ Legg & Prager Expires 17 December 2004 [Page 14] INTERNET-DRAFT ASN.1 Schema June 17, 2004 | UsefulType | | | GeneralizedTime | GeneralizedTime | | UTCTime | UTCTime | +----------------------------------+-------------------+ The element form translation of a Type comprising one oftheproductionsRefParameters inTable 1 is an element withthe[local name] "type". AnREF-AS-TYPE encoding instruction then an attribute with the [local name]"ref" is"context" SHALL be added to the [attributes] of the <type> element. The [normalized value] of this attribute isa qualified name withthenamespace name "http://xmled.info/ns/ASN.1" andstring value of thelocal part as indicatedAnyURIValue inTable 1. Example BOOLEAN <type ref="asn1:BOOLEAN"/> UsuallythetranslatorContextParameter. If the CanonicalizationParameter isfree to choose either the attribute form or element form translation for a Type, howeverpresent insome contexts attribute forms of Type are explicitly disallowed. 6.3. BitStringType Translation The translation of a BitStringType with a NamedBitList is an element with the [local name] "type". An element with the [local name] "namedBitList" is added to the [children] ofthe<type> element. The translation of each NamedBitRefParameters in theNamedBitList is appended to the [children] of the <namedBitList> element. The translation of a NamedBit isREF-AS-TYPE encoding instruction then anelement with the [local name] "namedBit". An attribute with the [local name] "name" is added to the [attributes] of the <namedBit> element. The [normalized value] of this attribute is the identifier of the NamedBit. Anattribute with the [local name]"bit" is also"canonicalization" SHALL be added to the [attributes] of the<namedBit><type> element. The [normalized value] of this attribute is the stringrepresentation of the integervalue of thenumber or DefinedValue ofAnyURIValue in theNamedBit.CanonicalizationParameter. ExampleBIT STRINGCHOICE {zero(0), one(1), two(2)one Foo, two [RXER:TYPE-REF { namespace-name "http://www.example.com/PO1", local-name "PurchaseOrderType" }<type> <namedBitList> <namedBit name="zero" bit="0"/> <namedBit] AnyType, three [RXER:REF-AS-TYPE "product" CONTEXT "http://www.example.com/inventory" ] AnyType } <type xmlns:po="http://www.example.com/PO1"> <choice> <element name="one"bit="1"/> <namedBittype="tns:Foo"/> <element name="two"bit="2"/>type="po:PurchaseOrderType"/> <element name="three"> <type elementType="product" context="http://www.example.com/inventory"/> Legg & Prager Expires17 December 200411 October 2005 [Page15]16] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 </namedBitList>April 11, 2005 </element> </choice> </type>6.4. IntegerType Translation The translation of an IntegerType withIf aNamedNumberListDefinedType isan element witha DummyReference then the[local name] "type". An element withtranslation of the[local name] "namedNumberList"Type isadded to the [children] ofthe<type> element. Thetranslation ofeach NamedNumberthe Type in theNamedNumberList is appendedActualParameter corresponding to the[children] of the <namedNumberList> element. The translation ofDummyReference. If aNamedNumberDefinedType isan element witha ParameterizedType then the[local name] "namedNumber". An attribute withtranslation of the[local name] "name"DefinedType isadded tothe[attributes]translation of the<namedNumber> element. The [normalized value]ParameterizedType. If a DefinedType is a ParameterizedValueSetType then the translation ofthis attributethe DefinedType is theidentifiertranslation of theNamedNumber. An attribute withParameterizedValueSetType. Definition: A ParameterizedType is recursively contained if its translation will be nested within the[local name] "number"translation of another ParameterizedType to which it isalso addedequivalent. A ParameterizedValueSetType is recursively contained if its translation will be nested within the translation of another ParameterizedValueSetType to which it is equivalent. If a ParameterizedType is not recursively contained then the[attributes]translation of the<namedNumber> element. The [normalized value]ParameterizedType is the translation ofthis attributethe Type on the right hand side of the referenced ParameterizedTypeAssignment. If a ParameterizedValueSetType is not recursively contained then thestring representationtranslation of theinteger valueParameterizedValueSetType is the translation of theSignedNumber or DefinedValueconstrained Type on the right hand side of theNamedNumber. Example 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> 6.5. EnumeratedType Translationnotional ParameterizedTypeAssignment equivalent to the referenced ParameterizedValueSetTypeAssignment (see Clause 15.8 of X.680 [X.680]). ASIDE: The Type that substitutes for a ParameterizedType, ParameterizedValueSetType or DummyReference is potentially in a different module scope to the surrounding translation, therefore the translation ofan EnumeratedTypethe Type may require a tagDefault or extensibilityImplied attribute, according to the provisions of Section 6.14. If a ParameterizedType or ParameterizedValueSetType is recursively contained then its translation is an element with the [local name] "type". Anelementattribute with the [local name]"enumerated" is"ancestor" SHALL be added to the[children][attributes] of the <type> element. Thetranslation[normalized value] ofeach EnumerationItem in the RootEnumerationthis attribute isappended to the [children] of the <enumerated> element. Iftheellipsis ("...") is present then an element withdecimal digit string representing the[local name] "extension" is appended tothe[children]integer value of one plus the<enumerated> element, and the translationnumber of intermediate enclosing <type> elements between theExceptionSpec (possibly empty) is added to<type> elements resulting from the[children]translations of the<extension> element. If an AdditionalEnumeration is present then the translationtwo equivalent instances ofeach EnumerationItem in the AdditionalEnumeration is appended toParameterizedType or Legg & Prager Expires17 December 200411 October 2005 [Page16]17] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 the [children] of the <extension> element. The translation ofApril 11, 2005 ParameterizedValueSetType. A <type> element with anEnumerationItemancestor attribute is a reference to an ancestor <type> element. This form for a <type> elementwith the [local name] "enumeration". If the EnumerationItemSHOULD NOT be used in original specifications written in ASN.1 Schema. ASIDE: The form isofonly intended for the"identifier" form thenpurpose of handling recursive parameterized type definitions in anattribute with the [local name] "name"ASN.1 specification being translated into ASN.1 Schema. Such definitions are self- referencing but have no obvious name. It isaddedalso not easy to construct a suitable name from the[attributes] of the <enumeration> element.surrounding context because recursive parameterized types can be embedded in other constructs, such as information objects, which are themselves unnamed. Example Consider these type definitions: Tree { ValueType } ::= SEQUENCE { value [0] ValueType, left-subtree [1] Tree { ValueType } OPTIONAL, right-subtree [2] Tree { ValueType } OPTIONAL } NumberTree ::= [APPLICATION 13] Tree { INTEGER } The[normalized value] of this attributeassignment for "Tree" is not directly translated because it is a ParameterizedAssignment. The translation for theidentifier. If"NumberTree" assignment, up to but not yet including theEnumerationItemType in the TaggedType, isofas follows: <namedType name="NumberTree"> <type> <tagged tagClass="APPLICATION" number="13"/> </type> </namedType> The Type in the"NamedNumber" form then an attribute withTaggedType is a ParameterizedType. Since the[local name] "name"ParameterizedType isadded tonot recursively contained the[attributes]translation of the<enumeration> element. The [normalized value] of this attributeParameterizedType is theidentifiertranslation of theNamedNumber. An attribute withType on the[local name] "number" is also added to the [attributes]right hand side of the<enumeration> element. The [normalized value] ofreferenced ParameterizedTypeAssignment, namely thisattribute is the string representation of the integertype: SEQUENCE { valueof the SignedNumber or DefinedValue of the NamedNumber. Example ENUMERATED[0] ValueType, left-subtree [1] Tree {red(0), green(1), ..., blue(2)ValueType }<type> <enumerated> <enumeration name="red" number="0"/> <enumeration name="green" number="1"/> <extension> <enumeration name="blue" number="2"/> </extension> </enumerated> </type> 6.6. TaggedType TranslationOPTIONAL, right-subtree [2] Tree { ValueType } OPTIONAL } Legg & Prager Expires 11 October 2005 [Page 18] INTERNET-DRAFT ASN.1 Schema April 11, 2005 ValueType is a DummyReference. The translation ofa TaggedType is an element with the [local name] "type". An element withthe[local name] "tagged" is added toactual parameter substitutes for the[children] ofDummyReference. In this case the<type> element. Ifactual parameter is theClass oftype INTEGER. The translation for theTag is not empty then an attribute withSEQUENCE type, up to the[local name] "tagClass"first component, is added to the[attributes] of the<tagged>element.element: <namedType name="NumberTree"> <type> <tagged tagClass="APPLICATION" number="13"> <type><!-- Tree { INTEGER } --> <sequence> <element name="value"> <type> <tagged number="0"> <type ref="asn1:INTEGER"/><!-- ValueType --> </tagged> </type> </element> </sequence> </type> </tagged> </type> </namedType> The[normalized value] of this attribute is the Class of the Tag, either "UNIVERSAL", "APPLICATION" or "PRIVATE". IfType in the TaggedType for the second component is a ParameterizedType. Since this ParameterizedType is recursively contained its translation is a <type> element with the ancestor attribute. The value of the"Tag IMPLICIT Type" form then anancestor attributewith the [local name] "tagging" and [normalized value] "IMPLICIT"isadded to"2" because there is one intermediate <type> element (for a TaggedType). Put another way, the[attributes]translations of the<tagged> element. Ifequivalent instances of ParameterizedType are two <type> steps apart. The translation of theTaggedType isthird component of the"Tag EXPLICIT Type" form then an Legg & Prager Expires 17 December 2004 [Page 17] INTERNET-DRAFT ASN.1 Schema June 17, 2004 attribute withSEQUENCE type follows the[local name] "tagging" and [normalized value] "EXPLICIT" is added tosame pattern as the[attributes]second component. The completed translation is as follows: <namedType name="NumberTree"> <type> <tagged tagClass="APPLICATION" number="13"> <type><!-- Tree { INTEGER } --> <sequence> <element name="value"> <type> <tagged number="0"> <type ref="asn1:INTEGER"/><!-- ValueType --> </tagged> </type> Legg & Prager Expires 11 October 2005 [Page 19] INTERNET-DRAFT ASN.1 Schema April 11, 2005 </element> <optional> <element name="left-subtree"> <type> <tagged number="1"> <type ancestor="2"/><!-- Tree { ValueType } --> </tagged> </type> </element> </optional> <optional> <element name="right-subtree"> <type> <tagged number="2"> <type ancestor="2"/><!-- Tree { ValueType } --> </tagged> </type> </element> </optional> </sequence> </type> </tagged> </type> </namedType> 6.3. Translation ofthe <tagged> element.Predefined Types Ifthe TaggedType isa Type comprises one of the"Tag Type" form and the Typeproductions inthe TaggedType is a DummyReferenceTable 1 thenan attribute with the [local name] "tagging" and [normalized value] "EXPLICIT" is added to the [attributes] ofthe<tagged> element. Thetranslation of the Typein the TaggedTypeisadded toeither thecontentattribute form or element form translation ofthe <tagged> element. Examples [0] INTEGER <type> <tagged number="0" type="asn1:INTEGER"/> </type> [APPLICATION 10] IMPLICIT BOOLEAN <type> <tagged tagClass="APPLICATION" number="10" tagging="IMPLICIT" type="asn1:BOOLEAN"/> </type> 6.7. SelectionType Translationthat type. The attribute form translation of aSelectionType is an element with the [local name] "type". An element with the [local name] "selection" is added to the [children]Type comprising one of the<type> element. Anproductions in Table 1 is an attribute with the [local name]"alternative" is added to the [attributes] of the <selection> element."type". The [normalized value] of this attribute is a qualified name with theidentifier of the SelectionType. The translation ofnamespace name "http://xmled.info/ns/ASN.1" and theTypelocal part as indicated inthe SelectionType is added to the content of the <selection> element. Example field1 < MyChoiceType <type> <selection alternative="field1" type="tns:MyChoiceType"/> </type> 6.8. InstanceOfType Translation Legg & Prager Expires 17 December 2004 [Page 18] INTERNET-DRAFT ASN.1 Schema June 17, 2004 The translation of an InstanceOfTypeTable 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 | Legg & Prager Expires 11 October 2005 [Page 20] INTERNET-DRAFT ASN.1 Schema April 11, 2005 +----------------------------------+-------------------+ | IntegerType | | | without a NamedNumberList | INTEGER | +----------------------------------+-------------------+ | NullType | NULL | | ObjectIdentifierType | OBJECT-IDENTIFIER | | OctetStringType | OCTET-STRING | | RealType | REAL | | RelativeOIDType | RELATIVE-OID | +----------------------------------+-------------------+ | RestrictedCharacterStringType | | | BMPString | BMPString | | GeneralString | GeneralString | | GraphicString | GraphicString | | IA5String | IA5String | | ISO646String | ISO646String | | NumericString | NumericString | | PrintableString | PrintableString | | TeletexString | TeletexString | | T61String | T61String | | UniversalString | UniversalString | | UTF8String | UTF8String | | VideotexString | VideotexString | | VisibleString | VisibleString | +----------------------------------+-------------------+ | UnrestrictedCharacterStringType | CHARACTER-STRING | +----------------------------------+-------------------+ | UsefulType | | | GeneralizedTime | GeneralizedTime | | UTCTime | UTCTime | | ObjectDescriptor | ObjectDescriptor | +----------------------------------+-------------------+ The element form translation of a Type comprising one of the productions in Table 1 is an element with the [local name] "type". Anelementattribute with the [local name]"instanceOf" is"ref" SHALL be added to the[children][attributes] of the <type> element. Thecontent[normalized value] ofthe <instanceOf> elementthis attribute is a qualified name with thetranslation ofnamespace name "http://xmled.info/ns/ASN.1" and theDefinedObjectClasslocal part as indicated inthe InstanceOfType.Table 1. ExampleINSTANCE OF TYPE-IDENTIFIER <type> <instanceOf class="asn1:TYPE-IDENTIFIER"/> </type> 6.9. ObjectClassFieldType Translation The translation of an ObjectClassFieldType is an element with the [local name] "type". An element withBOOLEAN <type ref="asn1:BOOLEAN"/> Usually the[local name] "fromClass"translator isaddedfree to choose either the[children] of the <type> element. The content of the <fromClass>attribute form or Legg & Prager Expires 11 October 2005 [Page 21] INTERNET-DRAFT ASN.1 Schema April 11, 2005 elementis theform translationof the DefinedObjectClassfor a Type, however inthe ObjectClassFieldType followed by the translationsome contexts attribute forms ofthe FieldName (Section 9.2.6). Example OPERATION.&Linked.&ArgumentType <type> <fromClass class="tns:OPERATION" fieldName="Linked/ArgumentType"/> </type> 6.10. TypeFromObject and ValueSetFromObjectsType are explicitly disallowed. 6.4. BitStringType Translation The translation of aTypeFromObject or ValueSetFromObjectsBitStringType with a NamedBitList is an element with the [local name] "type". An element with the [local name]"fromObjects" is"namedBitList" SHALL be added to the [children] of the <type> element. The translation ofthe ReferencedObjects in the TypeFromObject or ValueSetFromObjects is added to the content of the <fromObjects> element. The translation of the FieldNameeach NamedBit in theTypeFromObject or ValueSetFromObjects isNamedBitList SHALL be appended to thecontent[children] of the<fromObjects><namedBitList> element.Example Legg & Prager Expires 17 December 2004 [Page 19] INTERNET-DRAFT ASN.1 Schema June 17, 2004 invertMatrix.&Errors.&errorCode <type> <fromObjects object="tns:invertMatrix" fieldName="Errors/errorCode"/> </type> 6.11. Translation of Combining Types This section details the translation of the ASN.1 combining types SET, SEQUENCE, CHOICE, SET OF and SEQUENCE OF. 6.11.1. NamedType Translation A NamedType is translated one of two ways depending on the context. These are the simple content translation and the complex content translation. These two translations are not interchangeable. Either one or the other will be explicitly invoked as part of the translation of an enclosing combining type.Thecomplex contenttranslation of aNamedTypeNamedBit is an element with the [local name]"element"."namedBit". An attribute with the [local name] "name"isSHALL be added to the [attributes] of the<element><namedBit> element.TheIf the BitStringType is subject to a VALUES encoding instruction then the [normalized value] of this attribute is the replacement name [RXEREI] for the identifier of theNamedType. The translationNamedBit, otherwise it is the identifier of theType inNamedBit. If theNamedTypeBitStringType isaddedsubject to a VALUES encoding instruction and thecontentreduction of the<element> element. The simple content translation of a NamedTypereplacement name is not the same as the identifier then anelementattribute with the [local name]"content". An"identifier" SHALL be added to the [attributes] of the <namedBit> element, otherwise an attribute with the [local name]"name" is"identifier" MAY be added to the [attributes] of the<content><namedBit> element. The [normalized value] of this attribute is the identifier of theNamedType. The translation of the Type in the NamedType is added to the content of the <content> element. If the enclosing combining type is a SEQUENCE, SET or CHOICE type and the Type in the NamedType is a DummyReference and the TagDefault for the module containing the NamedType is "AUTOMATIC TAGS" then an attribute form translation of the Type in the NamedType SHALL NOT be used, and anNamedBit. An attribute with the [local name]"explicit" and [normalized value] "true" or "1" is"bit" SHALL be added to the [attributes] of the<type> element resulting from the translation<namedBit> element. The [normalized value] ofthe Type in the NamedType. Where the automatic tagging transformation applies,this attributeindicates that explicit tagging applies tois theType instring representation of theNamedType insteadinteger value of theusual implicit tagging. 6.11.2. SequenceTypenumber or DefinedValue of the NamedBit. Examples BIT STRING { zero(0), one(1), two(2) } <type> <namedBitList> <namedBit name="zero" bit="0"/> <namedBit name="one" bit="1"/> <namedBit name="two" bit="2"/> </namedBitList> </type> [RXER:VALUES ALL CAPITALIZED wednesday AS "Midweek"] BIT STRING { monday(0), tuesday(1), wednesday(2), thursday(3), friday(4) } <type> Legg & Prager Expires 11 October 2005 [Page 22] INTERNET-DRAFT ASN.1 Schema April 11, 2005 <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 aSequenceTypeNamedNumberList is an element with the [local name]Legg & Prager Expires 17 December 2004 [Page 20] INTERNET-DRAFT ASN.1 Schema June 17, 2004"type". An element with the [local name]"sequence" is"namedNumberList" SHALL be added to the [children] of the <type> element. The translation of eachComponentTypeNamedNumber in theComponentTypeList of the initial RootComponentTypeList, if present, isNamedNumberList SHALL be appended to the [children] of the<sequence><namedNumberList> element.If the ExtensionAndExceptionThe translation of a NamedNumber ispresent thenan element with the [local name]"extension" is appended"namedNumber". An attribute with the [local name] "name" SHALL be added to the[children][attributes] of the<sequence> element, and the translation of<namedNumber> element. If theExceptionSpec (possibly empty)IntegerType isaddedsubject to a VALUES encoding instruction then the[children][normalized value] of this attribute is the<extension> element. The translationreplacement name [RXEREI] for the identifier ofeach ExtensionAdditionGroup or ComponentType intheExtensionAdditions (if any)NamedNumber, otherwise it isappended tothe[children]identifier of the<extension> element.NamedNumber. If theExtensionEndMarkerIntegerType ispresent thensubject to a VALUES encoding instruction and thetranslationreduction ofeach ComponentType inthefinal RootComponentTypeListreplacement name isappended tonot the[children] ofsame as the<sequence> element. The translation of an ExtensionAdditionGroup isidentifier then anelementattribute with the [local name]"extensionGroup". If"identifier" SHALL be added to theVersionNumber is present then[attributes] of the <namedNumber> element, otherwise an attribute with the [local name]"version" is"identifier" MAY be added to the [attributes] of the<extensionGroup><namedNumber> element. The [normalized value] of this attribute is thenumberidentifier of theVersionNumber. The translation of each ComponentType inNamedNumber. An attribute with theExtensionAdditionGroup is appended[local name] "number" SHALL be added to the[children][attributes] of the<extensionGroup><namedNumber> element. Thetranslation[normalized value] ofa ComponentTypethis attribute is the string representation of the"NamedType" form isinteger value of thecomplex content translationSignedNumber or DefinedValue of theNamedType.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> Legg & Prager Expires 11 October 2005 [Page 23] INTERNET-DRAFT ASN.1 Schema April 11, 2005 [RXER:VALUES ALL CAPITALIZED very-high AS "DANGEROUS"] INTEGER { low(25), medium(50), high(75), very-high(100) } <type> <namedNumberList> <namedNumber name="Low" number="25"/> <namedNumber name="Medium" number="50"/> <namedNumber name="High" number="75"/> <namedNumber name="DANGEROUS" identifier="very-high" number="100"/> </namedNumberList> </type> 6.6. EnumeratedType Translation The translation ofa ComponentType of the "NamedType OPTIONAL" forman EnumeratedType is an element with the [local name]"optional". The complex content translation of"type". An element with theNamedType is[local name] "enumerated" SHALL be added to the [children] of the<optional><type> element. The translation ofa ComponentTypeeach EnumerationItem in the RootEnumeration SHALL be appended to the [children] of the"NamedType DEFAULT Value" form<enumerated> element. If the ellipsis ("...") is present then an element with the [local name]"optional". The complex content"extension" SHALL be appended to the [children] of the <enumerated> element, and the translation of theNamedType isExceptionSpec (possibly empty) SHALL be added to the [children] of the<optional><extension> element.An element with the [local name] "default"If an AdditionalEnumeration is present then the translation of each EnumerationItem in the AdditionalEnumeration SHALL be appended to the [children] of the<optional><extension> element. Thecontenttranslation ofthe <default>an EnumerationItem is an element with the [local name] "enumeration". If the EnumerationItem is of thetranslation"identifier" form then an attribute with the [local name] "name" SHALL be added to the [attributes] of theValue. The translation<enumeration> element. If the EnumeratedType is subject to a VALUES encoding instruction then the [normalized value] of this attribute is the replacement name [RXEREI] for the identifier, otherwise it is the identifier. If the EnumeratedType is subject to aComponentTypeVALUES encoding instruction and the reduction of the"COMPONENTS OF Type" formreplacement name is not the same as the identifier then anelementattribute with the [local name]"componentsOf"."identifier" SHALL be added to the [attributes] of the <namedNumber> element, otherwise an attribute with the [local name] "identifier" MAY be added to the [attributes] of the <namedNumber> element. Thetranslation[normalized value] of this attribute is theTypeidentifier. If the EnumerationItem is of the "NamedNumber" form then an attribute with the [local name] "name" SHALL be added to thecontent[attributes] of the<componentsOf><enumeration> element.ExampleIf the EnumeratedType is subject to a Legg & Prager Expires17 December 200411 October 2005 [Page21]24] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 SEQUENCE { one INTEGER, two BOOLEAN OPTIONAL, ..., [[ 2: four NULL ]], COMPONENTS OF MySequence, ..., three PrintableString DEFAULT "third" } <type> <sequence> <element name="one" type="asn1:INTEGER"/> <optional> <element name="two" type="asn1:BOOLEAN"/> </optional> <extension> <extensionGroup version="2"> <element name="four" type="asn1:NULL"/> </extensionGroup> <componentsOf type="tns:MySequence"/> </extension> <optional> <element name="three" type="asn1:PrintableString"/> <default literal="third"/> </optional> </sequence> </type> 6.11.3. SetType Translation The translation of a SetType follows the same procedure as a SequenceType except that SetType replaces SequenceType, "SET" replaces "SEQUENCE", andApril 11, 2005 VALUES encoding instruction then the[local name] "set" is used instead of "sequence". 6.11.4. ChoiceType Translation The translation[normalized value] ofa ChoiceType that is not a ChoiceOfStrings [RFC3641] typethis attribute isan element withthe[local name] "type". An element withreplacement name [RXEREI] for the[local name] "choice"identifier of the NamedNumber, otherwise it isadded tothe[children]identifier of the<type> element. The complex content translation of each NamedType inNamedNumber. If theRootAlternativeTypeListEnumeratedType isappendedsubject to a VALUES encoding instruction and the[children]reduction of the<choice> element. If the ExtensionAndExceptionreplacement name ispresentnot the same as the identifier then anelementattribute with theLegg & Prager Expires 17 December 2004 [Page 22] INTERNET-DRAFT ASN.1 Schema June 17, 2004[local name]"extension" is appended"identifier" SHALL be added to the[children][attributes] of the<choice><namedNumber> element,and the translation ofotherwise an attribute with theExceptionSpec (possibly empty) is[local name] "identifier" MAY be added to the[children][attributes] of the<extension><namedNumber> element. Thetranslation[normalized value] ofeach ExtensionAdditionAlternativesGroup or NamedType in the ExtensionAdditionAlternatives (if any)this attribute isappended to the [children] ofthe<extension> element. The complex content translation of the NamedType is used. The translationidentifier ofan ExtensionAdditionAlternativesGroup is an element with the [local name] "extensionGroup". IftheVersionNumber is present then anNamedNumber. An attribute with the [local name]"version" is"number" SHALL be added to the [attributes] of the<extensionGroup><enumeration> element. The [normalized value] of this attribute is thenumber of the VersionNumber. The complex content translationdigit string representation ofeach NamedType intheExtensionAdditionAlternativesGroup is appended tointeger value of the[children]SignedNumber or DefinedValue of the<extensionGroup> element.NamedNumber. ExampleCHOICEENUMERATED {one INTEGER, two BOOLEAN,red(0), green(1), ...,[[ 2: three NULL ]], four PrintableString, ...blue(2) } <type><choice> <element name="one" type="asn1:INTEGER"/> <element name="two" type="asn1:BOOLEAN"/><enumerated> <enumeration name="red" number="0"/> <enumeration name="green" number="1"/> <extension><extensionGroup version="2"> <element name="three" type="asn1:NULL"/> </extensionGroup> <element name="four" type="asn1:PrintableString"/><enumeration name="blue" number="2"/> </extension></choice></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.11.5.6.7. PrefixedType Translationof ChoiceOfStrings TypesThe translation of aChoiceTypePrefixedType [X.680-1] that is aChoiceOfStrings type followsTaggedType is thesame procedure astranslation of the TaggedType. If anon-ChoiceOfStrings ChoiceType exceptPrefixedType is an EncodingPrefixedType and the EncodingReference is RXER, or the EncodingReference is empty and the Legg & Prager Expires17 December 200411 October 2005 [Page23]25] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 thatApril 11, 2005 default encoding reference [X.680-1] for the[local name] "union"module isused instead of "choice", andRXER, then thesimple contenttranslation ofeach NamedTypethe PrefixedType isused instead ofthecomplex content translation. Example CHOICE -- a ChoiceOfStrings type -- { printableString PrintableString, visibleString VisibleString, ..., utf8String UTF8String } <type> <union> <content name="printableString" type="asn1:PrintableString"/> <content name="visibleString" type="asn1:VisibleString"/> <extension> <content name="utf8String" type="asn1:UTF8String"/> </extension> </union> </type> 6.11.6. SequenceOfType Translation Thetranslation ofa SequenceOfType is an element withthe[local name] "type". An element withType in the[local name] "sequenceOf"EncodingPrefixedType. ASIDE: This isadded to the [children] of the <type> element. If the SequenceOfTypenot suggesting that RXER encoding instructions are ignored. Encoding instructions for RXER are not explicitly represented in ASN.1 Schema, but rather affect how an ASN.1 specification isof the "SEQUENCE OF NamedType" form thentranslated into an ASN.1 Schema document (since thecomplexcontenttranslationofthe NamedTypean ASN.1 Schema document isadded toalso thecontentRXER encoding ofthe <sequenceOf> element. If the SequenceOfType isan abstract value of the"SEQUENCE OF Type" form thenModuleDefinition ASN.1 type in Appendix A). The individual effects of RXER encoding instructions on the translation are addressed in other parts of this specification. Encoding instructions for other encoding rules have explicit representations in ASN.1 Schema. If a PrefixedType is anelement withEncodingPrefixedType and the[local name] "element"EncodingReference isadded tonot RXER, or the[children] ofEncodingReference is empty and the<type> element. An attribute withdefault encoding reference for the[local name] "name" and [normalized value] "item"module isadded tonot RXER, then the[attributes]translation of the<element> element. An attributePrefixedType is an element with the [local name]"renames" and empty [normalized value] is added to the [attributes] of the <element> element."prefixed". The translation of theType isEncodingPrefix in the EncodingPrefixedType SHALL be added to thecontent[children] of the<element><prefixed> element.Examples SEQUENCE OF INTEGER <type> <sequenceOf> Legg & Prager Expires 17 December 2004 [Page 24] INTERNET-DRAFT ASN.1 Schema June 17, 2004 <element name="item" renames="" type="asn1:INTEGER"/> </sequenceOf> </type> SEQUENCE OF counter INTEGER <type> <sequenceOf> <element name="counter" type="asn1:INTEGER"/> </sequenceOf> </type> 6.11.7. SetOfType Translation The translation of a SetOfType follows the same procedure as a SequenceOfType except that SetOfType replaces SequenceOfType, "SET" replaces "SEQUENCE", and the [local name] "setOf" is used instead of "sequenceOf". 6.12. Translation of Constrained TypesIf theConstrainedType isEncodingReference ofthe "Type Constraint" form and the Typean EncodingPrefix isthe AnyType type from the SchemaLanguageIntegration module [GLUE]not empty then the translation of theConstrainedTypeEncodingPrefix isdetermined by the rules in Section 6.12.1. Ifan element with theConstrainedType isencodingreference of the"Type Constraint" form (excluding the case where the Type is the AnyType type [GLUE]) thenEncodingReference as the [local name]. The translation of theConstrainedType is an element with the [local name] "type". An element withEncodingInstruction in the[local name] "constrained" isEncodingPrefix SHALL be added to the [children] ofthe <type>this element.The content ofIf the<constrained> elementEncodingReference of an EncodingPrefix is empty then the translation of theType followed byEncodingPrefix is an element with the default encoding reference for the module as the [local name]. The translation of theConstraint. 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 BuiltinValueEncodingInstruction in theValue ofEncodingPrefix SHALL be added to theendpoint. A SizeConstraint[children] of this element. The EncodingInstruction notation isa simple range if the Constraintdifferent for each set of encoding instructions, and their translations into ASN.1 Schema are specified in separate documents [GSEREIT][XEREIT]. At theSizeConstraint containstime of writing, onlya ValueRange (i.e., a ValueRange in a SubtypeElements in an Elements in a single IntersectionElements in a single Intersections in a Unions in an ElementSetSpec in a lone RootElementSetSpec in an ElementSetSpecs in a SubtypeConstraint in a lone ConstraintSpec in the Constraint)three sets of encoding instructions have been defined (for RXER [RXEREI], GSER [GSER][GSEREI] andboth end points are simple. A Constraint isEXTENDED-XER [X.693][X.693-1]). If the <type> child element of asimple range if contains only<prefixed> element has no attributes and has aSizeConstraint<prefixed> child element then thatis a simple range (i.e., a simple range SizeConstraint in a<type> child element MAY be replaced by the content (both attributes and child elements) of the inner <prefixed> element. Legg & Prager Expires17 December 200411 October 2005 [Page25]26] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 SubtypeElements in an Elements in a single IntersectionElements in a single Intersections in a Unions in an ElementSetSpec inApril 11, 2005 If two consecutive child elements of alone RootElementSetSpec in<prefixed> element have the same [local name] (which will be anElementSetSpecs in a SubtypeConstraint in a lone ConstraintSpec inencodingreference) then theConstraint). Ifsecond child element MAY be removed and have its [children] appended to theparent type[children] ofa TypeWithConstraint is a "SEQUENCE OF Type" or "SEQUENCE OF NamedType" andtheConstraint or SizeConstraint infirst child element. These two rewriting steps MAY be applied to theTypeWithConstraint isresult of asimple range thenprevious rewriting step if the necessary conditions still hold. Example These three definitions are equivalent. [XER:ATTRIBUTE] [XER:USE-UNION] [GSER:CHOICE-OF-STRINGS] MyChoiceType <type> <prefixed> <XER><attribute/></XER> <type> <prefixed> <XER><useUnion/></XER> <type> <prefixed type="tns:MyChoiceType"> <GSER><choiceOfStrings/></GSER> </prefixed> </type> </prefixed> </type> </prefixed> </type> <type> <prefixed type="tns:MyChoiceType"> <XER><attribute/><useUnion/></XER> <GSER><choiceOfStrings/></GSER> </prefixed> </type> 6.7.1. TaggedType Translation The translation ofthe TypeWithConstrainta TaggedType is an element with thetranslation[local name] "type". An element with the [local name] "tagged" SHALL be added to the [children] of theparent type.<type> element. If thevalueClass of thelower endpointTag is not"MIN" or "0"empty then an attribute with the [local name]"minSize" is"tagClass" SHALL be added to the [attributes] of the<sequenceOf> element from the translation of the parent type.<tagged> element. The [normalized value] of this attribute is thevalueClass of thelower endpoint.Tag, either "UNIVERSAL", "APPLICATION" or "PRIVATE". Legg & Prager Expires 11 October 2005 [Page 27] INTERNET-DRAFT ASN.1 Schema April 11, 2005 If thevalueTaggedType is of theupper endpoint is not "MAX""Tag IMPLICIT Type" form then an attribute with the [local name]"maxSize" is"tagging" and [normalized value] "IMPLICIT" SHALL be added to the [attributes] of the<sequenceOf><tagged> element.The [normalized value]If the TaggedType is ofthisthe "Tag EXPLICIT Type" form then an attributeiswith thevalue[local name] "tagging" and [normalized value] "EXPLICIT" SHALL be added to the [attributes] of theupper endpoint.<tagged> element. If theparent type of a TypeWithConstraint isTaggedType is"SEQUENCE OFof the "Tag Type"or "SEQUENCE OF NamedType"form and theConstraint or SizeConstraintType in theTypeWithConstraintTaggedType isnotasimple rangeDummyReference thenthe translation of the TypeWithConstraint isanelement with the [local name] "type". An elementattribute with the [local name]"constrained" is"tagging" and [normalized value] "EXPLICIT" SHALL be added toThe content ofthe<constrained> element is[attributes] of the <tagged> element. The translation of theparent type followed byType in thetranslationTaggedType SHALL be added to the content of theConstraint or SizeConstraint.<tagged> element. Examples [0] INTEGER <type> <tagged number="0" type="asn1:INTEGER"/> </type> [APPLICATION 10] IMPLICIT BOOLEAN <type> <tagged tagClass="APPLICATION" number="10" tagging="IMPLICIT" type="asn1:BOOLEAN"/> </type> 6.8. SelectionType Translation The translation of aTypeWithConstraint where the parent typeSelectionType is"SET OF Type" or "SET OF NamedType" followsan element with thesame procedure as[local name] "type". An element with thetranslation[local name] "selection" SHALL be added to the [children] of the <type> element. The identifier in aTypeWithConstraint whereSelectionType identifies a NamedType in theparent type is "SEQUENCE OF Type" or "SEQUENCE OF NamedType" exceptdefinition of the Type in the SelectionType. The translation of that"SET" replaces "SEQUENCE" andNamedType will be an element with the [local name]"setOf"either "attribute", "element", "content" or "member". An attribute with the same [local name] as the translation of the NamedType SHALL be added to the [attributes] of the <selection> element. The [normalized value] of this attribute isused insteadthe RXER encoding [RXER] of"sequenceOf". Examples SEQUENCE (SIZE(1..MAX)) OF number INTEGER <type> <sequenceOf minSize="1"> <element name="number" type="asn1:INTEGER"/> </sequenceOf> </type> SEQUENCE SIZE(0..10) OF number INTEGER <type> <sequenceOf maxSize="10"> <element name="number" type="asn1:INTEGER"/>the effective name [RXEREI] of the NamedType. Legg & Prager Expires17 December 200411 October 2005 [Page26]28] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 </sequenceOf>April 11, 2005 The translation of the Type in the SelectionType SHALL be added to the content of the <selection> element. Example field1 < MyChoiceType <type> <selection element="field1" type="tns:MyChoiceType"/> </type>SEQUENCE SIZE(1..limit) OF numberfield2 < CHOICE { field2 [RXER:ATTRIBUTE][RXER:NAME AS "field-two"] INTEGER } <type><constrained><selection attribute="field-two"> <type><sequenceOf> <element name="number"<choice> <attribute name="field-two" identifier="field2" type="asn1:INTEGER"/></sequenceOf></choice> </type><size> <range> <minInclusive literal="1"/> <maxInclusive value="tns:limit"/> </range> </size> </constrained></selection> </type>6.12.1.6.9. InstanceOfType Translationof AnyTypeThe translationdescribed in this section applies to a ConstrainedTypeofthe "Type Constraint" form where the Typean InstanceOfType is an element with theAnyType type from the SchemaLanguageIntegration module [GLUE]. If the ConstraintSpec in the Constraint is a GeneralConstraint and the GeneralConstraint is a UserDefinedConstraint and the first UserDefinedConstraintParameter is an OBJECT IDENTIFIER[local name] "type". An element with thesame value as id-constraint-xml-type from[local name] "instanceOf" SHALL be added to theSchemaLanguageIntegration module then[children] of thetranslation<type> element. The content of theConstrainedType<instanceOf> element iseithertheattribute formtranslation ofa foreign type reference, ortheelement form translation of a foreign type reference.DefinedObjectClass in the InstanceOfType. Example INSTANCE OF TYPE-IDENTIFIER <type> <instanceOf class="asn1:TYPE-IDENTIFIER"/> </type> 6.10. ObjectClassFieldType Translation Theattribute formtranslation ofa foreign type referencean ObjectClassFieldType is anattributeelement with the [local name] "type". An element with the [local name] "fromClass" SHALL be added to the [children] of the <type> element. The[normalized value]content ofthis attributethe <fromClass> element is thequalified name representedtranslation of the Legg & Prager Expires 11 October 2005 [Page 29] INTERNET-DRAFT ASN.1 Schema April 11, 2005 DefinedObjectClass in the ObjectClassFieldType followed by thesecondtranslation of the FieldName (see Section 9.2.6). Example OPERATION.&Linked.&ArgumentType <type> <fromClass class="tns:OPERATION" fieldName="Linked/ArgumentType"/> </type> 6.11. TypeFromObject andthird UserDefinedConstraintParameter.ValueSetFromObjects Translation Theelement formtranslation of aforeign type referenceTypeFromObject or ValueSetFromObjects is an element with the [local name] "type". Anattributeelement with the [local name]"ref" is"fromObjects" SHALL be added to the[attributes][children] of the <type> element. The[normalized value]translation ofthis attribute is the qualified name represented bythesecond and third UserDefinedConstraintParameter. If there is a fourth UserDefinedConstraintParameter then an attribute withReferencedObjects in theLegg & Prager Expires 17 December 2004 [Page 27] INTERNET-DRAFT ASN.1 Schema June 17, 2004 [local name] "context" isTypeFromObject or ValueSetFromObjects SHALL be added to the[attributes]content of the<type><fromObjects> element. The[normalized value]translation ofthis attribute isthestring value ofFieldName in thefourth UserDefinedConstraintParameter. If there is a fourth UserDefinedConstraintParameter thenTypeFromObject or ValueSetFromObjects SHALL be appended to theattribute formcontent ofa foreign type reference cannot be used. The translator is otherwise free to choose eithertheattribute form or element form<fromObjects> element. Example invertMatrix.&Errors.&errorCode <type> <fromObjects object="tns:invertMatrix" fieldName="Errors/errorCode"/> </type> 6.12. Translation of Combining Types This section details the translationfor a foreignof the ASN.1 combining types: SET, SEQUENCE, CHOICE, SET OF and SEQUENCE OF. The combining typereference, except that in some contexts attribute formsdefinitions all make use ofType are explicitly disallowed. Example AnyType (CONSTRAINED BY { OBJECT IDENTIFIER:id-constraint-xml-type, AnyURI:"http://www.example.com/PO1", NCName:"PurchaseOrderType" }) or XML-Type { "http://www.example.com/PO1", "PurchaseOrderType" } <type xmlns:po="http://www.example.com/PO1" ref="po:PurchaseOrderType"/> IftheConstraintSpecNamedType notation. 6.12.1. NamedType Translation A NamedType is translated in one of three ways depending on theConstraint is a GeneralConstraint andcontext. These are theGeneralConstraint is a UserDefinedConstraintnormal translation, the member translation and thefirst UserDefinedConstraintParameter is an OBJECT IDENTIFIER withitem translation. These translations are not interchangeable. One of thesame valuethree will be explicitly invoked asid-constraint-dtd-type frompart Legg & Prager Expires 11 October 2005 [Page 30] INTERNET-DRAFT ASN.1 Schema April 11, 2005 of theSchemaLanguageIntegration moduletranslation of an enclosing combining type. If a NamedType is subject to an ATTRIBUTE or ATTRIBUTE-REF encoding instruction then the normal translation of theConstrainedTypeNamedType is an element with the [local name]"type". An attribute with"attribute", otherwise if the[local name] "context"NamedType isaddedsubject to a CONTENT encoding instruction then the[attributes]normal translation of the<type> element. The [normalized value] of this attributeNamedType is an element with thestring value[local name] "content", otherwise the normal translation of thesecond UserDefinedConstraintParameter. An attributeNamedType is an element with the [local name]"elementType" is also added to the [attributes]"element". The member translation of a NamedType is an element with the<type> element.[local name] "member". The[normalized value]item translation ofthis attributea NamedType is an element with thestring value of[local name] "item". ASIDE: A Namedtype for which thethird UserDefinedConstraintParameter. Example AnyType (CONSTRAINED BY { OBJECT IDENTIFIER:id-constraint-dtd-type, AnyURI:"http://www.example.com/inventory", Name:"product" })member orDTD-Type { "http://www.example.com/inventory", "product" } Legg & Prager Expires 17 December 2004 [Page 28] INTERNET-DRAFT ASN.1 Schema June 17, 2004 <type context="http://www.example.com/inventory" elementType="product"/> If the ConstraintSpec in the Constraintitem translation is invoked will never be subject to an ATTRIBUTE, ATTRIBUTE-REF, CONTENT or TYPE-AS-VERSION encoding instruction. These encoding instructions are also mutually exclusive. If aGeneralConstraint and the GeneralConstraintNamedType is subject to aUserDefinedConstraint and the first UserDefinedConstraintParameter is an OBJECT IDENTIFIER with the same value as id-constraint-xml-element from the SchemaLanguageIntegration moduleTYPE-AS-VERSION encoding instruction thenthe translation of the ConstrainedType isanelement with the [local name] "type". An elementattribute with the [local name]"choice" is"typeAsVersion" and [normalized value] "true" or "1" SHALL be added to the[children] of the <type><element> element.An elementFor the normal translation, if a NamedType is not subject to an ATTRIBUTE, ATTRIBUTE-REF, CONTENT or TYPE-AS-VERSION encoding instruction then an attribute with the [local name]"element" is"typeAsVersion" and [normalized value] "false" or "0" MAY be added to the[children] of the <choice><element> element.AnFor the normal, member and item translations, if a NamedType is not subject to an ATTRIBUTE-REF, ELEMENT-REF or REF-AS-ELEMENT encoding instruction then an attribute with the [local name]"ref" is"name" SHALL be added to the [attributes] of the<element> element.<attribute>, <content>, <element>, <member> or <item> element, as appropriate. The [normalized value] of this attribute is thequalifiedvalue of the local-name component of the effective namerepresented by[RXEREI] of thesecond and third UserDefinedConstraintParameter.NamedType. ASIDE: If thereisare no NAME, ATTRIBUTE-REF, ELEMENT-REF or REF-AS-ELEMENT encoding instructions then the value of the local-name component of the effective name of afourth UserDefinedConstraintParameterNamedType is its identifier. If the reduction of the local-name component (an NCName) of the effective name of the NamedType is not the same as the identifier of the NamedType then an attribute with the [local name]"context" is"identifier" SHALL be added to the [attributes] of the<element><attribute>, <content>, <element>, <member> or <item> element, as appropriate, otherwise an Legg & Prager Expires 11 October 2005 [Page 31] INTERNET-DRAFT ASN.1 Schema April 11, 2005 attribute with the [local name] "identifier" MAY be added to the [attributes] of the <attribute>, <content>, <element>, <member> or <item> element. The [normalized value] of this attribute is thestring valueidentifier of thefourth UserDefinedConstraintParameter. Example AnyType (CONSTRAINED BY { OBJECT IDENTIFIER:id-constraint-xml-element, AnyURI:"http://www.example.com/IPO", NCName:"purchaseOrder" }) or Contained-XML-Element { "http://www.example.com/IPO", "purchaseOrder" } <type xmlns:ipo="http://www.example.com/IPO"> <choice> <element ref="ipo:purchaseOrder/> </choice> </type>NamedType. Ifthe ConstraintSpec in the Constraint is a GeneralConstraint and the GeneralConstraint isaUserDefinedConstraint and the first UserDefinedConstraintParameterNamedType is subject to anOBJECT IDENTIFIER with the same value as id-constraint-dtd-element from the SchemaLanguageIntegration moduleATTRIBUTE-REF or ELEMENT-REF encoding instruction thenthe translation of the ConstrainedType isanelement with the [local name] "type". An elementattribute with the [local name]"choice" is"ref" SHALL be added to the[children][attributes] of the<type> element. An element with the [local name] "element"<attribute> or <element> element, as appropriate. The [normalized value] of this attribute isadded tothe[children]RXER encoding of the<choice> Legg & Prager Expires 17 December 2004 [Page 29] INTERNET-DRAFT ASN.1 Schema June 17, 2004 element. AnQNameValue from the encoding instruction. If a NamedType is subject to a REF-AS-ELEMENT encoding instruction then an attribute with the [local name]"context" is"elementType" SHALL be added to the [attributes] of the <element> element. The [normalized value] of this attribute is thestring valueRXER encoding of thesecond UserDefinedConstraintParameter. AnNameValue from the REF-AS-ELEMENT encoding instruction. If the ContextParameter is present in the RefParameters in the ATTRIBUTE-REF, ELEMENT-REF or REF-AS-ELEMENT encoding instruction then an attribute with the [local name]"elementType" is also"context" SHALL be added to the [attributes] of the <attribute> or <element>element.element, as appropriate. The [normalized value] of this attribute is the string value of thethird UserDefinedConstraintParameter. Example AnyType (CONSTRAINED BY { OBJECT IDENTIFIER:id-constraint-dtd-element, AnyURI:"http://www.example.com/inventory", Name:"product" }) or Contained-DTD-Element { "http://www.example.com/inventory", "product" } <type> <choice> <element context="http://www.example.com/inventory" elementType="product"/> </choice> </type> If none of the previous casesAnyURIValue inthis section apply to the Constraint thenthetranslation ofContextParameter. If theConstrainedTypeCanonicalizationParameter iseitherpresent in theattribute form translation of an anytype reference, orRefParameters in theelement form translation of an anytype reference. The attribute form translation of an anytype reference isencoding instruction then an attribute with the [local name]"type"."canonicalization" SHALL be added to the [attributes] of the <attribute> or <element> element, as appropriate. The [normalized value] of this attribute isa qualified name with the namespace name "http://xmled.info/ns/ASN.1" andthelocal part "AnyType". The element form translationstring value ofan anytype reference is an element withthe[local name] "type". An attribute withAnyURIValue in the[local name] "ref"CanonicalizationParameter. If a NamedType isaddednot subject to an ATTRIBUTE-REF, ELEMENT-REF or REF-AS-ELEMENT encoding instruction then the[attributes]translation of the<type> element. The [normalized value]Type in the NamedType SHALL be added to the content ofthis attributethe <attribute>, <content>, <element>, <member> or <item> element, as appropriate. If the enclosing combining type is aqualified name withSEQUENCE, SET or CHOICE type and thenamespace name "http://xmled.info/ns/ASN.1"Type in the NamedType is a DummyReference and thelocal part "AnyType". UsuallyTagDefault for thetranslatormodule containing the NamedType isfree to choose either"AUTOMATIC TAGS" then an attribute form translation of the Type in the NamedType SHALL NOT be used, and an attribute with the [local name] "explicit" and [normalized value] "true" or "1" SHALL be added to the [attributes] of the <type> elementformresulting from the translationfor an anytype reference, howeverof the Type insome contextsthe NamedType. Where the automatic tagging transformation applies, this attributeforms ofindicates that explicit tagging applies to the Typeare explicitly disallowed.in the NamedType instead of the usual implicit tagging. Example CHOICE { Legg & Prager Expires17 December 200411 October 2005 [Page30]32] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004April 11, 2005 one INTEGER, two [RXER:ATTRIBUTE] BOOLEAN, three [RXER:ATTRIBUTE-REF { namespace-name "http://www.example.com/schema", local-name "foo" }] AnyType, four [RXER:ELEMENT-REF { namespace-name "http://www.example.com/schema", local-name "bar" }] AnyType, four [RXER:REF-AS-ELEMENT "product" CONTEXT "http://www.example.com/inventory"] AnyType, five [RXER:CONTENT] MySequence } <type> <choice xmlns:ex="http://www.example.com/schema"> <element name="one" type="asn1:INTEGER"/> <attribute name="two" type="asn1:BOOLEAN"/> <attribute ref="ex:foo"/> <element ref="ex:bar"/> <element elementType="product" context="http://www.example.com/inventory"/> <content name=five" type="tns:MySequence"/> </choice> </type> 6.12.2.ConstraintSequenceType Translation The translation of aConstraintSequenceType is an element with thetranslation of[local name] "type". An element with theConstraintSpec followed by[local name] "sequence" SHALL be added to thetranslation[children] of theExceptionSpec (possibly empty).<type> element. The translation ofa ConstraintSpec iseach ComponentType in thetranslationComponentTypeList of thecontained SubtypeConstraint or GeneralConstraint. The translationinitial RootComponentTypeList, if present, SHALL be appended to the [children] ofa SubtypeConstraintthe <sequence> element. If the ExtensionAndException is present then an element with thetranslation[local name] "extension" SHALL be appended to the [children] of thecontained ElementSetSpecs. The<sequence> element, and the translation ofa GeneralConstraint isthetranslationExceptionSpec (possibly empty) SHALL be added to the [children] of thecontained UserDefinedConstraint, TableConstraint or ContentsConstraint. 6.12.3. UserDefinedConstraint Translation<extension> element. The translation ofa UserDefinedConstrainteach ExtensionAdditionGroup or ComponentType in the ExtensionAdditions (if any) SHALL be appended to the [children] of the <extension> element. If the ExtensionEndMarker isan element withpresent then the[local name] "constrainedBy". Thetranslation of eachUserDefinedConstraintParameter isLegg & Prager Expires 11 October 2005 [Page 33] INTERNET-DRAFT ASN.1 Schema April 11, 2005 ComponentType in the final RootComponentTypeList SHALL be appended to the [children] of the<constrainedBy><sequence> element. The translation ofa UserDefinedConstraintParameter of the "Governor : Value" forman ExtensionAdditionGroup is an element with the [local name]"valueParameter". The content"extensionGroup". If the VersionNumber is present then an attribute with the [local name] "version" SHALL be added to the [attributes] of the<valueParameter> element<extensionGroup> element. The [normalized value] of this attribute is thetranslationnumber of theTypeVersionNumber. The translation of each ComponentType in theGovernor followed byExtensionAdditionGroup SHALL be appended to thetranslation[children] of theValue.<extensionGroup> element. The translation of aUserDefinedConstraintParameterComponentType of the"Governor : ValueSet""NamedType" form isan element with the [local name] "valueSetParameter". The content of the <valueSetParameter> element is the translation of the Type in the Governor followed bythe normal translation of theValueSet.NamedType. The translation of aUserDefinedConstraintParameterComponentType of the"Governor : Object""NamedType OPTIONAL" form is an element with the [local name]"objectParameter"."optional". Thecontent of the <objectParameter> element is thenormal translation of theDefinedObjectClass in the Governor followed byNamedType SHALL be added to thetranslation[children] of theObject.<optional> element. The translation of aUserDefinedConstraintParameterComponentType of the"Governor : ObjectSet""NamedType DEFAULT Value" form is an element with the [local name]"objectSetParameter"."optional". Thecontent of the <objectSetParameter> element is thenormal translation of theDefinedObjectClass in the Governor followed byNamedType SHALL be added to thetranslation[children] of theObjectSet. The translation of a UserDefinedConstraintParameter that is a Type is Legg & Prager Expires 17 December 2004 [Page 31] INTERNET-DRAFT ASN.1 Schema June 17, 2004 an<optional> element. An element with the [local name]"typeParameter"."default" SHALL be appended to the [children] of the <optional> element. Thetranslationcontent ofthat Typethe <default> element isadded tothecontenttranslation of the<typeParameter> element.Value. The translation of aUserDefinedConstraintParameter that is a DefinedObjectClassComponentType of the "COMPONENTS OF Type" form is an element with the [local name]"classParameter"."componentsOf". The translation ofthat DefinedObjectClass isthe Type SHALL be added to the content of the<classParameter><componentsOf> element.6.12.4. TableConstraintExample SEQUENCE { one INTEGER, two [RXER:ATTRIBUTE] BOOLEAN OPTIONAL, ..., [[ 2: four NULL ]], COMPONENTS OF MySequence, ..., three PrintableString DEFAULT "third" } <type> <sequence> <element name="one" type="asn1:INTEGER"/> Legg & Prager Expires 11 October 2005 [Page 34] INTERNET-DRAFT ASN.1 Schema April 11, 2005 <optional> <attribute name="two" type="asn1:BOOLEAN"/> </optional> <extension> <extensionGroup version="2"> <element name="four" type="asn1:NULL"/> </extensionGroup> <componentsOf type="tns:MySequence"/> </extension> <optional> <element name="three" type="asn1:PrintableString"/> <default literal="third"/> </optional> </sequence> </type> 6.12.3. SetType Translation The translation of aTableConstraint that isSetType follows the same procedure as aSimpleTableConstraint is an element withSequenceType except that SetType replaces SequenceType, "SET" replaces "SEQUENCE", and the [local name]"table". The translation of the ObjectSet in the SimpleTableConstraint"set" isadded to the contentused instead ofthe <table> element."sequence". 6.12.4. ChoiceType Translation The translation of aTableConstraintChoiceType that is not subject to aComponentRelationConstraintUNION encoding instruction is an element with the [local name]"table". The translation of the DefinedObjectSet in"type". An element with theComponentRelationConstraint is[local name] "choice" SHALL be added to thecontent[children] of the<table><type> element. The normal translation of eachAtNotation isNamedType in the RootAlternativeTypeList SHALL be appended to the [children] of the<table><choice> element.The translation of an AtNotationIf the ExtensionAndException is present then an element with the [local name]"restrictBy". An attribute with the [local name] "component""extension" isaddedappended to the[attributes][children] of the<restrictBy> element. The [normalized value]<choice> element, and the translation ofthis attributethe ExceptionSpec (possibly empty) is added to theconcatenation[children] of the <extension> element. The translation ofzero, one or more "../" strings, one foreachLevelExtensionAdditionAlternativesGroup or NamedType in theAtNotation (includingExtensionAdditionAlternatives (if any) SHALL be appended to theempty one), followed by a "/" (U+002F) separated list[children] of theComponentIdList identifiers. Examples ERROR.&Type({Errors}{@severity,@...errorId}) <type> <constrained> <type> <fromClass class="tns:ERROR" fieldName="Type"/> </type> <table objectset="tns:Errors"> <restrictBy component="severity"/> <restrictBy component="../../../errorId"/> </table> </constrained> </type> 6.12.5. ContentsConstraint Translation Legg & Prager Expires 17 December 2004 [Page 32] INTERNET-DRAFT ASN.1 Schema June 17, 2004<extension> element. The normal translation ofa ContentsConstraintthe NamedType is used. The translation of an ExtensionAdditionAlternativesGroup is an element with the [local name]"contents"."extensionGroup". If theContentsConstraintVersionNumber isof the "CONTAINING Type" formpresent then anelementattribute with the [local name]"containing" is"version" SHALL be added to the[children][attributes] of the<contents><extensionGroup> element. Thetranslation[normalized value] ofthe Typethis attribute isadded tothecontentsnumber of the<containing> element. If the ContentsConstraint isVersionNumber. The normal translation of each NamedType in the"ENCODED BY Value" form then an element with the [local name] "encodedBy" is addedLegg & Prager Expires 11 October 2005 [Page 35] INTERNET-DRAFT ASN.1 Schema April 11, 2005 ExtensionAdditionAlternativesGroup SHALL be appended to the [children] of the<contents><extensionGroup> element. Example CHOICE { one INTEGER, two [RXER:NAME AS "Two"] BOOLEAN, ..., [[ 2: three NULL ]], four PrintableString, ... } <type> <choice> <element name="one" type="asn1:INTEGER"/> <element name="Two" type="asn1:BOOLEAN"/> <extension> <extensionGroup version="2"> <element name="three" type="asn1:NULL"/> </extensionGroup> <element name="four" type="asn1: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 theValuesame procedure as a ChoiceType that isaddednot subject to a UNION encoding instruction except that thecontents[local name] "union" is used instead of "choice", and the<encodedBy> element. If the ContentsConstraintmember translation of each NamedType is used instead of the"CONTAINING Type ENCODED BY Value" form then the content ofnormal translation. In addition, if the<contents> element isUNION encoding instruction has a PrecedenceList then anelementattribute with the [local name]"containing" followed by an element with"precedence" SHALL be added to the[local name] "encodedBy". The translation[attributes] of theType<union> element. The [normalized value] of this attribute isadded tothecontentswhite space separated list of the<containing> element, andRXER encodings [RXER] of thetranslationeffective names [RXEREI] of theValue is addedNamedType instances corresponding to thecontents ofidentifiers in the<encodedBy> element.PrecedenceList. Example [RXER:UNION PRECEDENCE utf8 visible] CHOICE { printable PrintableString, Legg & Prager Expires 11 October 2005 [Page 36] INTERNET-DRAFT ASN.1 Schema April 11, 2005 teletex TeletexString, visible [RXER:NAME AS "ascii"] VisibleString, ..., utf8 UTF8String } <type> <union precedence="utf8 ascii"> <member name="printable" type="asn1:PrintableString"/> <member name="teletex" type="asn1:TeletexString"/> <member name="ascii" identifier="visible" type="asn1:VisibleString"/> <extension> <member name="utf8" type="asn1:UTF8String"/> </extension> </union> </type> 6.12.6.ExceptionSpecSequenceOfType Translation The translation of anon-empty ExceptionSpecSequenceOfType that is not subject to a LIST encoding instruction is an element with the [local name]"exception". If the ExceptionSpec is a SignedNumber then the content of the <exception>"type". An elementiswith thetranslation of a notional INTEGER Type followed by[local name] "sequenceOf" SHALL be added to thetranslation of a notional Value[children] of theINTEGER type with the IntegerValue of SignedNumber.<type> element. If theExceptionSpecSequenceOfType isa DefinedValue then the contentof the<exception> element is"SEQUENCE OF NamedType" form then the normal translation ofa notional INTEGER Type followed bythetranslationNamedType SHALL be added to the content of theDefinedValue.<sequenceOf> element. If theExceptionSpecSequenceOfType is of the"Type : Value""SEQUENCE OF Type" form thenthe content of the <exception>an elementiswith thetranslation[local name] "element" SHALL be added to the [children] of theType followed by<type> element. An attribute with thetranslation[local name] "name" and [normalized value] "item" SHALL be added to the [attributes] of theValue. Examples !10 <exception type="asn1:INTEGER" literal="10"/> !myValue <exception type="asn1:INTEGER" value="tns:myValue"/> Legg & Prager Expires 17 December 2004 [Page 33] INTERNET-DRAFT ASN.1 Schema June 17, 2004 !PrintableString:"failure" <exception type="asn1:PrintableString" literal="failure"/> 7. Translation of Values The translation of a Value is<element> element. An attribute with thetranslation[local name] "identifier" and empty [normalized value] SHALL be added to the [attributes] ofeither a BuiltinValue, ReferencedValue or ObjectClassFieldValue.the <element> element. The translation ofa ReferencedValue isthetranslationType SHALL be added to the content ofeither a DefinedValue or a ValueFromObject.the <element> element. ExampleszeroSEQUENCE OF INTEGER::= 0 <namedValue name="zero" type="asn1:INTEGER" literal="0"/> integerList<type> <sequenceOf> <element name="item" identifier="" type="asn1:INTEGER"/> </sequenceOf> </type> Legg & Prager Expires 11 October 2005 [Page 37] INTERNET-DRAFT ASN.1 Schema April 11, 2005 SEQUENCE OFnumbercounter INTEGER::= { zero, 3, 7 } <namedValue name="integerList"><type><sequenceOf<sequenceOf> <element name="counter" type="asn1:INTEGER"/> </sequenceOf> </type><value> <number asn1:meta="true" ref="tns:zero"/> <number>3</number> <number>7</number> </value> </namedValue> 7.1. DefinedValue6.12.7. TranslationIf a DefinedValue is an valuereference (not a DummyReference) or an ExternalValueReference then the translation of the DefinedValue is either the attribute form translation of a value reference, or the element form translationofa value reference.LIST Types Theattribute formtranslation of avalue reference is an attribute with the [local name] "value". The [normalized value] of this attributeSequenceOfType that isthe qualified name referencing the value definition (see Section 5.1). The element form translation ofsubject to avalue referenceLIST encoding instruction is an element with the [local name]"value"."type". Anattributeelement with the [local name]"meta", [namespace name] "http://xmled.info/ns/ASN.1" and [normalized value] "true" or "1" (e.g., asn1:meta="true") is"list" SHALL be added to the[attributes][children] of the<value><type> element.An attribute withThe item translation of the[local name] "ref" is Legg & Prager Expires 17 December 2004 [Page 34] INTERNET-DRAFT ASN.1 Schema June 17, 2004NamedType SHALL be added to the[attributes]content of the<value><list> element.The [normalized value] of this attributeASIDE: SequenceOfType is necessarily of thequalified name referencing the value definition (see Section 5.1). Usually the translator is free to choose either an attribute form or element"SEQUENCE OF NamedType" formtranslationfor aDefinedValue, however in some contexts attribute formsLIST encoding instruction. Example [RXER:LIST] SEQUENCE OF number INTEGER <type> <list> <item name="number" type="asn1:INTEGER"/> </list> </type> 6.12.8. SetOfType Translation The translation ofValue are explicitly disallowed. If a DefinedValue isaDummyReference thenSetOfType follows thetranslation ofsame procedure as a SequenceOfType except that SetOfType replaces SequenceOfType, "SET" replaces "SEQUENCE", and theDefinedValue[local name] "setOf" isthe translationused instead ofthe Value in the ActualParameter corresponding to the DummyReference."sequenceOf". 6.13. Translation of Constrained Types If aDefinedValueConstrainedType isa ParameterizedValueof the "Type Constraint" form then the translation of theValueConstrainedType is an element with thetranslation of[local name] "type". An element with theValue on[local name] "constrained" SHALL be added to theright hand side[children] of thereferenced ParameterizedValueAssignment. 7.2. BuiltinValue Translation<type> element. Thetranslationcontent ofa BuiltinValuethe <constrained> element iseithertheattribute formtranslation ofa built-in value, ortheelement formType followed by the translation ofa built-in value.the Constraint. Theattribute formtranslation of abuilt-in valueContainedType that isan attribute with the [local name] "literal" whose [normalized value]a TypeWithConstraint is theRXER [RXER] encoding of the BuiltinValue. The element formtranslation of the TypeWithConstraint. Legg & Prager Expires 11 October 2005 [Page 38] INTERNET-DRAFT ASN.1 Schema April 11, 2005 Definition: A LowerEndpoint or UpperEndpoint is abuilt-insimple endpoint if it is closed and its value is "MIN", "MAX" or a SignedNumber in anelement with the [local name] "value" whose content isIntegerValue in a BuiltinValue in theRXER encodingValue of theBuiltinValue, except thatendpoint. Definition: A SizeConstraint is avalue ofsimple range if theEXTERNAL type (orConstraint in the SizeConstraint contains only asubtype thereof)ValueRange (i.e., a ValueRange in a SubtypeElements in an Elements in a single IntersectionElements in a single Intersections in a Unions in an ElementSetSpec in a lone RootElementSetSpec in an ElementSetSpecs in a SubtypeConstraint in a lone ConstraintSpec in the Constraint) and both endpoints are simple. Definition: A Constraint isencoded according toa simple range if contains only a SizeConstraint that is a simple range (i.e., a simple range SizeConstraint in a SubtypeElements in an Elements in a single IntersectionElements in a single Intersections in a Unions in an ElementSetSpec in a lone RootElementSetSpec in an ElementSetSpecs in a SubtypeConstraint in a lone ConstraintSpec in theassociated type definedConstraint). If the Constraint or SizeConstraint inClause 34.5a TypeWithConstraint is a simple range then the compact translation ofX.680 [X680].the TypeWithConstraint MAY be used, otherwise the full translation of the TypeWithConstraint is used. Therules for translatingcompact translation of aValue apply recursively to any nested Value except thatTypeWithConstraint is the[local name]translation ofa nested Value will be determined according to RXER bythegoverning ASN.1 typeparent type. If the value of theenclosing Value. Anlower endpoint is not "MIN" or "0" then an attribute with the [local name]"meta", [namespace name] "http://xmled.info/ns/ASN.1" and [normalized value] "false" or "0" (e.g., asn1:meta="false") MAY"minSize" SHALL be added to the [attributes] of the<value> element. Note that<sequenceOf>, <setOf> or <list> element from theasn1:metatranslation of the parent type. The [normalized value] of this attributeoperates as a switch that indicates whetheris thecontentvalue of the<value> element containinglower endpoint. If theattributevalue of the upper endpoint isinterpreted as ASN.1 Schema notation or asnot "MAX" then anRXER encoding. Theattributeform translation of BuiltinValuewith the [local name] "maxSize" SHALLNOTbeused if,added to theRXER encoding[attributes] of theValue contains items other than character information items,<sequenceOf>, <setOf> or <list> element. The [normalized value] of this attributeformsis the value ofValue have been explicitly disallowed, ortheBuiltinValue has a nested Value that is not a BuiltinValue. Legg & Prager Expires 17 December 2004 [Page 35] INTERNET-DRAFT ASN.1 Schema June 17, 2004 7.3. ValueFromObject Translationupper endpoint. The full translation of aValueFromObjectTypeWithConstraint is an element with the [local name]"value". An attribute with the [local name] "meta", [namespace name] "http://xmled.info/ns/ASN.1" and [normalized value] "true" or "1" (e.g., asn1:meta="true") is added to the [attributes] of the <value> element."type". An element with the [local name]"fromObjects" is"constrained" SHALL be added to the [children] of the<value><type> element. Thetranslationcontent of theReferencedObjects in the ValueFromObject<constrained> element isadded to the content ofthe<fromObjects> element. Thetranslation of theFieldName in the ValueFromObject is appended toparent type followed by thecontenttranslation of the<fromObjects> element. 7.4. ObjectClassFieldValueConstraint or SizeConstraint. Examples SEQUENCE (SIZE(1..MAX)) OF number INTEGER <type> <sequenceOf minSize="1"> <element name="number" type="asn1:INTEGER"/> </sequenceOf> Legg & Prager Expires 11 October 2005 [Page 39] INTERNET-DRAFT ASN.1 Schema April 11, 2005 </type> SEQUENCE SIZE(0..10) OF number INTEGER <type> <sequenceOf maxSize="10"> <element name="number" type="asn1:INTEGER"/> </sequenceOf> </type> SEQUENCE SIZE(1..limit) OF number INTEGER <type> <constrained> <type> <sequenceOf> <element name="number" type="asn1:INTEGER"/> </sequenceOf> </type> <size> <range> <minInclusive literal="1"/> <maxInclusive value="tns:limit"/> </range> </size> </constrained> </type> 6.13.1. Constraint TranslationIf an ObjectClassFieldValue is a BuiltinValue in a FixedTypeFieldVal then theThe translation ofthe ObjectClassFieldValuea Constraint is the translation of theBuiltinValue. If an ObjectClassFieldValue is a ReferencedValue in a FixedTypeFieldVal thenConstraintSpec followed by the translation of theObjectClassFieldValueExceptionSpec (possibly empty). The translation of a ConstraintSpec is the translation of theReferencedValue. If an ObjectClassFieldValue is an OpenTypeFieldVal then thecontained SubtypeConstraint or GeneralConstraint. The translation ofthe ObjectClassFieldValuea SubtypeConstraint is the translation of theValue in the OpenTypeFieldVal. Note that if the Value iscontained ElementSetSpecs. The translation of aBuiltinValue (in which case it will be RXER encoded) then the Type in the OpenTypeFieldVal should be indicated byGeneralConstraint is thexsi:type attribute, if it comprises onetranslation of theproductions in Table 1. 8.contained UserDefinedConstraint, TableConstraint or ContentsConstraint. 6.13.2. UserDefinedConstraint Translationof Value SetsThe translation of aValueSetUserDefinedConstraint is an element with the Legg & Prager Expires 11 October 2005 [Page 40] INTERNET-DRAFT ASN.1 Schema April 11, 2005 [local name]"valueSet"."constrainedBy". The translation ofthe ElementSetSpecs in the ValueSet is addedeach UserDefinedConstraintParameter SHALL be appended to the [children] of the<valueSet><constrainedBy> element.Example { 1 | 3..7, ..., 9..19 EXCEPT ( 11 | 12 ) } <valueSet> <union> <value>1</value> <range> <minInclusive literal="3"/> <maxInclusive literal="7"/> Legg & Prager Expires 17 December 2004 [Page 36] INTERNET-DRAFT ASN.1 Schema June 17, 2004 </range> </union> <extension> <all> <range> <minInclusive literal="9"/> <maxInclusive literal="19"/> </range> <except> <union> <value>11</value> <value>12</value> </union> </except> </all> </extension> </valueSet> 8.1. ElementSetSpecs TranslationThe translation ofan ElementSetSpecs wherea UserDefinedConstraintParameter of theellipsis ("...")"Governor : Value" form isnot presentan element with the [local name] "valueParameter". The content of the <valueParameter> element is the translation of theElementSetSpecType in theRootElementSetSpec.Governor followed by the translation of the Value. The translation ofan ElementSetSpecs wherea UserDefinedConstraintParameter of theellipsis ("...")"Governor : ValueSet" form ispresentan element with the [local name] "valueSetParameter". The content of the <valueSetParameter> element is the translation of theElementSetSpecType in theRootElementSetSpecGovernor followed by the translation of the ValueSet. The translation of a UserDefinedConstraintParameter of the "Governor : Object" form is an element with the [local name]"extension". If an AdditionalElementSetSpec"objectParameter". The content of the <objectParameter> element ispresent thenthe translation of theElementSetSpecDefinedObjectClass in theAdditionalElementSetSpec is added to the [children] of the <extension> element. 8.2. ElementSetSpec Translation IfGovernor followed by theElementSetSpec istranslation of the"ALL Exclusions" form then theObject. The translation of a UserDefinedConstraintParameter of theElementSetSpec"Governor : ObjectSet" form is an element with the [local name]"all". An"objectSetParameter". The content of the <objectSetParameter> element is the translation of the DefinedObjectClass in the Governor followed by the translation of the ObjectSet. The translation of a UserDefinedConstraintParameter that is a Type is an element with the [local name]"except" is"typeParameter". The translation of the Type SHALL be added to the[children]content of the<all><typeParameter> element. The translation of a UserDefinedConstraintParameter that is a DefinedObjectClass is an element with theElements in[local name] "classParameter". The translation of theExclusions isDefinedObjectClass SHALL be added to the[children]content of the<except><classParameter> element.If the ElementSetSpec is of the "Unions" form then the6.13.3. TableConstraint Translation The translation ofthe ElementSetSpeca TableConstraint that is a SimpleTableConstraint is an element with the [local name] "table". The translation of theUnions. IfObjectSet in theUnions has only one Intersections thenSimpleTableConstraint SHALL be added to thetranslationcontent of theUnions is the<table> element. The translation of a TableConstraint thatIntersections, otherwise the translation of the Unionsis a ComponentRelationConstraint is an element with the [local name]"union"."table". The translation ofeach Intersections is appended tothe[children] ofDefinedObjectSet in the<union> element.Legg & Prager Expires17 December 200411 October 2005 [Page37]41] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 If the Intersections has only one IntersectionElements then the translation of the Intersections is the translation of that IntersectionElements, otherwiseApril 11, 2005 ComponentRelationConstraint SHALL be added to thetranslationcontent of theIntersections is an element with the [local name] "intersection".<table> element. The translation of eachIntersectionElements isAtNotation SHALL be appended to the [children] of the<intersection><table> element.If the IntersectionElements is of the "Elems Exclusions" form then theThe translation ofthe IntersectionElementsan AtNotation is an element with the [local name]"all"."restrictBy". The content of the<all><restrictBy> element is thetranslation of the Elements in the Elems followedcharacter string formed byan element withthe[local name] "except". The translationconcatenation ofthe Elementszero, one or more "../" strings, one for each Level in theExclusions is added to the [children] of the <except> element. If the IntersectionElements is of the "Elements" form thenAtNotation (including thetranslationempty one), followed by a "/" (U+002F) separated list of theIntersectionElements is the translationRXER encodings [RXER] of theElements. The translationeffective names [RXEREI] ofan Elements isthetranslation ofNamedType instances identified by theSubtypeElements, ObjectSetElements or ElementSetSpec, as appropriate. 8.3. SubtypeElements TranslationComponentIdList identifiers. If aSubtypeElementsNamedType isa SingleValuesubject to an ATTRIBUTE or ATTRIBUTE-REF encoding instruction then thetranslationencoding of theSubtypeElementseffective name is prefixed with the "@" (U+0040) 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="asn1:TYPE-IDENTIFIER" fieldName="id"/> </type> <table objectset="tns:AllTypes"/> </constrained> </type> Legg & Prager Expires 11 October 2005 [Page 42] INTERNET-DRAFT ASN.1 Schema April 11, 2005 </attribute> <element name="value"> <type> <constrained> <type> <fromClass class="asn1:TYPE-IDENTIFIER" fieldName="Type"/> </type> <table objectset="tns:AllTypes"> <restrictBy>@ID</restrictBy> </table> </constrained> </type> </element> </sequence> </type> 6.13.4. ContentsConstraint Translation The translation ofthe Value, except thata ContentsConstraint is anattribute form ofelement with theValue translation SHALL NOT be used.[local name] "contents". Ifa SubtypeElements is a ContainedSubtype thenthetranslationContentsConstraint is of theSubtypeElements is"CONTAINING Type" form then an element with the [local name]"includes"."containing" SHALL be added to the [children] of the <contents> element. The translation of the Typein the ContainedSubtype isSHALL be added to thecontentcontents of the<includes><containing> element. Ifa SubtypeElements is a ValueRange then the translation oftheSubtypeElementsContentsConstraint isthe translationof theValueRange. If a SubtypeElements is a SizeConstraint"ENCODED BY Value" form thenthe translation of the SubtypeElements isan element with the [local name]"size". The content of the <size> element is"encodedBy" SHALL be added to the [children] of the <contents> element. The translation of theConstraint inValue SHALL be added to theSizeConstraint.contents of the <encodedBy> element. Ifa SubtypeElementsthe ContentsConstraint isa TypeConstraintof the "CONTAINING Type ENCODED BY Value" form then thetranslationcontent of theSubtypeElements<contents> element is an element with the [local name]"typeConstraint". The content of the <typeConstraint>"containing" followed by an elementiswith the [local name] "encodedBy". The translation of the TypeinSHALL be added to theTypeConstraint. If a SubtypeElements is a PermittedAlphabet thencontents of the <containing> element, and the translation of theSubtypeElementsValue SHALL be added to the contents of the <encodedBy> element. 6.13.5. ExceptionSpec Translation The translation of an empty ExceptionSpec is empty. The translation of a non-empty ExceptionSpec is an element with the [local name]"from". The"exception". If the ExceptionSpec is a SignedNumber then the content of the<from><exception> element is the translation ofthe Constraint ina notional INTEGER Type Legg & Prager Expires17 December 200411 October 2005 [Page38]43] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 the PermittedAlphabet. If a SubtypeElements is an InnerTypeConstraints thenApril 11, 2005 followed by the translation of a notional Value of theSubtypeElements isINTEGER type with thetranslationIntegerValue ofthe InnerTypeConstraints.SignedNumber. Ifa SubtypeElementsthe ExceptionSpec is aPatternConstraintDefinedValue then thetranslation of the SubtypeElements is an element with the [local name] "pattern". Thecontent of the<pattern><exception> element is the translation of a notional INTEGER Type followed by theValue in the PatternConstraint. 8.3.1. ValueRange Translation Thetranslation ofa ValueRange is an element withthe[local name] "range".DefinedValue. If theLowerEndpoint in the ValueRangeExceptionSpec is of the"LowerEndValue <""Type : Value" form thenan element with the [local name] "minExclusive" is added to the [children] of the <range> element. If the LowerEndValue is not "MIN" thenthe content of the<minExclusive><exception> element is the translation of theValue in the LowerEndValue. If the LowerEndpoint inType followed by theValueRange istranslation of the"LowerEndValue" form and the LowerEndValueValue. Examples !10 <exception type="asn1:INTEGER" literal="10"/> !myValue <exception type="asn1:INTEGER" value="tns:myValue"/> !PrintableString:"failure" <exception type="asn1:PrintableString" literal="failure"/> 6.14. Tag Defaults and Extension Defaults When a DummyReference or parameterized reference isnot "MIN" then an elementreplaced by the definition it references the TagDefault and ExtensionDefault applying to any nested type definitions may no longer accord with the[local name] "minInclusive" isoriginal ASN.1 specification. This section describes attributes that are added to the[children] of the <range> element. The content of the <minInclusive> element is thetranslation of a type definition so that theValue in the LowerEndValue.appropriate defaults for tagging and extensibility are applied. Definition: For encoding rules that use type tagging, a tag default affects how those tags are constructed. Its value is either EXPLICIT, IMPLICIT or AUTOMATIC. If theLowerEndpointTagDefault in theValueRangeModuleDefinition for a module isofempty then the"LowerEndValue" form andtag default for theLowerEndValuemodule is"MIN" then an element with the [local name] "minInclusive" MAY be added toEXPLICIT, otherwise the[children] oftag default for the<range> element. Ifmodule is theUpperEndpointfirst keyword in theValueRangeTagDefault. The tag default for a Type is the tag default of the"< UpperEndValue" form then an element withmodule containing the[local name] "maxExclusive" is addedType. Definition: An extension default indicates whether types are assumed to be extensible in the[children]absence ofthe <range> element.an explicit extension marker (which translates into an <extension> element). Its value is either TRUE or FALSE. If theUpperEndValueExtensionDefault in the ModuleDefinition for a module isnot "MAX"empty then thecontent ofextension default for the<maxExclusive> elementmodule is FALSE, otherwise thetranslation ofextension default for theValue inmodule is TRUE. The Legg & Prager Expires 11 October 2005 [Page 44] INTERNET-DRAFT ASN.1 Schema April 11, 2005 extension default for a Type is theUpperEndValue. Ifextension default of theUpperEndpoint inmodule containing theValueRangeType. Definition: The contributing Type for a <type> element isofthe"UpperEndValue" form and the UpperEndValue is not "MAX" then an element with the [local name] "maxInclusive" is added toType whose translation produces the[children]content ofthe <range>that <type> element. ASIDE: Thecontenttranslation ofthe <maxInclusive> elementa Type that is a DummyReference, ParameterizedType or ParameterizedValueSetType (in a DefinedType in a ReferencedType) is normally the translation of theValue in the UpperEndValue. If the UpperEndpoint inreferenced Type. In such cases, theValueRangereferencing Type isof the "UpperEndValue" form and the UpperEndValuetherefore not a contributing Type. Definition: If a <type> element is"MAX" then annot enclosed by another <type> elementwiththen the[local name] "maxInclusive" MAY be added toinherited tag default for that <type> element is the[children]tag default of the<range> element. Legg & Prager Expires 17 December 2004 [Page 39] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Examples 1..10 <range> <minInclusive literal="1"/> <maxInclusive literal="10"/> </range> 0..MAX <range> <minInclusive literal="0"/> </range> 0<..<MAX <range> <minExclusive literal="0"/> <maxExclusive/> </range> 8.3.2. InnerTypeConstraints Translation Themodule whose translationof an InnerTypeConstraints ofcontains the"WITH COMPONENT SingleTypeConstraint" form is an element with<type> element, otherwise the[local name] "withComponent". The content ofinherited tag default for the<withComponent><type> element is thetranslationtag default of theConstraint incontributing Type for theSingleTypeConstraint. The translation of an InnerTypeConstraintsinnermost enclosing <type> element. If a contributing Type is not a DefinedType and is not one of the"WITH COMPONENTS MultipleTypeConstraints" form is anproductions in Table 1 (see Section 6.3) and the inherited tag default for its associated <type> elementwithis not the[local name] "withComponents". Ifsame as theMultipleTypeConstraints is a PartialSpecificationtag default of the contributing Type then an attribute with the [local name]"partial" and the [normalized value] "true" or "1" is"tagDefault" SHALL be added to the [attributes] of the<withComponents> element. If the MultipleTypeConstraints is a FullSpecification then<type> element, otherwise an attribute with the [local name]"partial" and the [normalized value] "false" or "0""tagDefault" MAY be added to the [attributes] of the<withComponents><type> element. Thetranslation[normalized value] ofeach NamedConstraint in the MultipleTypeConstraintsthis attribute isappended tothe[children]tag default of the<withComponents> element. The translation ofcontributing Type. Definition: If aNamedConstraint<type> element isannot enclosed by another <type> elementwith the [local name] "component". An attribute withthen the[local name] "name" Legg & Prager Expires 17 December 2004 [Page 40] INTERNET-DRAFT ASN.1 Schema June 17, 2004inherited extension default for that <type> element isadded tothe[attributes]extension default of the<component> element. The [normalized value] of this attributemodule whose translation contains the <type> element, otherwise the inherited extension default for the <type> element is theidentifierextension default of theNamedConstraint. Ifcontributing Type for thePresenceConstraintinnermost enclosing <type> element. If a contributing Type is not a DefinedType and is not one of theComponentConstraint ofproductions in Table 1 and theNamedConstraintinherited extension default for its associated <type> element is notemptythe same as the extension default of the contributing Type then an attribute with the [local name]"use" is"extensibilityImplied" SHALL be added to the [attributes] of the<component> element. The [normalized value] of this<type> element, otherwise an attributeiswith thetext[local name] "extensibilityImplied" MAY be added to the [attributes] of thePresenceConstraint, either "PRESENT", "ABSENT" or "OPTIONAL".<type> element. If theValueConstraint in the ComponentConstraint of the NamedConstraintextension default isnot emptyTRUE then thethe translation[normalized value] ofthe Constraint in the ValueConstraintthis attribute isadded to the [children] of the <component> element. 9."true" or "1", otherwise it is "false" or "0". 7. Translation ofObject Classes The translation ofValues Legg & Prager Expires 11 October 2005 [Page 45] INTERNET-DRAFT ASN.1 Schema April 11, 2005 A Value in anObjectClassASN.1 specification is a mix of literal values (e.g., numbers and strings) and notations for referencing defined values. Likewise, the ASN.1 Schema translation ofeither a DefinedObjectClass, an ObjectClassDefn oraParameterizedObjectClass. If an ObjectClassValue is aParameterizedObjectClass then the translationmix ofthe ObjectClassmarkup for literal values and markup for referencing notations (meta-values). A Value is categorized by thetranslation offollowing definitions. Definition: A Value is a literal value if and only if it is not a meta-value. Definition: A Value is a meta-value if and only if: (a) theObjectClass onValue is a BuiltinValue, and (1) theright hand side ofBuiltinValue is a TaggedValue and thereferenced ParameterizedObjectClassAssignment. The ObjectClass that substitutes forValue in the TaggedValue is aParameterizedObjectClassmeta-value, or (2) the BuiltinValue ispotentially inadifferent module scope toSequenceValue or SetValue and thesurrounding translation, thereforeComponentValueList of the SequenceValue or SetValue contains a NamedValue where the translation of theObjectClass may require a tagDefault or extensibilityImplied attribute, according tocorresponding NamedType (from theprovisionsgoverning type ofSection 5.9. 9.1. DefinedObjectClass Translation If a DefinedObjectClassthe Value) is not anobjectclassreference (not<element> element and the Value of the NamedValue is aDummyReference), an ExternalObjectClassReferencemeta-value, or (3) the BuiltinValue is aUsefulObjectClassReference thenChoiceValue where the translation of theDefinedObjectClass is eitherNamedType corresponding to theattribute form translationidentifier of the ChoiceValue is not anobject class reference,<element> element and the Value of the ChoiceValue is a meta-value, or (4) the BuiltinValue is a SequenceOfValue with a NamedValueList that contains a NamedValue where theelement formtranslation ofan object class reference. The attribute form translationthe corresponding NamedType (from the governing type ofan object class referencethe Value) is not anattribute with<element> element and the[local name] "class". The [normalized value]Value ofthis attribute isthequalified name referencingNamedValue is a meta-value, or (b) theobject class definition (see Section 5.1). InValue is a ReferencedValue, and (1) thecase ofReferencedValue is aUsefulObjectClassReferenceValueFromObject, or (2) thenamespace nameReferencedValue is"http://xmled.info/ns/ASN.1"a DefinedValue, and (i) thelocal partDefinedValue iseither "TYPE- IDENTIFIER"a valuereference (not a DummyReference) or"ABSTRACT-SYNTAX", as appropriate. The element form translation ofanobject class referenceExternalValueReference, or (ii) the DefinedValue isan Legg & Prager Expires 17 December 2004 [Page 41] INTERNET-DRAFT ASN.1 Schema June 17, 2004 element witha DummyReference and the[local name] "class". An attribute withValue in the[local name] "ref" is addedActualParameter corresponding to the[attributes] of the <class> element. The [normalized value] of this attributeDummyReference is a meta-value, or (iii) thequalified name referencingDefinedValue is a ParameterizedValue and theobject class definition. InValue Legg & Prager Expires 11 October 2005 [Page 46] INTERNET-DRAFT ASN.1 Schema April 11, 2005 on thecaseright hand side of the referenced ParameterizedValueAssignment is aUsefulObjectClassReferencemeta-value, or (c) thenamespace nameValue is"http://xmled.info/ns/ASN.1"an ObjectClassFieldValue, and (1) thelocal partObjectClassFieldValue iseither "TYPE- IDENTIFIER"an OpenTypeFieldVal, or"ABSTRACT-SYNTAX", as appropriate. The translation of(2) theDefinedObjectClassObjectClassFieldValue is a FixedTypeFieldVal, and (i) thesame whether the object class definitionFixedTypeFieldVal isreferenced by an objectclassreferencea BuiltinValue that satisfies case (a), oran ExternalObjectClassReference.(ii) the FixedTypeFieldVal is a ReferencedValue that satisfies case (b). 7.1. Translation of Literal Values Thetranslatortranslation of a literal value isfree to chooseeither the attribute form translation of a literal value, or the element form translationfor an object class reference. If a DefinedObjectClass isof aDummyReference then theliteral value. The attribute form translation of a literal value is an attribute with theDefinedObjectClass[local name] "literal" whose [normalized value] is thetranslationRXER encoding [RXER] of theDefinedObjectClass in the ActualParameter corresponding to the DummyReference. 9.2. ObjectClassDefn TranslationValue. The element form translation ofan ObjectClassDefna literal value is an element with the [local name]"class". The translation"value" whose content is the RXER encoding ofeach FieldSpec intheObjectClassDefnValue, except that a value of the EXTERNAL type (or a subtype thereof) isappendedencoded according to the[children]associated type defined in Clause 34.5 of X.680 [X.680]. In addition, where the<class> element. The translationcontent of an element in the encoding corresponds to aFieldSpec isnested meta-value the translation specified in Section 7.2. SHALL be used instead (for the content ofeither a TypeFieldSpec, a FixedTypeValueFieldSpec, a VariableTypeValueFieldSpec, a FixedTypeValueSetFieldSpec, a VariableTypeValueSetFieldSpec, an ObjectFieldSpec or an ObjectSetFieldSpec. 9.2.1. TypeFieldSpec Translation The translation of a TypeFieldSpec wherethat element). If theTypeOptionalitySpec is absent iscontent of an elementwithin the[local name] "typeField". The translation ofencoding corresponds to aTypeFieldSpec withnested literal Value that is aTypeOptionalitySpec of "OPTIONAL"BuiltinValue that isan element with the [local name] "optional".a a SequenceValue, SetValue, ChoiceValue, SequenceOfValue or SetOfValue then that nested literal Value MAY be translated as a meta-value. Anelementattribute with the [local name]"typeField" is"meta", [namespace name] "http://xmled.info/ns/ASN.1" and [normalized value] "false" or "0" (e.g., asn1:meta="false") MAY be added to the[children][attributes] of the<optional><value> element. ASIDE: Thetranslation of a TypeFieldSpec withasn1:meta attribute operates as aTypeOptionalitySpec of "DEFAULT" is an element with the [local name] "optional". An element with the [local name] "typeField" is added toswitch that indicates whether the[children]content of the<optional> element. Anelementwithcontaining the[local name] "default"attribute isappended to the [children] of the <optional> element.interpreted as ASN.1 Schema notation (a meta-value) or as an RXER encoding (a literal value). Thecontent of the <default> element is theattribute form translation of a literal value SHALL NOT be used if, theType inRXER encoding of theTypeOptionalitySpec.Value contains items other than Legg & Prager Expires17 December 200411 October 2005 [Page42]47] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 AnApril 11, 2005 character information items, attributewithforms of Value have been explicitly disallowed, or the[local name] "name"Value has a nested meta-value. 7.2. Translation of Meta-values The translation of a meta-value isadded tothe[attributes]translation ofthe <typeField> element.either a BuiltinValue, a ReferencedValue or an ObjectClassFieldValue. The[normalized value]translation ofthis attributea ReferencedValue is thetypefieldreferencetranslation ofthe TypeFieldSpec, without the ampersand. Example CLASS { &One, &Two OPTIONAL, &Three DEFAULT OBJECT IDENTIFIER } <class> <typeField name="One"/> <optional> <typeField name="Two"/> </optional> <optional> <typeField name="Three"/> <default type="asn1:OBJECT-IDENTIFIER"/> </optional> </class> 9.2.2. FixedTypeValueFieldSpec Translationeither a DefinedValue or a ValueFromObject. The translationof a FixedTypeValueFieldSpec where the ValueOptionalitySpec is absentfor each these cases is described as creating an element with the [local name]"valueField". The translation of"value", which is appropriate for aFixedTypeValueFieldSpec withmeta-value that stands on its own. However, aValueOptionalitySpec of "OPTIONAL" is an element with the [local name] "optional". An element withmeta-value may also be nested within a literal value, in which case the [local name]"valueField" is addedwill be determined according to RXER and the[children]governing ASN.1 type of the<optional> element. The translation of a FixedTypeValueFieldSpec withenclosing literal Value. Examples zero INTEGER ::= 0 <namedValue name="zero" type="asn1:INTEGER"> <value>0</value><!-- A literal value. --> </namedValue> nothing INTEGER ::= zero <namedValue name="nothing" type="asn1:INTEGER"/> <value asn1:meta="true" ref="tns:zero"/><!-- A meta-value. --> </namedValue> integerList SEQUENCE OF number INTEGER ::= { zero, 3, 7 } <namedValue name="integerList"> <type> <sequenceOf> <element name="number" type="asn1:INTEGER"/> </sequenceOf> </type> <value><!-- A literal value. --> <number asn1:meta="true" ref="tns:zero"/><!-- A meta-value. --> <number>3</number><!-- A literal value. --> <number>7</number><!-- A literal value. --> </value> </namedValue> 7.2.1. DefinedValue Translation Legg & Prager Expires 11 October 2005 [Page 48] INTERNET-DRAFT ASN.1 Schema April 11, 2005 If aValueOptionalitySpec of "DEFAULT"DefinedValue is a valuereference (not a DummyReference) or anelement withExternalValueReference then the[local name] "optional". An element withtranslation of the[local name] "valueField"DefinedValue isadded toeither the[children]attribute form translation of a value reference, or the<optional> element. Anelementwith the [local name] "default" is appended to the [children]form translation ofthe <optional> element.a value reference. Thecontent of the <default> element is theattribute form translation ofthe Value in the ValueOptionalitySpec. Ana value reference is an attribute with the [local name]"name" is added to the [attributes] of the <valueField> element."value". The [normalized value] of this attribute is thevaluefieldreference of the FixedTypeValueFieldSpec, withoutqualified name referencing theampersand. Ifvalue definition (see Section 5.1). The attribute form translation SHALL NOT be used if the"UNIQUE" keywordqualified name is shared by two or more value definitions in separate modules, i.e., is ambiguous. The element form translation of a value reference ispresent thenan element with the [local name] "value". An attribute with the [local name]"unique" Legg & Prager Expires 17 December 2004 [Page 43] INTERNET-DRAFT ASN.1 Schema June 17, 2004"meta", [namespace name] "http://xmled.info/ns/ASN.1" and [normalized value] "true" or "1"isSHALL be added to the [attributes] of the<valueField> element, otherwise an<value> element. An attribute with the [local name]"unique" and [normalized value] "false" or "0" MAY"ref" SHALL be added to the [attributes] of the<valueField><value> element. Thetranslation[normalized value] ofthe Type in the FixedTypeValueFieldSpecthis attribute isadded to the content ofthe<valueField> element. Example CLASS { &one OBJECT IDENTIFIER UNIQUE, &two BOOLEAN OPTIONAL, &three INTEGER DEFAULT 0 } <class> <valueField name="one" unique="true" type="asn1:OBJECT-IDENTIFIER"/> <optional> <valueField name="two" type="asn1:BOOLEAN"/> </optional> <optional> <valueField name="three" type="asn1:INTEGER"/> <default literal="0"/> </optional> </class> 9.2.3. FixedTypeValueSetFieldSpec Translation The translation of a FixedTypeValueSetFieldSpec wherequalified name referencing theValueSetOptionalitySpec is absent is an element withvalue definition (see Section 5.1). If the[local name] "valueSetField". The translation of a FixedTypeValueSetFieldSpec with a ValueSetOptionalitySpec of "OPTIONAL"qualified name is shared by two or more value definitions in separate modules then anelement with the [local name] "optional". An elementattribute with the [local name]"valueSetField" is"context" SHALL be added to the[children][attributes] of the<optional><value> element. Thetranslation of a FixedTypeValueSetFieldSpec with a ValueSetOptionalitySpec[normalized value] of"DEFAULT"this attribute isan element with the [local name] "optional". An element withthe[local name] "valueSetField" is added tocharacter string value of the[children]AnyURIValue of the<optional> element. An element withSCHEMA-IDENTITY encoding instruction for the[local name] "default"module containing the value definition referenced by the DefinedValue. ASIDE: A SCHEMA-IDENTITY encoding instruction isappended toobligatory in such cases (see Section 5.1). Usually the[children]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<optional> element. The contentattribute form translation SHALL NOT be used for a DefinedValue that is nested in a literal value. If a DefinedValue is a DummyReference then the translation of the<default> elementDefinedValue is the translation of theValueSetValue in theValueSetOptionalitySpec. An attribute withActualParameter corresponding to the[local name] "name"DummyReference. If a DefinedValue isadded toa ParameterizedValue then the translation of the Value is the translation of the Value on the right hand side of the referenced ParameterizedValueAssignment. ASIDE: Since this section is describing the translation of a DefinedValue for a meta-value, the Value that substitutes for a DummyReference or ParameterizedValue is necessarily also a meta-value. Legg & Prager Expires17 December 200411 October 2005 [Page44]49] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 [attributes] of the <valueSetField> element.April 11, 2005 7.2.2. BuiltinValue Translation The[normalized value]translation ofthis attributea BuiltinValue is thevaluesetfieldreferencetranslation ofthe FixedTypeValueSetFieldSpec, without the ampersand.either a ChoiceValue, a SequenceValue, a SequenceOfValue, a SetValue or a TaggedValue. The translation ofthe Type in the FixedTypeValueSetFieldSpeca TaggedValue isadded tothecontenttranslation of the<valueSetField> element. Example CLASS { &One UTF8String, &Two BOOLEAN OPTIONAL, &Three INTEGER DEFAULT { 1 | 2 } } <class> <valueSetField name="One" type="asn1:UTF8String"/> <optional> <valueSetField name="Two" type="asn1:BOOLEAN"/> </optional> <optional> <valueSetField name="Three" type="asn1:INTEGER"/> <default> <valueSet> <union> <value>1</value> <value>2</value> </union> </valueSet> </default> </optional> </class> 9.2.4. VariableTypeValueFieldSpec Translationcontained Value (which is necessarily a meta-value). The translation of aVariableTypeValueFieldSpec where the ValueOptionalitySpec is absentChoiceValue is an element with the [local name]"valueField". The translation of a VariableTypeValueFieldSpec with a ValueOptionalitySpec of "OPTIONAL" is an element with the [local name] "optional"."value". Anelement with the [local name] "valueField" is added to the [children] of the <optional> element. The translation of a VariableTypeValueFieldSpec with a ValueOptionalitySpec of "DEFAULT" is an elementattribute with the [local name]"optional". An element with the [local"meta", [namespace name]"valueField" is"http://xmled.info/ns/ASN.1" and [normalized value] "true" or "1" SHALL be added to the[children][attributes] of the<optional><value> element. An element with the same [local name]"default" is appended to the [children] of(i.e., "attribute", "element", "content" or "member") as theLegg & Prager Expires 17 December 2004 [Page 45] INTERNET-DRAFT ASN.1 Schema June 17, 2004 <optional> element. Thetranslation of theValueNamedType corresponding to the identifier in theValueOptionalitySpec isChoiceValue SHALL be added to thecontent[children] of the<default><value> element. An attribute with the [local name] "name"isSHALL be added to the [attributes] of the<valueField><attribute>, <element>, <content> or <member> element. The [normalized value] of this attribute is thevaluefieldreferenceRXER encoding of theVariableTypeValueFieldSpec, without the ampersand. An element with the [local name] "typeFromField" is added to the [children]effective name of the<valueField> element.NamedType. The translation of theFieldNameValue in theVariableTypeValueFieldSpec isChoiceValue SHALL be added to the content of the<typeFromField><attribute>, <element>, <content> or <member> element.Example CLASS { &Syntax DEFAULT INTEGER, &one &Syntax, &two &Syntax OPTIONAL, &three &Syntax DEFAULT 0 } <class> <optional> <typeField name="Syntax"/> <default type="asn1: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 literal="0"/> </optional> </class> 9.2.5. VariableTypeValueSetFieldSpec Translation The translation of a VariableTypeValueSetFieldSpec where the ValueSetOptionalitySpec is absent is an element with the [local name] "valueSetField". Legg & Prager Expires 17 December 2004 [Page 46] INTERNET-DRAFT ASN.1 Schema June 17, 2004The translation of aVariableTypeValueSetFieldSpec with a ValueSetOptionalitySpec of "OPTIONAL"SequenceValue or SetValue is an element with the [local name]"optional"."value". Anelementattribute with the [local name]"valueSetField" is"meta", [namespace name] "http://xmled.info/ns/ASN.1" and [normalized value] "true" or "1" SHALL be added to the[children][attributes] of the<optional><value> element. The translation ofa VariableTypeValueSetFieldSpec with a ValueSetOptionalitySpeceach NamedValue in the ComponentValueList of"DEFAULT"the SequenceValue or SetValue SHALL be appended to the [children] of the <value> element, in the order in which their corresponding NamedType instances appear in the definition of the governing type. The translation of a SequenceOfValue is an element with the [local name]"optional"."value". Anelementattribute with the [local name]"valueSetField" is"meta", [namespace name] "http://xmled.info/ns/ASN.1" and [normalized value] "true" or "1" SHALL be added to the [attributes] of the <value> element. If the SequenceOfValue has a NamedValueList then the translation of each NamedValue in the NamedValueList SHALL be appended to the [children] of the<optional><value> element.AnIf the SequenceOfValue has a ValueList then an element with the [local name]"default" is"element" SHALL be appended to the [children] of the<optional><value> element for each Value in the ValueList. An attribute with the [local name] "name" and [normalized value] "item" SHALL be added Legg & Prager Expires 11 October 2005 [Page 50] INTERNET-DRAFT ASN.1 Schema April 11, 2005 to the [attributes] of the <element> element. The translation of the Value (from the ValueList) SHALL be added to the content of the<default> element<element> element. The translation of a NamedValue is an element with the same [local name] as the translation of theValueSet in the ValueSetOptionalitySpec.corresponding NamedType, i.e., "attribute", "element", "content" or "item". An attribute with the [local name] "name"isSHALL be added to the [attributes] of the<valueSetField>element. The [normalized value] of this attribute is thevaluesetfieldreferenceRXER encoding of theVariableTypeValueSetFieldSpec, without the ampersand. An element with the [local name] "typeFromField" is added to the [children]effective name of the<valueSetField> element.NamedType. The translation of theFieldName in the VariableTypeValueSetFieldSpec isValue SHALL be added to the content of the<typeFromField>element.Example CLASSExamples -- This is the governing type. MyType ::= SEQUENCE {&Syntax DEFAULTone [ATTRIBUTE] INTEGER,&One &Syntax, &Two &Syntax OPTIONAL, &Three &Syntax DEFAULTtwo INTEGER, three [ATTRIBUTE][LIST] SEQUENCE OF number INTEGER } <namedType name="MyType"> <type> <sequence> <attribute name="one" type="asn1:INTEGER"/> <element name="two" type="asn1:INTEGER"/> <attribute name="three"> <type> <list> <item name="number" type="asn1:INTEGER"/> </list> </type> </attribute> </sequence> </type> </namedType> myValue1 MyType ::= {1 | 2one 456, two 123, three { number 123, number 456 } }<class> <optional> <typeField name="Syntax"/> <default type="asn1: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"/>-- No meta-values. <namedValue name="myValue1" type="tns:MyType"> <value one="456" three="123 456"> <two>123</two> </value> Legg & Prager Expires17 December 200411 October 2005 [Page47]51] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 </valueSetField> <default> <valueSet> <union> <value>1</value> <value>2</value> </union> </valueSet> </default> </optional> </class> 9.2.6. FieldNameApril 11, 2005 </namedValue> myValue2 MyType ::= { one 456, two myObject.&number, -- only the value for component "two" is a meta-value three { number 123, number 456 } } <namedValue name="myValue2" type="tns:MyType"> <value one="456" three="123 456"> <two asn1:meta="true"> <fromObjects object="tns:myObject" fieldName="number"/> </two> </value> </namedValue> myValue3 MyType ::= { one myObject.&number, two 123, three { number 123, number myObject.&number } } <namedValue name="myValue3" type="tns:MyType"> <value asn1:meta="true"> <attribute name="one"> <value asn1:meta="true"> <fromObjects object="tns:myObject" fieldName="number"/> </value> </attribute> <element name="two" literal="123"/> <attribute name="three"> <value asn1:meta="true"> <item name="number" literal="123"/> <item name="number"> <value asn1:meta="true"> <fromObjects object="tns:myObject" fieldName="number"/> </value> </item> </value> </attribute> </value> </namedValue> 7.2.3. ValueFromObject Translation The translation of aFieldNameValueFromObject iseither, at the translator's option,an element with the [local name] "value". An attribute with the [local name]"fieldName""meta", Legg & Prager Expires 11 October 2005 [Page 52] INTERNET-DRAFT ASN.1 Schema April 11, 2005 [namespace name] "http://xmled.info/ns/ASN.1" and [normalized value] "true" or "1" SHALL be added to the [attributes] of theenclosing element, or an<value> element. An element with the [local name]"fieldName" appended"fromObjects" SHALL be added to the [children] of theenclosing<value> element. The[normalized value]translation of theattribute is a "/" (U+002F) separated list ofReferencedObjects in theprimitive field names withoutValueFromObject SHALL be added to theampersand characters ("&", U+0026). Thecontent of the<fieldName> element is (ignoring comment and processing instruction items) a "/" (U+002F) separated list<fromObjects> element. The translation of theprimitive field names withoutFieldName in theampersand characters ("&", U+0026). Example &Linked.&ArgumentType <fieldName>Linked/ArgumentType</fieldName> 9.2.7. ObjectFieldSpecValueFromObject SHALL be appended to the content of the <fromObjects> element. 7.2.4. ObjectClassFieldValue TranslationTheIf an ObjectClassFieldValue is a BuiltinValue in a FixedTypeFieldVal then the translation ofan ObjectFieldSpec wheretheObjectOptionalitySpec is absentObjectClassFieldValue isan element withthe[local name] "objectField". Thetranslation of the BuiltinValue. If an ObjectClassFieldValue is aObjectFieldSpec withReferencedValue in aObjectOptionalitySpec of "OPTIONAL" is an element withFixedTypeFieldVal then the[local name] "optional". An element withtranslation of the[local name] "objectField"ObjectClassFieldValue isadded tothe[children]translation of the<optional> element. TheReferencedValue. If an ObjectClassFieldValue is an OpenTypeFieldVal then the translation ofa ObjectFieldSpec with a ObjectOptionalitySpec of "DEFAULT"the ObjectClassFieldValue is an element with the [local name]"optional"."value". Anelementattribute with the [local name]"objectField" is"meta", [namespace name] "http://xmled.info/ns/ASN.1" and [normalized value] "true" or "1" SHALL be added to the[children][attributes] of the<optional><value> element. An element with the [local name]"default" is Legg & Prager Expires 17 December 2004 [Page 48] INTERNET-DRAFT ASN.1 Schema June 17, 2004 appended"openTypeValue" SHALL be added to the [children] of the<optional><value> element. Thecontent of the <default> element is thetranslation of theObjectType in theObjectOptionalitySpec. An attribute with the [local name] "name" isOpenTypeFieldVal SHALL be added to the[attributes]content of the<objectField><openTypeValue> element. The[normalized value] of this attribute is the objectfieldreference of the ObjectFieldSpec, without the ampersand. Thetranslation of theDefinedObjectClassValue in theObjectFieldSpec is addedOpenTypeFieldVal SHALL be appended to the content of the<objectField><openTypeValue> element. ExampleCLASS { &one TYPE-IDENTIFIER, &two ABSTRACT-SYNTAX OPTIONAL, &three TYPE-IDENTIFIER DEFAULT myObject } <class> <objectField name="one" class="asn1:TYPE-IDENTIFIER"/> <optional> <objectField name="two" class="asn1:ABSTRACT-SYNTAX"/> </optional> <optional> <objectField name="three" class="asn1:TYPE-IDENTIFIER"/> <default object="tns:myObject"/> </optional> </class> 9.2.8. ObjectSetFieldSpecmyValue TYPE-IDENTIFIER.&Type ::= INTEGER:123 <namedValue name="myValue"> <type> <fromClass class="asn1:TYPE-IDENTIFIER" fieldName="Type"/> </type> <value asn1:meta="true"> <openTypeValue type="asn1:INTEGER" literal="123"/> </value> </namedValue> 8. Translation of Value Sets Legg & Prager Expires 11 October 2005 [Page 53] INTERNET-DRAFT ASN.1 Schema April 11, 2005 The translation ofan ObjectSetFieldSpec where the ObjectSetOptionalitySpec is absenta ValueSet is an element with the [local name]"objectSetField"."valueSet". The translation ofa ObjectSetFieldSpec with a ObjectSetOptionalitySpec of "OPTIONAL" is an element withthe[local name] "optional". An element withElementSetSpecs in the[local name] "objectSetField" isValueSet SHALL be added to the [children] of the<optional><valueSet> element.The translation of a ObjectSetFieldSpec with a ObjectSetOptionalitySpec of "DEFAULT" is an element with the [local name] "optional". An element with the [local name] "objectSetField"Example { 1 | 3..7, ..., 9..19 EXCEPT ( 11 | 12 ) } <valueSet> <union> <value>1</value> <range> <minInclusive literal="3"/> <maxInclusive literal="7"/> </range> </union> <extension> <all> <range> <minInclusive literal="9"/> <maxInclusive literal="19"/> </range> <except> <union> <value>11</value> <value>12</value> </union> </except> </all> </extension> </valueSet> 8.1. ElementSetSpecs Translation The translation of an ElementSetSpecs where the ellipsis ("...") is not present isadded tothe[children]translation of the<optional> element. AnElementSetSpec in the RootElementSetSpec. The translation of an ElementSetSpecs where the ellipsis ("...") is present is the translation of the ElementSetSpec in the RootElementSetSpec followed by an element with the [local name]"default""extension". If an AdditionalElementSetSpec isappendedpresent then the translation of the ElementSetSpec in the AdditionalElementSetSpec SHALL be added to the [children] of the<optional><extension> element.The content8.2. ElementSetSpec Translation If the ElementSetSpec is of the "ALL Exclusions" form then the Legg & Prager Expires17 December 200411 October 2005 [Page49]54] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 <default> element is theApril 11, 2005 translation of theObjectSet inElementSetSpec is an element with theObjectSetOptionalitySpec.[local name] "all". Anattributeelement with the [local name]"name" is"except" SHALL be added to the[attributes][children] of the<objectSetField><all> element. The[normalized value] of this attribute is the objectsetfieldreference of the ObjectSetFieldSpec, without the ampersand. Thetranslation of theDefinedObjectClassElements in theObjectSetFieldSpec isExclusions SHALL be added to thecontent[children] of the<objectSetField><except> element.Example CLASS { &One TYPE-IDENTIFIER, &Two ABSTRACT-SYNTAX OPTIONAL, &Three TYPE-IDENTIFIER DEFAULT { myObject } } <class> <objectSetField name="One" class="asn1:TYPE-IDENTIFIER"/> <optional> <objectSetField name="Two" class="asn1:ABSTRACT-SYNTAX"/> </optional> <optional> <objectSetField name="Three" class="asn1:TYPE-IDENTIFIER"/> <default> <objectSet> <object ref="tns:myObject"/> </objectSet> </default> </optional> </class> 10. Translation of Objects The translation of an Object is the translation of either a DefinedObject, an ObjectDefn, an ObjectFromObject or a ParameterizedObject.Ifan Objectthe ElementSetSpec isa ParameterizedObjectof the "Unions" form then the translation of theObjectElementSetSpec is the translation of theObject onUnions. If theright hand sideUnions has only one Intersections then the translation of thereferenced ParameterizedObjectAssignment. The Object that substitutes for a ParameterizedObjectUnions ispotentially in a different module scope tothesurrounding translation, thereforetranslation of that Intersections, otherwise the translation of theObject may require a tagDefault or extensibilityImplied attribute, accordingUnions is an element with the [local name] "union". The translation of each Intersections SHALL be appended to theprovisions[children] ofSection 5.9. Legg & Prager Expires 17 December 2004 [Page 50] INTERNET-DRAFT ASN.1 Schema June 17, 2004 10.1. DefinedObject Translationthe <union> element. Ifa DefinedObject is an objectreference (not a DummyReference) or an ExternalObjectReferencethe Intersections has only one IntersectionElements then the translation of theDefinedObjectIntersections iseithertheattribute formtranslation ofan object reference, orthat IntersectionElements, otherwise theelement form translation of an object reference. The attribute formtranslation ofan object referencethe Intersections is anattributeelement with the [local name]"object"."intersection". The[normalized value]translation ofthis attribute iseach IntersectionElements SHALL be appended to thequalified name referencing[children] of theobject definition (see Section 5.1). The element<intersection> element. If the IntersectionElements is of the "Elems Exclusions" form then the translation ofan object referencethe IntersectionElements is an element with the [local name]"object". An attribute"all". The content of the <all> element is the translation of the Elements in the Elems followed by an element with the [local name]"ref" is"except". The translation of the Elements in the Exclusions SHALL be added to the[attributes][children] of the<object><except> element.The [normalized value] of this attributeIf the IntersectionElements is of thequalified name referencing"Elements" form then theobject definition. Thetranslation of theDefinedObjectIntersectionElements is thesame whethertranslation of theobject definition is referenced by an objectreference orElements. The translation of anExternalObjectReference. UsuallyElements is thetranslator is free to choose eithertranslation of theattribute formSubtypeElements, ObjectSetElements orelement formElementSetSpec, as appropriate. 8.3. SubtypeElements Translation If a SubtypeElements is a SingleValue then the translationfor an object reference, however in some contextsof the SubtypeElements is the translation of the Value, except that an attribute formis explicitly disallowed.of the Value translation SHALL NOT be used. If aDefinedObjectSubtypeElements is aDummyReferenceContainedSubtype then the translation of theDefinedObjectSubtypeElements is an element with the [local name] "includes". The translation of theObjectType in theActualParameter correspondingContainedSubtype SHALL be added to theDummyReference. The Object that substitutes forcontent of the <includes> element. If aDummyReferenceSubtypeElements ispotentially inadifferent module scope to the surrounding translation, thereforeValueRange then the translation of theObject may require a tagDefault or extensibilityImplied attribute, according toLegg & Prager Expires 11 October 2005 [Page 55] INTERNET-DRAFT ASN.1 Schema April 11, 2005 SubtypeElements is theprovisionstranslation ofSection 5.9. 10.2. ObjectDefn Translation An ObjectDefn intheDefinedSyntax formValueRange. If a SubtypeElements isfirst converted to the equivalent DefaultSyntax anda SizeConstraint thentranslated. Thethe translation ofan ObjectDefnthe SubtypeElements is an element with the [local name]"object". An element with"size". The content of the[local name] "definition"<size> element isadded to the [children] ofthe<object> element. Thetranslation ofeach FieldSettingthe Constraint in theDefaultSyntaxSizeConstraint. If a SubtypeElements is a TypeConstraint then the translation of theObjectClassDefnSubtypeElements isappended toan element with the[children][local name] "typeConstraint". The content of the<definition> element. The<typeConstraint> element is the translation of the Type in the TypeConstraint. If aFieldSettingSubtypeElements is a PermittedAlphabet then the translation of the SubtypeElements is an element with theLegg & Prager Expires 17 December 2004 [Page 51] INTERNET-DRAFT ASN.1 Schema June 17, 2004 PrimitiveFieldName (without the ampersand) as its[localname].name] "from". The content ofthisthe <from> element is the translation of theType, Value, ValueSet, Object or ObjectSetConstraint in theSettingPermittedAlphabet. If a SubtypeElements is an InnerTypeConstraints then the translation of theFieldSetting. Example ONE-OF-EVERYTHING ::= CLASS { &One, &two INTEGER, &Three INTEGER, &four TYPE-IDENTIFIER, &Five TYPE-IDENTIFIER } <namedClass name="ONE-OF-EVERYTHING"> <class> <typeField name="One"/> <valueField name="two" type="asn1:INTEGER"/> <valueSetField name="Three" type="asn1:INTEGER"/> <objectField name="four" class="asn1:TYPE-IDENTIFIER"/> <objectSetField name="Five" class="asn1:TYPE-IDENTIFIER"/> </class> </namedClass> mixedBag ONE-OF-EVERYTHING ::= { &One BOOLEAN, &two 99, &Three { 1 | 2 }, &four myObject, &Five { myObject } } <namedObject name="mixedBag" class="ONE-OF-EVERYTHING"> <object> <definition> <One type="asn1:BOOLEAN"/> <two literal="99"/> <Three> <valueSet> <union> <value>1</value> <value>2</value> </union> </valueSet> </Three> <four object="tns:myObject"/> <Five> <objectSet> Legg & Prager Expires 17 December 2004 [Page 52] INTERNET-DRAFT ASN.1 Schema June 17, 2004 <object ref="tns:myObject"/> </objectSet> </Five> </definition> </object> </namedObject> 10.3. ObjectFromObjectSubtypeElements is the translation of the InnerTypeConstraints. If a SubtypeElements is a PatternConstraint then the translation of the SubtypeElements is an element with the [local name] "pattern". The content of the <pattern> element is the translation of the Value in the PatternConstraint. 8.3.1. ValueRange Translation The translation ofan ObjectFromObjecta ValueRange is an element with the [local name]"object". An"range". If the LowerEndpoint in the ValueRange is of the "LowerEndValue <" form then an element with the [local name]"fromObjects" is"minExclusive" SHALL be added to the [children] of the<object><range> element.TheIf the LowerEndValue is not "MIN" then the content of the <minExclusive> element is the translation of theReferencedObjectsValue in theObjectFromObjectLowerEndValue. If the LowerEndpoint in the ValueRange is of the "LowerEndValue" form and the LowerEndValue is not "MIN" then an element with the [local name] "minInclusive" SHALL be added to thecontent[children] of the<fromObjects><range> element. The content of the <minInclusive> element is the translation of theFieldNameValue in theObjectFromObject is appended toLowerEndValue. If thecontent ofLowerEndpoint in the<fromObjects> element. 11. TranslationValueRange is ofObject Sets If an ObjectSet matchesthe "LowerEndValue" form"{ DefinedObjectSet }" (i.e., a DefinedObjectSet in an ObjectSetElements in an Elements in a single IntersectionElements in a single Intersections in a Unions in an ElementSetSpec in a lone RootElementSetSpec inand theObjectSetSpec)LowerEndValue is "MIN" then an element with thetranslator[local name] "minInclusive" MAYusebe added to thetranslation[children] of theDefinedObjectSet as the translation of<range> element. If theObjectSet, otherwiseUpperEndpoint in thetranslation of an ObjectSetValueRange is of the "< UpperEndValue" Legg & Prager Expires 11 October 2005 [Page 56] INTERNET-DRAFT ASN.1 Schema April 11, 2005 form then an element with the [local name]"objectSet". The translation of the ObjectSetSpec in the ObjectSet is"maxExclusive" SHALL be added to the [children] of the<objectSet><range> element.Note that an ObjectSet that is directly a DefinedObjectSetIf the UpperEndValue isa notational capability that doesnotexist in ASN.1 specifications but is allowed in ASN.1 Schema to avoid excessive nesting of <objectSet> elements in the expansion of parameterized definitions. If an ObjectSetSpec contains only a RootElementSetSpec"MAX" then thetranslationcontent of theObjectSetSpec<maxExclusive> element is the translation of theElementSetSpecValue in theRootElementSetSpec.UpperEndValue. Ifan ObjectSetSpec contains a RootElementSetSpec andtheellipsis ("...") then the translation ofUpperEndpoint in theObjectSetSpecValueRange isthe translationof theElementSetSpec in"UpperEndValue" form and theRootElementSetSpec followed byUpperEndValue is not "MAX" then an element with the [local name]"extension". If an AdditionalElementSetSpec is present then the translation of the ElementSetSpec in the AdditionalElementSetSpec is"maxInclusive" SHALL be added to the [children] of the<extension><range> element.Legg & Prager Expires 17 December 2004 [Page 53] INTERNET-DRAFT ASN.1 Schema June 17, 2004 If an ObjectSetSpec does not contain a RootElementSetSpec then the translationThe content of theObjectSetSpec is an<maxInclusive> elementwith the [local name] "extension". If an AdditionalElementSetSpecispresent thenthe translation of theElementSetSpecValue in theAdditionalElementSetSpec is added toUpperEndValue. If the[children] ofUpperEndpoint in the<extension> element. Contained within the ElementSetSpec will be one or more ObjectSetElements. 11.1. DefinedObjectSet Translation If a DefinedObjectSetValueRange isan objectsetreference (not a DummyReference) or an ExternalObjectSetReference then the translationof theDefinedObjectSet is either the attribute"UpperEndValue" formtranslation of an object set reference, orand the UpperEndValue is "MAX" then an elementform translationwith the [local name] "maxInclusive" MAY be added to the [children] ofan object set reference.the <range> element. Examples 1..10 <range> <minInclusive literal="1"/> <maxInclusive literal="10"/> </range> 0..MAX <range> <minInclusive literal="0"/> </range> 0<..<MAX <range> <minExclusive literal="0"/> <maxExclusive/> </range> 8.3.2. InnerTypeConstraints Translation Theattribute formtranslation of anobject set referenceInnerTypeConstraints of the "WITH COMPONENT SingleTypeConstraint" form is anattributeelement with the [local name]"objectSet"."withComponent". The[normalized value]content ofthis attributethe <withComponent> element is thequalified name referencingtranslation of theobject set definition (see Section 5.1).Constraint in the SingleTypeConstraint. Theelement formtranslation of anobject set referenceInnerTypeConstraints of the "WITH COMPONENTS MultipleTypeConstraints" form is an element with the [local name]"objectSet". An"withComponents". Legg & Prager Expires 11 October 2005 [Page 57] INTERNET-DRAFT ASN.1 Schema April 11, 2005 If the MultipleTypeConstraints is a PartialSpecification then an attribute with the [local name]"ref" is"partial" and the [normalized value] "true" or "1" SHALL be added to the [attributes] of the<objectSet><withComponents> element.TheIf the MultipleTypeConstraints is a FullSpecification then an attribute with the [local name] "partial" and the [normalized value]of this attribute is"false" or "0" MAY be added to thequalified name referencing[attributes] of theobject set definition.<withComponents> element. The translation of each NamedConstraint in theDefinedObjectSet isMultipleTypeConstraints SHALL be appended to thesame whether[children] of theobject definition<withComponents> element. The translation of a NamedConstraint isreferenced byanobjectsetreferenceelement with the same [local name] (i.e., "attribute", "element", "content" oran ExternalObjectSetReference. Usually"member") as thetranslator is free to choose eithertranslation of the NamedType corresponding to the identifier of the NamedConstraint. An attributeformwith the [local name] "name" SHALL be added to the [attributes] of the <attribute>, <element>, <content> orelement form translation for<member> element, as appropriate. The [normalized value] of this attribute is the RXER encoding of the effective name of the NamedType corresponding to the identifier of the NamedConstraint. If the PresenceConstraint of the ComponentConstraint of the NamedConstraint is not empty then anobject set reference, however in some contextsattribute with the [local name] "use" SHALL be added to the [attributes] of the <component> element. The [normalized value] of this attributeformisexplicitly disallowed.the text of the PresenceConstraint, either "PRESENT", "ABSENT" or "OPTIONAL". If the ValueConstraint in the ComponentConstraint of the NamedConstraint is not empty then the the translation of the Constraint in the ValueConstraint SHALL be added to the [children] of the <attribute>, <element>, <content> or <member> element, as appropriate. 9. Translation of Object Classes The translation of an ObjectClass is the translation of either aDefinedObjectSetDefinedObjectClass, an ObjectClassDefn or a ParameterizedObjectClass. If an ObjectClass is aDummyReferenceParameterizedObjectClass then the translation of theDefinedObjectSetObjectClass is the translation of theObjectSet inObjectClass on theActualParameter corresponding toright hand side of theDummyReference.referenced ParameterizedObjectClassAssignment. ASIDE: TheObjectSetObjectClass that substitutes for aDummyReferenceParameterizedObjectClass is potentially in a different module scope to the surrounding translation, therefore the translation ofthe ObjectSeta nested Type may require a tagDefault or extensibilityImplied attribute, according to the provisions of Section5.9. 11.2. ObjectSetElements Translation6.14. Legg & Prager Expires17 December 200411 October 2005 [Page54]58] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004April 11, 2005 9.1. DefinedObjectClass Translation Ifan ObjectSetElementsa DefinedObjectClass is anObjectobjectclassreference (not a DummyReference), an ExternalObjectClassReference or a UsefulObjectClassReference then the translation of theObjectSetElementsDefinedObjectClass isthe translation of the Object, except thateither the attribute formof the DefinedObjecttranslationSHALL NOT be used. Ifof anObjectSetElements is a DefinedObjectSet thenobject class reference, or the element form translation ofthe ObjectSetElements is the translation of the DefinedObjectSet, except that thean object class reference. The attribute formof the DefinedObjectSettranslationSHALL NOT be used. Ifof anObjectSetElementsobject class reference is anObjectSetFromObjects thenattribute with thetranslation[local name] "class". The [normalized value] ofthe ObjectSetElementsthis attribute is thetranslation ofqualified name referencing theObjectSetFromObjects. If an ObjectSetElements is an ParameterizedObjectSet thenobject class definition (see Section 5.1). In thetranslationcase of a UsefulObjectClassReference theObjectSetElementsnamespace name is "http://xmled.info/ns/ASN.1" and the local part is either "TYPE-IDENTIFIER" or "ABSTRACT-SYNTAX", as appropriate. The attribute form translationof the ObjectSet on the right hand side ofSHALL NOT be used if thereferenced ParameterizedObjectSetAssignment. Note that an ObjectSetElements that is an ObjectSetqualified name isa notational capability that does not existshared by two or more object class definitions inASN.1 specifications butseparate modules, i.e., isallowed in ASN.1 Schema to avoid the need to manufacture a reference name forambiguous. Otherwise, theexpanded parameterized definition. The ObjectSet that substitutes for a ParameterizedObjectSettranslator ispotentially in a different module scopefree to choose either thesurrounding translation, therefore the translation of the ObjectSet may require a tagDefaultattribute form orextensibilityImplied attribute, according to the provisions of Section 5.9. 11.2.1. ObjectSetFromObjects Translationelement form translation for an object class reference. The element form translation of anObjectSetFromObjectsobject class reference is an element with the [local name]"objectSet"."class". Anelementattribute with the [local name]"fromObjects" is"ref" SHALL be added to the[children][attributes] of the<objectSet><class> element. Thetranslation[normalized value] ofthe ReferencedObjects in the ObjectSetFromObjectsthis attribute isadded tothecontent ofqualified name referencing the<fromObjects> element. The translation ofobject class definition. In theFieldName incase of a UsefulObjectClassReference theObjectSetFromObjectsnamespace name isappended to the content of"http://xmled.info/ns/ASN.1" and the<fromObjects> element. 12. Translation of Information From Objects If a ReferencedObjects is a DefinedObject (not a DummyReference) then the translation of the ReferencedObjectslocal part isthe translation of the DefinedObject.either "TYPE-IDENTIFIER" or "ABSTRACT-SYNTAX", as appropriate. Ifa ReferencedObjectsthe qualified name isa DefinedObjectSet (not a DummyReference) Legg & Prager Expires 17 December 2004 [Page 55] INTERNET-DRAFT ASN.1 Schema June 17, 2004shared by two or more object class definitions in separate modules then an attribute with thetranslation of the ReferencedObjects is[local name] "context" SHALL be added to thetranslation[attributes] of theDefinedObjectSet. If a ReferencedObjects<class> element. The [normalized value] of this attribute isa ParameterizedObject thenthetranslationcharacter string value of theReferencedObjects is the translationAnyURIValue of theObject onSCHEMA-IDENTITY encoding instruction for theright hand side ofmodule containing the object class definition referencedParameterizedObjectAssignment. If a ReferencedObjects is a ParameterizedObjectSet then the translation ofby theReferencedObjectsDefinedObjectClass. ASIDE: A SCHEMA-IDENTITY encoding instruction istheobligatory in such cases (see Section 5.1). The translation of theObjectSet onDefinedObjectClass is theright hand side ofsame whether the object class definition is referencedParameterizedObjectSetAssignment.by an objectclassreference or an ExternalObjectClassReference. Ifthe ReferencedObjectsa DefinedObjectClass is a DummyReference then the translation of theReferencedObjectsDefinedObjectClass is the translation of theObject or ObjectSetDefinedObjectClass in the ActualParameter corresponding to the DummyReference.Note that a ReferencedObjects that is an Object or ObjectSet is a notational capability that does not exist inLegg & Prager Expires 11 October 2005 [Page 59] INTERNET-DRAFT ASN.1specifications butSchema April 11, 2005 9.2. ObjectClassDefn Translation The translation of an ObjectClassDefn isallowedan element with the [local name] "class". The translation of each FieldSpec inASN.1 Schema to avoidtheneedObjectClassDefn SHALL be appended tomanufacture a reference name fortheexpanded parameterized definition.[children] of the <class> element. TheObject or ObjectSet that substitutes fortranslation of aParameterizedObject, ParameterizedObjectSet or DummyReferenceFieldSpec ispotentially in a different module scope to the surrounding translation, thereforethe translation ofthe Object or ObjectSet may requireeither atagDefaultTypeFieldSpec, a FixedTypeValueFieldSpec, a VariableTypeValueFieldSpec, a FixedTypeValueSetFieldSpec, a VariableTypeValueSetFieldSpec, an ObjectFieldSpec orextensibilityImplied attribute, according to the provisions of Section 5.9. 13. Security Considerationsan ObjectSetFieldSpec. 9.2.1. TypeFieldSpec Translation TheASN.1 Schematranslation ofan ASN.1 specificationa TypeFieldSpec where the TypeOptionalitySpec issemantically equivalent toabsent is an element with theoriginal ASN.1 specification.[local name] "typeField". Thesecurity considerations that apply totranslation of a TypeFieldSpec with a TypeOptionalitySpec of "OPTIONAL" is anapplication built fromelement with theoriginal ASN.1 specification apply equally[local name] "optional". An element with the [local name] "typeField" SHALL be added toan application built fromtheASN.1 Schema translation. 14. Acknowledgements This document and[children] of thetechnology it describes are a product<optional> element. The translation of ajoint research project between Adacel Technologies Limited and Deakin University on leveraging existing directory technology to produce an XML-based directory service. Appendix A. ASN.1 for ASN.1 Schema This appendixTypeFieldSpec with a TypeOptionalitySpec of "DEFAULT" isnormative. ASN1-Schema Legg & Prager Expires 17 December 2004 [Page 56] INTERNET-DRAFT ASN.1 Schema June 17, 2004 {iso(1) 2 36 79672281 xed(3) module(0) asn1-schema(0)} -- Copyright (C)an element with the [local name] "optional". An element with the [local name] "typeField" SHALL be added to the [children] of the <optional> element. An element with the [local name] "default" SHALL be appended to the [children] of the <optional> element. TheInternet Society (2004). This versioncontent of-- this ASN.1 modulethe <default> element ispartthe translation ofRFC XXXX; seetheRFC itself -- for full legal notices. -- The namespace name for this module is: -- http://xmled.info/ns/ASN.1 --Type in the TypeOptionalitySpec. An attribute with the [local name] "name" SHALL be added to the [attributes] of the <typeField> element. TheSchemaIdentity for[normalized value] of thismodule is: -- http://xmled.info/id/ASN.1/Schema DEFINITIONS XER INSTRUCTIONS AUTOMATIC TAGS EXTENSIBILITY IMPLIED ::= BEGIN IMPORTS AnyType, AnyURI, NCName, Name, XML-Type{} FROM SchemaLanguageIntegration {iso(1) 2 36 79672281 xed(3) module(0) sli(1)} ; ModuleDefinition ::= SEQUENCEattribute is the typefieldreference of the TypeFieldSpec, without the ampersand ("&", U+0026). Example CLASS {name [ATTRIBUTE] ModuleReference OPTIONAL, identifier [ATTRIBUTE] DefinitiveIdentifier OPTIONAL, targetNamespace [ATTRIBUTE] AnyURI&One, &Two OPTIONAL,tagDefault [ATTRIBUTE] TagDefault DEFAULT automatic, extensibilityImplied [ATTRIBUTE] BOOLEAN&Three DEFAULTFALSE, imports [UNTAGGED] SEQUENCE SIZE (1..MAX) OF import Import OPTIONAL, assignments [UNTAGGED] AssignmentList } ModuleReference ::= TypeReference DefinitiveIdentifier ::=OBJECT IDENTIFIERImport ::= SEQUENCE { namespace [ATTRIBUTE] AnyURI OPTIONAL, name [ATTRIBUTE] ModuleReference OPTIONAL, identifier [ATTRIBUTE] DefinitiveIdentifier OPTIONAL, schemaIdentity [ATTRIBUTE] AnyURI OPTIONAL, schemaLocation [ATTRIBUTE] AnyURI OPTIONAL} <class> <typeField name="One"/> <optional> <typeField name="Two"/> Legg & Prager Expires17 December 200411 October 2005 [Page57]60] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 AssignmentList ::= SEQUENCE SIZE (1..MAX) OF assignment [UNTAGGED] Assignment Assignment ::= CHOICE { namedType TypeAssignment, namedValue ValueAssignment, namedValueSet ValueSetTypeAssignment, namedClass ObjectClassAssignment, namedObject ObjectAssignment, namedObjectSet ObjectSetAssignment } TypeAssignment ::= SEQUENCE { name [ATTRIBUTE] ExtendedTypeReference, renames [ATTRIBUTE] TypeReferenceOrEmpty OPTIONAL, typeRef [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL, type Type OPTIONAL } (WITH COMPONENTS { ..., typeRef PRESENT, type ABSENT } | WITH COMPONENTS { ..., typeRef ABSENT, type PRESENT }) ExtendedTypeReference ::= NCName TypeReference ::= UTF8String (PATTERN "[A-Z][A-Z0-9a-z]*(-[A-Z0-9a-z]+)*") TypeReferenceOrEmpty ::= UTF8String (INCLUDES TypeReference | "") ValueAssignment ::= SEQUENCE { name [ATTRIBUTE] ValueReference, typeRef [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL, type Type OPTIONAL, literal [ATTRIBUTE] AnySimpleType OPTIONAL, valueRef [NAME AS "value"] [ATTRIBUTE] QName OPTIONAL, value Value OPTIONAL } ((WITH COMPONENTS { ..., typeRef PRESENT, type ABSENT } | WITH COMPONENTS { ..., typeRef ABSENT, type PRESENT }) INTERSECTION (WITH COMPONENTSApril 11, 2005 </optional> <optional> <typeField name="Three"/> <default type="asn1:OBJECT-IDENTIFIER"/> </optional> </class> 9.2.2. FixedTypeValueFieldSpec Translation The translation of a FixedTypeValueFieldSpec where the ValueOptionalitySpec is absent is an element with the [local name] "valueField". The translation of a FixedTypeValueFieldSpec with a ValueOptionalitySpec of "OPTIONAL" is an element with the [local name] "optional". An element with the [local name] "valueField" SHALL be added to the [children] of the <optional> element. The translation of a FixedTypeValueFieldSpec with a ValueOptionalitySpec of "DEFAULT" is an element with the [local name] "optional". An element with the [local name] "valueField" SHALL be added to the [children] of the <optional> element. An element with the [local name] "default" SHALL be appended to the [children] of the <optional> element. The content of the <default> element is the translation of the Value in the ValueOptionalitySpec. An attribute with the [local name] "name" SHALL be added to the [attributes] of the <valueField> element. The [normalized value] of this attribute is the valuefieldreference of the FixedTypeValueFieldSpec, without the ampersand. If the "UNIQUE" keyword is present then an attribute with the [local name] "unique" and [normalized value] "true" or "1" SHALL be added to the [attributes] of the <valueField> element, otherwise an attribute with the [local name] "unique" and [normalized value] "false" or "0" MAY be added to the [attributes] of the <valueField> element. The translation of the Type in the FixedTypeValueFieldSpec SHALL be added to the content of the <valueField> element. Example CLASS {..., literal PRESENT, valueRef ABSENT, value ABSENT&one OBJECT IDENTIFIER UNIQUE, &two BOOLEAN OPTIONAL, &three INTEGER DEFAULT 0 }| WITH COMPONENTS<class> Legg & Prager Expires 11 October 2005 [Page 61] INTERNET-DRAFT ASN.1 Schema April 11, 2005 <valueField name="one" unique="true" type="asn1:OBJECT-IDENTIFIER"/> <optional> <valueField name="two" type="asn1:BOOLEAN"/> </optional> <optional> <valueField name="three" type="asn1:INTEGER"/> <default literal="0"/> </optional> </class> 9.2.3. FixedTypeValueSetFieldSpec Translation The translation of a FixedTypeValueSetFieldSpec where the ValueSetOptionalitySpec is absent is an element with the [local name] "valueSetField". The translation of a FixedTypeValueSetFieldSpec with a ValueSetOptionalitySpec of "OPTIONAL" is an element with the [local name] "optional". An element with the [local name] "valueSetField" SHALL be added to the [children] of the <optional> element. The translation of a FixedTypeValueSetFieldSpec with a ValueSetOptionalitySpec of "DEFAULT" is an element with the [local name] "optional". An element with the [local name] "valueSetField" SHALL be added to the [children] of the <optional> element. An element with the [local name] "default" SHALL be appended to the [children] of the <optional> element. The content of the <default> element is the translation of the ValueSet in the ValueSetOptionalitySpec. An attribute with the [local name] "name" SHALL be added to the [attributes] of the <valueSetField> element. The [normalized value] of this attribute is the valuesetfieldreference of the FixedTypeValueSetFieldSpec, without the ampersand. The translation of the Type in the FixedTypeValueSetFieldSpec SHALL be added to the content of the <valueSetField> element. Example CLASS {..., literal ABSENT, valueRef PRESENT, value ABSENT } | WITH COMPONENTS&One UTF8String, &Two BOOLEAN OPTIONAL, &Three INTEGER DEFAULT {..., literal ABSENT, valueRef ABSENT,1 | 2 } } <class> Legg & Prager Expires 11 October 2005 [Page 62] INTERNET-DRAFT ASN.1 Schema April 11, 2005 <valueSetField name="One" type="asn1:UTF8String"/> <optional> <valueSetField name="Two" type="asn1:BOOLEAN"/> </optional> <optional> <valueSetField name="Three" type="asn1:INTEGER"/> <default> <valueSet> <union> <value>1</value> <value>2</value> </union> </valueSet> </default> </optional> </class> 9.2.4. VariableTypeValueFieldSpec Translation The translation of a VariableTypeValueFieldSpec where the ValueOptionalitySpec is absent is an element with the [local name] "valueField". The translation of a VariableTypeValueFieldSpec with a ValueOptionalitySpec of "OPTIONAL" is an element with the [local name] "optional". An element with the [local name] "valueField" SHALL be added to the [children] of the <optional> element. The translation of a VariableTypeValueFieldSpec with a ValueOptionalitySpec of "DEFAULT" is an element with the [local name] "optional". An element with the [local name] "valueField" SHALL be added to the [children] of the <optional> element. An element with the [local name] "default" SHALL be appended to the [children] of the <optional> element. The translation of the Value in the ValueOptionalitySpec SHALL be added to the content of the <default> element. An attribute with the [local name] "name" SHALL be added to the [attributes] of the <valueField> element. The [normalized value] of this attribute is the valuefieldreference of the VariableTypeValueFieldSpec, without the ampersand. An element with the [local name] "typeFromField" SHALL be added to the [children] of the <valueField> element. The translation of the FieldName in the VariableTypeValueFieldSpec SHALL be added to the content of the <typeFromField> element. Example Legg & Prager Expires 11 October 2005 [Page 63] INTERNET-DRAFT ASN.1 Schema April 11, 2005 CLASS { &Syntax DEFAULT INTEGER, &one &Syntax, &two &Syntax OPTIONAL, &three &Syntax DEFAULT 0 } <class> <optional> <typeField name="Syntax"/> <default type="asn1: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 literal="0"/> </optional> </class> 9.2.5. VariableTypeValueSetFieldSpec Translation The translation of a VariableTypeValueSetFieldSpec where the ValueSetOptionalitySpec is absent is an element with the [local name] "valueSetField". The translation of a VariableTypeValueSetFieldSpec with a ValueSetOptionalitySpec of "OPTIONAL" is an element with the [local name] "optional". An element with the [local name] "valueSetField" SHALL be added to the [children] of the <optional> element. The translation of a VariableTypeValueSetFieldSpec with a ValueSetOptionalitySpec of "DEFAULT" is an element with the [local name] "optional". An element with the [local name] "valueSetField" SHALL be added to the [children] of the <optional> element. An element with the [local name] "default" SHALL be appended to the [children] of the <optional> element. The content of the <default> element is the translation of the ValueSet in the ValueSetOptionalitySpec. Legg & Prager Expires 11 October 2005 [Page 64] INTERNET-DRAFT ASN.1 Schema April 11, 2005 An attribute with the [local name] "name" SHALL be added to the [attributes] of the <valueSetField> element. The [normalized value] of this attribute is the valuesetfieldreference of the VariableTypeValueSetFieldSpec, without the ampersand. An element with the [local name] "typeFromField" SHALL be added to the [children] of the <valueSetField> element. The translation of the FieldName in the VariableTypeValueSetFieldSpec SHALL be added to the content of the <typeFromField> element. Example CLASS { &Syntax DEFAULT INTEGER, &One &Syntax, &Two &Syntax OPTIONAL, &Three &Syntax DEFAULT { 1 | 2 } } <class> <optional> <typeField name="Syntax"/> <default type="asn1: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> <value>1</value> <value>2</value> </union> </valueSet> </default> </optional> </class> 9.2.6. FieldName Translation Legg & Prager Expires 11 October 2005 [Page 65] INTERNET-DRAFT ASN.1 Schema April 11, 2005 The translation of a FieldName is either, at the translator's option, an attribute with the [local name] "fieldName" added to the [attributes] of the enclosing element, or an element with the [local name] "fieldName" appended to the [children] of the enclosing element. The [normalized value] of the attribute is a "/" (U+002F) separated list of the primitive field names without the ampersand characters ("&", U+0026). The content of the <fieldName> element is (ignoring comment and processing instruction items) a "/" (U+002F) separated list of the primitive field names without the ampersand characters ("&", U+0026). Example &Linked.&ArgumentType <fieldName>Linked/ArgumentType</fieldName> 9.2.7. ObjectFieldSpec Translation The translation of an ObjectFieldSpec where the ObjectOptionalitySpec is absent is an element with the [local name] "objectField". The translation of a ObjectFieldSpec with a ObjectOptionalitySpec of "OPTIONAL" is an element with the [local name] "optional". An element with the [local name] "objectField" SHALL be added to the [children] of the <optional> element. The translation of a ObjectFieldSpec with a ObjectOptionalitySpec of "DEFAULT" is an element with the [local name] "optional". An element with the [local name] "objectField" SHALL be added to the [children] of the <optional> element. An element with the [local name] "default" SHALL be appended to the [children] of the <optional> element. The content of the <default> element is the translation of the Object in the ObjectOptionalitySpec. An attribute with the [local name] "name" SHALL be added to the [attributes] of the <objectField> element. The [normalized value] of this attribute is the objectfieldreference of the ObjectFieldSpec, without the ampersand. The translation of the DefinedObjectClass in the ObjectFieldSpec SHALL be added to the content of the <objectField> element. Example CLASS { Legg & Prager Expires 11 October 2005 [Page 66] INTERNET-DRAFT ASN.1 Schema April 11, 2005 &one TYPE-IDENTIFIER, &two ABSTRACT-SYNTAX OPTIONAL, &three TYPE-IDENTIFIER DEFAULT myObject } <class> <objectField name="one" class="asn1:TYPE-IDENTIFIER"/> <optional> <objectField name="two" class="asn1:ABSTRACT-SYNTAX"/> </optional> <optional> <objectField name="three" class="asn1:TYPE-IDENTIFIER"/> <default object="tns:myObject"/> </optional> </class> 9.2.8. ObjectSetFieldSpec Translation The translation of an ObjectSetFieldSpec where the ObjectSetOptionalitySpec is absent is an element with the [local name] "objectSetField". The translation of a ObjectSetFieldSpec with a ObjectSetOptionalitySpec of "OPTIONAL" is an element with the [local name] "optional". An element with the [local name] "objectSetField" SHALL be added to the [children] of the <optional> element. The translation of a ObjectSetFieldSpec with a ObjectSetOptionalitySpec of "DEFAULT" is an element with the [local name] "optional". An element with the [local name] "objectSetField" SHALL be added to the [children] of the <optional> element. An element with the [local name] "default" SHALL be appended to the [children] of the <optional> element. The content of the <default> element is the translation of the ObjectSet in the ObjectSetOptionalitySpec. An attribute with the [local name] "name" SHALL be added to the [attributes] of the <objectSetField> element. The [normalized value] of this attribute is the objectsetfieldreference of the ObjectSetFieldSpec, without the ampersand. The translation of the DefinedObjectClass in the ObjectSetFieldSpec SHALL be added to the content of the <objectSetField> element. Example CLASS { &One TYPE-IDENTIFIER, Legg & Prager Expires 11 October 2005 [Page 67] INTERNET-DRAFT ASN.1 Schema April 11, 2005 &Two ABSTRACT-SYNTAX OPTIONAL, &Three TYPE-IDENTIFIER DEFAULT { myObject } } <class> <objectSetField name="One" class="asn1:TYPE-IDENTIFIER"/> <optional> <objectSetField name="Two" class="asn1:ABSTRACT-SYNTAX"/> </optional> <optional> <objectSetField name="Three" class="asn1:TYPE-IDENTIFIER"/> <default> <objectSet> <object ref="tns:myObject"/> </objectSet> </default> </optional> </class> 10. Translation of Objects The translation of an Object is the translation of either a DefinedObject, an ObjectDefn, an ObjectFromObject or a ParameterizedObject. If an Object is a ParameterizedObject then the translation of the Object is the translation of the Object on the right hand side of the referenced ParameterizedObjectAssignment. ASIDE: The Object that substitutes for a ParameterizedObject is potentially in a different module scope to the surrounding translation, therefore the translation of a nested Type may require a tagDefault or extensibilityImplied attribute, according to the provisions of Section 6.14. 10.1. DefinedObject Translation If a DefinedObject is an objectreference (not a DummyReference) or an ExternalObjectReference then the translation of the DefinedObject is either the attribute form translation of an object reference, or the element form translation of an object reference. The attribute form translation of an object reference is an attribute with the [local name] "object". The [normalized value] of this attribute is the qualified name referencing the object definition (see Section 5.1). The attribute form translation SHALL NOT be used if the qualified name is shared by two or more object definitions in separate modules, i.e., is ambiguous. Legg & Prager Expires 11 October 2005 [Page 68] INTERNET-DRAFT ASN.1 Schema April 11, 2005 The element form translation of an object reference is an element with the [local name] "object". An attribute with the [local name] "ref" SHALL be added to the [attributes] of the <object> element. The [normalized value] of this attribute is the qualified name referencing the object definition. If the qualified name is shared by two or more object definitions in separate modules then an attribute with the [local name] "context" SHALL be added to the [attributes] of the <object> element. The [normalized value] of this attribute is the character string valuePRESENT })) TypeAndValue ::= SEQUENCE { typeRef [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL, typeof the AnyURIValue of the SCHEMA-IDENTITY encoding instruction for the module containing the object definition referenced by the DefinedObject. ASIDE: A SCHEMA-IDENTITY encoding instruction is obligatory in such cases (see Section 5.1). The translation of the DefinedObject is the same whether the object definition is referenced by an objectreference or an ExternalObjectReference. Usually the translator is free to choose either the attribute form or element form translation for an object reference, however in some contexts the attribute form is explicitly disallowed. If a DefinedObject is a DummyReference then the translation of the DefinedObject is the translation of the Object in the ActualParameter corresponding to the DummyReference. ASIDE: The Object that substitutes for a DummyReference is potentially in a different module scope to the surrounding translation, therefore the translation of a nested TypeOPTIONAL, literal [ATTRIBUTE] AnySimpleType OPTIONAL,may require a tagDefault or extensibilityImplied attribute, according to the provisions of Section 6.14. 10.2. ObjectDefn Translation An ObjectDefn in the DefinedSyntax form is first converted to the equivalent DefaultSyntax and then translated. The translation of an ObjectDefn is an element with the [local name] "object". The translation of each FieldSetting in the DefaultSyntax of the ObjectClassDefn SHALL be appended to the [children] of the <object> element. The translation of a FieldSetting is an element with the [local name] "field". An attribute with the [local name] "name" SHALL be added to the [attributes] of the <field> element. The [normalized value] of this attribute is the PrimitiveFieldName without the ampersand. The translation of the Type, Value, ValueSet, Object or ObjectSet in the Legg & Prager Expires17 December 200411 October 2005 [Page58]69] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 valueRef [NAME AS "value"] [ATTRIBUTE] QName OPTIONAL, value Value OPTIONAL } ((WITH COMPONENTS { ..., typeRef PRESENT, type ABSENT } | WITH COMPONENTS { ..., typeRef ABSENT, type PRESENT }) INTERSECTION (WITH COMPONENTS { ..., literal PRESENT, valueRef ABSENT, value ABSENT } | WITH COMPONENTS { ..., literal ABSENT, valueRef PRESENT, value ABSENT } | WITH COMPONENTS { ..., literal ABSENT, valueRef ABSENT, value PRESENT })) ValueReference ::= Identifier Identifier ::= UTF8String (PATTERN "[a-z][A-Z0-9a-z]*(-[A-Z0-9a-z]+)*") ValueSetTypeAssignment ::= SEQUENCE { name [ATTRIBUTE] ExtendedTypeReference, typeRef [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL, type Type OPTIONAL, valueSet ValueSet } (WITH COMPONENTS { ..., typeRef PRESENT, type ABSENT } | WITH COMPONENTS { ..., typeRef ABSENT, type PRESENT }) TypeAndValueSet ::= SEQUENCE { typeRef [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL, type Type OPTIONAL, valueSet ValueSet } (WITH COMPONENTS { ..., typeRef PRESENT, type ABSENT } | WITH COMPONENTS { ..., typeRef ABSENT, type PRESENT }) ObjectClassAssignmentApril 11, 2005 Setting of the FieldSetting SHALL be added to the [children] of the <field> element. Example ONE-OF-EVERYTHING ::=SEQUENCE { name [ATTRIBUTE] ObjectClassReference, classRef [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL, class ObjectClass OPTIONAL } (WITH COMPONENTSCLASS {..., classRef PRESENT, class ABSENT&One, &two INTEGER, &Three INTEGER, &four TYPE-IDENTIFIER, &Five TYPE-IDENTIFIER }| WITH COMPONENTS { ..., classRef ABSENT, class PRESENT }) ObjectClassReference ::= UTF8String (PATTERN "[A-Z][A-Z0-9]*(-[A-Z0-9]+)*") ObjectAssignment<namedClass name="ONE-OF-EVERYTHING"> <class> <typeField name="One"/> <valueField name="two" type="asn1:INTEGER"/> <valueSetField name="Three" type="asn1:INTEGER"/> <objectField name="four" class="asn1:TYPE-IDENTIFIER"/> <objectSetField name="Five" class="asn1:TYPE-IDENTIFIER"/> </class> </namedClass> mixedBag ONE-OF-EVERYTHING ::=SEQUENCE{name [ATTRIBUTE] ObjectReference, classRef [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL, class DefinedObjectClass OPTIONAL, objectRef [NAME AS "object"] [ATTRIBUTE] QName OPTIONAL, object&One BOOLEAN, &two 99, &Three { 1 | 2 }, &four myObject, &Five { myObject } } <namedObject name="mixedBag" class="tns:ONE-OF-EVERYTHING"> <object> <field name="One" type="asn1:BOOLEAN"/> <field name="two" literal="99"/> <field name="Three"> <valueSet> <union> <value>1</value> <value>2</value> </union> </valueSet> </field> <field name="four" object="tns:myObject"/> <field name="Five"> <objectSet> <object ref="tns:myObject"/> </objectSet> Legg & Prager Expires 11 October 2005 [Page 70] INTERNET-DRAFT ASN.1 Schema April 11, 2005 </field> </object> </namedObject> 10.3. ObjectFromObject Translation The translation of an ObjectFromObject is an element with the [local name] "object". An element with the [local name] "fromObjects" SHALL be added to the [children] of the <object> element. The translation of the ReferencedObjects in the ObjectFromObject SHALL be added to the content of the <fromObjects> element. The translation of the FieldName in the ObjectFromObject SHALL be appended to the content of the <fromObjects> element. 11. Translation of ObjectOPTIONALSets If an ObjectSet matches the form "{ DefinedObjectSet }" (i.e., a DefinedObjectSet in an ObjectSetElements in an Elements in a single IntersectionElements in a single Intersections in a Unions in an ElementSetSpec in a lone RootElementSetSpec in the ObjectSetSpec) then the translator MAY use the translation of the DefinedObjectSet as the translation of the ObjectSet, otherwise the translation of an ObjectSet is an element with the [local name] "objectSet". The translation of the ObjectSetSpec in the ObjectSet SHALL be added to the [children] of the <objectSet> element. ASIDE: An ObjectSet that is directly a DefinedObjectSet is a notational capability that does not exist in ASN.1 specifications but is allowed in ASN.1 Schema to avoid excessive nesting of <objectSet> elements 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 the ellipsis ("...") then the translation of the ObjectSetSpec is the translation of the ElementSetSpec in the RootElementSetSpec followed by an element with the [local name] "extension". If an AdditionalElementSetSpec is present then the translation of the ElementSetSpec in the AdditionalElementSetSpec SHALL be added to the [children] of the <extension> element. If an ObjectSetSpec does not contain a RootElementSetSpec then the Legg & Prager Expires17 December 200411 October 2005 [Page59]71] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 } ((WITH COMPONENTS { ..., classRef PRESENT, class ABSENT } | WITH COMPONENTS { ..., classRef ABSENT, class PRESENT }) INTERSECTION (WITH COMPONENTS { ..., objectRef PRESENT,April 11, 2005 translation of the ObjectSetSpec is an element with the [local name] "extension". If an AdditionalElementSetSpec is present then the translation of the ElementSetSpec in the AdditionalElementSetSpec SHALL be added to the [children] of the <extension> element. Contained within the ElementSetSpec will be one or more ObjectSetElements. 11.1. DefinedObjectSet Translation If a DefinedObjectSet is an objectsetreference (not a DummyReference) or an ExternalObjectSetReference then the translation of the DefinedObjectSet is either the attribute form translation of an objectABSENT } | WITH COMPONENTS { ..., objectRef ABSENT,set reference, or the element form translation of an object set reference. The attribute form translation of an object set reference is an attribute with the [local name] "objectSet". The [normalized value] of this attribute is the qualified name referencing the objectPRESENT })) ObjectClassAndObject ::= SEQUENCE { classRef [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL, class DefinedObjectClass OPTIONAL, objectRef [NAME AS "object"] [ATTRIBUTE] QName OPTIONAL,set definition (see Section 5.1). The attribute form translation SHALL NOT be used if the qualified name is shared by two or more objectObject OPTIONAL } ((WITH COMPONENTS { ..., classRef PRESENT, class ABSENT } | WITH COMPONENTS { ..., classRef ABSENT, class PRESENT }) INTERSECTION (WITH COMPONENTS { ..., objectRef PRESENT,set definitions in separate modules, i.e., is ambiguous. The element form translation of an objectABSENT } | WITH COMPONENTS { ..., objectRef ABSENT,set reference is an element with the [local name] "objectSet". An attribute with the [local name] "ref" SHALL be added to the [attributes] of the <objectSet> element. The [normalized value] of this attribute is the qualified name referencing the objectPRESENT })) ObjectReference ::= ValueReference ObjectSetAssignment ::= SEQUENCE {set definition. If the qualified name[ATTRIBUTE] ObjectSetReference, classRef [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL, class DefinedObjectClass OPTIONAL, objectSetRef [NAME AS "objectSet"] [ATTRIBUTE] QName OPTIONAL, objectSetis shared by two or more object set definitions in separate modules then an attribute with the [local name] "context" SHALL be added to the [attributes] of the <objectSet> element. The [normalized value] of this attribute is the character string value of the AnyURIValue of the SCHEMA-IDENTITY encoding instruction for the module containing the object set definition referenced by the DefinedObjectSet. ASIDE: A SCHEMA-IDENTITY encoding instruction is obligatory in such cases (see Section 5.1). The translation of the DefinedObjectSet is the same whether the object definition is referenced by an objectsetreference or an ExternalObjectSetReference. Usually the translator is free to choose either the attribute form or element form translation for an object set reference, however in some contexts the attribute form is explicitly disallowed. If a DefinedObjectSet is a DummyReference then the translation of the Legg & Prager Expires 11 October 2005 [Page 72] INTERNET-DRAFT ASN.1 Schema April 11, 2005 DefinedObjectSet is the translation of the ObjectSetOPTIONAL } ((WITH COMPONENTS { ..., classRef PRESENT, class ABSENT } | WITH COMPONENTS { ..., classRef ABSENT, class PRESENT }) INTERSECTION (WITH COMPONENTS { ..., objectSetRef PRESENT, objectSet ABSENT } | WITH COMPONENTS { ..., objectSetRef ABSENT, objectSet PRESENT })) ObjectClassAndObjectSet ::= SEQUENCE { classRef [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL, class DefinedObjectClass OPTIONAL, objectSetRef [NAME AS "objectSet"] [ATTRIBUTE] QName OPTIONAL, objectSetin the ActualParameter corresponding to the DummyReference. ASIDE: The ObjectSet that substitutes for a DummyReference is potentially in a different module scope to the surrounding translation, therefore the translation of a nested Type may require a tagDefault or extensibilityImplied attribute, according to the provisions of Section 6.14. 11.2. ObjectSetElements Translation If an ObjectSetElements is an Object then the translation of the ObjectSetElements is the translation of the Object, except that the attribute form of the DefinedObject translation SHALL NOT be used. If an ObjectSetElements is a DefinedObjectSet then the translation of the ObjectSetElements is the translation of the DefinedObjectSet, except that the attribute form of the DefinedObjectSet translation SHALL NOT be used. If an ObjectSetElements is an ObjectSetFromObjects then the translation of the ObjectSetElements is the translation of the ObjectSetFromObjects. If an ObjectSetElements is an ParameterizedObjectSet then the translation of the ObjectSetElements is the translation of the ObjectSetOPTIONAL } ((WITH COMPONENTS { ..., classRef PRESENT, class ABSENT } | WITH COMPONENTS { ..., classRef ABSENT, class PRESENT }) INTERSECTION (WITH COMPONENTS { ..., objectSetRef PRESENT, objectSet ABSENT } | WITH COMPONENTS { ..., objectSetRef ABSENT, objectSet PRESENT })) ObjectSetReference ::= TypeReference TypeOnly ::= SEQUENCE { typeRef [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL, type Type OPTIONAL } (WITH COMPONENTS { typeRef PRESENT, type ABSENT } | Legg & Prager Expires 17 December 2004 [Page 60] INTERNET-DRAFTon the right hand side of the referenced ParameterizedObjectSetAssignment. ASIDE: An ObjectSetElements that is an ObjectSet is a notational capability that does not exist in ASN.1 specifications but is allowed in ASN.1 SchemaJune 17, 2004 WITH COMPONENTS { typeRef ABSENT, type PRESENT }) Type ::= SEQUENCE { tagDefault [ATTRIBUTE] TagDefault OPTIONAL, extensibilityImplied [ATTRIBUTE] BOOLEAN OPTIONAL, explicit [ATTRIBUTE] BOOLEAN DEFAULT FALSE, context [ATTRIBUTE] AnyURI OPTIONAL, ref [ATTRIBUTE] QName OPTIONAL, elementType [ATTRIBUTE] Name OPTIONAL, definition [UNTAGGED] CHOICE { namedBitList NamedBitList, namedNumberList NamedNumberList, enumerated EnumeratedType, tagged TaggedType, selection SelectionType, instanceOf InstanceOfType, fromClass ObjectClassFieldType, fromObjects InformationFromObjects, sequence SequenceType, set SetType, choice ChoiceType, union UnionType, sequenceOf SequenceOfType, setOf SetOfType, list ListType, constrained ConstrainedType } OPTIONAL } (WITH COMPONENTS { ..., context OPTIONAL, ref PRESENT, elementType ABSENT, definition ABSENT } | WITH COMPONENTS { ..., context PRESENT, ref ABSENT, elementType PRESENT, definition ABSENT } | WITH COMPONENTS { ..., context ABSENT, ref ABSENT, elementType ABSENT, definition PRESENT }) QName ::= XML-Type { "http://www.w3.org/2001/XMLSchema", "QName" } NamedBitList ::= SEQUENCE { namedBits [UNTAGGED] SEQUENCE OF namedBit NamedBit } NamedBit ::= SEQUENCE { name [ATTRIBUTE] TextIdentifier, renames [ATTRIBUTE] Identifier OPTIONAL, bit [ATTRIBUTE] INTEGER (0..MAX) }to avoid the need to manufacture a reference name for the expanded parameterized definition. ASIDE: The ObjectSet that substitutes for a ParameterizedObjectSet is potentially in a different module scope to the surrounding translation, therefore the translation of a nested Type may require a tagDefault or extensibilityImplied attribute, according to the provisions of Section 6.14. 11.2.1. ObjectSetFromObjects Translation The translation of an ObjectSetFromObjects is an element with the [local name] "objectSet". An element with the [local name] "fromObjects" SHALL be added to the [children] of the <objectSet> element. The translation of the ReferencedObjects in the ObjectSetFromObjects Legg & Prager Expires17 December 200411 October 2005 [Page61]73] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 TextIdentifier ::= UTF8String NamedNumberList ::= SEQUENCE { namedNumbers [UNTAGGED] SEQUENCE OF namedNumber NamedNumber } NamedNumber ::= SEQUENCE { name [ATTRIBUTE] TextIdentifier, renames [ATTRIBUTE] Identifier OPTIONAL, number [ATTRIBUTE] INTEGER } EnumeratedType ::= SEQUENCE { root [UNTAGGED] Enumeration, extension SEQUENCE { exception ExceptionSpec OPTIONAL, additional [UNTAGGED] Enumeration OPTIONAL } OPTIONAL } Enumeration ::= SEQUENCE SIZE (1..MAX) OF enumeration EnumerationItem EnumerationItem ::= SEQUENCE {April 11, 2005 SHALL be added to the content of the <fromObjects> element. The translation of the FieldName in the ObjectSetFromObjects SHALL be appended to the content of the <fromObjects> element. 12. Translation of Information From Objects If a ReferencedObjects is a DefinedObject (not a DummyReference) then the translation of the ReferencedObjects is the translation of the DefinedObject. If a ReferencedObjects is a DefinedObjectSet (not a DummyReference) then the translation of the ReferencedObjects is the translation of the DefinedObjectSet. If a ReferencedObjects is a DummyReference then the translation of the ReferencedObjects is the translation of the Object or ObjectSet in the ActualParameter corresponding to the DummyReference. If a ReferencedObjects is a ParameterizedObject then the translation of the ReferencedObjects is the translation of the Object on the right hand side of the referenced ParameterizedObjectAssignment. If a ReferencedObjects is a ParameterizedObjectSet then the translation of the ReferencedObjects is the translation of the ObjectSet on the right hand side of the referenced ParameterizedObjectSetAssignment. ASIDE: A ReferencedObjects that is an Object or ObjectSet is a notational capability that does not exist in ASN.1 specifications but is allowed in ASN.1 Schema to avoid the need to manufacture a reference name[ATTRIBUTE] TextIdentifier, renames [ATTRIBUTE] Identifier OPTIONAL, number [ATTRIBUTE] INTEGER OPTIONAL } TaggedType ::= SEQUENCE { tagClass [ATTRIBUTE] TagClass OPTIONAL, tagging [ATTRIBUTE] Tagging OPTIONAL, typeRef [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL, type Type OPTIONAL } (WITH COMPONENTS { ..., typeRef PRESENT, type ABSENT } | WITH COMPONENTS { ..., typeRef ABSENT, type PRESENT }) SelectionType ::= SEQUENCE { alternative [ATTRIBUTE] NameIdentifier, typeRef [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL, typefor an expanded parameterized definition. ASIDE: The Object or ObjectSet that substitutes for a ParameterizedObject, ParameterizedObjectSet or DummyReference is potentially in a different module scope to the surrounding translation, therefore the translation of a nested TypeOPTIONAL } (WITH COMPONENTS { ..., typeRef PRESENT, type ABSENT } | WITH COMPONENTS { ..., typeRef ABSENT, type PRESENT }) InstanceOfType ::= DefinedObjectClassOnly ObjectClassFieldType ::= SEQUENCE { classRef [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL,may require a tagDefault or extensibilityImplied attribute, according to the provisions of Section 6.14. 13. EncodingControlSection Translation If the encodingreference in an EncodingControlSection is RXER then the translation of the EncodingControlSection is empty. ASIDE: This is not suggesting that RXER encoding control sections are ignored. Encoding control sections for RXER are not explicitly represented in ASN.1 Schema, but rather affect how an Legg & Prager Expires17 December 200411 October 2005 [Page62]74] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 class DefinedObjectClass OPTIONAL, fieldNameAtt [NAME AS "fieldName"] [ATTRIBUTE] PrimitiveFieldNames OPTIONAL, fieldName PrimitiveFieldNames OPTIONAL } ((WITH COMPONENTS { ..., classRef PRESENT, class ABSENT } | WITH COMPONENTS { ..., classRef ABSENT, class PRESENT }) INTERSECTION (WITH COMPONENTS { ..., fieldNameAtt PRESENT, fieldName ABSENT } | WITH COMPONENTS { ..., fieldNameAtt ABSENT, fieldName PRESENT })) FieldNameOnly ::= SEQUENCE { fieldNameAtt [NAME AS "fieldName"] [ATTRIBUTE] PrimitiveFieldNames OPTIONAL, fieldName PrimitiveFieldNames OPTIONAL } (WITH COMPONENTS { fieldNameAtt PRESENT, fieldName ABSENT } | WITH COMPONENTS { fieldNameAtt ABSENT, fieldName PRESENT }) PrimitiveFieldNames ::= UTF8String InformationFromObjects ::= SEQUENCE { objectRef [NAME AS "object"] [ATTRIBUTE] QName OPTIONAL, object Object OPTIONAL, objectSetRef [NAME AS "objectSet"] [ATTRIBUTE] QName OPTIONAL, objectSet ObjectSet OPTIONAL, fieldNameAtt [NAME AS "fieldName"] [ATTRIBUTE] PrimitiveFieldNames OPTIONAL, fieldName PrimitiveFieldNames OPTIONAL } ((WITH COMPONENTS { ..., objectRef PRESENT, object ABSENT, objectSetRef ABSENT, objectSet ABSENT } | WITH COMPONENTS { ..., objectRef ABSENT, object PRESENT, objectSetRef ABSENT, objectSet ABSENT } | WITH COMPONENTS { ..., objectRef ABSENT, object ABSENT, objectSetRef PRESENT, objectSet ABSENT } | WITH COMPONENTS { ..., objectRef ABSENT, object ABSENT, objectSetRef ABSENT, objectSet PRESENT }) INTERSECTION (WITH COMPONENTS { ..., fieldNameAtt PRESENT, fieldName ABSENT } | WITH COMPONENTS { ..., fieldNameAtt ABSENT, fieldName PRESENT })) NamedType ::= CHOICE { attribute TypedContainer,April 11, 2005 ASN.1 specification is translated into an ASN.1 Schema document. The effect of an RXER encoding control section on the translation is addressed in other parts of this specification. Encoding control sections for other encoding rules will have explicit representations in ASN.1 Schema. If the encodingreference in an EncodingControlSection is GSER then the translation of the EncodingControlSection is an element with the [local name] "encodingControl-GSER". The translation of the EncodingInstructionAssignmentList SHALL be added to the content of the <encodingControl-GSER> element. The EncodingInstructionAssignmentList notation is different for each set of encoding instructions. The translation into ASN.1 Schema of an EncodingInstructionAssignmentList for GSER is specified in a separate document [GSEREIT]. ASIDE: The translation of an EncodingInstructionAssignmentList for GSER, as it is currently defined, is always empty. If the encodingreference in an EncodingControlSection is XER then the translation of the EncodingControlSection is an elementTypedContainer,with the [local name] "encodingControl-XER". The translation of the EncodingInstructionAssignmentList SHALL be added to the contentTypedContainer }of the <encodingControl-XER> element. The translation into ASN.1 Schema of an EncodingInstructionAssignmentList for XER is specified in a separate document [XEREIT]. 14. Security Considerations The ASN.1 Schema translation of an ASN.1 specification is semantically equivalent to the original ASN.1 specification. The security considerations that apply to an application built from the original ASN.1 specification apply equally to an application built from the ASN.1 Schema translation. 15. Acknowledgements This document and the technology it describes are a product of a joint research project between Adacel Technologies Limited and Deakin University on leveraging existing directory technology to produce an XML-based directory service. 16. IANA Considerations This document has no actions for IANA. Legg & Prager Expires17 December 200411 October 2005 [Page63]75] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 NonAttributeNamedTypeApril 11, 2005 Appendix A. ASN.1 for ASN.1 Schema This appendix is normative. ASN1-Schema { iso(1) identified-organization(3) dod(6) internet(1) private(4) enterprise(1) xmled(21472) asn1(1) module(0) schema(1) } -- Copyright (C) The Internet Society 2005. This version of -- this ASN.1 module is part of RFC XXXX; see the RFC itself -- for full legal notices. DEFINITIONS RXER INSTRUCTIONS AUTOMATIC TAGS EXTENSIBILITY IMPLIED ::=NamedType (WITH COMPONENTSBEGIN IMPORTS AnyType, AnySimpleType, AnyURI, NCName, Name, QName FROM AdditionalBasicDefinitions {..., attribute ABSENT }) TypedContaineriso(1) identified-organization(3) dod(6) internet(1) private(4) enterprise(1) xmled(21472) asn1(1) module(0) basic(0) } GSER-EncodingInstruction, GSER-EncodingInstructionAssignmentList FROM GSER-EncodingInstructionSchema { iso(1) identified-organization(3) dod(6) internet(1) private(4) enterprise(1) xmled(21472) asn1(1) module(0) gser-ei-schema(2) } XER-EncodingInstruction, XER-EncodingInstructionAssignmentList FROM XER-EncodingInstructionSchema { iso(1) identified-organization(3) dod(6) internet(1) private(4) enterprise(1) xmled(21472) asn1(1) module(0) xer-ei-schema(3) } ; ModuleDefinition ::= SEQUENCE {contextname [ATTRIBUTE]AnyURI OPTIONAL, refModuleReference, identifier [ATTRIBUTE]QNameDefinitiveIdentifier OPTIONAL,elementTypeschemaIdentity [ATTRIBUTE]NameAnyURI OPTIONAL,nametargetNamespace [ATTRIBUTE]NameIdentifierAnyURI OPTIONAL,renamesLegg & Prager Expires 11 October 2005 [Page 76] INTERNET-DRAFT ASN.1 Schema April 11, 2005 tagDefault [ATTRIBUTE]IdentifierOrEmpty OPTIONAL, typeRef [NAME AS "type"]TagDefault DEFAULT automatic, extensibilityImplied [ATTRIBUTE]QNameBOOLEAN DEFAULT FALSE, imports [CONTENT] ImportList OPTIONAL,type Type OPTIONAL } (WITH COMPONENTS { contextassignments [CONTENT] AssignmentList OPTIONAL,ref PRESENT } | WITH COMPONENTS { context PRESENT, elementType PRESENTencodingControls [CONTENT] EncodingControlSections OPTIONAL }| WITH COMPONENTSModuleReference ::= TypeReference DefinitiveIdentifier ::= OBJECT IDENTIFIER TagDefault ::= [VALUES ALL UPPERCASED] ENUMERATED {name PRESENT, renames OPTIONAL, typeRef PRESENTexplicit, implicit, automatic }| WITH COMPONENTS { name PRESENT, renames OPTIONAL, type PRESENT }) NameIdentifier ::= NCName IdentifierOrEmptyImportList ::=UTF8String (INCLUDES Identifier | "") SequenceTypeSEQUENCE SIZE (1..MAX) OF import Import Import ::= SEQUENCE {initialRoot [UNTAGGED] ComponentTypeListname [ATTRIBUTE] ModuleReference OPTIONAL,extension SEQUENCE { exception ExceptionSpecidentifier [ATTRIBUTE] DefinitiveIdentifier OPTIONAL,additional [UNTAGGED] ExtensionAdditions OPTIONAL }schemaIdentity [ATTRIBUTE] AnyURI OPTIONAL,finalRoot [UNTAGGED] ComponentTypeListnamespace [ATTRIBUTE] AnyURI OPTIONAL, schemaLocation [ATTRIBUTE] AnyURI OPTIONAL }ComponentTypeListAssignmentList ::= SEQUENCE SIZE (1..MAX) OFcomponent [UNTAGGED] ComponentType ComponentTypeassignment [CONTENT] Assignment Assignment ::= CHOICE {named [UNTAGGED] NamedType, optionalnamedType TypeAssignment, namedValue ValueAssignment, namedValueSet ValueSetTypeAssignment, namedClass ObjectClassAssignment, namedObject ObjectAssignment, namedObjectSet ObjectSetAssignment, component [CONTENT] TopLevelNamedType } TypeAssignment ::= SEQUENCE {named [UNTAGGED] NamedType, default ValueOnly OPTIONAL }, componentsOf TypeOnlyname [ATTRIBUTE] TypeReference, type [CONTENT] Type }ExtensionAdditionsTypeReference ::=SEQUENCE SIZE (1..MAX) OF addition [UNTAGGED] ExtensionAddition ExtensionAdditionUTF8String (PATTERN "[A-Z]\w*(-\w+)*") -- \w is equivalent to [a-zA-Z0-9] ValueAssignment ::=CHOICESEQUENCE {group ExtensionAdditionGroup, component [UNTAGGED] ComponentTypename [ATTRIBUTE] ValueReference, type [CONTENT] Type, Legg & Prager Expires17 December 200411 October 2005 [Page64]77] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 } ExtensionAdditionGroup ::= SEQUENCE { version [ATTRIBUTE] VersionNumber OPTIONAL, group [UNTAGGED] ComponentTypeListApril 11, 2005 value [CONTENT] Value }VersionNumberValueReference ::=INTEGER (2..MAX) SetTypeIdentifier Identifier ::=SequenceType ChoiceTypeUTF8String (PATTERN "[a-z]\w(-\w+)*") ValueSetTypeAssignment ::= SEQUENCE {root [UNTAGGED] AlternativeTypeList, extension SEQUENCE { exception ExceptionSpec OPTIONAL, additional [UNTAGGED] ExtensionAdditionAlternatives OPTIONAL } OPTIONALname [ATTRIBUTE] TypeReference, type [CONTENT] Type, valueSet [CONTENT] ValueSet }AlternativeTypeList ::= SEQUENCE SIZE (1..MAX) OF named [UNTAGGED] NonAttributeNamedType ExtensionAdditionAlternatives ::= SEQUENCE SIZE (1..MAX) OF addition [UNTAGGED] ExtensionAdditionAlternative ExtensionAdditionAlternativeObjectClassAssignment ::=CHOICESEQUENCE {group ExtensionAdditionAlternativesGroup, named [UNTAGGED] NonAttributeNamedTypename [ATTRIBUTE] ObjectClassReference, objectClass [CONTENT] ObjectClass }ExtensionAdditionAlternativesGroupObjectClassReference ::= UTF8String (PATTERN "[A-Z][A-Z0-9]*(-[A-Z0-9]+)*") ObjectAssignment ::= SEQUENCE {versionname [ATTRIBUTE]VersionNumber OPTIONAL, alternatives [UNTAGGED] AlternativeTypeListObjectReference, objectClass [CONTENT] DefinedObjectClass, object [CONTENT] Object }UnionTypeObjectReference ::=ChoiceType SequenceOfTypeValueReference ObjectSetAssignment ::= SEQUENCE {minSize [ATTRIBUTE] INTEGER (0..MAX) OPTIONAL, maxSizename [ATTRIBUTE]INTEGER (0..MAX) OPTIONAL, named [UNTAGGED] NonAttributeNamedTypeObjectSetReference, objectClass [CONTENT] DefinedObjectClass, objectSet [CONTENT] ObjectSet }SetOfTypeObjectSetReference ::=SequenceOfType ListTypeTypeReference TopLevelNamedType ::=SequenceOfType ConstrainedTypeNamedType (WITH COMPONENTS { ..., attribute (WITH COMPONENTS { ..., reference ABSENT }), element (WITH COMPONENTS { ..., reference ABSENT }), content ABSENT, member ABSENT, item ABSENT }) NamedType ::=SEQUENCECHOICE { attribute Attribute, element Element, Legg & Prager Expires17 December 200411 October 2005 [Page65]78] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 typeRef [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL, type Type OPTIONAL, constraint [UNTAGGED] ConstraintApril 11, 2005 content InvisibleNamedType, member InvisibleNamedType, item InvisibleNamedType } Attribute ::= GenericNamedType (WITH COMPONENTS { ...,typeRef PRESENT, typedefinition (WITH COMPONENTS { ..., typeAsVersion ABSENT} | WITH}) }) Element ::= GenericNamedType InvisibleNamedType ::= GenericNamedType (WITH COMPONENTS { ...,typeRefreference ABSENT,type PRESENTdefinition (WITH COMPONENTS { ..., typeAsVersion ABSENT })Constraint}) GenericNamedType ::=SEQUENCE { constraintSpec [UNTAGGED]CHOICE {subtype [UNTAGGED] ElementSetSpecs, constrainedBy UserDefinedConstraint, table TableConstraint, contents ContentsConstraint }, exception ExceptionSpec OPTIONALreference [CONTENT] GeneralReference, definition [CONTENT] SEQUENCE { name [ATTRIBUTE] NCName, identifier [ATTRIBUTE] IdentifierOrEmpty OPTIONAL, typeAsVersion [ATTRIBUTE] BOOLEAN DEFAULT FALSE, type [CONTENT] Type }UserDefinedConstraint} IdentifierOrEmpty ::=SEQUENCEUTF8String (INCLUDES Identifier | "") Type ::= CHOICE {parameters [UNTAGGED] ConstraintParameters OPTIONALtypeRef [NAME AS "type"] [ATTRIBUTE] QName, type ElementFormType }ConstraintParametersElementFormType ::= SEQUENCESIZE (1..MAX) OF parameter [UNTAGGED] UserDefinedConstraintParameter UserDefinedConstraintParameter ::={ tagDefault [ATTRIBUTE] TagDefault OPTIONAL, extensibilityImplied [ATTRIBUTE] BOOLEAN OPTIONAL, explicit [ATTRIBUTE] BOOLEAN DEFAULT FALSE, definition [CONTENT] CHOICE {valueParameter TypeAndValue, valueSetParameter TypeAndValueSet, objectParameter ObjectClassAndObject, objectSetParameter ObjectClassAndObjectSet, typeParameter TypeOnly, classParameter DefinedObjectClassOnlyreference [CONTENT] GeneralReference, ancestor [ATTRIBUTE] INTEGER (1..MAX), namedBitList NamedBitList, namedNumberList NamedNumberList, enumerated EnumeratedType, tagged TaggedType, prefixed EncodingPrefixedType, selection SelectionType, Legg & Prager Expires 11 October 2005 [Page 79] INTERNET-DRAFT ASN.1 Schema April 11, 2005 instanceOf InstanceOfType, fromClass ObjectClassFieldType, fromObjects InformationFromObjects, sequence SequenceType, set SetType, choice ChoiceType, union UnionType, sequenceOf SequenceOfType, setOf SetOfType, list ListType, constrained ConstrainedType } }TableConstraintGeneralReference ::= SEQUENCE {objectSetRef [NAME AS "objectSet"]reference [CONTENT] CHOICE { ref [ATTRIBUTE]QName OPTIONAL, objectSet ObjectSetQName, elementType [ATTRIBUTE] Name }, context [ATTRIBUTE] AnyURI OPTIONAL,componentRelation [UNTAGGED] SEQUENCE SIZE (1..MAX) OF restrictBy AtNotationcanonicalization [ATTRIBUTE] AnyURI OPTIONAL } Reference ::= GeneralReference (WITH COMPONENTS { ...,objectSetRef PRESENT, objectSet ABSENT } | WITHreference (WITH COMPONENTS { ...,objectSetRef ABSENT, objectSet PRESENTelementType ABSENT }), canonicalization ABSENT })AtNotationNamedBitList ::= SEQUENCE {componentnamedBits [CONTENT] SEQUENCE SIZE (1..MAX) OF namedBit NamedBit } NamedBit ::= SEQUENCE { name [ATTRIBUTE]UTF8StringNCName, identifier [ATTRIBUTE] Identifier OPTIONAL, bit [ATTRIBUTE] INTEGER (0..MAX) }ContentsConstraintNamedNumberList ::= SEQUENCE {containing TypeOnlynamedNumbers [CONTENT] SEQUENCE SIZE (1..MAX) OF namedNumber NamedNumber } NamedNumber ::= SEQUENCE { name [ATTRIBUTE] NCName, identifier [ATTRIBUTE] Identifier OPTIONAL,encodedBy ValueOnly OPTIONALnumber [ATTRIBUTE] INTEGER Legg & Prager Expires17 December 200411 October 2005 [Page66]80] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004April 11, 2005 }((WITH COMPONENTSEnumeratedType ::= SEQUENCE {..., containing PRESENT }) | (WITH COMPONENTSroot [CONTENT] Enumeration, extension SEQUENCE {..., encodedBy PRESENT }))exception ExceptionSpec OPTIONAL, additions [CONTENT] Enumeration OPTIONAL } OPTIONAL } Enumeration ::=TypeAndValue ValueOnlySEQUENCE SIZE (1..MAX) OF enumeration EnumerationItem EnumerationItem ::= SEQUENCE {literalname [ATTRIBUTE]AnySimpleType OPTIONAL, valueRef [NAME AS "value"]NCName, identifier [ATTRIBUTE]QNameIdentifier OPTIONAL,value Valuenumber [ATTRIBUTE] INTEGER OPTIONAL }(WITH COMPONENTSTaggedType ::= SEQUENCE {literal PRESENT, valueRef ABSENT, value ABSENTtagClass [ATTRIBUTE] TagClass OPTIONAL, tagging [ATTRIBUTE] Tagging OPTIONAL, type [CONTENT] Type }| WITH COMPONENTSTagClass ::= [VALUES ALL UPPERCASED] ENUMERATED {literal ABSENT, valueRef PRESENT, value ABSENTuniversal, application, private }| WITH COMPONENTSTagging ::= [VALUES ALL UPPERCASED] ENUMERATED {literal ABSENT, valueRef ABSENT, value PRESENT }) AnySimpleTypeexplicit, implicit } EncodingPrefixedType ::=AnyType (WITH COMPONENTSSEQUENCE {..., attributes ABSENT }) Valueprefixes [CONTENT] EncodingPrefixes, type [CONTENT] Type } EncodingPrefixes ::=AnyType ValueSetOnlySEQUENCE SIZE (1..MAX) OF prefix [CONTENT] EncodingPrefix EncodingPrefix ::= CHOICE { gser [NAME AS "GSER"] GSER-EncodingInstructions, xer [NAME AS "XER"] XER-EncodingInstructions -- plus encoding instructions -- for other encoding rules in the future } GSER-EncodingInstructions ::= SEQUENCE SIZE (1..MAX) OF instruction [CONTENT] GSER-EncodingInstruction Legg & Prager Expires 11 October 2005 [Page 81] INTERNET-DRAFT ASN.1 Schema April 11, 2005 XER-EncodingInstructions ::= SEQUENCE{ valueSet ValueSet } ValueSetSIZE (1..MAX) OF instruction [CONTENT] XER-EncodingInstruction SelectionType ::= SEQUENCE {definition [UNTAGGED]alternative [CONTENT] CHOICE {set [UNTAGGED] ElementSetSpecs } OPTIONALattribute [ATTRIBUTE] QName, element [ATTRIBUTE] QName, content [ATTRIBUTE] QName, member [ATTRIBUTE] QName }, type [CONTENT] Type }ElementSetSpecsInstanceOfType ::= SEQUENCE {root [UNTAGGED] ElementSetSpec, extensionobjectClass [CONTENT] DefinedObjectClass } ObjectClassFieldType ::= SEQUENCE {additional [UNTAGGED] ElementSetSpec } OPTIONALobjectClass [CONTENT] DefinedObjectClass, fieldName [CONTENT] FieldName }ElementSetSpecFieldName ::= CHOICE {single [UNTAGGED] Intersections, unionfieldNameAtt [NAME AS "fieldName"] [ATTRIBUTE] PrimitiveFieldNames, fieldName PrimitiveFieldNames } PrimitiveFieldNames ::= UTF8String InformationFromObjects ::= SEQUENCE {list [UNTAGGED] IntersectionsListreferencedObjects [CONTENT] ReferencedObjects, fieldName [CONTENT] FieldName } ReferencedObjects ::= CHOICE { object [CONTENT] Object, objectSet [CONTENT] ObjectSet }IntersectionsListSequenceType ::= SEQUENCESIZE (2..MAX) OF item [UNTAGGED] Intersections{ root [CONTENT] ComponentTypeList OPTIONAL, extensionAndFinal [CONTENT] SEQUENCE { extension SEQUENCE { exception ExceptionSpec OPTIONAL, additions [CONTENT] ExtensionAdditions OPTIONAL }, root [CONTENT] ComponentTypeList OPTIONAL Legg & Prager Expires17 December 200411 October 2005 [Page67]82] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 Intersections ::= CHOICE { single [UNTAGGED] IntersectionElements, intersection SEQUENCE { list [UNTAGGED] IntersectionElementsListApril 11, 2005 } OPTIONAL }IntersectionElementsListComponentTypeList ::= SEQUENCE SIZE(2..MAX)(1..MAX) OFitem [UNTAGGED] IntersectionElements IntersectionElementscomponentType [CONTENT] ComponentType ComponentType ::= CHOICE {allcomponent [CONTENT] SequenceNamedType, optional SEQUENCE {elements [UNTAGGED] Elements OPTIONAL, exceptcomponent [CONTENT] SequenceNamedType, default SEQUENCE {exclusions [UNTAGGED] Elementsvalue [CONTENT] Value } OPTIONAL },elements [UNTAGGED] ElementscomponentsOf SEQUENCE { type [CONTENT] Type }Elements} SequenceNamedType ::=CHOICENamedType (WITH COMPONENTS {value Value, includes TypeOnly, range ValueRange, size Constraint, typeConstraint TypeOnly, from Constraint, withComponent Constraint, withComponents MultipleTypeConstraints, pattern ValueOnly, object Object, objectSet ObjectSet } ValueRange..., member ABSENT, item ABSENT }) ExtensionAdditions ::= SEQUENCE{ minimum [UNTAGGED]SIZE (1..MAX) OF addition [CONTENT] ExtensionAddition ExtensionAddition ::= CHOICE {minInclusive OptionalValueOnly, minExclusive OptionalValueOnlyextensionGroup ExtensionAdditionGroup, componentType [CONTENT] ComponentType }DEFAULT minInclusive:{}, maximum [UNTAGGED] CHOICEExtensionAdditionGroup ::= SEQUENCE {maxInclusive OptionalValueOnly, maxExclusive OptionalValueOnly } DEFAULT maxInclusive:{}version [ATTRIBUTE] VersionNumber OPTIONAL, componentTypes [CONTENT] ComponentTypeList }OptionalValueOnlyVersionNumber ::= INTEGER (2..MAX) SetType ::= SequenceType ChoiceOrUnionType ::= SEQUENCE {literalprecedence [ATTRIBUTE]AnySimpleTypePrecedenceList OPTIONAL,valueRef [NAME AS "value"] [ATTRIBUTE] QNameroot [CONTENT] AlternativeTypeList, extension SEQUENCE { exception ExceptionSpec OPTIONAL, additions [CONTENT] ExtensionAdditionAlternatives OPTIONAL } OPTIONAL } Legg & Prager Expires17 December 200411 October 2005 [Page68]83] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 value Value OPTIONAL }April 11, 2005 PrecedenceList ::= [LIST] SEQUENCE SIZE (1..MAX) OF member QName AlternativeTypeList ::= SEQUENCE SIZE (1..MAX) OF component [CONTENT] ChoiceOrUnionNamedType ChoiceOrUnionNamedType ::= NamedType (WITH COMPONENTS {literal PRESENT } | WITH COMPONENTS { valueRef PRESENT } | WITH COMPONENTS { value OPTIONAL..., item ABSENT })MultipleTypeConstraintsExtensionAdditionAlternatives ::= SEQUENCE{ partial [ATTRIBUTE] BOOLEAN DEFAULT FALSE, typeConstraints [UNTAGGED] SEQUENCESIZE (1..MAX) OF addition [CONTENT] ExtensionAdditionAlternative ExtensionAdditionAlternative ::= CHOICE { extensionGroup ExtensionAdditionAlternativesGroup, componentNamedConstraint[CONTENT] ChoiceOrUnionNamedType }NamedConstraintExtensionAdditionAlternativesGroup ::= SEQUENCE {name [ATTRIBUTE] NameIdentifier, useversion [ATTRIBUTE]PresenceConstraintVersionNumber OPTIONAL,constraint [UNTAGGED] Constraintalternatives [CONTENT] AlternativeTypeList }DefinedObjectClassOnlyChoiceType ::=SEQUENCEChoiceOrUnionType (WITH COMPONENTS {classRef [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL, class DefinedObjectClass OPTIONAL }..., precedence ABSENT, root (WITH COMPONENT (INCLUDES ChoiceNamedType)), extension (WITH COMPONENTS {classRef PRESENT, class ABSENT } | WITH..., additions (WITH COMPONENT (WITH COMPONENTS {classRef ABSENT, class PRESENT..., extensionGroup (WITH COMPONENTS { ..., alternatives (WITH COMPONENT (INCLUDES ChoiceNamedType)) }), component (INCLUDES ChoiceNamedType) })) })ObjectClass}) ChoiceNamedType ::=SEQUENCEChoiceOrUnionNamedType (WITH COMPONENTS {tagDefault [ATTRIBUTE] TagDefault OPTIONAL, extensibilityImplied [ATTRIBUTE] BOOLEAN OPTIONAL, context [ATTRIBUTE] AnyURI OPTIONAL, ref [ATTRIBUTE] QName OPTIONAL, definition [UNTAGGED] CHOICE..., member ABSENT }) UnionType ::= ChoiceOrUnionType (WITH COMPONENTS {objectClassDefn [UNTAGGED] SEQUENCE SIZE (1..MAX) OF fieldSpec [UNTAGGED] FieldSpec } OPTIONAL }..., root (WITH COMPONENT (INCLUDES UnionNamedType)), extension (WITH COMPONENTS { ...,context OPTIONAL, ref PRESENT, definition ABSENT } | WITHadditions (WITH COMPONENT (WITH COMPONENTS { ...,context ABSENT, ref ABSENT, definition PRESENTextensionGroup (WITH COMPONENTS { ..., alternatives (WITH COMPONENT (INCLUDES UnionNamedType)) }), component (INCLUDES UnionNamedType) })) })DefinedObjectClass}) UnionNamedType ::=ObjectClassChoiceOrUnionNamedType (WITH COMPONENTS { ...,definitionattribute ABSENT, element ABSENT, content ABSENT })FieldSpec ::= CHOICE { typeField TypeField, valueField ValueField, valueSetField ValueSetField, objectField ObjectField, objectSetField ObjectSetField, optional SEQUENCE { optionalField [UNTAGGED] CHOICE {Legg & Prager Expires17 December 200411 October 2005 [Page69]84] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 optionalTypeField [UNTAGGED] SEQUENCE { typeField TypeField, default TypeOnly }, optionalValueField [UNTAGGED] SEQUENCE { valueField ValueField, default ValueOnly }, optionalValueSetField [UNTAGGED] SEQUENCE { valueSetField ValueSetField, default ValueSetOnly }, optionalObjectField [UNTAGGED] SEQUENCE { objectField ObjectField, default ObjectOnly }, optionalObjectSetField [UNTAGGED] SEQUENCE { objectSetField ObjectSetField, default ObjectSetOnly } } } } TypeField ::= SEQUENCE { name [ATTRIBUTE] TypeFieldReference } TypeFieldReference ::= TypeReference ValueFieldApril 11, 2005 SequenceOfOrListType ::= SEQUENCE {name [ATTRIBUTE] ValueFieldReference, unique [ATTRIBUTE] BOOLEAN DEFAULT FALSE, typeRef [NAME AS "type"]minSize [ATTRIBUTE]QNameINTEGER (0..MAX) OPTIONAL,type TypemaxSize [ATTRIBUTE] INTEGER (0..MAX) OPTIONAL,typeFromField FieldNameOnly OPTIONAL }component [CONTENT] NamedType (WITH COMPONENTS { ...,typeRef PRESENT, typeattribute ABSENT,typeFromFieldmember ABSENT }) }| WITHSequenceOfType ::= SequenceOfOrListType (WITH COMPONENTS { ...,typeRef ABSENT, type PRESENT, typeFromFieldcomponent (WITH COMPONENTS { ..., item ABSENT} | WITH}) }) SetOfType ::= SequenceOfType ListType ::= SequenceOfOrListType (WITH COMPONENTS { ...,unique ABSENT, typeRef ABSENT, typecomponent (WITH COMPONENTS { ..., element ABSENT,typeFromField PRESENTcontent ABSENT })ValueFieldReference}) ConstrainedType ::=ValueReference ValueSetFieldSEQUENCE { type [CONTENT] Type, constraint [CONTENT] Constraint } Constraint ::= SEQUENCE {name [ATTRIBUTE] ValueSetFieldReference, typeRef [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL,constraintSpec [CONTENT] CHOICE { subtype [CONTENT] ElementSetSpecs, constrainedBy UserDefinedConstraint, table TableConstraint, contents ContentsConstraint }, exception ExceptionSpec OPTIONAL } UserDefinedConstraint ::= SEQUENCE { parameters [CONTENT] ConstraintParameters OPTIONAL } ConstraintParameters ::= SEQUENCE SIZE (1..MAX) OF parameter [CONTENT] UserDefinedConstraintParameter UserDefinedConstraintParameter ::= CHOICE { valueParameter SEQUENCE { type [CONTENT] Type, value [CONTENT] Value }, valueSetParameter SEQUENCE { type [CONTENT] Type, Legg & Prager Expires17 December 200411 October 2005 [Page70]85] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 type Type OPTIONAL, typeFromField FieldNameOnly OPTIONAL } (WITH COMPONENTSApril 11, 2005 valueSet [CONTENT] ValueSet }, objectParameter SEQUENCE {..., typeRef PRESENT, type ABSENT, typeFromField ABSENT } | WITH COMPONENTSobjectClass [CONTENT] DefinedObjectClass, object [CONTENT] Object }, objectSetParameter SEQUENCE {..., typeRef ABSENT, type PRESENT, typeFromField ABSENT } | WITH COMPONENTSobjectClass [CONTENT] DefinedObjectClass, objectSet [CONTENT] ObjectSet }, typeParameter SEQUENCE {..., typeRef ABSENT,typeABSENT, typeFromField PRESENT }) ValueSetFieldReference ::= TypeReference ObjectField ::=[CONTENT] Type }, classParameter SEQUENCE {name [ATTRIBUTE] ObjectFieldReference, classRef [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL, classobjectClass [CONTENT] DefinedObjectClassOPTIONAL}(WITH COMPONENTS { ..., classRef PRESENT, class ABSENT}| WITH COMPONENTSTableConstraint ::= SEQUENCE {..., classRef ABSENT, class PRESENT }) ObjectFieldReferenceobjectSet [CONTENT] ObjectSet, componentRelation [CONTENT] AtNotations OPTIONAL } AtNotations ::=ObjectReference ObjectSetFieldSEQUENCE SIZE (1..MAX) OF restrictBy AtNotation AtNotation ::= AnySimpleType ContentsConstraint ::= SEQUENCE {name [ATTRIBUTE] ObjectSetFieldReference, classRef [NAME AS "class"] [ATTRIBUTE] QNamecontaining SEQUENCE { type [CONTENT] Type } OPTIONAL,class DefinedObjectClassencodedBy SEQUENCE { value [CONTENT] Value } OPTIONAL }(WITH((WITH COMPONENTS { ...,classRef PRESENT, class ABSENT }containing PRESENT }) |WITH(WITH COMPONENTS { ...,classRef ABSENT, classencodedBy PRESENT}) ObjectSetFieldReference ::= ObjectSetReference ObjectOnly})) ExceptionSpec ::= SEQUENCE {objectRef [NAME AS "object"] [ATTRIBUTE] QName OPTIONAL, object Object OPTIONAL } (WITH COMPONENTS { objectRef PRESENT, object ABSENTtype [CONTENT] Type, value [CONTENT] Value }| WITH COMPONENTS { objectRef ABSENT, object PRESENT }) ObjectValue ::=SEQUENCECHOICE {tagDefault [ATTRIBUTE] TagDefault OPTIONAL, extensibilityImplied [ATTRIBUTE] BOOLEAN OPTIONAL, contextliteral [ATTRIBUTE]AnyURI OPTIONAL, refAnySimpleType, valueRef [NAME AS "value"] [ATTRIBUTE]QName OPTIONAL, definition [UNTAGGED] CHOICE { definition AnyType, fromObjects InformationFromObjects } OPTIONAL } (WITH COMPONENTS { ..., context OPTIONAL, ref PRESENT, definition ABSENTQName, value ElementFormValue }| WITH COMPONENTS { ..., context ABSENT, ref ABSENT, definition PRESENT })Legg & Prager Expires17 December 200411 October 2005 [Page71]86] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 ObjectSetOnlyApril 11, 2005 ElementFormValue ::= AnyType -- If asn1:meta="true" then the governing type of Value.value -- is ElementFormMetaValue. ElementFormMetaValue ::= SEQUENCE {objectSetRef [NAME AS "objectSet"] [ATTRIBUTE] QName OPTIONAL, objectSet ObjectSet OPTIONAL } (WITH COMPONENTSdefinition [CONTENT] CHOICE {objectSetRef PRESENT, objectSet ABSENTreference [CONTENT] GeneralReference, fromObjects InformationFromObjects, openTypeValue SEQUENCE { type [CONTENT] Type, value [CONTENT] Value }, components [CONTENT] ComponentValueList }| WITH COMPONENTS} ComponentValueList ::= SEQUENCE SIZE (1..MAX) OF component [CONTENT] NamedValue NamedValue ::= CHOICE {objectSetRef ABSENT, objectSet PRESENT }) ObjectSetattribute GenericNamedValue, element GenericNamedValue, content GenericNamedValue, member GenericNamedValue, item GenericNamedValue } GenericNamedValue ::= SEQUENCE {tagDefault [ATTRIBUTE] TagDefault OPTIONAL, extensibilityImplied [ATTRIBUTE] BOOLEAN OPTIONAL, context [ATTRIBUTE] AnyURI OPTIONAL, refname [ATTRIBUTE]QName OPTIONAL, definition [UNTAGGED]QName, value [CONTENT] Value } ValueSet ::= CHOICE {objectSetSpec [UNTAGGED] ObjectSetSpec, fromObjects InformationFromObjects } OPTIONALvalueSet ElementFormValueSet }(WITH COMPONENTSElementFormValueSet ::= SEQUENCE {..., context OPTIONAL, ref PRESENT,definitionABSENT } | WITH COMPONENTS[CONTENT] CHOICE {..., context ABSENT, ref ABSENT, definition PRESENT }) ObjectSetSpecelementSetSpecs [CONTENT] ElementSetSpecs } } ElementSetSpecs ::= SEQUENCE { root[UNTAGGED] ElementSetSpec OPTIONAL,[CONTENT] ElementSetSpec, extension SEQUENCE {additional [UNTAGGED]additions [CONTENT] ElementSetSpec } OPTIONAL }TagDefault ::= ENUMERATED { explicit, implicit, automatic } TagClass ::= ENUMERATED { universal, application, private } Tagging ::= ENUMERATED { explicit, implicit } PresenceConstraint ::= ENUMERATED { present, absent, optional } ENCODING-CONTROL XER GLOBAL-DEFAULTS MODIFIED-ENCODINGS TEXT TagDefault:ALL AS UPPERCASED TEXT TagClass:ALL AS UPPERCASED TEXT Tagging:ALL AS UPPERCASED TEXT PresenceConstraint:ALL AS UPPERCASED END Appendix B. ASN.1 Schema for ASN.1 Schema This appendix is non-normative. Legg & Prager Expires 17 December 2004 [Page 72] INTERNET-DRAFT ASN.1 Schema June 17, 2004 <?xml version="1.0"?> <asn1:schema xmlns:asn1="http://xmled.info/ns/ASN.1" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:tns="http://xmled.info/ns/ASN.1" targetNamespace="http://xmled.info/ns/ASN.1" name="ASN1-Schema" extensibilityImplied="true"> <import name="SchemaLanguageIntegration" schemaLocation="SchemaLanguageIntegration.asd"/> <namedType name="ModuleDefinition"> <type> <sequence> <optional> <attribute name="name" type="tns:ModuleReference"/> </optional> <optional> <attribute name="identifier" type="tns:DefinitiveIdentifier"/> </optional> <optional> <attribute name="targetNamespace" type="asn1:AnyURI"/> </optional> <optional> <attribute name="tagDefault" type="tns:TagDefault"/> <default literal="automatic"/> </optional> <optional> <attribute name="extensibilityImplied" type="asn1:BOOLEAN"/> <default literal="false"/> </optional> <optional> <content name="imports"> <type> <sequenceOf minSize="1"> <element name="import" type="tns:Import"/> </sequenceOf> </type> </content> </optional> <content name="assignments" type="tns:AssignmentList"/> </sequence> </type> </namedType> <namedType name="ModuleReference" type="tns:TypeReference"/> <namedType name="DefinitiveIdentifier" Legg & Prager Expires 17 December 2004 [Page 73] INTERNET-DRAFT ASN.1 Schema June 17, 2004 type="asn1:OBJECT-IDENTIFIER"/> <namedType name="Import"> <type> <sequence> <optional> <attribute name="namespace" type="asn1:AnyURI"/> </optional> <optional> <attribute name="name" type="tns:ModuleReference"/> </optional> <optional> <attribute name="identifier" type="tns:DefinitiveIdentifier"/> </optional> <optional> <attribute name="schemaIdentity" type="asn1:AnyURI"/> </optional> <optional> <attribute name="schemaLocation" type="asn1:AnyURI"/> </optional> </sequence> </type> </namedType> <namedType name="AssignmentList"> <type> <sequenceOf minSize="1"> <content name="assignment" type="tns:Assignment"/> </sequenceOf> </type> </namedType> <namedType name="Assignment"> <type> <choice> <element name="namedType" type="tns:TypeAssignment"/> <element name="namedValue" type="tns:ValueAssignment"/> <element name="namedValueSet" type="tns:ValueSetTypeAssignment"/> <element name="namedClass" type="tns:ObjectClassAssignment"/> <element name="namedObject" type="tns:ObjectAssignment"/> <element name="namedObjectSet" type="tns:ObjectSetAssignment"/> </choice> </type> </namedType> <namedType name="TypeAssignment"> <type> <constrained>Legg & Prager Expires17 December 200411 October 2005 [Page74] INTERNET-DRAFT ASN.1 Schema June 17, 2004 <type> <sequence> <attribute name="name" type="tns:ExtendedTypeReference"/> <optional> <attribute name="renames" type="tns:TypeReferenceOrEmpty"/> </optional> <optional> <attribute name="type" renames="typeRef" type="tns:QName"/> </optional> <optional> <element name="type" type="tns:Type"/> </optional> </sequence> </type> <union> <withComponents partial="true"> <component name="@type" use="PRESENT"/> <component name="type" use="ABSENT"/> </withComponents> <withComponents partial="true"> <component name="@type" use="ABSENT"/> <component name="type" use="PRESENT"/> </withComponents> </union> </constrained> </type> </namedType> <namedType name="ExtendedTypeReference" type="asn1:NCName"/> <namedType name="TypeReference"> <type> <constrained type="asn1:UTF8String"> <pattern literal="[A-Z][A-Z0-9a-z]*(-[A-Z0-9a-z]+)*"/> </constrained> </type> </namedType> <namedType name="TypeReferenceOrEmpty"> <type> <constrained type="asn1:UTF8String"> <union> <includes type="tns:TypeReference"/> <value/> </union> </constrained> </type> </namedType>87] INTERNET-DRAFT ASN.1 Schema April 11, 2005 ElementSetSpec ::= CHOICE { single [CONTENT] Intersections, union SEQUENCE { list [CONTENT] IntersectionsList } } IntersectionsList ::= SEQUENCE SIZE (2..MAX) OF intersections [CONTENT] Intersections Intersections ::= CHOICE { single [CONTENT] IntersectionElements, intersection SEQUENCE { list [CONTENT] IntersectionElementsList } } IntersectionElementsList ::= SEQUENCE SIZE (2..MAX) OF intersectionElements [CONTENT] IntersectionElements IntersectionElements ::= CHOICE { all SEQUENCE { elements [CONTENT] Elements OPTIONAL, except SEQUENCE { exclusions [CONTENT] Elements } }, elements [CONTENT] Elements } Elements ::= CHOICE { value ElementFormValue, includes SEQUENCE { containedSubtype [CONTENT] Type }, range ValueRange, size SEQUENCE { constraint [CONTENT] Constraint }, typeConstraint SEQUENCE { type [CONTENT] Type }, from SEQUENCE { permittedAlphabet [CONTENT] Constraint }, withComponent SEQUENCE { singleTypeConstraint [CONTENT] Constraint }, Legg & Prager Expires17 December 200411 October 2005 [Page75]88] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 <namedType name="ValueAssignment"> <type> <constrained> <type> <sequence> <attribute name="name" type="tns:ValueReference"/> <optional> <attribute name="type" renames="typeRef" type="tns:QName"/> </optional> <optional> <element name="type" type="tns:Type"/> </optional> <optional> <attribute name="literal" type="tns:AnySimpleType"/> </optional> <optional> <attribute name="value" renames="valueRef" type="tns:QName"/> </optional> <optional> <element name="value" type="tns:Value"/> </optional> </sequence> </type> <intersection> <union> <withComponents partial="true"> <component name="@type" use="PRESENT"/> <component name="type" use="ABSENT"/> </withComponents> <withComponents partial="true"> <component name="@type" use="ABSENT"/> <component name="type" use="PRESENT"/> </withComponents> </union> <union> <withComponents partial="true"> <component name="@literal" use="PRESENT"/> <component name="@value" use="ABSENT"/> <component name="value" use="ABSENT"/> </withComponents> <withComponents partial="true"> <component name="@literal" use="ABSENT"/> <component name="@value" use="PRESENT"/> <component name="value" use="ABSENT"/> </withComponents> <withComponents partial="true"> <component name="@literal" use="ABSENT"/> <component name="@value" use="ABSENT"/>April 11, 2005 withComponents MultipleTypeConstraints, pattern SEQUENCE { patternConstraint [CONTENT] Value }, object ElementFormObject, objectSet ElementFormObjectSet } ValueRange ::= SEQUENCE { minimum [CONTENT] CHOICE { minInclusive SEQUENCE { lowerEndValue [CONTENT] Value OPTIONAL }, minExclusive SEQUENCE { lowerEndValue [CONTENT] Value OPTIONAL } } DEFAULT minInclusive:{}, maximum [CONTENT] CHOICE { maxInclusive SEQUENCE { upperEndValue [CONTENT] Value OPTIONAL }, maxExclusive SEQUENCE { upperEndValue [CONTENT] Value OPTIONAL } } DEFAULT maxInclusive:{} } MultipleTypeConstraints ::= SEQUENCE { partial [ATTRIBUTE] BOOLEAN DEFAULT FALSE, typeConstraints [CONTENT] TypeConstraints } TypeConstraints ::= SEQUENCE SIZE (1..MAX) OF namedConstraint [CONTENT] NamedConstraint NamedConstraint ::= CHOICE { attribute GenericNamedConstraint, element GenericNamedConstraint, content GenericNamedConstraint, member GenericNamedConstraint, item GenericNamedConstraint } GenericNamedConstraint ::= SEQUENCE { name [ATTRIBUTE] QName, use [ATTRIBUTE] PresenceConstraint OPTIONAL, constraint [CONTENT] Constraint OPTIONAL } Legg & Prager Expires17 December 200411 October 2005 [Page76]89] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 <component name="value" use="PRESENT"/> </withComponents> </union> </intersection> </constrained> </type> </namedType> <namedType name="TypeAndValue"> <type> <constrained> <type> <sequence> <optional> <attribute name="type" renames="typeRef" type="tns:QName"/> </optional> <optional> <element name="type" type="tns:Type"/> </optional> <optional> <attribute name="literal" type="tns:AnySimpleType"/> </optional> <optional> <attribute name="value" renames="valueRef" type="tns:QName"/> </optional> <optional> <element name="value" type="tns:Value"/> </optional> </sequence> </type> <intersection> <union> <withComponents partial="true"> <component name="@type" use="PRESENT"/> <component name="type" use="ABSENT"/> </withComponents> <withComponents partial="true"> <component name="@type" use="ABSENT"/> <component name="type" use="PRESENT"/> </withComponents> </union> <union> <withComponents partial="true"> <component name="@literal" use="PRESENT"/> <component name="@value" use="ABSENT"/> <component name="value" use="ABSENT"/> </withComponents> <withComponents partial="true">April 11, 2005 PresenceConstraint ::= [VALUES ALL UPPERCASED] ENUMERATED { present, absent, optional } ObjectClass ::= CHOICE { classRef [NAME AS "class"] [ATTRIBUTE] QName, class ElementFormObjectClass } DefinedObjectClass ::= ObjectClass (WITH COMPONENTS { ..., class (WITH COMPONENTS { ..., definition (WITH COMPONENTS { ..., objectClassDefn ABSENT }) }) }) ElementFormObjectClass ::= SEQUENCE { definition [CONTENT] CHOICE { reference [CONTENT] Reference, objectClassDefn [CONTENT] ObjectClassDefn } } ObjectClassDefn ::= SEQUENCE SIZE (1..MAX) OF fieldSpec [CONTENT] FieldSpec FieldSpec ::= CHOICE { typeField TypeField, valueField ValueField, valueSetField ValueSetField, objectField ObjectField, objectSetField ObjectSetField, optional OptionalField } OptionalField ::= SEQUENCE { field [CONTENT] CHOICE { typeField TypeField, valueField ValueField, valueSetField ValueSetField, objectField ObjectField, objectSetField ObjectSetField }, default SEQUENCE { setting [CONTENT] Setting } OPTIONAL } (WITH COMPONENTS { ..., field (WITH COMPONENTS { typeField PRESENT }), default (WITH COMPONENTS { setting (WITH COMPONENTS { type PRESENT }) }) } | Legg & Prager Expires 11 October 2005 [Page 90] INTERNET-DRAFT ASN.1 Schema April 11, 2005 WITH COMPONENTS { ..., field (WITH COMPONENTS { valueField PRESENT }), default (WITH COMPONENTS { setting (WITH COMPONENTS { value PRESENT }) }) } | WITH COMPONENTS { ..., field (WITH COMPONENTS { valueSetField PRESENT }), default (WITH COMPONENTS { setting (WITH COMPONENTS { valueSet PRESENT }) }) } | WITH COMPONENTS { ..., field (WITH COMPONENTS { objectField PRESENT }), default (WITH COMPONENTS { setting (WITH COMPONENTS { object PRESENT }) }) } | WITH COMPONENTS { ..., field (WITH COMPONENTS { objectSetField PRESENT }), default (WITH COMPONENTS { setting (WITH COMPONENTS { objectSet PRESENT }) }) }) TypeField ::= SEQUENCE { name [ATTRIBUTE] TypeFieldReference } TypeFieldReference ::= TypeReference ValueField ::= SEQUENCE { name [ATTRIBUTE] ValueFieldReference, unique [ATTRIBUTE] BOOLEAN DEFAULT FALSE, governor [CONTENT] CHOICE { type [CONTENT] Type, typeFromField SEQUENCE { fieldName [CONTENT] FieldName } } } ((WITH COMPONENTS { ..., unique ABSENT }) | (WITH COMPONENTS { ..., governor (WITH COMPONENTS { ..., typeFromField ABSENT }) })) ValueFieldReference ::= ValueReference ValueSetField ::= SEQUENCE { name [ATTRIBUTE] ValueSetFieldReference, governor [CONTENT] CHOICE { type [CONTENT] Type, typeFromField SEQUENCE { fieldName [CONTENT] FieldName } } } Legg & Prager Expires17 December 200411 October 2005 [Page77]91] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 <component name="@literal" use="ABSENT"/> <component name="@value" use="PRESENT"/> <component name="value" use="ABSENT"/> </withComponents> <withComponents partial="true"> <component name="@literal" use="ABSENT"/> <component name="@value" use="ABSENT"/> <component name="value" use="PRESENT"/> </withComponents> </union> </intersection> </constrained> </type> </namedType> <namedType name="ValueReference" type="tns:Identifier"/> <namedType name="Identifier"> <type> <constrained type="asn1:UTF8String"> <pattern literal="[a-z][A-Z0-9a-z]*(-[A-Z0-9a-z]+)*"/> </constrained> </type> </namedType> <namedType name="ValueSetTypeAssignment"> <type> <constrained> <type> <sequence> <attribute name="name" type="tns:ExtendedTypeReference"/> <optional> <attribute name="type" renames="typeRef" type="tns:QName"/> </optional> <optional> <element name="type" type="tns:Type"/> </optional> <element name="valueSet" type="tns:ValueSet"/> </sequence> </type> <union> <withComponents partial="true"> <component name="@type" use="PRESENT"/> <component name="type" use="ABSENT"/> </withComponents> <withComponents partial="true"> <component name="@type" use="ABSENT"/> <component name="type" use="PRESENT"/>April 11, 2005 ValueSetFieldReference ::= TypeReference ObjectField ::= SEQUENCE { name [ATTRIBUTE] ObjectFieldReference, objectClass [CONTENT] DefinedObjectClass } ObjectFieldReference ::= ObjectReference ObjectSetField ::= SEQUENCE { name [ATTRIBUTE] ObjectSetFieldReference, objectClass [CONTENT] DefinedObjectClass } ObjectSetFieldReference ::= ObjectSetReference Object ::= CHOICE { objectRef [NAME AS "object"] [ATTRIBUTE] QName, object ElementFormObject } ElementFormObject ::= SEQUENCE { definition [CONTENT] CHOICE { reference [CONTENT] Reference, fromObjects InformationFromObjects, fields [CONTENT] ObjectDefn } } ObjectDefn ::= SEQUENCE OF field FieldSetting FieldSetting ::= SEQUENCE { name [ATTRIBUTE] NCName, setting [CONTENT] Setting } Setting ::= CHOICE { type [CONTENT] Type, value [CONTENT] Value, valueSet [CONTENT] ValueSet, object [CONTENT] Object, objectSet [CONTENT] ObjectSet } ObjectSet ::= CHOICE { objectSetRef [NAME AS "objectSet"] [ATTRIBUTE] QName, objectSet ElementFormObjectSet } Legg & Prager Expires17 December 200411 October 2005 [Page78]92] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 </withComponents> </union> </constrained> </type> </namedType> <namedType name="TypeAndValueSet"> <type> <constrained> <type> <sequence> <optional> <attribute name="type" renames="typeRef" type="tns:QName"/> </optional> <optional> <element name="type" type="tns:Type"/> </optional> <element name="valueSet" type="tns:ValueSet"/> </sequence> </type> <union> <withComponents partial="true"> <component name="@type" use="PRESENT"/> <component name="type" use="ABSENT"/> </withComponents> <withComponents partial="true"> <component name="@type" use="ABSENT"/> <component name="type" use="PRESENT"/> </withComponents> </union> </constrained> </type> </namedType> <namedType name="ObjectClassAssignment"> <type> <constrained> <type> <sequence> <attribute name="name" type="tns:ObjectClassReference"/> <optional> <attribute name="class" renames="classRef" type="tns:QName"/> </optional> <optional> <element name="class" type="tns:ObjectClass"/> </optional> </sequence> </type> Legg & Prager Expires 17 December 2004 [Page 79] INTERNET-DRAFTApril 11, 2005 ElementFormObjectSet ::= SEQUENCE { definition [CONTENT] CHOICE { reference [CONTENT] Reference, objectSetSpec [CONTENT] ObjectSetSpec, fromObjects InformationFromObjects } } ObjectSetSpec ::= SEQUENCE { root [CONTENT] ElementSetSpec OPTIONAL, extension SEQUENCE { additions [CONTENT] ElementSetSpec } OPTIONAL } EncodingControlSections ::= SEQUENCE SIZE (1..MAX) OF section [CONTENT] EncodingControlSection EncodingControlSection ::= CHOICE { encodingControl-GSER GSER-EncodingInstructionAssignmentList, encodingControl-XER XER-EncodingInstructionAssignmentList -- plus encoding control sections -- for other encoding rules in the future } ENCODING-CONTROL RXER SCHEMA-IDENTITY "http://xmled.info/id/ASN.1/Schema" TARGET-NAMESPACE "http://xmled.info/ns/ASN.1" COMPONENT schema ModuleDefinition COMPONENT meta [ATTRIBUTE] BOOLEAN END Appendix B. ASN.1 SchemaJune 17, 2004 <union> <withComponents partial="true"> <component name="@class" use="PRESENT"/> <component name="class" use="ABSENT"/> </withComponents> <withComponents partial="true"> <component name="@class" use="ABSENT"/> <component name="class" use="PRESENT"/> </withComponents> </union> </constrained> </type> </namedType> <namedType name="ObjectClassReference"> <type> <constrained type="asn1:UTF8String"> <pattern literal="[A-Z][A-Z0-9]*(-[A-Z0-9]+)*"/> </constrained> </type> </namedType> <namedType name="ObjectAssignment"> <type> <constrained> <type> <sequence> <attribute name="name" type="tns:ObjectReference"/> <optional> <attribute name="class" renames="classRef" type="tns:QName"/> </optional> <optional> <element name="class" type="tns:DefinedObjectClass"/> </optional> <optional> <attribute name="object" renames="objectRef" type="tns:QName"/> </optional> <optional> <element name="object" type="tns:Object"/> </optional> </sequence> </type> <intersection> <union> <withComponents partial="true"> <component name="@class" use="PRESENT"/> <component name="class" use="ABSENT"/>for ASN.1 Schema This appendix is non-normative. <?xml version="1.0"?> <asn1:schema xmlns:asn1="http://xmled.info/ns/ASN.1" xmlns:gser="http://xmled.info/ns/ASN.1" xmlns:xer="http://xmled.info/ns/ASN.1" name="ASN1-Schema" identifier="1.3.6.1.4.1.21472.1.0.1" schemaIdentity="http://xmled.info/id/ASN.1/Schema" xmlns:asd="http://xmled.info/ns/ASN.1" Legg & Prager Expires17 December 200411 October 2005 [Page80]93] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 </withComponents> <withComponents partial="true"> <component name="@class" use="ABSENT"/> <component name="class" use="PRESENT"/> </withComponents> </union> <union> <withComponents partial="true"> <component name="@object" use="PRESENT"/> <component name="object" use="ABSENT"/> </withComponents> <withComponents partial="true"> <component name="@object" use="ABSENT"/> <component name="object" use="PRESENT"/> </withComponents> </union> </intersection> </constrained> </type> </namedType>April 11, 2005 targetNamespace="http://xmled.info/ns/ASN.1" extensibilityImplied="true"> <!-- Copyright (C) The Internet Society 2005. This version of this ASN.1 Schema is part of RFC XXXX; see the RFC itself for full legal notices. --> <import name="GSER-EncodingInstructionSchema" identifier="1.3.6.1.4.1.21472.1.0.2" schemaIdentity= "http://xmled.info/id/ASN.1/GSER-EncodingInstructionSchema" namespace="http://xmled.info/ns/ASN.1" schemaLocation="GSER-EncodingInstructionSchema.asd"/> <import name="XER-EncodingInstructionSchema" identifier="1.3.6.1.4.1.21472.1.0.3" schemaIdentity= "http://xmled.info/id/ASN.1/XER-EncodingInstructionSchema" namespace="http://xmled.info/ns/ASN.1" schemaLocation="XER-EncodingInstructionSchema.asd"/> <namedTypename="ObjectClassAndObject"> <type> <constrained>name="ModuleDefinition"> <type> <sequence> <attribute name="name" type="asd:ModuleReference"/> <optional> <attributename="class" renames="classRef" type="tns:QName"/>name="identifier" type="asd:DefinitiveIdentifier"/> </optional> <optional><element name="class" type="tns:DefinedObjectClass"/><attribute name="schemaIdentity" type="asn1:AnyURI"/> </optional> <optional> <attributename="object" renames="objectRef" type="tns:QName"/>name="targetNamespace" type="asn1:AnyURI"/> </optional> <optional><element name="object" type="tns:Object"/><attribute name="tagDefault" type="asd:TagDefault"/> <default literal="AUTOMATIC"/> </optional> <optional> <attribute name="extensibilityImplied" type="asn1:BOOLEAN"/> <default literal="false"/> </optional> <optional> <content name="imports" type="asd:ImportList"/> </optional> <optional> <content name="assignments" type="asd:AssignmentList"/> </optional></sequence> </type> <intersection> <union> <withComponents partial="true"> <component name="@class" use="PRESENT"/> <component name="class" use="ABSENT"/> </withComponents> <withComponents partial="true">Legg & Prager Expires17 December 200411 October 2005 [Page81]94] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 <component name="@class" use="ABSENT"/> <component name="class" use="PRESENT"/> </withComponents> </union> <union> <withComponents partial="true"> <component name="@object" use="PRESENT"/> <component name="object" use="ABSENT"/> </withComponents> <withComponents partial="true"> <component name="@object" use="ABSENT"/> <component name="object" use="PRESENT"/> </withComponents> </union> </intersection> </constrained>April 11, 2005 <optional> <content name="encodingControls" type="asd:EncodingControlSections"/> </optional> </sequence> </type> </namedType> <namedTypename="ObjectReference" type="tns:ValueReference"/>name="ModuleReference" type="asd:TypeReference"/> <namedTypename="ObjectSetAssignment">name="DefinitiveIdentifier" type="asn1:OBJECT-IDENTIFIER"/> <namedType name="TagDefault"> <type><constrained><enumerated> <enumeration name="EXPLICIT" identifier="explicit"/> <enumeration name="IMPLICIT" identifier="implicit"/> <enumeration name="AUTOMATIC" identifier="automatic"/> </enumerated> </type> </namedType> <namedType name="ImportList"> <type> <sequenceOf minSize="1"> <element name="import" type="asd:Import"/> </sequenceOf> </type> </namedType> <namedType name="Import"> <type> <sequence> <optional> <attribute name="name"type="tns:ObjectSetReference"/>type="asd:ModuleReference"/> </optional> <optional> <attributename="class" renames="classRef" type="tns:QName"/>name="identifier" type="asd:DefinitiveIdentifier"/> </optional> <optional><element name="class" type="tns:DefinedObjectClass"/><attribute name="schemaIdentity" type="asn1:AnyURI"/> </optional> <optional> <attributename="objectSet" renames="objectSetRef" type="tns:QName"/>name="namespace" type="asn1:AnyURI"/> </optional> <optional><element name="objectSet" type="tns:ObjectSet"/> </optional> </sequence> </type> <intersection> <union> <withComponents partial="true"> <component name="@class" use="PRESENT"/> <component name="class" use="ABSENT"/> </withComponents><attribute name="schemaLocation" type="asn1:AnyURI"/> Legg & Prager Expires17 December 200411 October 2005 [Page82]95] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 <withComponents partial="true"> <component name="@class" use="ABSENT"/> <component name="class" use="PRESENT"/> </withComponents> </union> <union> <withComponents partial="true"> <component name="@objectSet" use="PRESENT"/> <component name="objectSet" use="ABSENT"/> </withComponents> <withComponents partial="true"> <component name="@objectSet" use="ABSENT"/> <component name="objectSet" use="PRESENT"/> </withComponents> </union> </intersection> </constrained>April 11, 2005 </optional> </sequence> </type> </namedType> <namedTypename="ObjectClassAndObjectSet">name="AssignmentList"> <type><constrained><sequenceOf minSize="1"> <content name="assignment" type="asd:Assignment"/> </sequenceOf> </type> </namedType> <namedType name="Assignment"> <type><sequence> <optional> <attribute name="class" renames="classRef" type="tns:QName"/> </optional> <optional><choice> <elementname="class" type="tns:DefinedObjectClass"/> </optional> <optional> <attribute name="object" renames="objectSetRef" type="tns:QName"/> </optional> <optional>name="namedType" type="asd:TypeAssignment"/> <elementname="objectSet" type="tns:ObjectSet"/> </optional>name="namedValue" type="asd:ValueAssignment"/> <element name="namedValueSet" type="asd:ValueSetTypeAssignment"/> <element name="namedClass" type="asd:ObjectClassAssignment"/> <element name="namedObject" type="asd:ObjectAssignment"/> <element name="namedObjectSet" type="asd:ObjectSetAssignment"/> <content name="component" type="asd:TopLevelNamedType"/> </choice> </type> </namedType> <namedType name="TypeAssignment"> <type> <sequence> <attribute name="name" type="asd:TypeReference"/> <content name="type" type="asd:Type"/> </sequence> </type><intersection> <union> <withComponents partial="true"> <component name="@class" use="PRESENT"/> <component name="class" use="ABSENT"/> </withComponents> <withComponents partial="true"> <component name="@class" use="ABSENT"/></namedType> <namedType name="TypeReference"> <type> <constrained type="asn1:UTF8String"> <pattern literal="[A-Z]\w*(-\w+)*"/> </constrained> </type> </namedType> <namedType name="ValueAssignment"> <type> <sequence> <attribute name="name" type="asd:ValueReference"/> Legg & Prager Expires17 December 200411 October 2005 [Page83]96] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 <component name="class" use="PRESENT"/> </withComponents> </union> <union> <withComponents partial="true"> <component name="@objectSet" use="PRESENT"/> <component name="objectSet" use="ABSENT"/> </withComponents> <withComponents partial="true"> <component name="@objectSet" use="ABSENT"/> <component name="objectSet" use="PRESENT"/> </withComponents> </union> </intersection> </constrained>April 11, 2005 <content name="type" type="asd:Type"/> <content name="value" type="asd:Value"/> </sequence> </type> </namedType> <namedTypename="ObjectSetReference" type="tns:TypeReference"/>name="ValueReference" type="asd:Identifier"/> <namedTypename="TypeOnly">name="Identifier"> <type><constrained><constrained type="asn1:UTF8String"> <pattern literal="[a-z]\w(-\w+)*"/> </constrained> </type> </namedType> <namedType name="ValueSetTypeAssignment"> <type> <sequence><optional><attribute name="name" type="asd:TypeReference"/> <content name="type"renames="typeRef" type="tns:QName"/> </optional> <optional> <element name="type" type="tns:Type"/> </optional>type="asd:Type"/> <content name="valueSet" type="asd:ValueSet"/> </sequence> </type><union> <withComponents> <component name="@type" use="PRESENT"/> <component name="type" use="ABSENT"/> </withComponents> <withComponents> <component name="@type" use="ABSENT"/> <component name="type" use="PRESENT"/> </withComponents> </union></namedType> <namedType name="ObjectClassAssignment"> <type> <sequence> <attribute name="name" type="asd:ObjectClassReference"/> <content name="objectClass" type="asd:ObjectClass"/> </sequence> </type> </namedType> <namedType name="ObjectClassReference"> <type> <constrained type="asn1:UTF8String"> <pattern literal="[A-Z][A-Z0-9]*(-[A-Z0-9]+)*"/> </constrained> </type> </namedType> <namedTypename="Type">name="ObjectAssignment"> <type> <sequence> <attribute name="name" type="asd:ObjectReference"/> <content name="objectClass" type="asd:DefinedObjectClass"/> Legg & Prager Expires17 December 200411 October 2005 [Page84]97] INTERNET-DRAFT ASN.1 SchemaJune 17, 2004 <type> <constrained>April 11, 2005 <content name="object" type="asd:Object"/> </sequence> </type> </namedType> <namedType name="ObjectReference" type="asd:ValueReference"/> <namedType name="ObjectSetAssignment"> <type> <sequence><optional> <attribute name="tagDefault" type="tns:TagDefault"/> </optional> <optional> <attribute name="extensibilityImplied" type="asn1:BOOLEAN"/> </optional> <optional> <attribute name="explicit" type="asn1:BOOLEAN"/> <default literal="false"/> </optional> <optional> <attribute name="context" type="asn1:AnyURI"/> </optional> <optional> <attribute name="ref" type="tns:QName"/> </optional> <optional><attributename="elementType" type="asn1:Name"/> </optional> <optional>name="name" type="asd:ObjectSetReference"/> <contentname="definition">name="objectClass" type="asd:DefinedObjectClass"/> <content name="objectSet" type="asd:ObjectSet"/> </sequence> </type> </namedType> <namedType name="ObjectSetReference" type="asd:TypeReference"/> <namedType name="TopLevelNamedType"> <type><choice> <element name="namedBitList" type="tns:NamedBitList"/> <element name="namedNumberList" type="tns:NamedNumberList"/> <element name="enumerated" type="tns:EnumeratedType"/> <element name="tagged" type="tns:TaggedType"/> <element name="selection" type="tns:SelectionType"/> <element name="instanceOf" type="tns:InstanceOfType"/> <element name="fromClass" type="tns:ObjectClassFieldType"/><constrained type="asd:NamedType"> <withComponents partial="true"> <elementname="fromObjects" type="tns:InformationFromObjects"/>name="attribute"> <withComponents partial="true"> <content name="reference" use="ABSENT"/> </withComponents> </element> <elementname="sequence" type="tns:SequenceType"/>name="element"> <withComponents partial="true"> <content name="reference" use="ABSENT"/> </withComponents> </element> <elementname="set" type="tns:SetType"/>name="content" use="ABSENT"/> <elementname="choice" type="tns:ChoiceType"/>name="member" use="ABSENT"/> <elementname="union" type="tns:UnionType"/>name="item" use="ABSENT"/> </withComponents> </constrained> </type> </namedType> <namedType name="NamedType"> <type> <choice> <elementname="sequenceOf" type="tns:SequenceOfType"/>name="attribute" type="asd:Attribute"/> <elementname="setOf" type="tns:SetOfType"/>name="element" type="asd:Element"/> <elementname="list" type="tns:ListType"/>name="content" type="asd:InvisibleNamedType"/> <elementname="constrained" type="tns:ConstrainedType"/> </choice> </type> </content>name="member" type="asd:InvisibleNamedType"/> Legg & Prager Expires17 December 200411 October 2005 [Page85]98] INTERNET-DRAFT