INTERNET-DRAFT S. Legg draft-legg-xed-asd-02.txt Adacel Technologies Intended Category: Standards Track D. Prager Deakin University June 17, 2004 ASN.1 Schema: An XML Representation for ASN.1 Specifications Copyright (C) The Internet Society (2004). All Rights Reserved. Status of this Memo This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of RFC2026. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work in progress". The list of current Internet-Drafts can be accessed at http://www.ietf.org/ietf/1id-abstracts.txt The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. Distribution of this document is unlimited. Technical discussion of this document should take place on the XED developers mailing list . Please send editorial comments directly to the editor . This Internet-Draft expires on 17 December 2004. Abstract This document defines a semantically equivalent Extensible Markup Language (XML) representation for Abstract Syntax Notation One 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 than Legg & Prager Expires 17 December 2004 [Page 1] INTERNET-DRAFT ASN.1 Schema June 17, 2004 original ASN.1 specifications. Table of Contents 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Conventions. . . . . . . . . . . . . . . . . . . . . . . . . . 4 3. General Considerations . . . . . . . . . . . . . . . . . . . . 5 4. ModuleDefinition Translation . . . . . . . . . . . . . . . . . 5 5. Translation of Assignments . . . . . . . . . . . . . . . . . . 7 5.1. Referencing Named Constructs . . . . . . . . . . . . . . 7 5.2. Importing Namespaces . . . . . . . . . . . . . . . . . . 8 5.3. TypeAssignment Translation . . . . . . . . . . . . . . . 9 5.4. ValueAssignment and XMLValueAssignment Translation . . . 9 5.5. ValueSetTypeAssignment Translation . . . . . . . . . . . 9 5.6. ObjectClassAssignment Translation. . . . . . . . . . . . 10 5.7. ObjectAssignment Translation . . . . . . . . . . . . . . 10 5.8. ObjectSetAssignment Translation. . . . . . . . . . . . . 11 5.9. Parameterized Assignments. . . . . . . . . . . . . . . . 11 6. Translation of Types . . . . . . . . . . . . . . . . . . . . . 12 6.1. DefinedType Translation. . . . . . . . . . . . . . . . . 12 6.2. Translation of Predefined Types. . . . . . . . . . . . . 13 6.3. BitStringType Translation. . . . . . . . . . . . . . . . 15 6.4. IntegerType Translation. . . . . . . . . . . . . . . . . 16 6.5. EnumeratedType Translation . . . . . . . . . . . . . . . 16 6.6. TaggedType Translation . . . . . . . . . . . . . . . . . 17 6.7. SelectionType Translation . . . . . . . . . . . . . . . 18 6.8. InstanceOfType Translation . . . . . . . . . . . . . . . 18 6.9. ObjectClassFieldType Translation . . . . . . . . . . . . 19 6.10. TypeFromObject and ValueSetFromObjects Translation . . . 19 6.11. Translation of Combining Types . . . . . . . . . . . . . 20 6.11.1. NamedType Translation . . . . . . . . . . . . . 20 6.11.2. SequenceType Translation. . . . . . . . . . . . 20 6.11.3. SetType Translation . . . . . . . . . . . . . . 22 6.11.4. ChoiceType Translation. . . . . . . . . . . . . 22 6.11.5. Translation of ChoiceOfStrings Types. . . . . . 23 6.11.6. SequenceOfType Translation. . . . . . . . . . . 24 6.11.7. SetOfType Translation . . . . . . . . . . . . . 25 6.12. Translation of Constrained Types . . . . . . . . . . . . 25 6.12.1. Translation of AnyType. . . . . . . . . . . . . 27 6.12.2. Constraint Translation. . . . . . . . . . . . . 31 6.12.3. UserDefinedConstraint Translation . . . . . . . 31 6.12.4. TableConstraint Translation . . . . . . . . . . 32 6.12.5. ContentsConstraint Translation. . . . . . . . . 32 6.12.6. ExceptionSpec Translation . . . . . . . . . . . 33 7. Translation of Values. . . . . . . . . . . . . . . . . . . . . 34 7.1. DefinedValue Translation . . . . . . . . . . . . . . . . 34 7.2. BuiltinValue Translation . . . . . . . . . . . . . . . . 35 7.3. ValueFromObject Translation. . . . . . . . . . . . . . . 36 Legg & Prager Expires 17 December 2004 [Page 2] INTERNET-DRAFT ASN.1 Schema June 17, 2004 7.4. ObjectClassFieldValue Translation. . . . . . . . . . . . 36 8. Translation of Value Sets. . . . . . . . . . . . . . . . . . . 36 8.1. ElementSetSpecs Translation. . . . . . . . . . . . . . . 37 8.2. ElementSetSpec Translation . . . . . . . . . . . . . . . 37 8.3. SubtypeElements Translation. . . . . . . . . . . . . . . 38 8.3.1. ValueRange Translation . . . . . . . . . . . . . 39 8.3.2. InnerTypeConstraints Translation . . . . . . . . 40 9. Translation of Object Classes. . . . . . . . . . . . . . . . . 41 9.1. DefinedObjectClass Translation . . . . . . . . . . . . . 41 9.2. ObjectClassDefn Translation. . . . . . . . . . . . . . . 42 9.2.1. TypeFieldSpec Translation. . . . . . . . . . . . 42 9.2.2. FixedTypeValueFieldSpec Translation. . . . . . . 43 9.2.3. FixedTypeValueSetFieldSpec Translation . . . . . 44 9.2.4. VariableTypeValueFieldSpec Translation . . . . . 45 9.2.5. VariableTypeValueSetFieldSpec Translation. . . . 46 9.2.6. FieldName Translation. . . . . . . . . . . . . . 48 9.2.7. ObjectFieldSpec Translation. . . . . . . . . . . 48 9.2.8. ObjectSetFieldSpec Translation . . . . . . . . . 49 10. Translation of Objects . . . . . . . . . . . . . . . . . . . . 50 10.1. DefinedObject Translation . . . . . . . . . . . . . . . 51 10.2. ObjectDefn Translation. . . . . . . . . . . . . . . . . 51 10.3. ObjectFromObject Translation. . . . . . . . . . . . . . 53 11. Translation of Object Sets . . . . . . . . . . . . . . . . . . 53 11.1. DefinedObjectSet Translation. . . . . . . . . . . . . . 54 11.2. ObjectSetElements Translation . . . . . . . . . . . . . 54 11.2.1. ObjectSetFromObjects Translation . . . . . . . 55 12. Translation of Information From Objects. . . . . . . . . . . . 55 13. Security Considerations. . . . . . . . . . . . . . . . . . . . 56 14. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 56 Appendix A. ASN.1 for ASN.1 Schema . . . . . . . . . . . . . . . . 56 Appendix B. ASN.1 Schema for ASN.1 Schema. . . . . . . . . . . . . 72 Appendix C. An XML Schema for ASN.1 Schema . . . . . . . . . . . .118 Normative References . . . . . . . . . . . . . . . . . . . . . . .118 Informative Reference . . . . . . . . . . . . . . . . . . . . . .119 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . .120 Full Copyright Statement . . . . . . . . . . . . . . . . . . . . .120 1. Introduction A full parser for the Abstract Syntax Notation One (ASN.1) language [X680] is difficult to implement due to numerous ambiguities in the notation. For example, certain notations for a Value are syntactically indistinguishable from notation for a ValueSet, Object, ObjectSet, DummyReference or SimpleTableConstraint, an ObjectClassAssignment, ObjectAssignment or ObjectSetAssignment resembles respectively a TypeAssignment, ValueAssignment or ValueSetTypeAssignment, a FixedTypeValueFieldSpec or FixedTypeValueSetFieldSpec resembles respectively an ObjectFieldSpec Legg & Prager Expires 17 December 2004 [Page 3] INTERNET-DRAFT ASN.1 Schema June 17, 2004 or ObjectSetFieldSpec, and an ObjectClassFieldType resembles an InformationFromObjects. 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], 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. This specification for translating ASN.1 specifications into ASN.1 Schema caters for recursive ASN.1 definitions and caters for parameterized definitions, but does not allow for recursive parameterized definitions. Recursive parameterized definitions will be covered in a revision of this document. The effect of ASN.1 encoding instructions on the translation of an ASN.1 specification 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 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 value. A reference to an ASN.1 production [X680] (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, 2004 The 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", though in practice any valid namespace prefix is permitted in ASN.1 Schema. 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 add whitespace character information items to the [children] of the enclosing element to improve the 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] (an ASN.1 module) is a document information item. The [document element] of the document Legg & Prager Expires 17 December 2004 [Page 5] INTERNET-DRAFT ASN.1 Schema June 17, 2004 information item is an element with the [local name] "schema" and the [namespace name] "http://xmled.info/ns/ASN.1". An ASN.1 module has a namespace name if the specification defining the module explicitly nominates a namespace name for the module, or if a namespace name has been registered [XEDNS] for the module. If the ASN.1 module being translated has a namespace name then an attribute with the [local name] "targetNamespace" SHALL be added to the [attributes] of the [document element] (i.e., element). The [normalized value] of this attribute is the namespace name of the module. In examples in the following sections the namespace prefix "tns:" is used to stand for the namespace name of the module being translated. An attribute with the [local name] "name" MAY 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" MAY 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 [document element] (i.e., 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, 2004 If 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 translated is appended to the [children] of the [document element]. Example MyModule DEFINITIONS IMPLICIT TAGS EXTENSIBILITY IMPLIED ::= BEGIN MyType ::= INTEGER END 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 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 namespace name then 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, 2004 If the ASN.1 module in which the Assignment is defined does not have a namespace name then the namespace name of the qualified name is absent (i.e., the name is unqualified), 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". If an ASN.1 specification contains two or more modules without namespace names 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 a case. For this reason it is RECOMMENDED that the modules in ASN.1 specifications translated into ASN.1 Schema all have a specified or registered namespace name. 5.2. Importing Namespaces An element with the [local name] "import" is added to the [children] of the [document element] for each external module 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 element. The [normalized value] of this attribute is the namespace name of the external module. An attribute with the [local name] "name" MAY be added to the [attributes] of the 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 ModuleDefinition of the external module is not empty then an attribute with the [local name] "identifier" MAY be added to the [attributes] of the 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 element. The [normalized value] of this attribute is the schema identity URI of the external module. An attribute with the [local name] "schemaLocation" MAY be added to the [attributes] of the 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 elements MUST be before 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, 2004 Note 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 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" is added to the [attributes] of the element. The [normalized value] of this attribute is the typereference on the left hand side of the assignment. The content of the element is the translation of the Type on the right hand side of the assignment. Example MyType ::= 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" is added to the [attributes] of the element. The [normalized value] of this attribute is the valuereference on the left hand side of the assignment. The content of the 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 5.5. ValueSetTypeAssignment Translation The translation of a ValueSetTypeAssignment is an element with the [local name] "namedValueSet". An attribute with the [local name] "name" is added to the [attributes] of the element. The [normalized value] of this attribute is the typereference on the Legg & Prager Expires 17 December 2004 [Page 9] INTERNET-DRAFT ASN.1 Schema June 17, 2004 left hand side of the assignment. The content of the 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 } 10 5.6. ObjectClassAssignment Translation The translation of an ObjectClassAssignment is an element with the [local name] "namedClass". An attribute with the [local name] "name" is added to the [attributes] of the element. The [normalized value] of this attribute is the objectclassreference on the left hand side of the assignment. The content of the element is the translation of the ObjectClass on the right hand side of the assignment. Example MY-CLASS ::= 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" is added to the [attributes] of the element. The [normalized value] of this attribute is the objectreference on the left hand side of the assignment. The content of the 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 } } Legg & Prager Expires 17 December 2004 [Page 10] INTERNET-DRAFT ASN.1 Schema June 17, 2004 element. The [normalized value] of this attribute is the objectsetreference on the left hand side of the assignment. The content of the 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 } 5.9. Parameterized Assignments The translation of an ASN.1 specification into ASN.1 Schema replaces any Dummyreference or references to parameterized definitions with the definition expanded in-line. For example, a ParameterizedType is replaced by the Type on the right hand side of the referenced ParameterizedTypeAssignment. Thus there is no direct translation for a ParameterizedAssignment, though its definition may come into play in the translation of references to the parameterized definition. The definition that substitutes for a DummyReference or parameterized reference (e.g., the Type that substitutes for a ParameterizedType) is potentially in a different module scope to the parameterized reference. Given that an empty TagDefault is equivalent to a TagDefault of "EXPLICIT", if the TagDefault of the module of the substitute definition (a Type, ObjectClass, Object or ObjectSet) is not the same as the TagDefault of the module of the parameterized reference and the translation of the substitute definition is 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 of the module of the substitute 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 of the module of the substitute definition. If the ExtensionDefault of the module of the substitute definition is not empty and the ExtensionDefault of the module of the parameterized reference is empty and the translation of the substitute definition is an element then an attribute with the [local name] "extensibilityImplied" and [normalized value] "true" or "1" is added to that element. If the ExtensionDefault of the module of the substitute definition is empty and the ExtensionDefault of the module of the parameterized reference is not empty and the translation of the substitute definition is an element then an attribute with the [local name] "extensibilityImplied" and [normalized value] "false" or "0" is added to that element. The cases where the addition of the tagDefault and extensibilityImplied attributes may apply are called out in the description of the translation of each kind of definition. 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 both tagged and constrained. For example, the notation "[0] INTEGER (0..10)" could be interpreted either as a 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 the tagging, so the above notation would be taken to be a tagged ConstrainedType. 6.1. 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 a typereference (not a DummyReference) or an ExternalTypeReference (which contains a typereference) and the typereference is AnyType from the SchemaLanguageIntegration module [GLUE] then the translation of the DefinedType is either the attribute form translation of an anytype reference, or the element form translation of an anytype reference (Section 6.12.1). Legg & Prager Expires 17 December 2004 [Page 12] INTERNET-DRAFT ASN.1 Schema June 17, 2004 If a DefinedType 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 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 element form translation of a type reference is an element with the [local name] "type". An attribute with the [local name] "ref" is added to the [attributes] of the element. The [normalized value] of this attribute is the qualified name referencing the type definition. The translation of the DefinedType is the same whether the type definition is referenced by a typereference or an ExternalTypeReference. Usually the translator is free to choose either the attribute form or element form translation for a type reference, however in some contexts attribute forms of Type are explicitly disallowed. If a DefinedType is a ParameterizedType then the translation of the Type is the translation of the Type on the right hand side of the referenced ParameterizedTypeAssignment. If a DefinedType is a ParameterizedValueSetType then the translation of the Type is the translation of the constrained Type on the right hand side of the notional ParameterizedTypeAssignment equivalent to the referenced ParameterizedValueSetTypeAssignment (see Clause 15.8 of X.680 [X680]). If a DefinedType is a DummyReference then the translation of the Type is the translation of the Type in the ActualParameter corresponding to the DummyReference. The Type that substitutes for a ParameterizedType, ParameterizedValueSetType or DummyReference is potentially in a different module scope to the surrounding translation, therefore the translation of the Type may require a tagDefault or extensibilityImplied attribute, according to the provisions of Section 5.9. 6.2. Translation of Predefined Types Legg & Prager Expires 17 December 2004 [Page 13] INTERNET-DRAFT ASN.1 Schema June 17, 2004 If a Type comprises one of the productions in Table 1 then the translation of the Type is either the attribute form or element form translation of that type. The attribute form translation of a Type comprising one of the productions in Table 1 is an attribute with the [local name] "type". The [normalized value] of this attribute is a qualified name with the namespace name "http://xmled.info/ns/ASN.1" and the local part as indicated in Table 1. Table 1: Reference Names for Predefined Types +----------------------------------+-------------------+ | ASN.1 Production | local part | +==================================+===================+ | BitStringType | | | without a NamedBitList | BIT-STRING | +----------------------------------+-------------------+ | BooleanType | BOOLEAN | | EmbeddedPDVType | EMBEDDED-PDV | | ExternalType | EXTERNAL | +----------------------------------+-------------------+ | IntegerType | | | without a NamedNumberList | INTEGER | +----------------------------------+-------------------+ | NullType | NULL | | ObjectIdentifierType | OBJECT-IDENTIFIER | | OctetStringType | OCTET-STRING | | RealType | REAL | | RelativeOIDType | RELATIVE-OID | +----------------------------------+-------------------+ | 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 of the productions in Table 1 is an element with the [local name] "type". An attribute with the [local name] "ref" is added to the [attributes] of the element. The [normalized value] of this attribute is a qualified name with the namespace name "http://xmled.info/ns/ASN.1" and the local part as indicated in Table 1. Example BOOLEAN Usually the translator is free to choose either the attribute form or element form translation for a Type, however in some contexts attribute forms 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] of the element. The translation of each NamedBit in the NamedBitList is appended to the [children] of the element. The translation of a NamedBit is an element with the [local name] "namedBit". An attribute with the [local name] "name" is added to the [attributes] of the element. The [normalized value] of this attribute is the identifier of the NamedBit. An attribute with the [local name] "bit" is also added to the [attributes] of the element. The [normalized value] of this attribute is the string representation of the integer value of the number or DefinedValue of the NamedBit. Example BIT STRING { zero(0), one(1), two(2) } Legg & Prager Expires 17 December 2004 [Page 15] INTERNET-DRAFT ASN.1 Schema June 17, 2004 6.4. IntegerType Translation The translation of an IntegerType with a NamedNumberList is an element with the [local name] "type". An element with the [local name] "namedNumberList" is added to the [children] of the element. The translation of each NamedNumber in the NamedNumberList is appended to the [children] of the element. The translation of a NamedNumber is an element with the [local name] "namedNumber". An attribute with the [local name] "name" is added to the [attributes] of the element. The [normalized value] of this attribute is the identifier of the NamedNumber. An attribute with the [local name] "number" is also added to the [attributes] of the element. The [normalized value] of this attribute is the string representation of the integer value of the SignedNumber or DefinedValue of the NamedNumber. Example INTEGER { nothing(0), a-little(1), a-lot(100) } 6.5. EnumeratedType Translation The translation of an EnumeratedType is an element with the [local name] "type". An element with the [local name] "enumerated" is added to the [children] of the element. The translation of each EnumerationItem in the RootEnumeration is appended to the [children] of the element. If the ellipsis ("...") is present then an element with the [local name] "extension" is appended to the [children] of the element, and the translation of the ExceptionSpec (possibly empty) is added to the [children] of the element. If an AdditionalEnumeration is present then the translation of each EnumerationItem in the AdditionalEnumeration is appended to Legg & Prager Expires 17 December 2004 [Page 16] INTERNET-DRAFT ASN.1 Schema June 17, 2004 the [children] of the element. The translation of an EnumerationItem is an element with the [local name] "enumeration". If the EnumerationItem is of the "identifier" form then an attribute with the [local name] "name" is added to the [attributes] of the element. The [normalized value] of this attribute is the identifier. If the EnumerationItem is of the "NamedNumber" form then an attribute with the [local name] "name" is added to the [attributes] of the element. The [normalized value] of this attribute is the identifier of the NamedNumber. An attribute with the [local name] "number" is also added to the [attributes] of the element. The [normalized value] of this attribute is the string representation of the integer value of the SignedNumber or DefinedValue of the NamedNumber. Example ENUMERATED { red(0), green(1), ..., blue(2) } 6.6. TaggedType Translation The translation of a TaggedType is an element with the [local name] "type". An element with the [local name] "tagged" is added to the [children] of the element. If the Class of the Tag is not empty then an attribute with the [local name] "tagClass" is added to the [attributes] of the element. The [normalized value] of this attribute is the Class of the Tag, either "UNIVERSAL", "APPLICATION" or "PRIVATE". If the TaggedType is of the "Tag IMPLICIT Type" form then an attribute with the [local name] "tagging" and [normalized value] "IMPLICIT" is added to the [attributes] of the element. If the TaggedType is 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 with the [local name] "tagging" and [normalized value] "EXPLICIT" is added to the [attributes] of the element. If the TaggedType is of the "Tag Type" form and the Type in the TaggedType is a DummyReference then an attribute with the [local name] "tagging" and [normalized value] "EXPLICIT" is added to the [attributes] of the element. The translation of the Type in the TaggedType is added to the content of the element. Examples [0] INTEGER [APPLICATION 10] IMPLICIT BOOLEAN 6.7. SelectionType Translation The translation of a SelectionType is an element with the [local name] "type". An element with the [local name] "selection" is added to the [children] of the element. An attribute with the [local name] "alternative" is added to the [attributes] of the element. The [normalized value] of this attribute is the identifier of the SelectionType. The translation of the Type in the SelectionType is added to the content of the element. Example field1 < MyChoiceType 6.8. InstanceOfType Translation Legg & Prager Expires 17 December 2004 [Page 18] INTERNET-DRAFT ASN.1 Schema June 17, 2004 The translation of an InstanceOfType is an element with the [local name] "type". An element with the [local name] "instanceOf" is added to the [children] of the element. The content of the element is the translation of the DefinedObjectClass in the InstanceOfType. Example INSTANCE OF TYPE-IDENTIFIER 6.9. ObjectClassFieldType Translation The translation of an ObjectClassFieldType is an element with the [local name] "type". An element with the [local name] "fromClass" is added to the [children] of the element. The content of the element is the translation of the DefinedObjectClass in the ObjectClassFieldType followed by the translation of the FieldName (Section 9.2.6). Example OPERATION.&Linked.&ArgumentType 6.10. TypeFromObject and ValueSetFromObjects Translation The translation of a TypeFromObject or ValueSetFromObjects is an element with the [local name] "type". An element with the [local name] "fromObjects" is added to the [children] of the element. The translation of the ReferencedObjects in the TypeFromObject or ValueSetFromObjects is added to the content of the element. The translation of the FieldName in the TypeFromObject or ValueSetFromObjects is appended to the content of the element. Example Legg & Prager Expires 17 December 2004 [Page 19] INTERNET-DRAFT ASN.1 Schema June 17, 2004 invertMatrix.&Errors.&errorCode 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. The complex content translation of a NamedType is an element with the [local name] "element". An attribute with the [local name] "name" is added to the [attributes] of the element. The [normalized value] of this attribute is the identifier of the NamedType. The translation of the Type in the NamedType is added to the content of the element. The simple content translation of a NamedType is an element with the [local name] "content". An attribute with the [local name] "name" is added to the [attributes] of the element. The [normalized value] of this attribute is the identifier of the NamedType. The translation of the Type in the NamedType is added to the content of the 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 an attribute with the [local name] "explicit" and [normalized value] "true" or "1" is added to the [attributes] of the element resulting from the translation of the Type in the NamedType. Where the automatic tagging transformation applies, this attribute indicates that explicit tagging applies to the Type in the NamedType instead of the usual implicit tagging. 6.11.2. SequenceType Translation The translation of a SequenceType 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 added to the [children] of the element. The translation of each ComponentType in the ComponentTypeList of the initial RootComponentTypeList, if present, is appended to the [children] of the element. If the ExtensionAndException is present then an element with the [local name] "extension" is appended to the [children] of the element, and the translation of the ExceptionSpec (possibly empty) is added to the [children] of the element. The translation of each ExtensionAdditionGroup or ComponentType in the ExtensionAdditions (if any) is appended to the [children] of the element. If the ExtensionEndMarker is present then the translation of each ComponentType in the final RootComponentTypeList is appended to the [children] of the element. The translation of an ExtensionAdditionGroup is an element with the [local name] "extensionGroup". If the VersionNumber is present then an attribute with the [local name] "version" is added to the [attributes] of the element. The [normalized value] of this attribute is the number of the VersionNumber. The translation of each ComponentType in the ExtensionAdditionGroup is appended to the [children] of the element. The translation of a ComponentType of the "NamedType" form is the complex content translation of the NamedType. The translation of a ComponentType of the "NamedType OPTIONAL" form is an element with the [local name] "optional". The complex content translation of the NamedType is added to the [children] of the element. The translation of a ComponentType of the "NamedType DEFAULT Value" form is an element with the [local name] "optional". The complex content translation of the NamedType is added to the [children] of the element. An element with the [local name] "default" is appended to the [children] of the element. The content of the element is the translation of the Value. The translation of a ComponentType of the "COMPONENTS OF Type" form is an element with the [local name] "componentsOf". The translation of the Type is added to the content of the element. Example Legg & Prager Expires 17 December 2004 [Page 21] INTERNET-DRAFT ASN.1 Schema June 17, 2004 SEQUENCE { one INTEGER, two BOOLEAN OPTIONAL, ..., [[ 2: four NULL ]], COMPONENTS OF MySequence, ..., three PrintableString DEFAULT "third" } 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", and the [local name] "set" is used instead of "sequence". 6.11.4. ChoiceType Translation The translation of a ChoiceType that is not a ChoiceOfStrings [RFC3641] type is an element with the [local name] "type". An element with the [local name] "choice" is added to the [children] of the element. The complex content translation of each NamedType in the RootAlternativeTypeList is appended to the [children] of the element. If the ExtensionAndException is present then an element with the Legg & Prager Expires 17 December 2004 [Page 22] INTERNET-DRAFT ASN.1 Schema June 17, 2004 [local name] "extension" is appended to the [children] of the element, and the translation of the ExceptionSpec (possibly empty) is added to the [children] of the element. The translation of each ExtensionAdditionAlternativesGroup or NamedType in the ExtensionAdditionAlternatives (if any) is appended to the [children] of the element. The complex content translation of the NamedType is used. The translation of an ExtensionAdditionAlternativesGroup is an element with the [local name] "extensionGroup". If the VersionNumber is present then an attribute with the [local name] "version" is added to the [attributes] of the element. The [normalized value] of this attribute is the number of the VersionNumber. The complex content translation of each NamedType in the ExtensionAdditionAlternativesGroup is appended to the [children] of the element. Example CHOICE { one INTEGER, two BOOLEAN, ..., [[ 2: three NULL ]], four PrintableString, ... } 6.11.5. Translation of ChoiceOfStrings Types The translation of a ChoiceType that is a ChoiceOfStrings type follows the same procedure as a non-ChoiceOfStrings ChoiceType except Legg & Prager Expires 17 December 2004 [Page 23] INTERNET-DRAFT ASN.1 Schema June 17, 2004 that the [local name] "union" is used instead of "choice", and the simple content translation of each NamedType is used instead of the complex content translation. Example CHOICE -- a ChoiceOfStrings type -- { printableString PrintableString, visibleString VisibleString, ..., utf8String UTF8String } 6.11.6. SequenceOfType Translation The translation of a SequenceOfType is an element with the [local name] "type". An element with the [local name] "sequenceOf" is added to the [children] of the element. If the SequenceOfType is of the "SEQUENCE OF NamedType" form then the complex content translation of the NamedType is added to the content of the element. If the SequenceOfType is of the "SEQUENCE OF Type" form then an element with the [local name] "element" is added to the [children] of the element. An attribute with the [local name] "name" and [normalized value] "item" is added to the [attributes] of the element. An attribute with the [local name] "renames" and empty [normalized value] is added to the [attributes] of the element. The translation of the Type is added to the content of the element. Examples SEQUENCE OF INTEGER Legg & Prager Expires 17 December 2004 [Page 24] INTERNET-DRAFT ASN.1 Schema June 17, 2004 SEQUENCE OF counter INTEGER 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 Types If the ConstrainedType is of the "Type Constraint" form and the Type is the AnyType type from the SchemaLanguageIntegration module [GLUE] then the translation of the ConstrainedType is determined by the rules in Section 6.12.1. If the ConstrainedType is of the "Type Constraint" form (excluding the case where the Type is the AnyType type [GLUE]) then the translation of the ConstrainedType is an element with the [local name] "type". An element with the [local name] "constrained" is added to the [children] of the element. The content of the element is the translation of the Type followed by the translation of the Constraint. A LowerEndpoint or UpperEndpoint is a simple endpoint if it is closed and its value is "MIN", "MAX" or a SignedNumber in an IntegerValue in a BuiltinValue in the Value of the endpoint. A SizeConstraint is a simple range if the Constraint in the SizeConstraint contains only a ValueRange (i.e., a ValueRange in a SubtypeElements in an Elements in a single IntersectionElements in a single Intersections in a Unions in an ElementSetSpec in a lone RootElementSetSpec in an ElementSetSpecs in a SubtypeConstraint in a lone ConstraintSpec in the Constraint) and both end points are simple. A Constraint is a simple range if contains only a SizeConstraint that is a simple range (i.e., a simple range SizeConstraint in a Legg & Prager Expires 17 December 2004 [Page 25] INTERNET-DRAFT ASN.1 Schema June 17, 2004 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). If the parent type of a TypeWithConstraint is a "SEQUENCE OF Type" or "SEQUENCE OF NamedType" and the Constraint or SizeConstraint in the TypeWithConstraint is a simple range then the translation of the TypeWithConstraint is the translation of the parent type. If the value of the lower endpoint is not "MIN" or "0" then an attribute with the [local name] "minSize" is added to the [attributes] of the element from the translation of the parent type. The [normalized value] of this attribute is the value of the lower endpoint. If the value of the upper endpoint is not "MAX" then an attribute with the [local name] "maxSize" is added to the [attributes] of the element. The [normalized value] of this attribute is the value of the upper endpoint. If the parent type of a TypeWithConstraint is is "SEQUENCE OF Type" or "SEQUENCE OF NamedType" and the Constraint or SizeConstraint in the TypeWithConstraint is not a simple range then the translation of the TypeWithConstraint is an element with the [local name] "type". An element with the [local name] "constrained" is added to The content of the element is the translation of the parent type followed by the translation of the Constraint or SizeConstraint. The translation of a TypeWithConstraint where the parent type is "SET OF Type" or "SET OF NamedType" follows the same procedure as the translation of a TypeWithConstraint where the parent type is "SEQUENCE OF Type" or "SEQUENCE OF NamedType" except that "SET" replaces "SEQUENCE" and the [local name] "setOf" is used instead of "sequenceOf". Examples SEQUENCE (SIZE(1..MAX)) OF number INTEGER SEQUENCE SIZE(0..10) OF number INTEGER Legg & Prager Expires 17 December 2004 [Page 26] INTERNET-DRAFT ASN.1 Schema June 17, 2004 SEQUENCE SIZE(1..limit) OF number INTEGER 6.12.1. Translation of AnyType The translation described in this section applies to a ConstrainedType of the "Type Constraint" form where the Type is the AnyType 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 with the same value as id-constraint-xml-type from the SchemaLanguageIntegration module then the translation of the ConstrainedType is either the attribute form translation of a foreign type reference, or the element form translation of a foreign type reference. The attribute form translation of a foreign type reference is an attribute with the [local name] "type". The [normalized value] of this attribute is the qualified name represented by the second and third UserDefinedConstraintParameter. The element form translation of a foreign type reference is an element with the [local name] "type". An attribute with the [local name] "ref" is added to the [attributes] of the element. The [normalized value] of this attribute is the qualified name represented by the second and third UserDefinedConstraintParameter. If there is a fourth UserDefinedConstraintParameter then an attribute with the Legg & Prager Expires 17 December 2004 [Page 27] INTERNET-DRAFT ASN.1 Schema June 17, 2004 [local name] "context" is added to the [attributes] of the element. The [normalized value] of this attribute is the string value of the fourth UserDefinedConstraintParameter. If there is a fourth UserDefinedConstraintParameter then the attribute form of a foreign type reference cannot be used. The translator is otherwise free to choose either the attribute form or element form translation for a foreign type reference, except that in some contexts attribute forms of Type 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" } If the ConstraintSpec in the Constraint is a GeneralConstraint and the GeneralConstraint is a UserDefinedConstraint and the first UserDefinedConstraintParameter is an OBJECT IDENTIFIER with the same value as id-constraint-dtd-type from the SchemaLanguageIntegration module then the translation of the ConstrainedType is an element with the [local name] "type". An attribute with the [local name] "context" is added to the [attributes] of the element. The [normalized value] of this attribute is the string value of the second UserDefinedConstraintParameter. An attribute with the [local name] "elementType" is also added to the [attributes] of the element. The [normalized value] of this attribute is the string value of the third UserDefinedConstraintParameter. Example AnyType (CONSTRAINED BY { OBJECT IDENTIFIER:id-constraint-dtd-type, AnyURI:"http://www.example.com/inventory", Name:"product" }) or DTD-Type { "http://www.example.com/inventory", "product" } Legg & Prager Expires 17 December 2004 [Page 28] INTERNET-DRAFT ASN.1 Schema June 17, 2004 If the ConstraintSpec in the Constraint is a GeneralConstraint and the GeneralConstraint is a UserDefinedConstraint and the first UserDefinedConstraintParameter is an OBJECT IDENTIFIER with the same value as id-constraint-xml-element from the SchemaLanguageIntegration module then the translation of the ConstrainedType is an element with the [local name] "type". An element with the [local name] "choice" is added to the [children] of the element. An element with the [local name] "element" is added to the [children] of the element. An attribute with the [local name] "ref" is added to the [attributes] of the element. The [normalized value] of this attribute is the qualified name represented by the second and third UserDefinedConstraintParameter. If there is a fourth UserDefinedConstraintParameter then an attribute with the [local name] "context" is added to the [attributes] of the element. The [normalized value] of this attribute is the string value of the fourth 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" } element. An element with the [local name] "element" is added to the [children] of the Legg & Prager Expires 17 December 2004 [Page 29] INTERNET-DRAFT ASN.1 Schema June 17, 2004 element. An attribute with the [local name] "context" is added to the [attributes] of the element. The [normalized value] of this attribute is the string value of the second UserDefinedConstraintParameter. An attribute with the [local name] "elementType" is also added to the [attributes] of the element. The [normalized value] of this attribute is the string value of the third 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" } If none of the previous cases in this section apply to the Constraint then the translation of the ConstrainedType is either the attribute form translation of an anytype reference, or the element form translation of an anytype reference. The attribute form translation of an anytype reference is an attribute with the [local name] "type". The [normalized value] of this attribute is a qualified name with the namespace name "http://xmled.info/ns/ASN.1" and the local part "AnyType". The element form translation of an anytype reference is an element with the [local name] "type". An attribute with the [local name] "ref" is added to the [attributes] of the element. The [normalized value] of this attribute is a qualified name with the namespace name "http://xmled.info/ns/ASN.1" and the local part "AnyType". Usually the translator is free to choose either an attribute form or element form translation for an anytype reference, however in some contexts attribute forms of Type are explicitly disallowed. Legg & Prager Expires 17 December 2004 [Page 30] INTERNET-DRAFT ASN.1 Schema June 17, 2004 6.12.2. Constraint Translation The translation of a Constraint is the translation of the ConstraintSpec followed by the translation of the ExceptionSpec (possibly empty). The translation of a ConstraintSpec is the translation of the contained SubtypeConstraint or GeneralConstraint. The translation of a SubtypeConstraint is the translation of the contained ElementSetSpecs. The translation of a GeneralConstraint is the translation of the contained UserDefinedConstraint, TableConstraint or ContentsConstraint. 6.12.3. UserDefinedConstraint Translation The translation of a UserDefinedConstraint is an element with the [local name] "constrainedBy". The translation of each UserDefinedConstraintParameter is appended to the [children] of the element. The translation of a UserDefinedConstraintParameter of the "Governor : Value" form is an element with the [local name] "valueParameter". The content of the element is the translation of the Type in the Governor followed by the translation of the Value. The translation of a UserDefinedConstraintParameter of the "Governor : ValueSet" form is an element with the [local name] "valueSetParameter". The content of the element is the translation of the Type in the Governor followed by the translation of the ValueSet. The translation of a UserDefinedConstraintParameter of the "Governor : Object" form is an element with the [local name] "objectParameter". The content of the element is the translation of the DefinedObjectClass in the Governor followed by the translation of the Object. The translation of a UserDefinedConstraintParameter of the "Governor : ObjectSet" form is an element with the [local name] "objectSetParameter". The content of the 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 Legg & Prager Expires 17 December 2004 [Page 31] INTERNET-DRAFT ASN.1 Schema June 17, 2004 an element with the [local name] "typeParameter". The translation of that Type is added to the content of the element. The translation of a UserDefinedConstraintParameter that is a DefinedObjectClass is an element with the [local name] "classParameter". The translation of that DefinedObjectClass is added to the content of the element. 6.12.4. TableConstraint Translation The translation of a TableConstraint that is a SimpleTableConstraint is an element with the [local name] "table". The translation of the ObjectSet in the SimpleTableConstraint is added to the content of the element. The translation of a TableConstraint that is a ComponentRelationConstraint is an element with the [local name] "table". The translation of the DefinedObjectSet in the ComponentRelationConstraint is added to the content of the
element. The translation of each AtNotation is appended to the [children] of the
element. The translation of an AtNotation is an element with the [local name] "restrictBy". An attribute with the [local name] "component" is added to the [attributes] of the element. The [normalized value] of this attribute is the concatenation of zero, one or more "../" strings, one for each Level in the AtNotation (including the empty one), followed by a "/" (U+002F) separated list of the ComponentIdList identifiers. Examples ERROR.&Type({Errors}{@severity,@...errorId})
6.12.5. ContentsConstraint Translation Legg & Prager Expires 17 December 2004 [Page 32] INTERNET-DRAFT ASN.1 Schema June 17, 2004 The translation of a ContentsConstraint is an element with the [local name] "contents". If the ContentsConstraint is of the "CONTAINING Type" form then an element with the [local name] "containing" is added to the [children] of the element. The translation of the Type is added to the contents of the element. If the ContentsConstraint is of the "ENCODED BY Value" form then an element with the [local name] "encodedBy" is added to the [children] of the element. The translation of the Value is added to the contents of the element. If the ContentsConstraint is of the "CONTAINING Type ENCODED BY Value" form then the content of the element is an element with the [local name] "containing" followed by an element with the [local name] "encodedBy". The translation of the Type is added to the contents of the element, and the translation of the Value is added to the contents of the element. 6.12.6. ExceptionSpec Translation The translation of a non-empty ExceptionSpec is an element with the [local name] "exception". If the ExceptionSpec is a SignedNumber then the content of the element is the translation of a notional INTEGER Type followed by the translation of a notional Value of the INTEGER type with the IntegerValue of SignedNumber. If the ExceptionSpec is a DefinedValue then the content of the element is the translation of a notional INTEGER Type followed by the translation of the DefinedValue. If the ExceptionSpec is of the "Type : Value" form then the content of the element is the translation of the Type followed by the translation of the Value. Examples !10 !myValue Legg & Prager Expires 17 December 2004 [Page 33] INTERNET-DRAFT ASN.1 Schema June 17, 2004 !PrintableString:"failure" 7. Translation of Values The translation of a Value is the translation of either a BuiltinValue, ReferencedValue or ObjectClassFieldValue. The translation of a ReferencedValue is the translation of either a DefinedValue or a ValueFromObject. Examples zero INTEGER ::= 0 integerList SEQUENCE OF number INTEGER ::= { zero, 3, 7 } 3 7 7.1. DefinedValue Translation If 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 translation of a value reference. The attribute form translation of a value reference is an attribute with the [local name] "value". The [normalized value] of this attribute is the qualified name referencing the value definition (see Section 5.1). The element form translation of a value reference 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 element. An attribute with the [local name] "ref" is Legg & Prager Expires 17 December 2004 [Page 34] INTERNET-DRAFT ASN.1 Schema June 17, 2004 added to the [attributes] of the element. The [normalized value] of this attribute is the qualified name referencing the value definition (see Section 5.1). Usually the translator is free to choose either an attribute form or element form translation for a DefinedValue, however in some contexts attribute forms of Value are explicitly disallowed. If a DefinedValue is a DummyReference then the translation of the DefinedValue is the translation of the Value in the ActualParameter corresponding to the DummyReference. If a DefinedValue is a ParameterizedValue then the translation of the Value is the translation of the Value on the right hand side of the referenced ParameterizedValueAssignment. 7.2. BuiltinValue Translation The translation of a BuiltinValue is either the attribute form translation of a built-in value, or the element form translation of a built-in value. The attribute form translation of a built-in value is an attribute with the [local name] "literal" whose [normalized value] is the RXER [RXER] encoding of the BuiltinValue. The element form translation of a built-in value is an element with the [local name] "value" whose content is the RXER encoding of the BuiltinValue, except that a value of the EXTERNAL type (or a subtype thereof) is encoded according to the associated type defined in Clause 34.5 of X.680 [X680]. The rules for translating a Value apply recursively to any nested Value except that the [local name] of a nested Value will be determined according to RXER by the governing ASN.1 type of the enclosing Value. 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 be added to the [attributes] of the element. Note that the asn1:meta attribute operates as a switch that indicates whether the content of the element containing the attribute is interpreted as ASN.1 Schema notation or as an RXER encoding. The attribute form translation of BuiltinValue SHALL NOT be used if, the RXER encoding of the Value contains items other than character information items, attribute forms of Value have been explicitly disallowed, or the BuiltinValue 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 Translation The translation of a ValueFromObject 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 element. An element with the [local name] "fromObjects" is added to the [children] of the element. The translation of the ReferencedObjects in the ValueFromObject is added to the content of the element. The translation of the FieldName in the ValueFromObject is appended to the content of the element. 7.4. ObjectClassFieldValue Translation If an ObjectClassFieldValue is a BuiltinValue in a FixedTypeFieldVal then the translation of the ObjectClassFieldValue is the translation of the BuiltinValue. If an ObjectClassFieldValue is a ReferencedValue in a FixedTypeFieldVal then the translation of the ObjectClassFieldValue is the translation of the ReferencedValue. If an ObjectClassFieldValue is an OpenTypeFieldVal then the translation of the ObjectClassFieldValue is the translation of the Value in the OpenTypeFieldVal. Note that if the Value is a BuiltinValue (in which case it will be RXER encoded) then the Type in the OpenTypeFieldVal should be indicated by the xsi:type attribute, if it comprises one of the productions in Table 1. 8. Translation of Value Sets The translation of a ValueSet is an element with the [local name] "valueSet". The translation of the ElementSetSpecs in the ValueSet is added to the [children] of the element. Example { 1 | 3..7, ..., 9..19 EXCEPT ( 11 | 12 ) } 1 Legg & Prager Expires 17 December 2004 [Page 36] INTERNET-DRAFT ASN.1 Schema June 17, 2004 11 12 8.1. ElementSetSpecs Translation The translation of an ElementSetSpecs where the ellipsis ("...") is not present is the translation of the ElementSetSpec in the RootElementSetSpec. The translation of an ElementSetSpecs where the ellipsis ("...") is present is the translation of the ElementSetSpec in the RootElementSetSpec followed by an element with the [local name] "extension". If an AdditionalElementSetSpec is present then the translation of the ElementSetSpec in the AdditionalElementSetSpec is added to the [children] of the element. 8.2. ElementSetSpec Translation If the ElementSetSpec is of the "ALL Exclusions" form then the translation of the ElementSetSpec is an element with the [local name] "all". An element with the [local name] "except" is added to the [children] of the element. The translation of the Elements in the Exclusions is added to the [children] of the element. If the ElementSetSpec is of the "Unions" form then the translation of the ElementSetSpec is the translation of the Unions. If the Unions has only one Intersections then the translation of the Unions is the translation of that Intersections, otherwise the translation of the Unions is an element with the [local name] "union". The translation of each Intersections is appended to the [children] of the element. Legg & Prager Expires 17 December 2004 [Page 37] INTERNET-DRAFT ASN.1 Schema June 17, 2004 If the Intersections has only one IntersectionElements then the translation of the Intersections is the translation of that IntersectionElements, otherwise the translation of the Intersections is an element with the [local name] "intersection". The translation of each IntersectionElements is appended to the [children] of the element. If the IntersectionElements is of the "Elems Exclusions" form then the translation of the IntersectionElements is an element with the [local name] "all". The content of the element is the translation of the Elements in the Elems followed by an element with the [local name] "except". The translation of the Elements in the Exclusions is added to the [children] of the element. If the IntersectionElements is of the "Elements" form then the translation of the IntersectionElements is the translation of the Elements. The translation of an Elements is the translation of the SubtypeElements, ObjectSetElements or ElementSetSpec, as appropriate. 8.3. SubtypeElements Translation If a SubtypeElements is a SingleValue then the translation of the SubtypeElements is the translation of the Value, except that an attribute form of the Value translation SHALL NOT be used. If a SubtypeElements is a ContainedSubtype then the translation of the SubtypeElements is an element with the [local name] "includes". The translation of the Type in the ContainedSubtype is added to the content of the element. If a SubtypeElements is a ValueRange then the translation of the SubtypeElements is the translation of the ValueRange. If a SubtypeElements is a SizeConstraint then the translation of the SubtypeElements is an element with the [local name] "size". The content of the element is the translation of the Constraint in the SizeConstraint. If a SubtypeElements is a TypeConstraint then the translation of the SubtypeElements is an element with the [local name] "typeConstraint". The content of the element is the translation of the Type in the TypeConstraint. If a SubtypeElements is a PermittedAlphabet then the translation of the SubtypeElements is an element with the [local name] "from". The content of the element is the translation of the Constraint in Legg & Prager Expires 17 December 2004 [Page 38] INTERNET-DRAFT ASN.1 Schema June 17, 2004 the PermittedAlphabet. If a SubtypeElements is an InnerTypeConstraints then the translation of the SubtypeElements 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 element is the translation of the Value in the PatternConstraint. 8.3.1. ValueRange Translation The translation of a ValueRange is an element with the [local name] "range". If the LowerEndpoint in the ValueRange is of the "LowerEndValue <" form then an element with the [local name] "minExclusive" is added to the [children] of the element. If the LowerEndValue is not "MIN" then the content of the element is the translation of the Value in the LowerEndValue. 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" is added to the [children] of the element. The content of the element is the translation of the Value in the LowerEndValue. If the LowerEndpoint in the ValueRange is of the "LowerEndValue" form and the LowerEndValue is "MIN" then an element with the [local name] "minInclusive" MAY be added to the [children] of the element. If the UpperEndpoint in the ValueRange is of the "< UpperEndValue" form then an element with the [local name] "maxExclusive" is added to the [children] of the element. If the UpperEndValue is not "MAX" then the content of the element is the translation of the Value in the UpperEndValue. If the UpperEndpoint in the ValueRange is of the "UpperEndValue" form and the UpperEndValue is not "MAX" then an element with the [local name] "maxInclusive" is added to the [children] of the element. The content of the element is the translation of the Value in the UpperEndValue. If the UpperEndpoint in the ValueRange is of the "UpperEndValue" form and the UpperEndValue is "MAX" then an element with the [local name] "maxInclusive" MAY be added to the [children] of the element. Legg & Prager Expires 17 December 2004 [Page 39] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Examples 1..10 0..MAX 0<.. 8.3.2. InnerTypeConstraints Translation The translation of an InnerTypeConstraints of the "WITH COMPONENT SingleTypeConstraint" form is an element with the [local name] "withComponent". The content of the element is the translation of the Constraint in the SingleTypeConstraint. The translation of an InnerTypeConstraints of the "WITH COMPONENTS MultipleTypeConstraints" form is an element with the [local name] "withComponents". If the MultipleTypeConstraints is a PartialSpecification then an attribute with the [local name] "partial" and the [normalized value] "true" or "1" is added to the [attributes] of the element. If the MultipleTypeConstraints is a FullSpecification then an attribute with the [local name] "partial" and the [normalized value] "false" or "0" MAY be added to the [attributes] of the element. The translation of each NamedConstraint in the MultipleTypeConstraints is appended to the [children] of the element. The translation of a NamedConstraint is an element with the [local name] "component". An attribute with the [local name] "name" Legg & Prager Expires 17 December 2004 [Page 40] INTERNET-DRAFT ASN.1 Schema June 17, 2004 is added to the [attributes] of the element. The [normalized value] of this attribute is the identifier of the NamedConstraint. If the PresenceConstraint of the ComponentConstraint of the NamedConstraint is not empty then an attribute with the [local name] "use" is added to the [attributes] of the element. The [normalized value] of this attribute is 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 is added to the [children] of the element. 9. Translation of Object Classes The translation of an ObjectClass is the translation of either a DefinedObjectClass, an ObjectClassDefn or a ParameterizedObjectClass. If an ObjectClass is a ParameterizedObjectClass then the translation of the ObjectClass is the translation of the ObjectClass on the right hand side of the referenced ParameterizedObjectClassAssignment. The ObjectClass that substitutes for a ParameterizedObjectClass is potentially in a different module scope to the surrounding translation, therefore the translation of the ObjectClass may require a tagDefault or extensibilityImplied attribute, according to the provisions of Section 5.9. 9.1. DefinedObjectClass Translation If a DefinedObjectClass is an objectclassreference (not a DummyReference), an ExternalObjectClassReference or a UsefulObjectClassReference then the translation of the DefinedObjectClass is either the attribute form translation of an object class reference, or the element form translation of an object class reference. The attribute form translation of an object class reference is an attribute with the [local name] "class". The [normalized value] of this attribute is the qualified name referencing the object class definition (see Section 5.1). In the case of a UsefulObjectClassReference the namespace name is "http://xmled.info/ns/ASN.1" and the local part is either "TYPE- IDENTIFIER" or "ABSTRACT-SYNTAX", as appropriate. The element form translation of an object class reference is an Legg & Prager Expires 17 December 2004 [Page 41] INTERNET-DRAFT ASN.1 Schema June 17, 2004 element with the [local name] "class". An attribute with the [local name] "ref" is added to the [attributes] of the element. The [normalized value] of this attribute is the qualified name referencing the object class definition. In the case of a UsefulObjectClassReference the namespace name is "http://xmled.info/ns/ASN.1" and the local part is either "TYPE- IDENTIFIER" or "ABSTRACT-SYNTAX", as appropriate. The translation of the DefinedObjectClass is the same whether the object class definition is referenced by an objectclassreference or an ExternalObjectClassReference. The translator is free to choose either the attribute form or element form translation for an object class reference. If a DefinedObjectClass is a DummyReference then the translation of the DefinedObjectClass is the translation of the DefinedObjectClass in the ActualParameter corresponding to the DummyReference. 9.2. ObjectClassDefn Translation The translation of an ObjectClassDefn is an element with the [local name] "class". The translation of each FieldSpec in the ObjectClassDefn is appended to the [children] of the element. The translation of a FieldSpec is the translation of either a TypeFieldSpec, a FixedTypeValueFieldSpec, a VariableTypeValueFieldSpec, a FixedTypeValueSetFieldSpec, a VariableTypeValueSetFieldSpec, an ObjectFieldSpec or an ObjectSetFieldSpec. 9.2.1. TypeFieldSpec Translation The translation of a TypeFieldSpec where the TypeOptionalitySpec is absent is an element with the [local name] "typeField". The translation of a TypeFieldSpec with a TypeOptionalitySpec of "OPTIONAL" is an element with the [local name] "optional". An element with the [local name] "typeField" is added to the [children] of the element. The translation of a TypeFieldSpec with a TypeOptionalitySpec of "DEFAULT" is an element with the [local name] "optional". An element with the [local name] "typeField" is added to the [children] of the element. An element with the [local name] "default" is appended to the [children] of the element. The content of the element is the translation of the Type in the TypeOptionalitySpec. Legg & Prager Expires 17 December 2004 [Page 42] INTERNET-DRAFT ASN.1 Schema June 17, 2004 An attribute with the [local name] "name" is added to the [attributes] of the element. The [normalized value] of this attribute is the typefieldreference of the TypeFieldSpec, without the ampersand. Example CLASS { &One, &Two OPTIONAL, &Three DEFAULT OBJECT IDENTIFIER } 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" is added to the [children] of the 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" is added to the [children] of the element. An element with the [local name] "default" is appended to the [children] of the element. The content of the element is the translation of the Value in the ValueOptionalitySpec. An attribute with the [local name] "name" is added to the [attributes] of the 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" Legg & Prager Expires 17 December 2004 [Page 43] INTERNET-DRAFT ASN.1 Schema June 17, 2004 and [normalized value] "true" or "1" is added to the [attributes] of the element, otherwise an attribute with the [local name] "unique" and [normalized value] "false" or "0" MAY be added to the [attributes] of the element. The translation of the Type in the FixedTypeValueFieldSpec is added to the content of the element. Example CLASS { &one OBJECT IDENTIFIER UNIQUE, &two BOOLEAN OPTIONAL, &three INTEGER DEFAULT 0 } 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" is added to the [children] of the 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" is added to the [children] of the element. An element with the [local name] "default" is appended to the [children] of the element. The content of the element is the translation of the ValueSet in the ValueSetOptionalitySpec. An attribute with the [local name] "name" is added to the Legg & Prager Expires 17 December 2004 [Page 44] INTERNET-DRAFT ASN.1 Schema June 17, 2004 [attributes] of the element. The [normalized value] of this attribute is the valuesetfieldreference of the FixedTypeValueSetFieldSpec, without the ampersand. The translation of the Type in the FixedTypeValueSetFieldSpec is added to the content of the element. Example CLASS { &One UTF8String, &Two BOOLEAN OPTIONAL, &Three INTEGER DEFAULT { 1 | 2 } } 1 2 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" is added to the [children] of the 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" is added to the [children] of the element. An element with the [local name] "default" is appended to the [children] of the Legg & Prager Expires 17 December 2004 [Page 45] INTERNET-DRAFT ASN.1 Schema June 17, 2004 element. The translation of the Value in the ValueOptionalitySpec is added to the content of the element. An attribute with the [local name] "name" is added to the [attributes] of the element. The [normalized value] of this attribute is the valuefieldreference of the VariableTypeValueFieldSpec, without the ampersand. An element with the [local name] "typeFromField" is added to the [children] of the element. The translation of the FieldName in the VariableTypeValueFieldSpec is added to the content of the element. Example CLASS { &Syntax DEFAULT INTEGER, &one &Syntax, &two &Syntax OPTIONAL, &three &Syntax DEFAULT 0 } 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, 2004 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" is added to the [children] of the 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" is added to the [children] of the element. An element with the [local name] "default" is appended to the [children] of the element. The content of the element is the translation of the ValueSet in the ValueSetOptionalitySpec. An attribute with the [local name] "name" is added to the [attributes] of the element. The [normalized value] of this attribute is the valuesetfieldreference of the VariableTypeValueSetFieldSpec, without the ampersand. An element with the [local name] "typeFromField" is added to the [children] of the element. The translation of the FieldName in the VariableTypeValueSetFieldSpec is added to the content of the element. Example CLASS { &Syntax DEFAULT INTEGER, &One &Syntax, &Two &Syntax OPTIONAL, &Three &Syntax DEFAULT { 1 | 2 } } Legg & Prager Expires 17 December 2004 [Page 47] INTERNET-DRAFT ASN.1 Schema June 17, 2004 1 2 9.2.6. FieldName Translation 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 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 Linked/ArgumentType 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" is added to the [children] of the 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" is added to the [children] of the 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 to the [children] of the element. The content of the element is the translation of the Object in the ObjectOptionalitySpec. An attribute with the [local name] "name" is added to the [attributes] of the element. The [normalized value] of this attribute is the objectfieldreference of the ObjectFieldSpec, without the ampersand. The translation of the DefinedObjectClass in the ObjectFieldSpec is added to the content of the element. Example CLASS { &one TYPE-IDENTIFIER, &two ABSTRACT-SYNTAX OPTIONAL, &three TYPE-IDENTIFIER DEFAULT myObject } 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" is added to the [children] of the 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" is added to the [children] of the element. An element with the [local name] "default" is appended to the [children] of the element. The content of the Legg & Prager Expires 17 December 2004 [Page 49] INTERNET-DRAFT ASN.1 Schema June 17, 2004 element is the translation of the ObjectSet in the ObjectSetOptionalitySpec. An attribute with the [local name] "name" is added to the [attributes] of the element. The [normalized value] of this attribute is the objectsetfieldreference of the ObjectSetFieldSpec, without the ampersand. The translation of the DefinedObjectClass in the ObjectSetFieldSpec is added to the content of the element. Example CLASS { &One TYPE-IDENTIFIER, &Two ABSTRACT-SYNTAX OPTIONAL, &Three TYPE-IDENTIFIER DEFAULT { myObject } } 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. The Object that substitutes for a ParameterizedObject is potentially in a different module scope to the surrounding translation, therefore the translation of the Object may require a tagDefault or extensibilityImplied attribute, according to the provisions of Section 5.9. Legg & Prager Expires 17 December 2004 [Page 50] INTERNET-DRAFT ASN.1 Schema June 17, 2004 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 element form translation of an object reference is an element with the [local name] "object". An attribute with the [local name] "ref" is added to the [attributes] of the element. The [normalized value] of this attribute is the qualified name referencing the object definition. 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. The Object that substitutes for a DummyReference is potentially in a different module scope to the surrounding translation, therefore the translation of the Object may require a tagDefault or extensibilityImplied attribute, according to the provisions of Section 5.9. 10.2. ObjectDefn Translation An ObjectDefn in the DefinedSyntax form is first converted to the equivalent DefaultSyntax and then translated. The translation of an ObjectDefn is an element with the [local name] "object". An element with the [local name] "definition" is added to the [children] of the element. The translation of each FieldSetting in the DefaultSyntax of the ObjectClassDefn is appended to the [children] of the element. The translation of a FieldSetting is an element with the Legg & Prager Expires 17 December 2004 [Page 51] INTERNET-DRAFT ASN.1 Schema June 17, 2004 PrimitiveFieldName (without the ampersand) as its [local name]. The content of this element is the translation of the Type, Value, ValueSet, Object or ObjectSet in the Setting of the FieldSetting. Example ONE-OF-EVERYTHING ::= CLASS { &One, &two INTEGER, &Three INTEGER, &four TYPE-IDENTIFIER, &Five TYPE-IDENTIFIER } mixedBag ONE-OF-EVERYTHING ::= { &One BOOLEAN, &two 99, &Three { 1 | 2 }, &four myObject, &Five { myObject } } 1 2 Legg & Prager Expires 17 December 2004 [Page 52] INTERNET-DRAFT ASN.1 Schema June 17, 2004 10.3. ObjectFromObject Translation The translation of an ObjectFromObject is an element with the [local name] "object". An element with the [local name] "fromObjects" is added to the [children] of the element. The translation of the ReferencedObjects in the ObjectFromObject is added to the content of the element. The translation of the FieldName in the ObjectFromObject is appended to the content of the element. 11. Translation of Object Sets 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 is added to the [children] of the element. Note that 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 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 is added to the [children] of the 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 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 is added to the [children] of the 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 object set reference, or the element form translation of an object set reference. The attribute form translation of an object set reference is an attribute with the [local name] "objectSet". The [normalized value] of this attribute is the qualified name referencing the object set definition (see Section 5.1). The element form translation of an object set reference is an element with the [local name] "objectSet". An attribute with the [local name] "ref" is added to the [attributes] of the element. The [normalized value] of this attribute is the qualified name referencing the object set definition. 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 DefinedObjectSet is the translation of the ObjectSet in the ActualParameter corresponding to the DummyReference. The ObjectSet that substitutes for a DummyReference is potentially in a different module scope to the surrounding translation, therefore the translation of the ObjectSet may require a tagDefault or extensibilityImplied attribute, according to the provisions of Section 5.9. 11.2. ObjectSetElements Translation Legg & Prager Expires 17 December 2004 [Page 54] INTERNET-DRAFT ASN.1 Schema June 17, 2004 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 ObjectSet on the right hand side of the referenced ParameterizedObjectSetAssignment. Note that an ObjectSetElements that is an 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 for the expanded parameterized definition. The ObjectSet that substitutes for a ParameterizedObjectSet is potentially in a different module scope to the surrounding translation, therefore the translation of the ObjectSet may require a tagDefault or extensibilityImplied attribute, according to the provisions of Section 5.9. 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" is added to the [children] of the element. The translation of the ReferencedObjects in the ObjectSetFromObjects is added to the content of the element. The translation of the FieldName in the ObjectSetFromObjects is appended to the content of the 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) Legg & Prager Expires 17 December 2004 [Page 55] INTERNET-DRAFT ASN.1 Schema June 17, 2004 then the translation of the ReferencedObjects is the translation of the DefinedObjectSet. 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. If the 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. Note that 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 for the expanded parameterized definition. 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 the Object or ObjectSet may require a tagDefault or extensibilityImplied attribute, according to the provisions of Section 5.9. 13. 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. 14. 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. Appendix A. ASN.1 for ASN.1 Schema This appendix is normative. 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) The Internet Society (2004). This version of -- this ASN.1 module is part of RFC XXXX; see the RFC itself -- for full legal notices. -- The namespace name for this module is: -- http://xmled.info/ns/ASN.1 -- The SchemaIdentity for this module 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 ::= SEQUENCE { name [ATTRIBUTE] ModuleReference OPTIONAL, identifier [ATTRIBUTE] DefinitiveIdentifier OPTIONAL, targetNamespace [ATTRIBUTE] AnyURI OPTIONAL, tagDefault [ATTRIBUTE] TagDefault DEFAULT automatic, extensibilityImplied [ATTRIBUTE] BOOLEAN DEFAULT FALSE, imports [UNTAGGED] SEQUENCE SIZE (1..MAX) OF import Import OPTIONAL, assignments [UNTAGGED] AssignmentList } ModuleReference ::= TypeReference DefinitiveIdentifier ::= OBJECT IDENTIFIER Import ::= SEQUENCE { namespace [ATTRIBUTE] AnyURI OPTIONAL, name [ATTRIBUTE] ModuleReference OPTIONAL, identifier [ATTRIBUTE] DefinitiveIdentifier OPTIONAL, schemaIdentity [ATTRIBUTE] AnyURI OPTIONAL, schemaLocation [ATTRIBUTE] AnyURI OPTIONAL } Legg & Prager Expires 17 December 2004 [Page 57] INTERNET-DRAFT ASN.1 Schema June 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 COMPONENTS { ..., literal PRESENT, valueRef ABSENT, value ABSENT } | WITH COMPONENTS { ..., literal ABSENT, valueRef PRESENT, value ABSENT } | WITH COMPONENTS { ..., literal ABSENT, valueRef ABSENT, value PRESENT })) TypeAndValue ::= SEQUENCE { typeRef [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL, type Type OPTIONAL, literal [ATTRIBUTE] AnySimpleType OPTIONAL, Legg & Prager Expires 17 December 2004 [Page 58] INTERNET-DRAFT ASN.1 Schema June 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 }) ObjectClassAssignment ::= SEQUENCE { name [ATTRIBUTE] ObjectClassReference, classRef [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL, class ObjectClass OPTIONAL } (WITH COMPONENTS { ..., classRef PRESENT, class ABSENT } | WITH COMPONENTS { ..., classRef ABSENT, class PRESENT }) ObjectClassReference ::= UTF8String (PATTERN "[A-Z][A-Z0-9]*(-[A-Z0-9]+)*") ObjectAssignment ::= SEQUENCE { name [ATTRIBUTE] ObjectReference, classRef [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL, class DefinedObjectClass OPTIONAL, objectRef [NAME AS "object"] [ATTRIBUTE] QName OPTIONAL, object Object OPTIONAL Legg & Prager Expires 17 December 2004 [Page 59] INTERNET-DRAFT ASN.1 Schema June 17, 2004 } ((WITH COMPONENTS { ..., classRef PRESENT, class ABSENT } | WITH COMPONENTS { ..., classRef ABSENT, class PRESENT }) INTERSECTION (WITH COMPONENTS { ..., objectRef PRESENT, object ABSENT } | WITH COMPONENTS { ..., objectRef ABSENT, object PRESENT })) ObjectClassAndObject ::= SEQUENCE { classRef [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL, class DefinedObjectClass OPTIONAL, objectRef [NAME AS "object"] [ATTRIBUTE] QName OPTIONAL, object Object OPTIONAL } ((WITH COMPONENTS { ..., classRef PRESENT, class ABSENT } | WITH COMPONENTS { ..., classRef ABSENT, class PRESENT }) INTERSECTION (WITH COMPONENTS { ..., objectRef PRESENT, object ABSENT } | WITH COMPONENTS { ..., objectRef ABSENT, object PRESENT })) ObjectReference ::= ValueReference ObjectSetAssignment ::= SEQUENCE { name [ATTRIBUTE] ObjectSetReference, classRef [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL, class DefinedObjectClass OPTIONAL, objectSetRef [NAME AS "objectSet"] [ATTRIBUTE] QName OPTIONAL, objectSet ObjectSet OPTIONAL } ((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, objectSet ObjectSet OPTIONAL } ((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-DRAFT ASN.1 Schema June 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) } Legg & Prager Expires 17 December 2004 [Page 61] INTERNET-DRAFT ASN.1 Schema June 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 { 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, type Type OPTIONAL } (WITH COMPONENTS { ..., typeRef PRESENT, type ABSENT } | WITH COMPONENTS { ..., typeRef ABSENT, type PRESENT }) InstanceOfType ::= DefinedObjectClassOnly ObjectClassFieldType ::= SEQUENCE { classRef [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL, Legg & Prager Expires 17 December 2004 [Page 62] INTERNET-DRAFT ASN.1 Schema June 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, element TypedContainer, content TypedContainer } Legg & Prager Expires 17 December 2004 [Page 63] INTERNET-DRAFT ASN.1 Schema June 17, 2004 NonAttributeNamedType ::= NamedType (WITH COMPONENTS { ..., attribute ABSENT }) TypedContainer ::= SEQUENCE { context [ATTRIBUTE] AnyURI OPTIONAL, ref [ATTRIBUTE] QName OPTIONAL, elementType [ATTRIBUTE] Name OPTIONAL, name [ATTRIBUTE] NameIdentifier OPTIONAL, renames [ATTRIBUTE] IdentifierOrEmpty OPTIONAL, typeRef [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL, type Type OPTIONAL } (WITH COMPONENTS { context OPTIONAL, ref PRESENT } | WITH COMPONENTS { context PRESENT, elementType PRESENT } | WITH COMPONENTS { name PRESENT, renames OPTIONAL, typeRef PRESENT } | WITH COMPONENTS { name PRESENT, renames OPTIONAL, type PRESENT }) NameIdentifier ::= NCName IdentifierOrEmpty ::= UTF8String (INCLUDES Identifier | "") SequenceType ::= SEQUENCE { initialRoot [UNTAGGED] ComponentTypeList OPTIONAL, extension SEQUENCE { exception ExceptionSpec OPTIONAL, additional [UNTAGGED] ExtensionAdditions OPTIONAL } OPTIONAL, finalRoot [UNTAGGED] ComponentTypeList OPTIONAL } ComponentTypeList ::= SEQUENCE SIZE (1..MAX) OF component [UNTAGGED] ComponentType ComponentType ::= CHOICE { named [UNTAGGED] NamedType, optional SEQUENCE { named [UNTAGGED] NamedType, default ValueOnly OPTIONAL }, componentsOf TypeOnly } ExtensionAdditions ::= SEQUENCE SIZE (1..MAX) OF addition [UNTAGGED] ExtensionAddition ExtensionAddition ::= CHOICE { group ExtensionAdditionGroup, component [UNTAGGED] ComponentType Legg & Prager Expires 17 December 2004 [Page 64] INTERNET-DRAFT ASN.1 Schema June 17, 2004 } ExtensionAdditionGroup ::= SEQUENCE { version [ATTRIBUTE] VersionNumber OPTIONAL, group [UNTAGGED] ComponentTypeList } VersionNumber ::= INTEGER (2..MAX) SetType ::= SequenceType ChoiceType ::= SEQUENCE { root [UNTAGGED] AlternativeTypeList, extension SEQUENCE { exception ExceptionSpec OPTIONAL, additional [UNTAGGED] ExtensionAdditionAlternatives OPTIONAL } OPTIONAL } AlternativeTypeList ::= SEQUENCE SIZE (1..MAX) OF named [UNTAGGED] NonAttributeNamedType ExtensionAdditionAlternatives ::= SEQUENCE SIZE (1..MAX) OF addition [UNTAGGED] ExtensionAdditionAlternative ExtensionAdditionAlternative ::= CHOICE { group ExtensionAdditionAlternativesGroup, named [UNTAGGED] NonAttributeNamedType } ExtensionAdditionAlternativesGroup ::= SEQUENCE { version [ATTRIBUTE] VersionNumber OPTIONAL, alternatives [UNTAGGED] AlternativeTypeList } UnionType ::= ChoiceType SequenceOfType ::= SEQUENCE { minSize [ATTRIBUTE] INTEGER (0..MAX) OPTIONAL, maxSize [ATTRIBUTE] INTEGER (0..MAX) OPTIONAL, named [UNTAGGED] NonAttributeNamedType } SetOfType ::= SequenceOfType ListType ::= SequenceOfType ConstrainedType ::= SEQUENCE { Legg & Prager Expires 17 December 2004 [Page 65] INTERNET-DRAFT ASN.1 Schema June 17, 2004 typeRef [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL, type Type OPTIONAL, constraint [UNTAGGED] Constraint } (WITH COMPONENTS { ..., typeRef PRESENT, type ABSENT } | WITH COMPONENTS { ..., typeRef ABSENT, type PRESENT }) Constraint ::= SEQUENCE { constraintSpec [UNTAGGED] CHOICE { subtype [UNTAGGED] ElementSetSpecs, constrainedBy UserDefinedConstraint, table TableConstraint, contents ContentsConstraint }, exception ExceptionSpec OPTIONAL } UserDefinedConstraint ::= SEQUENCE { parameters [UNTAGGED] ConstraintParameters OPTIONAL } ConstraintParameters ::= SEQUENCE SIZE (1..MAX) OF parameter [UNTAGGED] UserDefinedConstraintParameter UserDefinedConstraintParameter ::= CHOICE { valueParameter TypeAndValue, valueSetParameter TypeAndValueSet, objectParameter ObjectClassAndObject, objectSetParameter ObjectClassAndObjectSet, typeParameter TypeOnly, classParameter DefinedObjectClassOnly } TableConstraint ::= SEQUENCE { objectSetRef [NAME AS "objectSet"] [ATTRIBUTE] QName OPTIONAL, objectSet ObjectSet OPTIONAL, componentRelation [UNTAGGED] SEQUENCE SIZE (1..MAX) OF restrictBy AtNotation OPTIONAL } (WITH COMPONENTS { ..., objectSetRef PRESENT, objectSet ABSENT } | WITH COMPONENTS { ..., objectSetRef ABSENT, objectSet PRESENT }) AtNotation ::= SEQUENCE { component [ATTRIBUTE] UTF8String } ContentsConstraint ::= SEQUENCE { containing TypeOnly OPTIONAL, encodedBy ValueOnly OPTIONAL Legg & Prager Expires 17 December 2004 [Page 66] INTERNET-DRAFT ASN.1 Schema June 17, 2004 } ((WITH COMPONENTS { ..., containing PRESENT }) | (WITH COMPONENTS { ..., encodedBy PRESENT })) ExceptionSpec ::= TypeAndValue ValueOnly ::= SEQUENCE { literal [ATTRIBUTE] AnySimpleType OPTIONAL, valueRef [NAME AS "value"] [ATTRIBUTE] QName OPTIONAL, value Value OPTIONAL } (WITH COMPONENTS { literal PRESENT, valueRef ABSENT, value ABSENT } | WITH COMPONENTS { literal ABSENT, valueRef PRESENT, value ABSENT } | WITH COMPONENTS { literal ABSENT, valueRef ABSENT, value PRESENT }) AnySimpleType ::= AnyType (WITH COMPONENTS { ..., attributes ABSENT }) Value ::= AnyType ValueSetOnly ::= SEQUENCE { valueSet ValueSet } ValueSet ::= SEQUENCE { definition [UNTAGGED] CHOICE { set [UNTAGGED] ElementSetSpecs } OPTIONAL } ElementSetSpecs ::= SEQUENCE { root [UNTAGGED] ElementSetSpec, extension SEQUENCE { additional [UNTAGGED] ElementSetSpec } OPTIONAL } ElementSetSpec ::= CHOICE { single [UNTAGGED] Intersections, union SEQUENCE { list [UNTAGGED] IntersectionsList } } IntersectionsList ::= SEQUENCE SIZE (2..MAX) OF item [UNTAGGED] Intersections Legg & Prager Expires 17 December 2004 [Page 67] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Intersections ::= CHOICE { single [UNTAGGED] IntersectionElements, intersection SEQUENCE { list [UNTAGGED] IntersectionElementsList } } IntersectionElementsList ::= SEQUENCE SIZE (2..MAX) OF item [UNTAGGED] IntersectionElements IntersectionElements ::= CHOICE { all SEQUENCE { elements [UNTAGGED] Elements OPTIONAL, except SEQUENCE { exclusions [UNTAGGED] Elements } }, elements [UNTAGGED] Elements } Elements ::= CHOICE { value Value, includes TypeOnly, range ValueRange, size Constraint, typeConstraint TypeOnly, from Constraint, withComponent Constraint, withComponents MultipleTypeConstraints, pattern ValueOnly, object Object, objectSet ObjectSet } ValueRange ::= SEQUENCE { minimum [UNTAGGED] CHOICE { minInclusive OptionalValueOnly, minExclusive OptionalValueOnly } DEFAULT minInclusive:{}, maximum [UNTAGGED] CHOICE { maxInclusive OptionalValueOnly, maxExclusive OptionalValueOnly } DEFAULT maxInclusive:{} } OptionalValueOnly ::= SEQUENCE { literal [ATTRIBUTE] AnySimpleType OPTIONAL, valueRef [NAME AS "value"] [ATTRIBUTE] QName OPTIONAL, Legg & Prager Expires 17 December 2004 [Page 68] INTERNET-DRAFT ASN.1 Schema June 17, 2004 value Value OPTIONAL } (WITH COMPONENTS { literal PRESENT } | WITH COMPONENTS { valueRef PRESENT } | WITH COMPONENTS { value OPTIONAL }) MultipleTypeConstraints ::= SEQUENCE { partial [ATTRIBUTE] BOOLEAN DEFAULT FALSE, typeConstraints [UNTAGGED] SEQUENCE SIZE (1..MAX) OF component NamedConstraint } NamedConstraint ::= SEQUENCE { name [ATTRIBUTE] NameIdentifier, use [ATTRIBUTE] PresenceConstraint OPTIONAL, constraint [UNTAGGED] Constraint } DefinedObjectClassOnly ::= SEQUENCE { classRef [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL, class DefinedObjectClass OPTIONAL } (WITH COMPONENTS { classRef PRESENT, class ABSENT } | WITH COMPONENTS { classRef ABSENT, class PRESENT }) ObjectClass ::= SEQUENCE { tagDefault [ATTRIBUTE] TagDefault OPTIONAL, extensibilityImplied [ATTRIBUTE] BOOLEAN OPTIONAL, context [ATTRIBUTE] AnyURI OPTIONAL, ref [ATTRIBUTE] QName OPTIONAL, definition [UNTAGGED] CHOICE { objectClassDefn [UNTAGGED] SEQUENCE SIZE (1..MAX) OF fieldSpec [UNTAGGED] FieldSpec } OPTIONAL } (WITH COMPONENTS { ..., context OPTIONAL, ref PRESENT, definition ABSENT } | WITH COMPONENTS { ..., context ABSENT, ref ABSENT, definition PRESENT }) DefinedObjectClass ::= ObjectClass (WITH COMPONENTS { ..., definition ABSENT }) FieldSpec ::= CHOICE { typeField TypeField, valueField ValueField, valueSetField ValueSetField, objectField ObjectField, objectSetField ObjectSetField, optional SEQUENCE { optionalField [UNTAGGED] CHOICE { Legg & Prager Expires 17 December 2004 [Page 69] INTERNET-DRAFT ASN.1 Schema June 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 ValueField ::= SEQUENCE { name [ATTRIBUTE] ValueFieldReference, unique [ATTRIBUTE] BOOLEAN DEFAULT FALSE, typeRef [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL, type Type OPTIONAL, typeFromField FieldNameOnly OPTIONAL } (WITH COMPONENTS { ..., typeRef PRESENT, type ABSENT, typeFromField ABSENT } | WITH COMPONENTS { ..., typeRef ABSENT, type PRESENT, typeFromField ABSENT } | WITH COMPONENTS { ..., unique ABSENT, typeRef ABSENT, type ABSENT, typeFromField PRESENT }) ValueFieldReference ::= ValueReference ValueSetField ::= SEQUENCE { name [ATTRIBUTE] ValueSetFieldReference, typeRef [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL, Legg & Prager Expires 17 December 2004 [Page 70] INTERNET-DRAFT ASN.1 Schema June 17, 2004 type Type OPTIONAL, typeFromField FieldNameOnly OPTIONAL } (WITH COMPONENTS { ..., typeRef PRESENT, type ABSENT, typeFromField ABSENT } | WITH COMPONENTS { ..., typeRef ABSENT, type PRESENT, typeFromField ABSENT } | WITH COMPONENTS { ..., typeRef ABSENT, type ABSENT, typeFromField PRESENT }) ValueSetFieldReference ::= TypeReference ObjectField ::= SEQUENCE { name [ATTRIBUTE] ObjectFieldReference, classRef [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL, class DefinedObjectClass OPTIONAL } (WITH COMPONENTS { ..., classRef PRESENT, class ABSENT } | WITH COMPONENTS { ..., classRef ABSENT, class PRESENT }) ObjectFieldReference ::= ObjectReference ObjectSetField ::= SEQUENCE { name [ATTRIBUTE] ObjectSetFieldReference, classRef [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL, class DefinedObjectClass OPTIONAL } (WITH COMPONENTS { ..., classRef PRESENT, class ABSENT } | WITH COMPONENTS { ..., classRef ABSENT, class PRESENT }) ObjectSetFieldReference ::= ObjectSetReference ObjectOnly ::= SEQUENCE { objectRef [NAME AS "object"] [ATTRIBUTE] QName OPTIONAL, object Object OPTIONAL } (WITH COMPONENTS { objectRef PRESENT, object ABSENT } | WITH COMPONENTS { objectRef ABSENT, object PRESENT }) Object ::= SEQUENCE { tagDefault [ATTRIBUTE] TagDefault OPTIONAL, extensibilityImplied [ATTRIBUTE] BOOLEAN OPTIONAL, context [ATTRIBUTE] AnyURI OPTIONAL, ref [ATTRIBUTE] QName OPTIONAL, definition [UNTAGGED] CHOICE { definition AnyType, fromObjects InformationFromObjects } OPTIONAL } (WITH COMPONENTS { ..., context OPTIONAL, ref PRESENT, definition ABSENT } | WITH COMPONENTS { ..., context ABSENT, ref ABSENT, definition PRESENT }) Legg & Prager Expires 17 December 2004 [Page 71] INTERNET-DRAFT ASN.1 Schema June 17, 2004 ObjectSetOnly ::= SEQUENCE { objectSetRef [NAME AS "objectSet"] [ATTRIBUTE] QName OPTIONAL, objectSet ObjectSet OPTIONAL } (WITH COMPONENTS { objectSetRef PRESENT, objectSet ABSENT } | WITH COMPONENTS { objectSetRef ABSENT, objectSet PRESENT }) ObjectSet ::= SEQUENCE { tagDefault [ATTRIBUTE] TagDefault OPTIONAL, extensibilityImplied [ATTRIBUTE] BOOLEAN OPTIONAL, context [ATTRIBUTE] AnyURI OPTIONAL, ref [ATTRIBUTE] QName OPTIONAL, definition [UNTAGGED] CHOICE { objectSetSpec [UNTAGGED] ObjectSetSpec, fromObjects InformationFromObjects } OPTIONAL } (WITH COMPONENTS { ..., context OPTIONAL, ref PRESENT, definition ABSENT } | WITH COMPONENTS { ..., context ABSENT, ref ABSENT, definition PRESENT }) ObjectSetSpec ::= SEQUENCE { root [UNTAGGED] ElementSetSpec OPTIONAL, extension SEQUENCE { additional [UNTAGGED] 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 Legg & Prager Expires 17 December 2004 [Page 74] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 75] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 76] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 77] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 78] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 79] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 80] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 81] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 82] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 83] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 84] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 85] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 86] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 87] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 88] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 89] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 90] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 92] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 93] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 94] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 95] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 96] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 97] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 98] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 99] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 100] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 101] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 102] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 103] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 104] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 105] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 106] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 107] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 108] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 109] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 110] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 111] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 112] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 113] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 114] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 116] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Legg & Prager Expires 17 December 2004 [Page 117] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Appendix C. An XML Schema for ASN.1 Schema To be supplied. Normative References [BCP14] Bradner, S., "Key words for use in RFCs to Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [URI] Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform Resource Identifiers (URI): Generic Syntax", RFC 2396, August 1998. [RFC3641] Legg, S., "Generic String Encoding Rules (GSER) for ASN.1 Types", RFC 3641, October 2003. [RXER] Legg, S. and D. Prager, "Robust XML Encoding Rules for Legg & Prager Expires 17 December 2004 [Page 118] INTERNET-DRAFT ASN.1 Schema June 17, 2004 ASN.1 Types", draft-legg-xed-rxer-xx.txt, a work in progress, June 2004. [XEDNS] Legg, S. and D. Prager, "The XML Enabled Directory: IANA Considerations", draft-legg-xed-iana-xx.txt, a work in progress, to be published. [GLUE] Legg, S. and D. Prager, "The XML Enabled Directory: Schema Language Integration", draft-legg-xed-glue-xx.txt, a work in progress, June 2004. [X680] ITU-T Recommendation X.680 (07/02) | ISO/IEC 8824-1:2002, Information technology - Abstract Syntax Notation One (ASN.1): Specification of basic notation [X681] ITU-T Recommendation X.681 (07/02) | ISO/IEC 8824-2:2002, Information technology - Abstract Syntax Notation One (ASN.1): Information object specification [X682] ITU-T Recommendation X.682 (07/02) | ISO/IEC 8824-3:2002, Information technology - Abstract Syntax Notation One (ASN.1): Constraint specification [X683] ITU-T Recommendation X.683 (07/02) | ISO/IEC 8824-4:2002, Information technology - Abstract Syntax Notation One (ASN.1): Parameterization of ASN.1 specifications [XML] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E. and F. Yergeau, "Extensible Markup Language (XML) 1.0 (Third Edition)", W3C Recommendation, http://www.w3.org/TR/2004/REC-xml-20040204, February 2004. [XMLNS] Bray, T., Hollander, D. and A. Layman, "Namespaces in XML", http://www.w3.org/TR/1999/REC-xml-names-19990114, January 1999. [ISET] Cowan, J. and R. Tobin, "XML Information Set", W3C Recommendation, http://www.w3.org/TR/2001/REC-xml- infoset-20011024, October 2001. Informative References [XSD1] Thompson, H., Beech, D., Maloney, M. and N. Mendelsohn, "XML Schema Part 1: Structures", W3C Recommendation, http://www.w3.org/TR/2001/REC-xmlschema-1-20010502, May 2001. [RNG] Clark, J. and M. Makoto, "RELAX NG Tutorial", OASIS Legg & Prager Expires 17 December 2004 [Page 119] INTERNET-DRAFT ASN.1 Schema June 17, 2004 Committee Specification, http://www.oasis- open.org/committees/relax-ng/tutorial-20011203.html, December 2001. Authors' Addresses Dr. Steven Legg Adacel Technologies Ltd. 250 Bay Street Brighton, Victoria 3186 AUSTRALIA Phone: +61 3 8530 7710 Fax: +61 3 8530 7888 EMail: steven.legg@adacel.com.au Dr. Daniel Prager C/o Professor Lynn Batten Department of Computing and Mathematics Deakin University Geelong, Victoria 3217 AUSTRALIA EMail: dan@layabout.net EMail: lmbatten@deakin.edu.au Full Copyright Statement Copyright (C) The Internet Society (2004). This document is subject to the rights, licenses and restrictions contained in BCP 78, and except as set forth therein, the authors retain all their rights. This document and the information contained herein are provided on an "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Intellectual Property The IETF takes no position regarding the validity or scope of any Intellectual Property Rights or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; nor does it represent that it has made any independent effort to identify any such rights. Information Legg & Prager Expires 17 December 2004 [Page 120] INTERNET-DRAFT ASN.1 Schema June 17, 2004 on the procedures with respect to rights in RFC documents can be found in BCP 78 and BCP 79. Copies of IPR disclosures made to the IETF Secretariat and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementers or users of this specification can be obtained from the IETF on-line IPR repository at http://www.ietf.org/ipr. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights that may cover technology that may be required to implement this standard. Please address the information to the IETF at ietf-ipr@ietf.org. Changes in Draft 01 The Directory XML Encoding Rules (DXER) have been renamed to the Robust XML Encoding Rules (RXER). The ASN.1 Schema representation of a value of the EXTERNAL type has been changed from the usual RXER encoding, the encoding according to the associated type in X.690, to the encoding according to the associated type in X.680. However the RXER encoding of EXTERNAL is unchanged. The translation of extensions to SEQUENCE, SET and CHOICE types has been simplified. The second extension marker no longer generates a second element. The translation of UserDefinedConstraintParameter has been revised so that the corresponding ASN.1 type in the ASN.1 for ASN.1 Schema is more straightforward. A element has been added to the translation of ObjectDefn to avoid the potential for ambiguity between an ObjectDefn and an ObjectFromObject. The assumedName attribute on the child of a or element has been replaced by a pair of attributes - name and renames. The renames attribute is intended to hold the identifier appearing in the original ASN.1 specification when that identifier is not the same as the value of the name attribute, i.e. because there is no identifier, or the identifier is modified by a NAME encoding instruction. The renames attribute will not be required if the name and the identifier are related by the name generation algorithm from X.694. Legg & Prager Expires 17 December 2004 [Page 121] INTERNET-DRAFT ASN.1 Schema June 17, 2004 The ASN.1 for ASN.1 Schema, and the ASN.1 Schema for ASN.1 Schema, have been provided. Changes in Draft 02 Extra cases have been added to the translation of AnyType to account for the additional constraints (id-constraint-dtd-type and id-constraint-dtd-element) defined by the latest revision to Schema Language Integration. An elementType attribute has been added to and elements to support these extra constraints. Appendix A and Appendix B have been amended appropriately. Legg & Prager Expires 17 December 2004 [Page 122]