One document matched: draft-legg-xed-asd-00.txt







INTERNET-DRAFT                                                   S. Legg
draft-legg-xed-asd-00.txt                            Adacel Technologies
Intended Category: Standard Track                              D. Prager
                                                       Deakin University
                                                          August 7, 2003


      ASN.1 Schema: An XML Representation for ASN.1 Specifications

    Copyright (C) The Internet Society (2003). 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.  Comments should be sent
   to the authors.

   This Internet-Draft expires on 7 February 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
   original ASN.1 specifications.




Legg & Prager            Expires 7 February 2004                [Page 1]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


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 ........................... 14
      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 ................................ 19
      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 ............................ 21
         6.11.3 SetType Translation ................................. 23
         6.11.4 ChoiceType Translation .............................. 23
         6.11.5 Translation of ChoiceOfStrings Types ................ 24
         6.11.6 SequenceOfType Translation .......................... 25
         6.11.7 SetOfType Translation ............................... 25
      6.12 Translation of Constrained Types ......................... 26
         6.12.1 Translation of AnyType .............................. 28
         6.12.2 Constraint Translation .............................. 30
         6.12.3 UserDefinedConstraint Translation ................... 30
         6.12.4 TableConstraint Translation ......................... 31
         6.12.5 ContentsConstraint Translation ...................... 32
         6.12.6 ExceptionSpec Translation ........................... 32
   7. Translation of Values ......................................... 33
      7.1 DefinedValue Translation .................................. 33
      7.2 BuiltinValue Translation .................................. 34
      7.3 ValueFromObject Translation ............................... 35
      7.4 ObjectClassFieldValue Translation ......................... 35
   8. Translation of Value Sets ..................................... 36



Legg & Prager            Expires 7 February 2004                [Page 2]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


      8.1 ElementSetSpecs Translation ............................... 36
      8.2 ElementSetSpec Translation ................................ 37
      8.3 SubtypeElements Translation ............................... 37
         8.3.1 ValueRange Translation ............................... 38
         8.3.2 InnerTypeConstraints Translation ..................... 39
   9. Translation of Object Classes ................................. 40
      9.1 DefinedObjectClass Translation ............................ 40
      9.2 ObjectClassDefn Translation ............................... 41
         9.2.1 TypeFieldSpec Translation ............................ 42
         9.2.2 FixedTypeValueFieldSpec Translation .................. 42
         9.2.3 FixedTypeValueSetFieldSpec Translation ............... 43
         9.2.4 VariableTypeValueFieldSpec Translation ............... 45
         9.2.5 VariableTypeValueSetFieldSpec Translation ............ 46
         9.2.6 FieldName Translation ................................ 47
         9.2.7 ObjectFieldSpec Translation .......................... 48
         9.2.8 ObjectSetFieldSpec Translation ....................... 49
   10. Translation of Objects ....................................... 50
      10.1 DefinedObject Translation ................................ 50
      10.2 ObjectDefn Translation ................................... 51
      10.3 ObjectFromObject Translation ............................. 52
   11. Translation of Object Sets ................................... 52
      11.1 DefinedObjectSet Translation ............................. 53
      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
   15. Normative References ......................................... 56
   16. Informative References ....................................... 57
   17. Intellectual Property Notice ................................. 58
   18. Copyright Notice ............................................. 58
   19. Authors' Addresses ........................................... 59
   Appendix A. ASN.1 for ASN.1 Schema ............................... 59
   Appendix B. ASN.1 Schema for ASN.1 Schema ........................ 59
   Appendix C. An XML Schema for ASN.1 Schema ....................... 59


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
   ObjectClassAssigment, ObjectAssigment or ObjectSetAssignment
   resembles respectively a TypeAssignment, ValueAssignment or
   ValueSetAssignment, a FixedTypeValueFieldSpec or
   FixedTypeValueSetFieldSpec resembles respectively an ObjectFieldSpec



Legg & Prager            Expires 7 February 2004                [Page 3]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   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 Directory XML Encoding Rules [DXER], 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 doctypedecls
   (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.


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 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 a ASN.1 production [X680] (e.g. Type, NamedType) is a
   reference to the text in an ASN.1 specification corresponding to that
   production.

   The description of the translation of an ASN.1 specification into
   ASN.1 Schema makes use of definitions from the XML Information Set



Legg & Prager            Expires 7 February 2004                [Page 4]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   (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/0702/00" 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].

   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
   information item is an element with the [local name] "schema" and the
   [namespace name] "http://xmled.info/ns/ASN.1/0702/00".




Legg & Prager            Expires 7 February 2004                [Page 5]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   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 [XEDNS]
   then an attribute with the [local name] "targetNamespace" SHALL be
   added to the [attributes] of the [document element] (i.e.
   <asn1:schema> 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
   DXER encoding [DXER] 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.
   <asn1:schema> 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].

   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



Legg & Prager            Expires 7 February 2004                [Page 6]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   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

      <asn1:schema xmlns:asn1="http://xmled.info/ns/ASN.1/0702/00"
                   name="MyModule"
                   tagDefault="IMPLICIT"
                   extensibilityImplied="true">

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

      </asn1:schema>


5. Translation of Assignments

5.1 Referencing Named Constructs

   An Assignment in ASN.1 associates a reference name with a Type,
   Value, ValueSet, ObjectClass, Object or ObjectSet.  In ASN.1 Schema,
   the translation of the Assignment is regarded as associating a
   qualified name [XMLNS] with the Type, Value, ValueSet, ObjectClass,
   Object or ObjectSet.  ASN.1 Schema uses these qualified names in
   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.

   If the ASN.1 module in which the Assignment is defined does not have



Legg & Prager            Expires 7 February 2004                [Page 7]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   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/0702/00".

   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 <import> 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 <import> element.  The [normalized value] of this
   attribute is the modulereference in the ModuleIdentifier in the
   ModuleDefinition of the external module.

   If the DefinitiveIdentifier in the ModuleIdentifier in the
   ModuleDefinition of the external module is not empty then an
   attribute with the [local name] "identifier" MAY be added to the
   [attributes] of the <import> element.  The [normalized value] of this
   attribute is the DXER encoding of the DefinitiveIdentifier.

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

   The <import> elements MUST be before any other elements in the
   [children] of the [document element].

   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 <import> elements.




Legg & Prager            Expires 7 February 2004                [Page 8]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


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 <namedType> element.  The
   [normalized value] of this attribute is the typereference on the left
   hand side of the assignment.  The content of the <namedType> element
   is the translation of the Type on the right hand side of the
   assignment.

   Example

      MyType ::= INTEGER

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


5.4 ValueAssignment and XMLValueAssignment Translation

   The translation of a ValueAssignment is an element with the
   [local name] "namedValue".  An attribute with the [local name] "name"
   is added to the [attributes] of the <namedValue> element.  The
   [normalized value] of this attribute is the valuereference on the
   left hand side of the assignment.  The content of the <namedValue>
   element is the translation of the Type on the left hand side of the
   assignment followed by the translation of the Value on the right hand
   side of the assignment.

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

   Example

      myValue INTEGER ::= 10

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


5.5 ValueSetTypeAssignment Translation

   The translation of a ValueSetTypeAssignment is an element with the
   [local name] "namedValueSet".  An attribute with the [local name]
   "name" is added to the [attributes] of the <namedValueSet> element.
   The [normalized value] of this attribute is the typereference on the
   left hand side of the assignment.  The content of the <namedValueSet>
   element is the translation of the Type on the left hand side of the



Legg & Prager            Expires 7 February 2004                [Page 9]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   assignment followed by the translation of the ValueSet on the right
   hand side of the assignment.

   Example

      MyValueSet INTEGER ::= { 10 }

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


5.6 ObjectClassAssignment Translation

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

   Example

      MY-CLASS ::= TYPE-IDENTIFIER

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


5.7 ObjectAssignment Translation

   The translation of an ObjectAssignment is an element with the
   [local name] "namedObject".  An attribute with the [local name]
   "name" is added to the [attributes] of the <namedObject> element.
   The [normalized value] of this attribute is the objectreference on
   the left hand side of the assignment.  The content of the
   <namedObject> element is the translation of the DefinedObjectClass on
   the left hand side of the assignment followed by the translation of
   the Object on the right hand side of the assignment.

   Example

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

      <namedObject name="myObject" class="asn1:TYPE-IDENTIFIER">



Legg & Prager            Expires 7 February 2004               [Page 10]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


       <object>
        <id literal="2.5.13.14"/>
        <Type type="asn1:INTEGER/>
       </object>
      </namedObject>


5.8 ObjectSetAssignment Translation

   The translation of an ObjectSetAssignment is an element with the
   [local name] "namedObjectSet".  An attribute with the [local name]
   "name" is added to the [attributes] of the <namedObjectSet> element.
   The [normalized value] of this attribute is the objectsetreference on
   the left hand side of the assignment.  The content of the
   <namedObjectSet> element is the translation of the DefinedObjectClass
   on the left hand side of the assignment followed by the translation
   of the ObjectSet on the right hand side of the assignment.

   Example

      MyObjectSet TYPE-IDENTIFIER ::= { myObject }

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


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, ValueSet, ObjectClass, Object or ObjectSet) is
   not the same as the TagDefault of the module of the parameterized



Legg & Prager            Expires 7 February 2004               [Page 11]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   reference and the translation of the substitute definition is an
   element then an attribute with the [local name] "tagDefault" is added
   to that 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



Legg & Prager            Expires 7 February 2004               [Page 12]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   typereference is AnyType from the SchemaLanguageIntegration module
   [GLUE] 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 (Section 6.12.1).

   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 <type> 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.

   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



Legg & Prager            Expires 7 February 2004               [Page 13]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   Section 5.9.


6.2 Translation of Predefined Types

   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/0702/00" 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        |



Legg & Prager            Expires 7 February 2004               [Page 14]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


      |    VideotexString                | VideotexString    |
      |    VisibleString                 | VisibleString     |
      +----------------------------------+-------------------+
      | UnrestrictedCharacterStringType  | CHARACTER-STRING  |
      +----------------------------------+-------------------+
      | 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 <type> element.  The [normalized value] of this attribute is a
   qualified name with the namespace name
   "http://xmled.info/ns/ASN.1/0702/00" and the local part as indicated
   in Table 1.

   Example

      BOOLEAN

      <type ref="asn1: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 <type> element.  The
   translation of each NamedBit in the NamedBitList is appended to the
   [children] of the <namedBitList> 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 <namedBit> 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
   <namedBit> element.  The [normalized value] of this attribute is the
   string representation of the integer value of the number or
   DefinedValue of the NamedBit.

   Example




Legg & Prager            Expires 7 February 2004               [Page 15]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


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

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


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
   <type> element.  The translation of each NamedNumber in the
   NamedNumberList is appended to the [children] of the
   <namedNumberList> 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 <namedNumber> 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 <namedNumber> 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) }

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


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 <type> element.  The translation of



Legg & Prager            Expires 7 February 2004               [Page 16]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   each EnumerationItem in the RootEnumeration is appended to the
   [children] of the <enumerated> element.

   If the ellipsis ("...") is present then an element with the
   [local name] "extension" is appended to the [children] of the
   <enumerated> element, and the translation of the ExceptionSpec
   (possibly empty) is added to the [children] of the <extension>
   element.  If an AdditionalEnumeration is present then the translation
   of each EnumerationItem in the AdditionalEnumeration is appended to
   the [children] of the <extension> 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
   <enumeration> 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
   <enumeration> 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
   <enumeration> 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) }

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


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 <type> element.  If the Class of the Tag is not



Legg & Prager            Expires 7 February 2004               [Page 17]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   empty then an attribute with the [local name] "tagClass" is added to
   the [attributes] of the <tagged> 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 <tagged> element.

   If the TaggedType is of the "Tag EXPLICIT Type" form then an
   attribute with the [local name] "tagging" and [normalized value]
   "EXPLICIT" is added to the [attributes] of the <tagged> 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 <tagged> element.

   The translation of the Type in the TaggedType is added to the content
   of the <tagged> element.

   Examples

      [0] INTEGER

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

      [APPLICATION 10] IMPLICIT BOOLEAN

      <type>
       <tagged tagClass="APPLICATION" number="10" tagging="IMPLICIT"
               type="asn1:BOOLEAN"/>
      </type>


6.7 SelectionType Translation

   The element form 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 <type> element.  An
   attribute with the [local name] "alternative" is added to the
   [attributes] of the <selection> 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 <selection> element.



Legg & Prager            Expires 7 February 2004               [Page 18]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   Example

      field1 < MyChoiceType

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


6.8 InstanceOfType Translation

   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 <type> element.  The content of the
   <instanceOf> element is the translation of the DefinedObjectClass in
   the InstanceOfType.

   Example

      INSTANCE OF TYPE-IDENTIFIER

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


6.9 ObjectClassFieldType Translation

   The translation of an ObjectClassFieldType is an element with the
   [local name] "type".  An element with the [local name] "fromClass" is
   added to the [children] of the <type> element.  The content of the
   <fromClass> 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

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


6.10 TypeFromObject and ValueSetFromObjects Translation

   The translation of a TypeFromObject or ValueSetFromObjects is an



Legg & Prager            Expires 7 February 2004               [Page 19]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   element with the [local name] "type".  An element with the
   [local name] "fromObjects" is added to the [children] of the <type>
   element.

   The translation of the ReferencedObjects in the TypeFromObject or
   ValueSetFromObjects is added to the content of the <fromObjects>
   element.

   The translation of the FieldName in the TypeFromObject or
   ValueSetFromObjects is appended to the content of the <fromObjects>
   element.

   Example

      invertMatrix.&Errors.&errorCode

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


6.11 Translation of Combining Types

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


6.11.1 NamedType Translation

   A NamedType is translated one of two ways depending on the context.
   These are the simple content translation and the complex content
   translation.  These two translations are not interchangeable.  Either
   one or the other will be explicitly invoked as part of the
   translation of an enclosing combining type.

   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> 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> 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 <content> element.  The
   [normalized value] of this attribute is the identifier of the
   NamedType.  The translation of the Type in the NamedType is added to



Legg & Prager            Expires 7 February 2004               [Page 20]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   the content of the <content> element.

   If the enclosing combining type is a SEQUENCE, SET or CHOICE type and
   the Type in the NamedType is a DummyReference and the TagDefault for
   the module containing the NamedType is "AUTOMATIC TAGS" then an
   attribute form translation of the Type in the NamedType SHALL NOT be
   used, and an attribute with the [local name] "explicit" and
   [normalized value] "true" or "1" is added to the [attributes] of the
   <type> 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]
   "type".  An element with the [local name] "sequence" is added to the
   [children] of the <type> element.  The translation of each
   ComponentType in the first ComponentTypeList is appended to the
   [children] of the <sequence> element.

   If the ExtensionAndException is present then an element with the
   [local name] "extension" is appended to the [children] of the
   <sequence> element, and the translation of the ExceptionSpec
   (possibly empty) is added to the [children] of the <extension>
   element.

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

   If the OptionalExtensionMarker is present and not empty then an
   element with the [local name] "extension" is appended to the
   [children] of the first <extension> element.

   If the ExtensionEndMarker is present then an element with the
   [local name] "extension" is appended to the [children] of the first
   <extension> element.  The translation of each ComponentType in the
   final RootComponentTypeList is appended to the [children] of the
   second <extension> 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 <extensionGroup> element.  The [normalized value]
   of this attribute is the number of the VersionNumber.  The
   translation of each ComponentType in the ExtensionAdditionGroup is



Legg & Prager            Expires 7 February 2004               [Page 21]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   appended to the [children] of the <extensionGroup> 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
   <optional> 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 <optional> element.  An element with the [local name] "default"
   is appended to the [children] of the <optional> element.  The content
   of the <default> 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 <componentsOf> element.

   Example

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

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



Legg & Prager            Expires 7 February 2004               [Page 22]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


           <element name="four" type="asn1:PrintableString"/>
           <default literal="fourth"/>
          </optional>
         </extension>
        </extension>
       </sequence>
      </type>


6.11.3 SetType Translation

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


6.11.4 ChoiceType Translation

   The translation of a ChoiceType that is not a ChoiceOfStrings [GSER]
   type is an element with the [local name] "type".  An element with the
   [local name] "choice" is added to the [children] of the <type>
   element.  The complex content translation of each NamedType in the
   RootAlternativeTypeList is appended to the [children] of the <choice>
   element.

   If the ExtensionAndException is present then an element with the
   [local name] "extension" is appended to the [children] of the
   <choice> element, and the translation of the ExceptionSpec (possibly
   empty) is added to the [children] of the <extension> element.

   The translation of each ExtensionAdditionAlternativesGroup or
   NamedType in the ExtensionAdditionAlternatives (if any) is appended
   to the [children] of the <extension> element.  The complex content
   translation of the NamedType is used.

   If the OptionalExtensionMarker is not empty then an element with the
   [local name] "extension" is appended to the [children] of the first
   <extension> element.

   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 <extensionGroup> 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 <extensionGroup> element.



Legg & Prager            Expires 7 February 2004               [Page 23]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   Example

      CHOICE {
          one  INTEGER,
          two  BOOLEAN,
          ...,
          [[ 2:
              three  NULL
          ]],
          four  PrintableString,
          ...
      }

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


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
   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
      }

      <type>
       <union>
        <content name="printableString" type="asn1:PrintableString"/>



Legg & Prager            Expires 7 February 2004               [Page 24]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


        <content name="visibleString" type="asn1:VisibleString"/>
        <extension>
         <content name="utf8String" type="asn1:UTF8String"/>
        </extension>
       </union>
      </type>


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 <type> 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 <sequenceOf> 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 <type> element.  An attribute with the [local name] "assumedName"
   and [normalized value] "item" is added to the [attributes] of the
   <element> element.  The translation of the Type is added to the
   content of the <element> element.

   Examples

      SEQUENCE OF INTEGER

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

      SEQUENCE OF counter INTEGER

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


6.11.7 SetOfType Translation

   The translation of a SetOfType follows the same procedure as a
   SequenceOfType except that SetOfType replaces SequenceOfType, "SET"



Legg & Prager            Expires 7 February 2004               [Page 25]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   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 <type> element.  The content of the
   <constrained> 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
   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
   <sequenceOf> 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



Legg & Prager            Expires 7 February 2004               [Page 26]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   [attributes] of the <sequenceOf> 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 <constrained> 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

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

      SEQUENCE SIZE(0..10) OF number INTEGER

      <type>
       <sequenceOf maxSize="10">
        <element name="number" type="asn1:INTEGER"/>
       </sequenceOf>
      </type>

      SEQUENCE SIZE(1..limit) OF number INTEGER

      <type>
       <constrained>
        <type>
         <sequenceOf>
          <element name="number" type="asn1:INTEGER"/>
         </sequenceOf>
        </type>
        <size>
         <range>
          <minInclusive literal="1"/>



Legg & Prager            Expires 7 February 2004               [Page 27]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


          <maxInclusive value="tns:limit"/>
         </range>
        </size>
       </constrained>
      </type>



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 <type>
   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 <type>
   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

      XML-Type { "http://www.example.com/PO1", "PurchaseOrderType" }




Legg & Prager            Expires 7 February 2004               [Page 28]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


      <type xmlns:po="http://www.example.com/PO1"
            ref="po: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-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 <type> element.  An element with
   the [local name] "element" is added to the [children] of the <type>
   element.  An attribute with the [local name] "ref" is added to the
   [attributes] of the <element> 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>
   element.  The [normalized value] of this attribute is the string
   value of the fourth UserDefinedConstraintParameter.

   Example

      Contained-XML-Element {
           "http://www.example.com/IPO",
          "purchaseOrder"
      }

      <type xmlns:ipo="http://www.example.com/IPO">
       <choice>
        <element ref="ipo:purchaseOrder/>
       </choice>
      </type>

   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/0702/00" 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 <type> element.  The
   [normalized value] of this attribute is a qualified name with the
   namespace name "http://xmled.info/ns/ASN.1/0702/00" and the local



Legg & Prager            Expires 7 February 2004               [Page 29]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   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.


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
   <constrainedBy> element.

   The translation of a UserDefinedConstraintParameter is an element
   with the [local name] "parameter".

   If the UserDefinedConstraintParameter is of the "Governor : Value"
   form then the content of the <constrainedBy> element is the
   translation of the Type in the Governor followed by the translation
   of the Value.

   If the UserDefinedConstraintParameter is of the "Governor : ValueSet"
   form then the content of the <constrainedBy> element is the
   translation of the Type in the Governor followed by the translation
   of the ValueSet.

   If the UserDefinedConstraintParameter is of the "Governor : Object"
   form then the content of the <constrainedBy> element is the
   translation of the DefinedObjectClass in the Governor followed by the
   translation of the Object.



Legg & Prager            Expires 7 February 2004               [Page 30]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   If the UserDefinedConstraintParameter is of the
   "Governor : ObjectSet" form then the content of the <constrainedBy>
   element is the translation of the DefinedObjectClass in the Governor
   followed by the translation of the ObjectSet.

   If the UserDefinedConstraintParameter is a Type then the translation
   of that Type is added to the content of the <constrainedBy> element.

   If the UserDefinedConstraintParameter is a DefinedObjectClass then
   the translation of that DefinedObjectClass is added to the content of
   the <constrainedBy> 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
   <table> 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 <table>
   element.  The translation of each AtNotation is appended to the
   [children] of the <table> 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 <restrictBy> 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})

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



Legg & Prager            Expires 7 February 2004               [Page 31]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


       </constrained>
      </type>


6.12.5 ContentsConstraint Translation

   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 <contents> element.  The translation of the Type is added to
   the contents of the <containing> 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 <contents> element.  The translation of the Value is added to
   the contents of the <encodedBy> element.

   If the ContentsConstraint is of the
   "CONTAINING Type ENCODED BY Value" form then the content of the
   <contents> 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 <containing>
   element, and the translation of the Value is added to the contents of
   the <encodedBy> 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
   <exception> 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
   <exception> 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 <exception> element is the translation of the Type followed by
   the translation of the Value.

   Examples




Legg & Prager            Expires 7 February 2004               [Page 32]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


      !10

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

      !myValue

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

      !PrintableString:"failure"

      <exception type="asn1:PrintableString" literal="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

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

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

      <namedValue name="integerList">
       <type>
        <sequenceOf type="asn1:INTEGER"/>
       </type>
       <value>
        <number asn1:meta="true" ref="tns:zero"/>
        <number>3</number>
        <number>7</number>
       </value>
      </namedValue>


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.



Legg & Prager            Expires 7 February 2004               [Page 33]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   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/0702/00" and
   [normalized value] "true" or "1" (e.g. asn1:meta="true")
   is added to the [attributes] of the <value> element.
   An attribute with the [local name] "ref" is added to
   the [attributes] of the <value> 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 DXER encoding [DXER] of the BuiltinValue.

   The element form translation of a built-in value is
   an element with the [local name] "value" whose content is
   the DXER encoding of the BuiltinValue.
   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 DXER
   by the governing ASN.1 type of the enclosing Value.

   Note that the asn1:meta attribute operates as a switch that indicates whether



Legg & Prager            Expires 7 February 2004               [Page 34]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   the content of the element containing the attribute is interpreted
   as ASN.1 Schema notation or as a DXER encoding.

   The attribute form translation of BuiltinValue SHALL NOT be used if,
   the DXER 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.


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/0702/00" and
   [normalized value] "true" or "1" (e.g. asn1:meta="true")
   is added to the [attributes] of the <value> element.
   An element with the [local name] "fromObjects" is added to
   the [children] of the <objectSet> element.

   The translation of the ReferencedObjects in the ValueFromObject is
   added to the content of the <fromObjects> element.

   The translation of the FieldName in the ValueFromObject
   is appended to the content of the <fromObjects> 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 DXER 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.





Legg & Prager            Expires 7 February 2004               [Page 35]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


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 <valueSet> element.

   Example

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

      <valueSet>
       <union>
        <value>1</value>
        <range>
         <minInclusive literal="3"/>
         <maxInclusive literal="7"/>
        </range>
       </union>
       <extension>
        <all>
         <range>
          <minInclusive literal="9"/>
          <maxInclusive literal="19"/>
         </range>
         <except>
          <union>
           <value>11</value>
           <value>12</value>
          </union>
         </except>
        </all>
       </extension>
      </valueSet>


8.1 ElementSetSpecs Translation

   The translation of an ElementSetSpecs where the ellipsis ("...") is
   not present 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 <extension> element.



Legg & Prager            Expires 7 February 2004               [Page 36]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


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 <all> element.  The translation of the Elements in
   the Exclusions is added to the [children] of the <except> 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 <union> element.

   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
   <intersection> 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 <all> 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 <except> element.

   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 <includes> element.

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



Legg & Prager            Expires 7 February 2004               [Page 37]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   If a SubtypeElements is a SizeConstraint then the translation of the
   SubtypeElements is an element with the [local name] "size".  The
   content of the <size> 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 <typeConstraint> 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 <from> element is the translation of the Constraint in
   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 <pattern> 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 <range> element.  If the LowerEndValue is not
   "MIN" then the content of the <minExclusive> 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 <range>
   element.  The content of the <minInclusive> 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 <range> element.

   If the UpperEndpoint in the ValueRange is of the "< UpperEndValue"
   form then an element with the [local name] "maxExclusive" is added to



Legg & Prager            Expires 7 February 2004               [Page 38]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   the [children] of the <range> element.  If the UpperEndValue is not
   "MAX" then the content of the <maxExclusive> 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 <range>
   element.  The content of the <maxInclusive> 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 <range> element.

   Examples

      1..10

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

      0..MAX

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

      0<..<MAX

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


8.3.2 InnerTypeConstraints Translation

   The translation of an InnerTypeConstraints of the
   "WITH COMPONENT SingleTypeConstraint" form is an element with the
   [local name] "withComponent".  The content of the <withComponent>
   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".



Legg & Prager            Expires 7 February 2004               [Page 39]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   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 <withComponents>
   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 <withComponents> element.

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

   The translation of a NamedConstraint is an element with the
   [local name] "component".  An attribute with the [local name] "name"
   is added to the [attributes] of the <component> 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 <component> 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 SingleTypeConstraint is added to the [children] of
   the <component> 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




Legg & Prager            Expires 7 February 2004               [Page 40]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   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/0702/00" and the local part is either
   "TYPE-IDENTIFIER" or "ABSTRACT-SYNTAX", as appropriate.

   The element form translation of an object class reference is an
   element with the [local name] "class".  An attribute with the
   [local name] "ref" is added to the [attributes] of the <class>
   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/0702/00" 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 <class> 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.




Legg & Prager            Expires 7 February 2004               [Page 41]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


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 <optional> 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
   <optional> element.  An element with the [local name] "default" is
   appended to the [children] of the <optional> element.  The content of
   the <default> element is the translation of the Type in the
   TypeOptionalitySpec.

   An attribute with the [local name] "name" is added to the
   [attributes] of the <typeField> 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
      }

      <class>
       <typeField name="One"/>
       <optional>
        <typeField name="Two"/>
       </optional>
       <optional>
        <typeField name="Three"/>
        <default type="asn1:OBJECT-IDENTIFIER"/>
       </optional>
      </class>


9.2.2 FixedTypeValueFieldSpec Translation

   The translation of a FixedTypeValueFieldSpec where the
   ValueOptionalitySpec is absent is an element with the [local name]
   "valueField".



Legg & Prager            Expires 7 February 2004               [Page 42]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   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 <optional> element.

   The translation of a FixedTypeValueFieldSpec with a
   ValueOptionalitySpec of "DEFAULT" is an element with the [local name]
   "optional".  An element with the [local name] "valueField" is added
   to the [children] of the <optional> element.  An element with the
   [local name] "default" is appended to the [children] of the
   <optional> element.  The content of the <default> element is the
   translation of the Value in the ValueOptionalitySpec.

   An attribute with the [local name] "name" is added to the
   [attributes] of the <valueField> element.  The [normalized value] of
   this attribute is the valuefieldreference of the
   FixedTypeValueFieldSpec, without the ampersand.  If the "UNIQUE"
   keyword is present then an attribute with the [local name] "unique"
   and [normalized value] "true" or "1" is added to the [attributes] of
   the <valueField> element, otherwise an attribute with the
   [local name] "unique" and [normalized value] "false" or "0" MAY be
   added to the [attributes] of the <valueField> element.  The
   translation of the Type in the FixedTypeValueFieldSpec is added to
   the content of the <valueField> element.

   Example

      CLASS {
          &one    OBJECT IDENTIFIER UNIQUE,
          &two    BOOLEAN OPTIONAL,
          &three  INTEGER DEFAULT 0
      }

      <class>
       <valueField name="one" unique="true"
                   type="asn1:OBJECT-IDENTIFIER"/>
       <optional>
        <valueField name="two" type="asn1:BOOLEAN"/>
       </optional>
       <optional>
        <valueField name="three" type="asn1:INTEGER"/>
        <default literal="0"/>
       </optional>
      </class>


9.2.3 FixedTypeValueSetFieldSpec Translation




Legg & Prager            Expires 7 February 2004               [Page 43]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   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 <optional> element.

   The translation of a FixedTypeValueSetFieldSpec with a
   ValueSetOptionalitySpec of "DEFAULT" is an element with the
   [local name] "optional".  An element with the [local name]
   "valueSetField" is added to the [children] of the <optional> element.
   An element with the [local name] "default" is appended to the
   [children] of the <optional> element.  The content of the <default>
   element is the translation of the ValueSet in the
   ValueSetOptionalitySpec.

   An attribute with the [local name] "name" is added to the
   [attributes] of the <valueSetField> element.  The [normalized value]
   of this attribute is the valuesetfieldreference of the
   FixedTypeValueSetFieldSpec, without the ampersand.  The translation
   of the Type in the FixedTypeValueSetFieldSpec is added to the content
   of the <valueSetField> element.

   Example

      CLASS {
          &One    UTF8String,
          &Two    BOOLEAN OPTIONAL,
          &Three  INTEGER DEFAULT { 1 | 2 }
      }

      <class>
       <valueSetField name="One" type="asn1:UTF8String"/>
       <optional>
        <valueSetField name="Two" type="asn1:BOOLEAN"/>
       </optional>
       <optional>
        <valueSetField name="Three" type="asn1:INTEGER"/>
        <default>
         <valueSet>
          <union>
           <value>1</value>
           <value>2</value>
          </union>
         </valueSet>
        </default>



Legg & Prager            Expires 7 February 2004               [Page 44]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


       </optional>
      </class>


9.2.4 VariableTypeValueFieldSpec Translation

   The translation of a VariableTypeValueFieldSpec where the
   ValueOptionalitySpec is absent is an element with the [local name]
   "valueField".

   The translation of a VariableTypeValueFieldSpec with a
   ValueOptionalitySpec of "OPTIONAL" is an element with the
   [local name] "optional".  An element with the [local name]
   "valueField" is added to the [children] of the <optional> element.

   The translation of a VariableTypeValueFieldSpec with a
   ValueOptionalitySpec of "DEFAULT" is an element with the [local name]
   "optional".  An element with the [local name] "valueField" is added
   to the [children] of the <optional> element.  An element with the
   [local name] "default" is appended to the [children] of the
   <optional> element.  The translation of the Value in the
   ValueOptionalitySpec is added to the content of the <default>
   element.

   An attribute with the [local name] "name" is added to the
   [attributes] of the <valueField> element.  The [normalized value] of
   this attribute is the valuefieldreference of the
   VariableTypeValueFieldSpec, without the ampersand.  An element with
   the [local name] "typeFromField" is added to the [children] of the
   <valueField> element.  The translation of the FieldName in the
   VariableTypeValueFieldSpec is added to the content of the
   <typeFromField> element.

   Example

      CLASS {
          &Syntax DEFAULT INTEGER,
          &one    &Syntax,
          &two    &Syntax OPTIONAL,
          &three  &Syntax DEFAULT 0
      }

      <class>
       <optional>
        <typeField name="Syntax"/>
        <default type="asn1:INTEGER/>
       </optional>
       <valueField name="one">



Legg & Prager            Expires 7 February 2004               [Page 45]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


        <typeFromField fieldName="Syntax"/>
       </valueField>
       <optional>
        <valueField name="two">
         <typeFromField fieldName="Syntax"/>
        </valueField>
       </optional>
       <optional>
        <valueField name="three">
         <typeFromField fieldName="Syntax"/>
        </valueField>
        <default literal="0"/>
       </optional>
      </class>


9.2.5 VariableTypeValueSetFieldSpec Translation

   The translation of a VariableTypeValueSetFieldSpec where the
   ValueSetOptionalitySpec is absent is an element with the [local name]
   "valueSetField".

   The translation of a VariableTypeValueSetFieldSpec with a
   ValueSetOptionalitySpec of "OPTIONAL" is an element with the
   [local name] "optional".  An element with the [local name]
   "valueSetField" is added to the [children] of the <optional> element.

   The translation of a VariableTypeValueSetFieldSpec with a
   ValueSetOptionalitySpec of "DEFAULT" is an element with the
   [local name] "optional".  An element with the [local name]
   "valueSetField" is added to the [children] of the <optional> element.
   An element with the [local name] "default" is appended to the
   [children] of the <optional> element.  The content of the <default>
   element is the translation of the ValueSet in the
   ValueSetOptionalitySpec.

   An attribute with the [local name] "name" is added to the
   [attributes] of the <valueSetField> element.  The [normalized value]
   of this attribute is the valuesetfieldreference of the
   VariableTypeValueSetFieldSpec, without the ampersand.  An element
   with the [local name] "typeFromField" is added to the [children] of
   the <valueSetField> element.  The translation of the FieldName in the
   VariableTypeValueSetFieldSpec is added to the content of the
   <typeFromField> element.

   Example

      CLASS {



Legg & Prager            Expires 7 February 2004               [Page 46]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


          &Syntax DEFAULT INTEGER,
          &One    &Syntax,
          &Two    &Syntax OPTIONAL,
          &Three  &Syntax DEFAULT { 1 | 2 }
      }

      <class>
       <optional>
        <typeField name="Syntax"/>
        <default type="asn1:INTEGER/>
       </optional>
       <valueSetField name="One">
        <typeFromField fieldName="Syntax"/>
       </valueSetField>
       <optional>
        <valueSetField name="Two">
         <typeFromField fieldName="Syntax"/>
        </valueSetField>
       </optional>
       <optional>
        <valueSetField name="Three">
         <typeFromField fieldName="Syntax"/>
        </valueSetField>
        <default>
         <valueSet>
          <union>
           <value>1</value>
           <value>2</value>
          </union>
         </valueSet>
        </default>
       </optional>
      </class>


9.2.6 FieldName Translation

   The translation of a FieldName is either, at the translator's option,
   an attribute with the [local name] "fieldName" added to the
   [attributes] of the enclosing element, or an element with the
   [local name] "fieldName" appended to the [children] of the enclosing
   element.

   The [normalized value] of the attribute is a "/" (U+002F) separated
   list of the primitive field names without the ampersand characters
   ("&", U+0026).

   The content of the <fieldName> element is (ignoring comment and



Legg & Prager            Expires 7 February 2004               [Page 47]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   processing instruction items) a "/" (U+002F) separated list of the
   primitive field names without the ampersand characters ("&", U+0026).

   Example

      &Linked.&ArgumentType

      <fieldName>Linked/ArgumentType</fieldName>


9.2.7 ObjectFieldSpec Translation

   The translation of an ObjectFieldSpec where the ObjectOptionalitySpec
   is absent is an element with the [local name] "objectField".

   The translation of a ObjectFieldSpec with a ObjectOptionalitySpec of
   "OPTIONAL" is an element with the [local name] "optional".  An
   element with the [local name] "objectField" is added to the
   [children] of the <optional> element.

   The translation of a ObjectFieldSpec with a ObjectOptionalitySpec of
   "DEFAULT" is an element with the [local name] "optional".  An element
   with the [local name] "objectField" is added to the [children] of the
   <optional> element.  An element with the [local name] "default" is
   appended to the [children] of the <optional> element.  The content of
   the <default> element is the translation of the Object in the
   ObjectOptionalitySpec.

   An attribute with the [local name] "name" is added to the
   [attributes] of the <objectField> element.  The [normalized value] of
   this attribute is the objectfieldreference of the ObjectFieldSpec,
   without the ampersand.  The translation of the DefinedObjectClass in
   the ObjectFieldSpec is added to the content of the <objectField>
   element.

   Example

      CLASS {
          &one    TYPE-IDENTIFIER,
          &two    ABSTRACT-SYNTAX OPTIONAL,
          &three  TYPE-IDENTIFIER DEFAULT myObject
      }

      <class>
       <objectField name="one" class="asn1:TYPE-IDENTIFIER"/>
       <optional>
        <objectField name="two" class="asn1:ABSTRACT-SYNTAX"/>
       </optional>



Legg & Prager            Expires 7 February 2004               [Page 48]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


       <optional>
        <objectField name="three" class="asn1:TYPE-IDENTIFIER"/>
        <default object="tns:myObject"/>
       </optional>
      </class>


9.2.8 ObjectSetFieldSpec Translation

   The translation of an ObjectSetFieldSpec where the
   ObjectSetOptionalitySpec is absent is an element with the
   [local name] "objectSetField".

   The translation of a ObjectSetFieldSpec with a
   ObjectSetOptionalitySpec of "OPTIONAL" is an element with the
   [local name] "optional".  An element with the [local name]
   "objectSetField" is added to the [children] of the <optional>
   element.

   The translation of a ObjectSetFieldSpec with a
   ObjectSetOptionalitySpec of "DEFAULT" is an element with the
   [local name] "optional".  An element with the [local name]
   "objectSetField" is added to the [children] of the <optional>
   element.  An element with the [local name] "default" is appended to
   the [children] of the <optional> element.  The content of the
   <default> element is the translation of the ObjectSet in the
   ObjectSetOptionalitySpec.

   An attribute with the [local name] "name" is added to the
   [attributes] of the <objectSetField> element.  The [normalized value]
   of this attribute is the objectsetfieldreference of the
   ObjectSetFieldSpec, without the ampersand.  The translation of the
   DefinedObjectClass in the ObjectSetFieldSpec is added to the content
   of the <objectSetField> element.

   Example

      CLASS {
          &One    TYPE-IDENTIFIER,
          &Two    ABSTRACT-SYNTAX OPTIONAL,
          &Three  TYPE-IDENTIFIER DEFAULT { myObject }
      }

      <class>
       <objectSetField name="One" class="asn1:TYPE-IDENTIFIER"/>
       <optional>
        <objectSetField name="Two" class="asn1:ABSTRACT-SYNTAX"/>
       </optional>



Legg & Prager            Expires 7 February 2004               [Page 49]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


       <optional>
        <objectSetField name="Three" class="asn1:TYPE-IDENTIFIER"/>
        <default>
         <objectSet>
          <object ref="tns:myObject"/>
         </objectSet>
        </default>
       </optional>
      </class>


10. Translation of Objects

   The translation of an Object is the translation of either a
   DefinedObject, an ObjectDefn, an ObjectFromObject or a
   ParameterizedObject.

   If an Object is a ParameterizedObject then the translation of the
   Object is the translation of the Object on the right hand side of the
   referenced ParameterizedObjectAssignment.

   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.


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 <object> 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



Legg & Prager            Expires 7 February 2004               [Page 50]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   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".  The translation of each FieldSetting in the DefaultSyntax
   of the ObjectClassDefn is appended to the [children] of the <object>
   element.

   The translation of a FieldSetting is an element with the
   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
      }

      <namedClass name="ONE-OF-EVERYTHING">
       <class>
        <typeField name="One"/>
        <valueField name="two" type="asn1:INTEGER"/>
        <valueSetField name="Three" type="asn1:INTEGER"/>
        <objectField name="four" class="asn1:TYPE-IDENTIFIER"/>



Legg & Prager            Expires 7 February 2004               [Page 51]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


        <objectSetField name="Five" class="asn1:TYPE-IDENTIFIER"/>
       </class>
      </namedClass>

      mixedBag ONE-OF-EVERYTHING ::= {
          &One    BOOLEAN,
          &two    99,
          &Three  { 1 | 2 },
          &four   myObject,
          &Five   { myObject }
      }

      <namedObject name="mixedBag" class="ONE-OF-EVERYTHING">
       <object>
        <One type="asn1:BOOLEAN"/>
        <two literal="99"/>
        <Three>
         <valueSet>
          <union>
           <value>1</value>
           <value>2</value>
          </union>
         </valueSet>
        </Three>
        <four object="tns:myObject"/>
        <Five>
         <objectSet>
          <object ref="tns:myObject"/>
         </objectSet>
        </Five>
       </object>
      </namedObject>


10.3 ObjectFromObject Translation

   The translation of an ObjectFromObject is an element with the
   [local name] "object".  An element with the [local name]
   "fromObjects" is added to the [children] of the <object> element.

   The translation of the ReferencedObjects in the ObjectFromObject is
   added to the content of the <fromObjects> element.

   The translation of the FieldName in the ObjectFromObject is appended
   to the content of the <fromObjects> element.


11. Translation of Object Sets



Legg & Prager            Expires 7 February 2004               [Page 52]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   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 <objectSet> 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 <objectSet>
   elements in the expansion of parameterized definitions.

   If an ObjectSetSpec contains only a RootElementSetSpec then the
   translation of the ObjectSetSpec is the translation of the
   ElementSetSpec in the RootElementSetSpec.

   If an ObjectSetSpec contains a RootElementSetSpec and the ellipsis
   ("...") then the translation of the ObjectSetSpec is the translation
   of the ElementSetSpec in the RootElementSetSpec followed by an
   element with the [local name] "extension".  If an
   AdditionalElementSetSpec is present then the translation of the
   ElementSetSpec in the AdditionalElementSetSpec is added to the
   [children] of the <extension> element.

   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 <extension> element.

   Contained within the ElementSetSpec will be one or more
   ObjectSetElements.


11.1 DefinedObjectSet Translation

   If a DefinedObjectSet is an objectsetreference (not a DummyReference)
   or an ExternalObjectSetReference then the translation of the
   DefinedObjectSet is either the attribute form translation of an
   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



Legg & Prager            Expires 7 February 2004               [Page 53]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   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 <objectSet>
   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

   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



Legg & Prager            Expires 7 February 2004               [Page 54]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   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 <objectSet> element.

   The translation of the ReferencedObjects in the ObjectSetFromObjects
   is added to the content of the <fromObjects> element.

   The translation of the FieldName in the ObjectSetFromObjects is
   appended to the content of the <fromObjects> element.


12. Translation of Information From Objects

   If a ReferencedObjects is a DefinedObject (not a DummyReference) then
   the translation of the ReferencedObjects is the translation of the
   DefinedObject.

   If a ReferencedObjects is a DefinedObjectSet (not a DummyReference)
   then the translation of the ReferencedObjects is the translation of
   the DefinedObjectSet.

   If a ReferencedObjects is a 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



Legg & Prager            Expires 7 February 2004               [Page 55]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   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.


15. Normative References

   [BCP14]  Bradner, S., "Key words for use in RFCs to Indicate
            Requirement Levels", BCP 14, RFC 2119, March 1997.

   [UTF8]   Yergeau, F., "UTF-8, a transformation format of ISO 10646",
            RFC 2279, January 1998.

   [URI]    Berners-Lee, T., Fielding, R. and L. Masinter, "Uniform
            Resource Identifiers (URI): Generic Syntax", RFC 2396,
            August 1998.

   [GSER]   Legg, S., "Generic String Encoding Rules for ASN.1 Types",
            draft-legg-ldap-gser-xx.txt, a work in progress, June 2003.

   [DXER]   Legg, S. and D. Prager, "Directory XML Encoding Rules for
            ASN.1 Types", draft-legg-xed-dxer-xx.txt, a work in
            progress, August 2003.




Legg & Prager            Expires 7 February 2004               [Page 56]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   [XEDNS]  Legg, S. and D. Prager, "XED: IANA Considerations",
            draft-legg-xed-iana-xx.txt, a work in progress, August 2003.

   [GLUE]   Legg, S. and D. Prager, "XED: Schema Language Integration",
            draft-legg-xed-glue-xx.txt, a work in progress, August 2003.

   [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, M. and E. Maler,
            "Extensible Markup Language (XML) 1.0 (Second Edition)", W3C
            Recommendation, http://www.w3.org/TR/2000/REC-xml-20001006,
            October 2000.

   [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.


16. Informative References

   [BCP11]  Hovey, R. and S. Bradner, "The Organizations Involved in the
            IETF Standards Process", BCP 11, RFC 2028, October 1996.

   [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
            Committee Specification, http://www.oasis-



Legg & Prager            Expires 7 February 2004               [Page 57]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


            open.org/committees/relax-ng/tutorial-20011203.html,
            December 2001.


17. Intellectual Property Notice

   The IETF takes no position regarding the validity or scope of any
   intellectual property 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; neither does it represent that it
   has made any effort to identify any such rights.  Information on the
   IETF's procedures with respect to rights in standards-track and
   standards-related documentation can be found in BCP-11. [BCP11]
   Copies of claims of rights made available for publication 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 implementors or users of this
   specification can be obtained from the IETF Secretariat.

   The IETF invites any interested party to bring to its attention any
   copyrights, patents or patent applications, or other proprietary
   rights which may cover technology that may be required to practice
   this standard.  Please address the information to the IETF Executive
   Director.


18. Copyright Notice

      Copyright (C) The Internet Society (2003). All Rights Reserved.

   This document and translations of it may be copied and furnished to
   others, and derivative works that comment on or otherwise explain it
   or assist in its implementation may be prepared, copied, published
   and distributed, in whole or in part, without restriction of any
   kind, provided that the above copyright notice and this paragraph are
   included on all such copies and derivative works.  However, this
   document itself may not be modified in any way, such as by removing
   the copyright notice or references to the Internet Society or other
   Internet organizations, except as needed for the purpose of
   developing Internet standards in which case the procedures for
   copyrights defined in the Internet Standards process must be
   followed, or as required to translate it into languages other than
   English.

   The limited permissions granted above are perpetual and will not be
   revoked by the Internet Society or its successors or assigns.




Legg & Prager            Expires 7 February 2004               [Page 58]

INTERNET-DRAFT                ASN.1 Schema                August 7, 2003


   This document and the information contained herein is provided on an
   "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING
   TASK FORCE DISCLAIMS 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.


19. 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


Appendix A. ASN.1 for ASN.1 Schema

   To be supplied.


Appendix B. ASN.1 Schema for ASN.1 Schema

   To be supplied.


Appendix C. An XML Schema for ASN.1 Schema

   To be supplied.







Legg & Prager            Expires 7 February 2004               [Page 59]


PAFTECH AB 2003-20262026-04-24 05:49:06