draft-legg-xed-asd-02.txt  -->   draft-legg-xed-asd-03.txt

view Side-By-Side changes

INTERNET-DRAFT                                                   S. Legg
draft-legg-xed-asd-02.txt                            Adacel Technologies
draft-legg-xed-asd-03.txt                                        eB2Bcom
Intended Category: Standards Track                             D. Prager
                                                       Deakin University
                                                           June 17, 2004
                                                          April 11, 2005


                ASN.1 Schema: An XML Representation for ASN.1
          Abstract Syntax Notation One (ASN.1) Specifications

               Copyright (C) The Internet Society (2004). All Rights Reserved. (2005).

   Status of this Memo



   This document

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

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

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

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

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

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


   Distribution of this document is unlimited.
   http://www.ietf.org/shadow.html

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

   This Internet-Draft expires on 17 December 2004. 11 October 2005.


Abstract

   This document defines a semantically equivalent Extensible Markup



Legg & Prager            Expires 11 October 2005                [Page 1]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   Language (XML) representation for Abstract Syntax Notation One ASN.1
   (ASN.1) specifications called ASN.1 Schema.  ASN.1 Schema completely
   avoids the numerous ambiguities inherent in the ASN.1 language,
   therefore ASN.1 Schema documents are much easier to parse and manage
   than




Legg & Prager           Expires 17 December 2004                [Page 1]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004 original ASN.1 specifications.

Table of Contents

   1.  Introduction . . . . . . . . . . . . . . . . . . . . . . . . .  3  4
   2.  Conventions. . . . . . . . . . . . . . . . . . . . . . . . . .  4  5
   3.  General Considerations . . . . . . . . . . . . . . . . . . . .  5
   4.  ModuleDefinition Translation . . . . . . . . . . . . . . . . .  5  6
   5.  Translation of Assignments . . . . . . . . . . . . . . . . . .  7  8
       5.1.  Referencing Named Constructs . . . . . . . . . . . . . .  7  8
       5.2.  Importing Namespaces . . . . . . . . . . . . . . . . . .  8  9
       5.3.  TypeAssignment Translation . . . . . . . . . . . . . . .  9 10
       5.4.  ValueAssignment and XMLValueAssignment Translation . . .  9 10
       5.5.  ValueSetTypeAssignment Translation . . . . . . . . . . .  9 11
       5.6.  ObjectClassAssignment Translation. . . . . . . . . . . . 10 11
       5.7.  ObjectAssignment Translation . . . . . . . . . . . . . . 10 12
       5.8.  ObjectSetAssignment Translation. . . . . . . . . . . . . 11 12
       5.9.  Parameterized Assignments. . . . . . . . . . . . . . . . 11 13
   6.  Translation of Types . . . . . . . . . . . . . . . . . . . . . 12 13
       6.1.  Identifier Replacement . . . . . . . . . . . . . . . . . 14
       6.2.  DefinedType Translation. . . . . . . . . . . . . . . . . 12
       6.2. 14
       6.3.  Translation of Predefined Types. . . . . . . . . . . . . 13
       6.3. 20
       6.4.  BitStringType Translation. . . . . . . . . . . . . . . . 15
       6.4. 22
       6.5.  IntegerType Translation. . . . . . . . . . . . . . . . . 16
       6.5. 23
       6.6.  EnumeratedType Translation . . . . . . . . . . . . . . . 16
       6.6.  TaggedType 24
       6.7.  PrefixedType Translation . . . . . . . . . . . . . . . . 25
             6.7.1.  TaggedType Translation . . . 17
       6.7. . . . . . . . . . . 27
       6.8.  SelectionType Translation  . . . . . . . . . . . . . . . 18
       6.8. 28
       6.9.  InstanceOfType Translation . . . . . . . . . . . . . . . 18
       6.9. 29
       6.10. ObjectClassFieldType Translation . . . . . . . . . . . . 19
       6.10. 29
       6.11. TypeFromObject and ValueSetFromObjects Translation . . . 19
       6.11. 30
       6.12. Translation of Combining Types . . . . . . . . . . . . . 20
             6.11.1. 30
             6.12.1.  NamedType Translation . . . . . . . . . . . . . 20
             6.11.2. 30
             6.12.2.  SequenceType Translation. . . . . . . . . . . . 20
             6.11.3. 33
             6.12.3.  SetType Translation . . . . . . . . . . . . . . 22
             6.11.4. 35
             6.12.4.  ChoiceType Translation. . . . . . . . . . . . . 22
             6.11.5. 35
             6.12.5.  Translation of ChoiceOfStrings UNION Types. . . . . . 23
             6.11.6. . . . . . 36
             6.12.6.  SequenceOfType Translation. . . . . . . . . . . 24
             6.11.7.  SetOfType 37
             6.12.7.  Translation of LIST Types . . . . . . . . . . . . . 25
       6.12. 38
             6.12.8.  SetOfType Translation of Constrained Types . . . . . . . . . . . . 25
             6.12.1. . 38
       6.13. Translation of AnyType. Constrained Types . . . . . . . . . . . . 27
             6.12.2. 38
             6.13.1.  Constraint Translation. . . . . . . . . . . . . 31
             6.12.3. 40
             6.13.2.  UserDefinedConstraint Translation . . . . . . . 31
             6.12.4. 40
             6.13.3.  TableConstraint Translation . . . . . . . . . . 32
             6.12.5. 41



Legg & Prager            Expires 11 October 2005                [Page 2]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


             6.13.4.  ContentsConstraint Translation. . . . . . . . . 32
             6.12.6. 43
             6.13.5.  ExceptionSpec Translation . . . . . . . . . . . 33
   7.  Translation of Values. . 43
       6.14. Tag Defaults and Extension Defaults. . . . . . . . . . . 44
   7.  Translation of Values. . . . . . . . . . 34
       7.1.  DefinedValue Translation . . . . . . . . . . . 45
       7.1.  Translation of Literal Values. . . . . . . . . 34 . . . . . 47
       7.2.  BuiltinValue  Translation of Meta-values . . . . . . . . . . . . . . . 48
             7.2.1.  DefinedValue Translation . 35
       7.3.  ValueFromObject Translation. . . . . . . . . . . . 48
             7.2.2.  BuiltinValue Translation . . . 36




Legg & Prager           Expires 17 December 2004                [Page 2]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



       7.4.  ObjectClassFieldValue . . . . . . . . . 50
             7.2.3.  ValueFromObject Translation. . . . . . . . . . . 52
             7.2.4.  ObjectClassFieldValue Translation. . . 36 . . . . . 53
   8.  Translation of Value Sets. . . . . . . . . . . . . . . . . . . 36 53
       8.1.  ElementSetSpecs Translation. . . . . . . . . . . . . . . 37 54
       8.2.  ElementSetSpec Translation . . . . . . . . . . . . . . . 37 54
       8.3.  SubtypeElements Translation. . . . . . . . . . . . . . . 38 55
             8.3.1.  ValueRange Translation . . . . . . . . . . . . . 39 56
             8.3.2.  InnerTypeConstraints Translation . . . . . . . . 40 57
   9.  Translation of Object Classes. . . . . . . . . . . . . . . . . 41 58
       9.1.  DefinedObjectClass Translation . . . . . . . . . . . . . 41 59
       9.2.  ObjectClassDefn Translation. . . . . . . . . . . . . . . 42 60
             9.2.1.  TypeFieldSpec Translation. . . . . . . . . . . . 42 60
             9.2.2.  FixedTypeValueFieldSpec Translation. . . . . . . 43 61
             9.2.3.  FixedTypeValueSetFieldSpec Translation . . . . . 44 62
             9.2.4.  VariableTypeValueFieldSpec Translation . . . . . 45 63
             9.2.5.  VariableTypeValueSetFieldSpec Translation. . . . 46 64
             9.2.6.  FieldName Translation. . . . . . . . . . . . . . 48 65
             9.2.7.  ObjectFieldSpec Translation. . . . . . . . . . . 48 66
             9.2.8.  ObjectSetFieldSpec Translation . . . . . . . . . 49 67
   10. Translation of Objects . . . . . . . . . . . . . . . . . . . . 50 68
       10.1.  DefinedObject Translation . . . . . . . . . . . . . . . 51 68
       10.2.  ObjectDefn Translation. . . . . . . . . . . . . . . . . 51 69
       10.3.  ObjectFromObject Translation. . . . . . . . . . . . . . 53 71
   11. Translation of Object Sets . . . . . . . . . . . . . . . . . . 53 71
       11.1.  DefinedObjectSet Translation. . . . . . . . . . . . . . 54 72
       11.2.  ObjectSetElements Translation . . . . . . . . . . . . . 54 73
              11.2.1.  ObjectSetFromObjects Translation . . . . . . . 55 73
   12. Translation of Information From Objects. . . . . . . . . . . . 55 74
   13. EncodingControlSection Translation . . . . . . . . . . . . . . 74
   14. Security Considerations. . . . . . . . . . . . . . . . . . . . 56
   14. 75
   15. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 56 75
   16. IANA Considerations. . . . . . . . . . . . . . . . . . . . . . 75
   Appendix A. ASN.1 for ASN.1 Schema . . . . . . . . . . . . . . . . 56 76
   Appendix B. ASN.1 Schema for ASN.1 Schema. . . . . . . . . . . . . 72 93
   Appendix C. An XML Schema for ASN.1 Schema . . . . . . . . . . . .118 .134
   Normative References . . . . . . . . . . . . . . . . . . . . . . .118 .134
   Informative Reference  . . . . . . . . . . . . . . . . . . . . . .119 .136
   Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . .120 .136
   Full Copyright Statement . . . . . . . . . . . . . . . . . . . . .120 .136




Legg & Prager            Expires 11 October 2005                [Page 3]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


1.  Introduction

   A full parser for the Abstract Syntax Notation One (ASN.1) language
   [X680]
   [X.680] is difficult to implement due to numerous ambiguities in the
   notation.  For example, certain notations for a Value are
   syntactically indistinguishable from notation for a ValueSet, Object,
   ObjectSet, DummyReference or SimpleTableConstraint, an SimpleTableConstraint.  An
   ObjectClassAssignment, ObjectAssignment or ObjectSetAssignment
   resembles respectively a TypeAssignment, ValueAssignment or
   ValueSetTypeAssignment, a
   ValueSetTypeAssignment.  A FixedTypeValueFieldSpec or
   FixedTypeValueSetFieldSpec resembles respectively an ObjectFieldSpec




Legg & Prager           Expires 17 December 2004                [Page 3]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004
   or ObjectSetFieldSpec, and an ObjectClassFieldType resembles an
   InformationFromObjects.  In general such ambiguities can only be
   resolved once the entire specification has been parsed.  The
   difficulty of parsing ASN.1 is an impediment to its wider adoption.

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

   An ASN.1 Schema document is a well-formed and valid XML document
   [XML] conforming to XML namespaces [XMLNS].  ASN.1 Schema, together
   with the Robust XML Encoding Rules (RXER) [RXER], constitutes a
   schema language for XML documents that automatically provides more
   compact binary encodings for XML instance documents conforming to
   ASN.1 Schema.  ASN.1 Schema definitions can also incorporate type
   definitions from XML Schema [XSD1], RELAX NG [RNG] or Document Type
   Definitions (DTDs) [XML].

   ASN.1 Schema is defined in terms of rules for translating from an
   ASN.1 specification.  This specification for translating ASN.1 specifications into does not preclude an ASN.1 Schema caters for recursive document
   being written directly without a pre-existing ASN.1 definitions specification,
   however such an ASN.1 Schema document is considered valid if and caters for
   parameterized definitions, but does not allow for recursive
   parameterized definitions.  Recursive parameterized definitions will
   be covered only
   if there exists in a revision of this principle an ASN.1 specification which when
   translated would yield the ASN.1 Schema document.

   The effect of format for ASN.1 encoding instructions on Schema has also been designed so that the translation
   content of an ASN.1 specification will be covered in a revision of this document.


2.  Conventions


   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
   "SHOULD", "SHOULD NOT", "RECOMMENDED", and "MAY" in this Schema document are conforms to be the RXER encoding of
   an abstract value of an ASN.1 type, the ModuleDefinition type,
   presented in Appendix A.  This means that it is possible to decode an
   ASN.1 Schema document using an RXER decoder and then re-encode the
   abstract value (for storage or transmission) using any of the other
   encoding rules for ASN.1.




Legg & Prager            Expires 11 October 2005                [Page 4]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


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

2.  Conventions

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

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

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





Legg & Prager           Expires 17 December 2004                [Page 4]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004

   The description of the translation of an ASN.1 specification into
   ASN.1 Schema makes use of definitions from the XML Information Set
   (Infoset) [ISET].  In particular, information item property names are
   presented per the Infoset, e.g., [local name].  In the sections that
   follow, the term "element" shall be taken to mean an Infoset element
   information item and "attribute" shall be taken to mean an Infoset
   attribute information item.

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

   This document uses the namespace prefix "asn1:" to stand for the
   namespace name "http://xmled.info/ns/ASN.1" and uses the namespace
   prefix "xsi:" to stand for the namespace name
   "http://www.w3.org/2001/XMLSchema-instance", "http://xmled.info/ns/ASN.1", though in practice any
   valid namespace prefix is permitted in ASN.1 Schema.

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

3.  General Considerations

   Apart from the [document element] of an ASN.1 Schema document
   information item, the translation of some ASN.1 construct belongs to
   the content of an enclosing element.  Where the translation of the
   construct is an element, it is appended to the [children] of the
   enclosing element.  Elements MUST be appended to the [children] of
   the enclosing element in the order described.  Translators MAY add
   whitespace
   white space character information items (i.e., U+0020, U+0009, U+000D
   and U+000A) to the [children] of the enclosing element to improve the



Legg & Prager            Expires 11 October 2005                [Page 5]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   layout.  Where the translation of the construct is an attribute it is
   added to the [attributes] of the enclosing element.  The order of
   attributes is not significant.

   An ASN.1 Schema document is permitted to contain XML comments,
   processing instructions (PIs), CDATA sections, character references
   and parsed entity references in any position allowed for a well-
   formed and valid XML document [XML].  However, note that an ASN.1
   Schema definition may be transferred as data in a protocol and that
   some protocols disallow processing instructions and entity
   references.

   Any element in an ASN.1 Schema document is permitted to have
   namespace declaration attributes [XMLNS].  Namespace declarations for
   the namespace prefixes used in the translation of an ASN.1 module
   into an ASN.1 Schema document are REQUIRED.

4.  ModuleDefinition Translation

   The translation of a ModuleDefinition [X680] [X.680] (an ASN.1 module) is a
   document information item.  The [document element] of the document




Legg & Prager           Expires 17 December 2004                [Page 5]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004
   information item is an element with the [local name] "schema" and the
   [namespace name] "http://xmled.info/ns/ASN.1".

   An ASN.1 module has a namespace name schema identity URI if it has a SCHEMA-IDENTITY
   encoding instruction, in which case the specification defining schema identity URI is the module explicitly nominates a namespace name for
   character string specified by the module, or
   if a namespace name has been registered [XEDNS] for AnyURIValue of the module. SCHEMA-IDENTITY
   encoding instruction.

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


   In examples

   An ASN.1 module has a target namespace if it has a TARGET-NAMESPACE
   encoding instruction, in which case the following sections the target namespace prefix "tns:" is
   used to stand for the namespace name
   character string specified by the AnyURIValue of the TARGET-NAMESPACE
   encoding instruction.

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

   In examples in the following sections the namespace prefix "tns:" is
   used to stand for the target namespace of the module being



Legg & Prager            Expires 11 October 2005                [Page 6]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   translated.

   An attribute with the [local name] "name" MAY SHALL 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 SHALL be added to the [attributes] of the
   [document element].  The [normalized value] of this attribute is the
   RXER [RXER] encoding of the DefinitiveIdentifier.

   If the TagDefault in the ModuleDefinition is empty then an attribute
   with the [local name] "tagDefault" and [normalized value] "EXPLICIT"
   SHALL be added to the [attributes] of the [document element] (i.e.,
   <asn1:schema> element). element].

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

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

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





Legg & Prager           Expires 17 December 2004                [Page 6]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004

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

   The translation of each Assignment in the AssignmentList in the
   ModuleBody in the ModuleDefinition of the module being translated is
   SHALL be appended to the [children] of the [document element].

   If the EncodingControlSections in the ModuleDefinition contains an
   EncodingControlSection for RXER then the translation of each
   NamedType in a TopLevelComponent [RXEREI] in a TopLevelComponents in
   the EncodingInstructionAssignmentList SHALL be added to the
   [children] of the [document element].  The relative order of the top
   level components SHOULD be preserved in the translation, however the



Legg & Prager            Expires 11 October 2005                [Page 7]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   top level components MAY be interspersed with the translations of the
   assignments in the AssignmentList.

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

   Example

      MyModule DEFINITIONS
      IMPLICIT TAGS
      EXTENSIBILITY IMPLIED ::=
      BEGIN

      MyType ::= INTEGER

      ENCODING-CONTROL RXER

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

          COMPONENT myElement INTEGER

      END

      <asn1:schema xmlns:asn1="http://xmled.info/ns/ASN.1"
                   name="MyModule"
                   schemaIdentity="http://example.com/id/MyModule"
                   targetNamespace="http://example.com/ns/MyModule"
                   tagDefault="IMPLICIT"
                   extensibilityImplied="true">

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

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

      </asn1:schema>

5.  Translation of Assignments

5.1.  Referencing Named Constructs

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



Legg & Prager            Expires 11 October 2005                [Page 8]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   place of the references in an ASN.1 specification.

   In every case, the local part of the qualified name is the
   typereference, valuereference, objectclassreference, objectreference
   or objectsetreference in the Assignment (i.e., the [normalized value]
   of the name attribute in the translation of the Assignment).  If the
   ASN.1 module in which the Assignment is defined has a target
   namespace name then this SHALL be the namespace name of the qualified
   name.  Note
   that the namespace name is the same as the value of the
   targetNamespace attribute.




Legg & Prager           Expires 17 December 2004                [Page 7]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004

   If the ASN.1 module in which the Assignment is defined does not have
   a target 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". unqualified).

   If an ASN.1 specification contains two or more modules without
   namespace names target
   namespaces then there exists the possibility of two or more distinct
   assignments in separate modules associated with the same ASN.1 Schema
   name.  An unambiguous translation to ASN.1 Schema does not exist in
   such a case.  For this reason it is RECOMMENDED that case unless each of the modules in ASN.1 specifications has a SCHEMA-IDENTITY encoding
   instruction.  Consequently, if two or more modules without target
   namespaces are being translated into ASN.1 Schema all and the effective
   names of the top level NamedType instances [RXEREI] in those modules
   are not distinct (across those modules) or the defined type, object
   class, value, object and object set references are not distinct
   across those modules then, as a local action prior to the
   translation, a SCHEMA-IDENTITY encoding instruction MUST be added to
   each of the modules which does not already have a SCHEMA-IDENTITY
   encoding instruction.  The character string (a URI) specified or registered namespace name. by the
   AnyURIValue of each added SCHEMA-IDENTITY encoding instruction is
   freely chosen by the translator, subject to the condition that these
   character strings are distinct [RXEREI].

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

5.2.  Importing Namespaces

   An element with the [local name] "import" is added to the [children]
   of the [document element] for each external module, except the
   AdditionalBasicDefinitions module [RXER], containing Assignments that
   are referenced from the definitions in the ASN.1 Schema document.  If the external module has a namespace name
   then an attribute with the [local name] "namespace" SHALL be added to
   the [attributes] of the <import> element.  The [normalized value] of
   this attribute is the namespace name of the external module.

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

   If the DefinitiveIdentifier in the ModuleIdentifier in the



Legg & Prager            Expires 11 October 2005                [Page 9]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


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

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

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

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

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





Legg & Prager           Expires 17 December 2004                [Page 8]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004

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

5.3.  TypeAssignment Translation

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

   Example

      MyType ::= INTEGER

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

5.4.  ValueAssignment and XMLValueAssignment Translation

   The translation of a ValueAssignment is an element with the
   [local name] "namedValue".  An attribute with the [local name] "name"
   is
   SHALL be added to the [attributes] of the <namedValue> element.  The



Legg & Prager            Expires 11 October 2005               [Page 10]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   [normalized value] of this attribute is the valuereference on the
   left hand side of the assignment.  The content of the <namedValue>
   element is the translation of the Type on the left hand side of the
   assignment followed by the translation of the Value on the right hand
   side of the assignment.

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

   Example

      myValue INTEGER ::= 10

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

5.5.  ValueSetTypeAssignment Translation

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




Legg & Prager           Expires 17 December 2004                [Page 9]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004 left hand side of the assignment.  The content
   of the <namedValueSet> element is the translation of the Type on the
   left hand side of the assignment followed by the translation of the
   ValueSet on the right hand side of the assignment.

   Example

      MyValueSet INTEGER ::= { 10 }

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

5.6.  ObjectClassAssignment Translation

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




Legg & Prager            Expires 11 October 2005               [Page 11]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   Example

      MY-CLASS ::= TYPE-IDENTIFIER

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

5.7.  ObjectAssignment Translation

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

   Example

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

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




Legg & Prager           Expires 17 December 2004               [Page 10]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004
       <object>
        <id
        <field name="id" literal="2.5.13.14"/>
        <Type
        <field name="Type" type="asn1:INTEGER/>
       </object>
      </namedObject>

5.8.  ObjectSetAssignment Translation

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

   Example

      MyObjectSet TYPE-IDENTIFIER ::= { myObject }

      <namedObjectSet name="MyObjectSet" class="asn1:TYPE-IDENTIFIER">
       <objectSet>



Legg & Prager            Expires 11 October 2005               [Page 12]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


        <object ref="tns:myObject"/>
       </objectSet>
      </namedObjectSet>

5.9.  Parameterized Assignments

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

   The definition that substitutes for a DummyReference or parameterized
   reference (e.g., the Type Object that substitutes for a ParameterizedType)
   ParameterizedObject) is potentially in a different module scope to
   the parameterized reference.


   Given that an empty TagDefault is equivalent to  Expanding a TagDefault of
   "EXPLICIT", if the TagDefault of the module of the substitute
   definition (a Type, ObjectClass, Object DummyReference or ObjectSet) is not the same
   as the TagDefault of the module of the
   parameterized reference and
   the translation of in-line puts the substitute definition is an element then an
   attribute with the [local name] "tagDefault" is added to that




Legg & Prager           Expires 17 December 2004               [Page 11]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   element.  If the TagDefault of into
   the module scope 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 parameterized reference, which could
   therefore alter the module interpretation of the substitute definition.


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

   A type definition is
   not empty and dependent on the TagDefault and ExtensionDefault
   of the module of the parameterized
   reference is empty module, and the translation of the substitute definition
   is an element then may also be affected by encoding instructions in
   an attribute with the [local name]
   "extensibilityImplied" and [normalized value] "true" or "1" is XML Encoding Rules (XER) encoding control section [X.693-1].
   Section 6.14 describes attributes that are added to that element.


   If the ExtensionDefault of the module translation
   of the substitute a type definition is
   empty and the ExtensionDefault of to override the module of the parameterized
   reference is not empty defaults and ensure the translation of the substitute
   definition is an element then an attribute
   appropriate interpretation with the [local name]
   "extensibilityImplied" respect to tagging and [normalized value] "false" or "0" is added
   to that element. extensibility.
   The cases where the addition of solution with respect to XER encoding instructions is described
   by the tagDefault and
   extensibilityImplied attributes may apply procedure for translating XER encoding instructions into
   ASN.1 Schema [XEREIT].

      ASIDE: Type definitions are called out in the
   description of the translation of each kind of definition. not dependent on their module's RXER
      or Generic String Encoding Rules (GSER) [GSER] encoding control
      section [GSEREI].

6.  Translation of Types

   The rules for translating the different varieties of Type are
   detailed in this section.

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



Legg & Prager            Expires 11 October 2005               [Page 13]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   tagged ConstrainedType or a constrained TaggedType.  For the purposes
   of the translation into ASN.1 Schema the constraint is assumed to
   have higher precedence than the tagging, prefix, so the above notation would
   be taken to be a tagged ConstrainedType.

6.1.  Identifier Replacement

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

   Definition: The reduction of an NCName is the string of characters
   resulting from the following operations performed in order on the
   NCName:

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

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

   (3) remove leading and trailing hyphen characters,

   (4) replace sequences of two or more hyphen characters with a single
       hyphen, and

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

      ASIDE: If the reduction of an NCName is not the same as the
      identifier the NCName replaces then the identifier will be
      explicitly given in the translation into ASN.1 Schema.

6.2.  DefinedType Translation

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

   If a DefinedType is not a typereference (not a DummyReference) ParameterizedType,
   ParameterizedValueSetType or an
   ExternalTypeReference (which contains a typereference) DummyReference and the
   typereference is AnyType from the SchemaLanguageIntegration module
   [GLUE] not subject to a
   TYPE-REF or REF-AS-TYPE encoding instruction then the translation of
   the DefinedType is either the attribute form translation of an anytype a type
   reference, or the element form translation of an anytype reference (Section 6.12.1). a type reference.



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 12] 14]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   If                April 11, 2005


   The attribute form translation of 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 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 attribute form translation SHALL NOT be used if
   the qualified name is shared by two or more type definitions in
   separate modules, i.e., is ambiguous.

   The element form translation of a type reference is an element with
   the [local name] "type".  An attribute with the [local name] "ref" is
   SHALL be added to the [attributes] of the <type> element.  The
   [normalized value] of this attribute is the qualified name
   referencing the type definition.  If the qualified name is shared by
   two or more type definitions in separate modules then an attribute
   with the [local name] "context" SHALL be added to the [attributes] of
   the <type> element.  The [normalized value] of this attribute is the
   character string value of the AnyURIValue of the SCHEMA-IDENTITY
   encoding instruction for the module containing the type definition
   referenced by the DefinedType.

      ASIDE: A SCHEMA-IDENTITY encoding instruction is obligatory in
      such cases (see Section 5.1).

   The translation of the DefinedType is the same whether the type
   definition is referenced by a typereference or an
   ExternalTypeReference.


   Usually the translator

   If a DefinedType is free subject to choose a TYPE-REF encoding instruction then
   the translation of the DefinedType is either the attribute form
   translation of a foreign type reference, or the element form
   translation for of a foreign type reference, however in some
   contexts attribute forms of Type are explicitly disallowed. reference.  If a DefinedType the RefParameters in the
   TYPE-REF encoding instruction is a ParameterizedType not empty then the attribute form of
   a foreign type reference cannot be used.

   The attribute form translation of the
   Type a foreign type reference is an
   attribute with the translation [local name] "type".  The [normalized value] of
   this attribute is the Type on the right hand side RXER encoding of the
   referenced ParameterizedTypeAssignment.


   If a DefinedType is a ParameterizedValueSetType then QNameValue from the
   TYPE-REF encoding instruction.

   The element form translation of the Type a foreign type reference is an
   element with the translation of the constrained Type on the right
   hand side of [local name] "type".  An attribute with the notional ParameterizedTypeAssignment equivalent
   [local name] "ref" SHALL be added to the referenced ParameterizedValueSetTypeAssignment (see Clause 15.8 [attributes] of X.680 [X680]).


   If a DefinedType is a DummyReference then the translation <type>
   element.  The [normalized value] of the Type this attribute is the translation RXER
   encoding of the Type in QNameValue from the ActualParameter corresponding
   to TYPE-REF encoding instruction.
   If the DummyReference.


   The Type that substitutes for a ParameterizedType,
   ParameterizedValueSetType or DummyReference ContextParameter is potentially present in a
   different module scope to the surrounding translation, therefore RefParameters in the
   translation of
   TYPE-REF encoding instruction then an attribute with the Type may require a tagDefault or
   extensibilityImplied attribute, according [local name]
   "context" SHALL be added to the provisions [attributes] of
   Section 5.9.


6.2.  Translation the <type> element.
   The [normalized value] of Predefined Types this attribute is the string value of the
   AnyURIValue in the ContextParameter.  If the



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 13] 15]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   If a Type comprises one of                April 11, 2005


   CanonicalizationParameter is present in the productions RefParameters in Table 1 the
   TYPE-REF encoding instruction then an attribute with the
   translation [local name]
   "canonicalization" SHALL be added to the [attributes] of the Type <type>
   element.  The [normalized value] of this attribute is the string
   value of the AnyURIValue in the CanonicalizationParameter.

   Usually the translator is free to choose either the attribute form or
   element form translation of that type.


   The for a type reference or foreign type
   reference, however in some contexts attribute form translation forms of a Type comprising one are
   explicitly disallowed.

   If a DefinedType is subject to a REF-AS-TYPE encoding instruction
   then the translation of the
   productions in Table 1 DefinedType is an attribute element with the
   [local name] "type".  An attribute with the [local name]
   "elementType" SHALL be added to the [attributes] of the <type>
   element.  The [normalized value] of this attribute is a qualified name with the
   namespace name "http://xmled.info/ns/ASN.1" and RXER
   encoding of the local part as
   indicated NameValue from the REF-AS-TYPE encoding instruction.
   If the ContextParameter is present in Table 1.


   Table 1: Reference Names for Predefined Types


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




Legg & Prager           Expires 17 December 2004               [Page 14]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



      | UsefulType                       |                   |
      |    GeneralizedTime               | GeneralizedTime   |
      |    UTCTime                       | UTCTime           |
      +----------------------------------+-------------------+


   The element form translation of a Type comprising one of the
   productions RefParameters in Table 1 is an element with the [local name] "type".
   An
   REF-AS-TYPE encoding instruction then an attribute with the
   [local name] "ref" is "context" SHALL be added to the [attributes] of the
   <type> element.  The [normalized value] of this attribute is a
   qualified name with the namespace name "http://xmled.info/ns/ASN.1"
   and
   string value of the local part as indicated AnyURIValue in Table 1.


   Example


      BOOLEAN


      <type ref="asn1:BOOLEAN"/>


   Usually the translator ContextParameter.  If the
   CanonicalizationParameter is free to choose either the attribute form or
   element form translation for a Type, however present 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 RefParameters in the NamedBitList is appended to the
   [children] of the <namedBitList> element.


   The translation of a NamedBit is
   REF-AS-TYPE encoding instruction then 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 "canonicalization" SHALL be added to the [attributes] of
   the
   <namedBit> <type> element.  The [normalized value] of this attribute is the
   string representation of the integer value of the number or
   DefinedValue of AnyURIValue in the NamedBit. CanonicalizationParameter.

   Example


      BIT STRING

      CHOICE { zero(0), one(1), two(2)
          one    Foo,
          two    [RXER:TYPE-REF
                     { namespace-name "http://www.example.com/PO1",
                       local-name "PurchaseOrderType" }


      <type>
       <namedBitList>
        <namedBit name="zero" bit="0"/>
        <namedBit
                 ] AnyType,
          three  [RXER:REF-AS-TYPE "product"
                     CONTEXT "http://www.example.com/inventory"
                 ] AnyType
      }

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



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 15] 16]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



       </namedBitList>                April 11, 2005


        </element>
       </choice>
      </type>


6.4.  IntegerType Translation


   The translation of an IntegerType with

   If a NamedNumberList DefinedType is an
   element with a DummyReference then the [local name] "type".  An element with translation of the
   [local name] "namedNumberList" Type
   is added to the [children] of the
   <type> element.  The translation of each NamedNumber the Type in the
   NamedNumberList is appended ActualParameter corresponding
   to the [children] of the
   <namedNumberList> element.


   The translation of DummyReference.

   If a NamedNumber DefinedType is an element with a ParameterizedType then the [local name]
   "namedNumber".  An attribute with translation of the [local name] "name"
   DefinedType is added to the [attributes] translation of the <namedNumber> element.  The
   [normalized value] ParameterizedType.

   If a DefinedType is a ParameterizedValueSetType then the translation
   of this attribute the DefinedType is the identifier translation of the
   NamedNumber.  An attribute with
   ParameterizedValueSetType.

   Definition: A ParameterizedType is recursively contained if its
   translation will be nested within the [local name] "number" translation of another
   ParameterizedType to which it is also
   added equivalent.  A
   ParameterizedValueSetType is recursively contained if its translation
   will be nested within the translation of another
   ParameterizedValueSetType to which it is equivalent.

   If a ParameterizedType is not recursively contained then the [attributes]
   translation of the <namedNumber> element.  The
   [normalized value] ParameterizedType is the translation of this attribute the Type
   on the right hand side of the referenced ParameterizedTypeAssignment.

   If a ParameterizedValueSetType is not recursively contained then the string representation
   translation of the integer value ParameterizedValueSetType is the translation of
   the SignedNumber or DefinedValue constrained Type on the right hand side 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 notional
   ParameterizedTypeAssignment equivalent to the referenced
   ParameterizedValueSetTypeAssignment (see Clause 15.8 of X.680
   [X.680]).

      ASIDE: The Type that substitutes for a ParameterizedType,
      ParameterizedValueSetType or DummyReference is potentially in a
      different module scope to the surrounding translation, therefore
      the translation of an EnumeratedType the Type may require a tagDefault or
      extensibilityImplied attribute, according to the provisions of
      Section 6.14.

   If a ParameterizedType or ParameterizedValueSetType is recursively
   contained then its translation is an element with the [local name]
   "type".  An element attribute with the [local name] "enumerated"
   is "ancestor" SHALL be added
   to the [children] [attributes] of the <type> element.  The translation [normalized value] of
   each EnumerationItem in the RootEnumeration
   this attribute is appended to the
   [children] of the <enumerated> element.


   If the ellipsis ("...") is present then an element with decimal digit string representing the
   [local name] "extension" is appended to the [children]
   integer value of one plus the
   <enumerated> element, and the translation number of intermediate enclosing <type>
   elements between the ExceptionSpec
   (possibly empty) is added to <type> elements resulting from the [children] translations
   of the <extension>
   element.  If an AdditionalEnumeration is present then the translation two equivalent instances of each EnumerationItem in the AdditionalEnumeration is appended to ParameterizedType or



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 16] 17]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   the [children] of the <extension> element.


   The translation of                April 11, 2005


   ParameterizedValueSetType.

   A <type> element with an EnumerationItem ancestor attribute is a reference to an
   ancestor <type> element.  This form for a <type> element with the
   [local name] "enumeration".


   If the EnumerationItem SHOULD NOT
   be used in original specifications written in ASN.1 Schema.

      ASIDE: The form is of only intended for the "identifier" form then purpose of handling
      recursive parameterized type definitions in an attribute
   with the [local name] "name" ASN.1 specification
      being translated into ASN.1 Schema.  Such definitions are self-
      referencing but have no obvious name.  It is added also not easy to
      construct a suitable name from the [attributes] of the
   <enumeration> element. surrounding context because
      recursive parameterized types can be embedded in other constructs,
      such as information objects, which are themselves unnamed.

   Example

      Consider these type definitions:

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

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

      The [normalized value] of this attribute assignment for "Tree" is not directly translated because it is
      a ParameterizedAssignment.  The translation for the identifier.


   If "NumberTree"
      assignment, up to but not yet including the EnumerationItem Type in the
      TaggedType, is of as follows:

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

      The Type in the "NamedNumber" form then an attribute
   with TaggedType is a ParameterizedType.  Since the [local name] "name"
      ParameterizedType is added to not recursively contained the [attributes] translation of
      the
   <enumeration> element.  The [normalized value] of this attribute ParameterizedType is the identifier translation of the NamedNumber.  An attribute with Type on the
   [local name] "number" is also added to the [attributes] right
      hand side of the
   <enumeration> element.  The [normalized value] of referenced ParameterizedTypeAssignment, namely
      this attribute is
   the string representation of the integer type:

         SEQUENCE {
             value of the SignedNumber or
   DefinedValue of the NamedNumber.


   Example


      ENUMERATED          [0] ValueType,
             left-subtree   [1] Tree { red(0), green(1), ..., blue(2) ValueType }


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


6.6.  TaggedType Translation OPTIONAL,
             right-subtree  [2] Tree { ValueType } OPTIONAL
         }



Legg & Prager            Expires 11 October 2005               [Page 18]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


      ValueType is a DummyReference.  The translation of a TaggedType is an element with the [local name]
   "type".  An element with the [local name] "tagged" is added to actual
      parameter substitutes for the
   [children] of DummyReference.  In this case the <type> element.  If
      actual parameter is the Class of type INTEGER.

      The translation for the Tag is not
   empty then an attribute with SEQUENCE type, up to the [local name] "tagClass" first component,
      is added to the [attributes] of the <tagged> element. element:

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

      The [normalized value] of
   this attribute is the Class of the Tag, either "UNIVERSAL",
   "APPLICATION" or "PRIVATE".


   If Type in the TaggedType for the second component is a
      ParameterizedType.  Since this ParameterizedType is recursively
      contained its translation is a <type> element with the ancestor
      attribute.  The value of the "Tag IMPLICIT Type" form then an ancestor attribute with the [local name] "tagging" and [normalized value]
   "IMPLICIT" is added to "2" because
      there is one intermediate <type> element (for a TaggedType).  Put
      another way, the [attributes] translations of the <tagged> element.


   If equivalent instances of
      ParameterizedType are two <type> steps apart.

      The translation of the TaggedType is third component of the "Tag EXPLICIT Type" form then an




Legg & Prager           Expires 17 December 2004               [Page 17]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   attribute with SEQUENCE type
      follows the [local name] "tagging" and [normalized value]
   "EXPLICIT" is added to same pattern as the [attributes] second component.  The completed
      translation is as follows:

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



Legg & Prager            Expires 11 October 2005               [Page 19]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


              </element>
              <optional>
               <element name="left-subtree">
                <type>
                 <tagged number="1">
                  <type ancestor="2"/><!-- Tree { ValueType } -->
                 </tagged>
                </type>
               </element>
              </optional>
              <optional>
               <element name="right-subtree">
                <type>
                 <tagged number="2">
                  <type ancestor="2"/><!-- Tree { ValueType } -->
                 </tagged>
                </type>
               </element>
              </optional>
             </sequence>
            </type>
           </tagged>
          </type>
         </namedType>

6.3.  Translation of the <tagged> element. Predefined Types

   If the TaggedType is a Type comprises one of the "Tag Type" form and the Type productions in the
   TaggedType is a DummyReference Table 1 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 either the content attribute form or element form
   translation 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 that type.

   The attribute 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] Type comprising one of the <type> element.  An
   productions in Table 1 is an attribute with the [local name] "alternative" is added to the [attributes] of the
   <selection> element. "type".
   The [normalized value] of this attribute is a qualified name with the
   identifier of the SelectionType.


   The translation of
   namespace name "http://xmled.info/ns/ASN.1" and the Type local part as
   indicated in the SelectionType is added to the
   content of the <selection> element.


   Example


      field1 < MyChoiceType


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


6.8.  InstanceOfType Translation





Legg & Prager           Expires 17 December 2004               [Page 18]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   The translation of an InstanceOfType 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          |



Legg & Prager            Expires 11 October 2005               [Page 20]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


      +----------------------------------+-------------------+
      | IntegerType                      |                   |
      |    without a NamedNumberList     | INTEGER           |
      +----------------------------------+-------------------+
      | NullType                         | NULL              |
      | ObjectIdentifierType             | OBJECT-IDENTIFIER |
      | OctetStringType                  | OCTET-STRING      |
      | RealType                         | REAL              |
      | RelativeOIDType                  | RELATIVE-OID      |
      +----------------------------------+-------------------+
      | RestrictedCharacterStringType    |                   |
      |    BMPString                     | BMPString         |
      |    GeneralString                 | GeneralString     |
      |    GraphicString                 | GraphicString     |
      |    IA5String                     | IA5String         |
      |    ISO646String                  | ISO646String      |
      |    NumericString                 | NumericString     |
      |    PrintableString               | PrintableString   |
      |    TeletexString                 | TeletexString     |
      |    T61String                     | T61String         |
      |    UniversalString               | UniversalString   |
      |    UTF8String                    | UTF8String        |
      |    VideotexString                | VideotexString    |
      |    VisibleString                 | VisibleString     |
      +----------------------------------+-------------------+
      | UnrestrictedCharacterStringType  | CHARACTER-STRING  |
      +----------------------------------+-------------------+
      | UsefulType                       |                   |
      |    GeneralizedTime               | GeneralizedTime   |
      |    UTCTime                       | UTCTime           |
      |    ObjectDescriptor              | ObjectDescriptor  |
      +----------------------------------+-------------------+

   The element form translation of a Type comprising one of the
   productions in Table 1 is an element with the [local name] "type".
   An element attribute with the [local name] "instanceOf"
   is "ref" SHALL be added to the [children]
   [attributes] of the <type> element.  The content [normalized value] of the
   <instanceOf> element this
   attribute is a qualified name with the translation of namespace name
   "http://xmled.info/ns/ASN.1" and the DefinedObjectClass local part as indicated in
   the InstanceOfType.
   Table 1.

   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

      BOOLEAN

      <type ref="asn1:BOOLEAN"/>

   Usually the [local name] "fromClass" translator is
   added free to choose either the [children] of the <type> element.  The content of the
   <fromClass> attribute form or



Legg & Prager            Expires 11 October 2005               [Page 21]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   element is the form translation of the DefinedObjectClass for a Type, however in
   the ObjectClassFieldType followed by the translation some contexts
   attribute forms 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 Type are explicitly disallowed.

6.4.  BitStringType Translation

   The translation of a TypeFromObject or ValueSetFromObjects BitStringType with a NamedBitList is an element
   with the [local name] "type".  An element with the [local name] "fromObjects" is
   "namedBitList" SHALL be added to the [children] of the <type>
   element.  The translation of the ReferencedObjects in the TypeFromObject or
   ValueSetFromObjects is added to the content of the <fromObjects>
   element.


   The translation of the FieldName each NamedBit in the TypeFromObject or
   ValueSetFromObjects is NamedBitList SHALL
   be appended to the content [children] of the <fromObjects> <namedBitList> element.


   Example




Legg & Prager           Expires 17 December 2004               [Page 19]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



      invertMatrix.&Errors.&errorCode


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


6.11.  Translation of Combining Types


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


6.11.1.  NamedType Translation


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

   The complex content translation of a NamedType NamedBit is an element with the [local name] "element".
   "namedBit".  An attribute with the [local name] "name" is SHALL be added
   to the [attributes] of the <element> <namedBit> element.  The  If the BitStringType
   is subject to a VALUES encoding instruction then the
   [normalized value] of this attribute is the replacement name [RXEREI]
   for the identifier of the
   NamedType.  The translation NamedBit, otherwise it is the identifier of
   the Type in NamedBit.  If the NamedType BitStringType is added subject to a VALUES encoding
   instruction and the content reduction of the <element> element.


   The simple content translation of a NamedType replacement name is not the same
   as the identifier then an element attribute with the [local name] "content".  An
   "identifier" SHALL be added to the [attributes] of the <namedBit>
   element, otherwise an attribute with the [local name] "name" is "identifier"
   MAY be added to the [attributes] of the <content> <namedBit> element.  The
   [normalized value] of this attribute is the identifier of the
   NamedType.  The translation of the Type in the NamedType is added to
   the content of the <content> element.


   If the enclosing combining type is a SEQUENCE, SET or CHOICE type and
   the Type in the NamedType is a DummyReference and the TagDefault for
   the module containing the NamedType is "AUTOMATIC TAGS" then an
   attribute form translation of the Type in the NamedType SHALL NOT be
   used, and an
   NamedBit.  An attribute with the [local name] "explicit" and
   [normalized value] "true" or "1" is "bit" SHALL be added to
   the [attributes] of the
   <type> element resulting from the translation <namedBit> element.  The [normalized value]
   of the Type in the
   NamedType.  Where the automatic tagging transformation applies, this attribute indicates that explicit tagging applies to is the Type in string representation of the
   NamedType instead integer value
   of the usual implicit tagging.


6.11.2.  SequenceType number or DefinedValue of the NamedBit.

   Examples

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

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

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

      <type>



Legg & Prager            Expires 11 October 2005               [Page 22]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


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

6.5.  IntegerType Translation

   The translation of an IntegerType with a SequenceType NamedNumberList is an
   element with the [local name]




Legg & Prager           Expires 17 December 2004               [Page 20]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004 "type".  An element with the
   [local name] "sequence" is "namedNumberList" SHALL be added to the [children] of
   the <type> element.  The translation of each
   ComponentType NamedNumber in the ComponentTypeList of the initial
   RootComponentTypeList, if present, is
   NamedNumberList SHALL be appended to the [children] of the <sequence>
   <namedNumberList> element.


   If the ExtensionAndException

   The translation of a NamedNumber is present then an element with the [local name] "extension" is appended
   "namedNumber".  An attribute with the [local name] "name" SHALL be
   added to the [children] [attributes] of the
   <sequence> element, and the translation of <namedNumber> element.  If the ExceptionSpec
   (possibly empty)
   IntegerType is added subject to a VALUES encoding instruction then the [children]
   [normalized value] of this attribute is the <extension>
   element.


   The translation replacement name [RXEREI]
   for the identifier of each ExtensionAdditionGroup or ComponentType in the ExtensionAdditions (if any) NamedNumber, otherwise it is appended to the [children] identifier
   of the
   <extension> element. NamedNumber.  If the ExtensionEndMarker IntegerType is present then subject to a VALUES
   encoding instruction and the translation reduction of each
   ComponentType in the final RootComponentTypeList replacement name is appended to not
   the
   [children] of same as the <sequence> element.


   The translation of an ExtensionAdditionGroup is identifier then an element attribute with the [local name] "extensionGroup".  If
   "identifier" SHALL be added to the VersionNumber is present then [attributes] of the <namedNumber>
   element, otherwise an attribute with the [local name] "version" is "identifier"
   MAY be added to the [attributes] of the <extensionGroup> <namedNumber> element.  The
   [normalized value] of this attribute is the number identifier of the VersionNumber.  The
   translation of each ComponentType in
   NamedNumber.  An attribute with the ExtensionAdditionGroup is
   appended [local name] "number" SHALL be
   added to the [children] [attributes] of the <extensionGroup> <namedNumber> element.  The translation
   [normalized value] of a ComponentType this attribute is the string representation of
   the "NamedType" form is integer value of the
   complex content translation SignedNumber or DefinedValue of the NamedType.
   NamedNumber.

   Examples

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

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



Legg & Prager            Expires 11 October 2005               [Page 23]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


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

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

6.6.  EnumeratedType Translation

   The translation of a ComponentType of the "NamedType OPTIONAL" form an EnumeratedType is an element with the
   [local name] "optional".  The complex content
   translation of "type".  An element with the NamedType is [local name] "enumerated"
   SHALL be added to the [children] of the
   <optional> <type> element.  The
   translation of a ComponentType each EnumerationItem in the RootEnumeration SHALL be
   appended to the [children] of the "NamedType DEFAULT Value"
   form <enumerated> element.

   If the ellipsis ("...") is present then an element with the
   [local name] "optional".  The complex
   content "extension" SHALL be appended to the [children] of the
   <enumerated> element, and the translation of the NamedType is ExceptionSpec
   (possibly empty) SHALL be added to the [children] of the <optional> <extension>
   element.  An element with the [local name] "default"  If an AdditionalEnumeration is present then the translation
   of each EnumerationItem in the AdditionalEnumeration SHALL be
   appended to the [children] of the <optional> <extension> element.

   The content translation of the <default> an EnumerationItem is an element with the
   [local name] "enumeration".

   If the EnumerationItem is of the translation "identifier" form then an attribute
   with the [local name] "name" SHALL be added to the [attributes] of
   the Value.


   The translation <enumeration> element.  If the EnumeratedType is subject to a
   VALUES encoding instruction then the [normalized value] of this
   attribute is the replacement name [RXEREI] for the identifier,
   otherwise it is the identifier.  If the EnumeratedType is subject to
   a ComponentType VALUES encoding instruction and the reduction of the "COMPONENTS OF Type" form replacement
   name is not the same as the identifier then an element attribute with the
   [local name] "componentsOf". "identifier" SHALL be added to the [attributes] of the
   <namedNumber> element, otherwise an attribute with the [local name]
   "identifier" MAY be added to the [attributes] of the <namedNumber>
   element.  The translation [normalized value] of this attribute is the Type identifier.

   If the EnumerationItem is of the "NamedNumber" form then an attribute
   with the [local name] "name" SHALL be added to the content [attributes] of
   the <componentsOf> <enumeration> element.


   Example  If the EnumeratedType is subject to a



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 21] 24]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



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


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


6.11.3.  SetType Translation


   The translation of a SetType follows the same procedure as a
   SequenceType except that SetType replaces SequenceType, "SET"
   replaces "SEQUENCE", and                April 11, 2005


   VALUES encoding instruction then the [local name] "set" is used instead of
   "sequence".


6.11.4.  ChoiceType Translation


   The translation [normalized value] of a ChoiceType that is not a ChoiceOfStrings
   [RFC3641] type this
   attribute is an element with the [local name] "type".  An
   element with replacement name [RXEREI] for the [local name] "choice" identifier of the
   NamedNumber, otherwise it is added to the [children] identifier of the <type> element.  The complex content translation of each
   NamedType in NamedNumber.  If
   the RootAlternativeTypeList EnumeratedType is appended subject to a VALUES encoding instruction and
   the
   [children] reduction of the <choice> element.


   If the ExtensionAndException replacement name is present not the same as the
   identifier then an element attribute with the




Legg & Prager           Expires 17 December 2004               [Page 22]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004 [local name] "extension" is appended "identifier" SHALL
   be added to the [children] [attributes] of the
   <choice> <namedNumber> element, and the translation of otherwise
   an attribute with the ExceptionSpec (possibly
   empty) is [local name] "identifier" MAY be added to the [children]
   [attributes] of the <extension> <namedNumber> element.  The translation [normalized value] of each ExtensionAdditionAlternativesGroup or
   NamedType in the ExtensionAdditionAlternatives (if any)
   this attribute is appended
   to the [children] of the <extension> element.  The complex content
   translation of the NamedType is used.


   The translation identifier of an ExtensionAdditionAlternativesGroup is an
   element with the [local name] "extensionGroup".  If the VersionNumber
   is present then an NamedNumber.  An attribute
   with the [local name] "version" is "number" SHALL be added to the [attributes] of
   the <extensionGroup> <enumeration> element.  The [normalized value] of this attribute
   is the number of the
   VersionNumber.  The complex content translation digit string representation of each NamedType in the ExtensionAdditionAlternativesGroup is appended to integer value of the [children]
   SignedNumber or DefinedValue of the <extensionGroup> element. NamedNumber.

   Example


      CHOICE

      ENUMERATED {
          one  INTEGER,
          two  BOOLEAN, red(0), green(1), ...,
          [[ 2:
              three  NULL
          ]],
          four  PrintableString,
          ... blue(2) }

      <type>
       <choice>
        <element name="one" type="asn1:INTEGER"/>
        <element name="two" type="asn1:BOOLEAN"/>
       <enumerated>
        <enumeration name="red" number="0"/>
        <enumeration name="green" number="1"/>
        <extension>
         <extensionGroup version="2">
          <element name="three" type="asn1:NULL"/>
         </extensionGroup>
         <element name="four" type="asn1:PrintableString"/>
         <enumeration name="blue" number="2"/>
        </extension>
       </choice>
       </enumerated>
      </type>

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

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


6.11.5.

6.7.  PrefixedType Translation of ChoiceOfStrings Types

   The translation of a ChoiceType PrefixedType [X.680-1] that is a ChoiceOfStrings type
   follows TaggedType is
   the same procedure as translation of the TaggedType.

   If a non-ChoiceOfStrings ChoiceType except PrefixedType is an EncodingPrefixedType and the
   EncodingReference is RXER, or the EncodingReference is empty and the



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 23] 25]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   that                April 11, 2005


   default encoding reference [X.680-1] for the [local name] "union" module is used instead of "choice", and RXER, then the
   simple content
   translation of each NamedType the PrefixedType 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"/>
        <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 Type in the [local name] "sequenceOf"
   EncodingPrefixedType.

      ASIDE: This is added to the [children] of the <type> element.


   If the SequenceOfType not suggesting that RXER encoding instructions are
      ignored.  Encoding instructions for RXER are not explicitly
      represented in ASN.1 Schema, but rather affect how an ASN.1
      specification is of the "SEQUENCE OF NamedType" form then translated into an ASN.1 Schema document (since
      the
   complex content translation of the NamedType an ASN.1 Schema document is added to also the content RXER encoding
      of the <sequenceOf> element.


   If the SequenceOfType is an abstract value of the "SEQUENCE OF Type" form then ModuleDefinition ASN.1 type in
      Appendix A).  The individual effects of RXER encoding instructions
      on the translation are addressed in other parts of this
      specification.

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

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


   Examples


      SEQUENCE OF INTEGER


      <type>
       <sequenceOf>




Legg & Prager           Expires 17 December 2004               [Page 24]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



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


      SEQUENCE OF counter INTEGER


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


6.11.7.  SetOfType Translation


   The translation of a SetOfType follows the same procedure as a
   SequenceOfType except that SetOfType replaces SequenceOfType, "SET"
   replaces "SEQUENCE", and the [local name] "setOf" is used instead of
   "sequenceOf".


6.12.  Translation of Constrained Types

   If the ConstrainedType is EncodingReference of the "Type Constraint" form and the Type an EncodingPrefix is the AnyType type from the SchemaLanguageIntegration module [GLUE] not empty then the
   translation of the ConstrainedType EncodingPrefix is determined by the
   rules in Section 6.12.1.


   If an element with the ConstrainedType is
   encodingreference of the "Type Constraint" form (excluding
   the case where the Type is the AnyType type [GLUE]) then EncodingReference as the [local name].  The
   translation of the ConstrainedType is an element with the
   [local name] "type".  An element with EncodingInstruction in the [local name] "constrained"
   is EncodingPrefix SHALL be
   added to the [children] of the <type> this element.  The content of

   If the
   <constrained> element EncodingReference of an EncodingPrefix is empty then the
   translation of the Type followed by EncodingPrefix is an element with the default
   encoding reference for the module as the [local name].  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 EncodingInstruction in the Value of EncodingPrefix SHALL be
   added to the endpoint.


   A SizeConstraint [children] of this element.

   The EncodingInstruction notation is a simple range if the Constraint different for each set of
   encoding instructions, and their translations into ASN.1 Schema are
   specified in separate documents [GSEREIT][XEREIT].  At the
   SizeConstraint contains time of
   writing, 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) three sets of encoding instructions have been defined
   (for RXER [RXEREI], GSER [GSER][GSEREI] and both end points are
   simple.


   A Constraint is EXTENDED-XER
   [X.693][X.693-1]).

   If the <type> child element of a simple range if contains only <prefixed> element has no attributes
   and has a SizeConstraint <prefixed> child element then that
   is a simple range (i.e., a simple range SizeConstraint in a <type> child element MAY
   be replaced by the content (both attributes and child elements) of
   the inner <prefixed> element.



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 25] 26]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   SubtypeElements in an Elements in a single IntersectionElements in a
   single Intersections in a Unions in an ElementSetSpec in                April 11, 2005


   If two consecutive child elements of a lone
   RootElementSetSpec in <prefixed> element have the
   same [local name] (which will be an ElementSetSpecs in a SubtypeConstraint in a
   lone ConstraintSpec in encodingreference) then the Constraint).


   If
   second child element MAY be removed and have its [children] appended
   to the parent type [children] of a TypeWithConstraint is a "SEQUENCE OF Type" or
   "SEQUENCE OF NamedType" and the Constraint or SizeConstraint in first child element.

   These two rewriting steps MAY be applied to the
   TypeWithConstraint is result of a simple range then previous
   rewriting step if the necessary conditions still hold.

   Example

      These three definitions are equivalent.

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

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

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

6.7.1.  TaggedType Translation

   The translation of the
   TypeWithConstraint a TaggedType is an element with the translation [local name]
   "type".  An element with the [local name] "tagged" SHALL be added to
   the [children] of the parent type. <type> element.  If the
   value Class of the lower endpoint Tag is not "MIN" or "0"
   empty then an attribute with the [local name] "minSize" is "tagClass" SHALL be
   added to the [attributes] of the
   <sequenceOf> element from the translation of the parent type. <tagged> element.  The
   [normalized value] of this attribute is the value Class of the lower
   endpoint. Tag, either
   "UNIVERSAL", "APPLICATION" or "PRIVATE".




Legg & Prager            Expires 11 October 2005               [Page 27]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   If the value TaggedType is of the upper endpoint is not "MAX" "Tag IMPLICIT Type" form then an
   attribute with the [local name] "maxSize" is "tagging" and [normalized value]
   "IMPLICIT" SHALL be added to the [attributes] of the <sequenceOf> <tagged>
   element.  The [normalized value]

   If the TaggedType is of
   this the "Tag EXPLICIT Type" form then an
   attribute is with the value [local name] "tagging" and [normalized value]
   "EXPLICIT" SHALL be added to the [attributes] of the upper endpoint. <tagged>
   element.

   If the parent type of a TypeWithConstraint is TaggedType is "SEQUENCE OF of the "Tag Type"
   or "SEQUENCE OF NamedType" form and the Constraint or SizeConstraint Type in the TypeWithConstraint
   TaggedType is not a simple range DummyReference then the translation of
   the TypeWithConstraint is an element with the [local name] "type".
   An element attribute with the
   [local name] "constrained" is "tagging" and [normalized value] "EXPLICIT" SHALL be
   added to The
   content of the <constrained> element is [attributes] of the <tagged> element.

   The translation of the parent
   type followed by Type in the translation TaggedType SHALL be added to the
   content of the Constraint or SizeConstraint. <tagged> element.

   Examples

      [0] INTEGER

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

      [APPLICATION 10] IMPLICIT BOOLEAN

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

6.8.  SelectionType Translation

   The translation of a TypeWithConstraint where the parent type SelectionType is
   "SET OF Type" or "SET OF NamedType" follows an element with the same procedure as
   [local name] "type".  An element with the
   translation [local name] "selection"
   SHALL be added to the [children] of the <type> element.

   The identifier in a TypeWithConstraint where SelectionType identifies a NamedType in the parent type is
   "SEQUENCE OF Type" or "SEQUENCE OF NamedType" except
   definition of the Type in the SelectionType.  The translation of that "SET"
   replaces "SEQUENCE" and
   NamedType will be an element with the [local name] "setOf" either
   "attribute", "element", "content" or "member".  An attribute with the
   same [local name] as the translation of the NamedType SHALL be added
   to the [attributes] of the <selection> element.  The
   [normalized value] of this attribute is used instead the RXER encoding [RXER] of
   "sequenceOf".


   Examples


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


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


      SEQUENCE SIZE(0..10) OF number INTEGER


      <type>
       <sequenceOf maxSize="10">
        <element name="number" type="asn1:INTEGER"/>
   the effective name [RXEREI] of the NamedType.




Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 26] 28]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



       </sequenceOf>                April 11, 2005


   The translation of the Type in the SelectionType SHALL be added to
   the content of the <selection> element.

   Example

      field1 < MyChoiceType

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


      SEQUENCE SIZE(1..limit) OF number

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

      <type>
       <constrained>
       <selection attribute="field-two">
        <type>
         <sequenceOf>
          <element name="number"
         <choice>
          <attribute name="field-two" identifier="field2"
                     type="asn1:INTEGER"/>
         </sequenceOf>
         </choice>
        </type>
        <size>
         <range>
          <minInclusive literal="1"/>
          <maxInclusive value="tns:limit"/>
         </range>
        </size>
       </constrained>
       </selection>
      </type>



6.12.1.

6.9.  InstanceOfType Translation of AnyType

   The translation described in this section applies to a
   ConstrainedType of the "Type Constraint" form where the Type an InstanceOfType is an element with 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
   [local name] "type".  An element with the same
   value as id-constraint-xml-type from [local name] "instanceOf"
   SHALL be added to the SchemaLanguageIntegration
   module then [children] of the translation <type> element.  The content
   of the ConstrainedType <instanceOf> element is either the
   attribute form translation of a foreign type reference, or the
   element form translation of a foreign type reference.
   DefinedObjectClass in the InstanceOfType.

   Example

      INSTANCE OF TYPE-IDENTIFIER

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

6.10.  ObjectClassFieldType Translation

   The attribute form translation of a foreign type reference an ObjectClassFieldType is an
   attribute element with the
   [local name] "type".  An element with the [local name] "fromClass"
   SHALL be added to the [children] of the <type> element.  The [normalized value] content
   of
   this attribute the <fromClass> element is the qualified name represented translation of the



Legg & Prager            Expires 11 October 2005               [Page 29]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   DefinedObjectClass in the ObjectClassFieldType followed by the second
   translation of the FieldName (see Section 9.2.6).

   Example

      OPERATION.&Linked.&ArgumentType

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

6.11.  TypeFromObject and
   third UserDefinedConstraintParameter. ValueSetFromObjects Translation

   The element form translation of a foreign type reference TypeFromObject or ValueSetFromObjects is an
   element with the [local name] "type".  An attribute element with the
   [local name] "ref" is "fromObjects" SHALL be added to the [attributes] [children] of the
   <type> element.

   The [normalized value] translation of this attribute is the qualified
   name represented by the second and third
   UserDefinedConstraintParameter.  If there is a fourth
   UserDefinedConstraintParameter then an attribute with ReferencedObjects in the




Legg & Prager           Expires 17 December 2004               [Page 27]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   [local name] "context" is TypeFromObject or
   ValueSetFromObjects SHALL be added to the [attributes] content of the <type>
   <fromObjects> element.

   The [normalized value] translation of this attribute is the string
   value of FieldName in the fourth UserDefinedConstraintParameter.


   If there is a fourth UserDefinedConstraintParameter then TypeFromObject or
   ValueSetFromObjects SHALL be appended to the
   attribute form content of a foreign type reference cannot be used.  The
   translator is otherwise free to choose either the attribute form or
   element form
   <fromObjects> element.

   Example

      invertMatrix.&Errors.&errorCode

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

6.12.  Translation of Combining Types

   This section details the translation for a foreign of the ASN.1 combining types:
   SET, SEQUENCE, CHOICE, SET OF and SEQUENCE OF.  The combining type reference, except that in
   some contexts attribute forms
   definitions all make use of Type are explicitly disallowed.


   Example


      AnyType (CONSTRAINED BY {
                  OBJECT IDENTIFIER:id-constraint-xml-type,
                  AnyURI:"http://www.example.com/PO1",
                  NCName:"PurchaseOrderType" })


         or


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


      <type xmlns:po="http://www.example.com/PO1"
            ref="po:PurchaseOrderType"/>


   If the ConstraintSpec NamedType notation.

6.12.1.  NamedType Translation

   A NamedType is translated in one of three ways depending on the Constraint is a GeneralConstraint and
   context.  These are the GeneralConstraint is a UserDefinedConstraint normal translation, the member translation
   and the first
   UserDefinedConstraintParameter is an OBJECT IDENTIFIER with item translation.  These translations are not
   interchangeable.  One of the same
   value three will be explicitly invoked as id-constraint-dtd-type from part



Legg & Prager            Expires 11 October 2005               [Page 30]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   of the SchemaLanguageIntegration
   module translation of an enclosing combining type.

   If a NamedType is subject to an ATTRIBUTE or ATTRIBUTE-REF encoding
   instruction then the normal translation of the ConstrainedType NamedType is an
   element with the [local name] "type".  An attribute with "attribute", otherwise if the [local name]
   "context" NamedType
   is added subject to a CONTENT encoding instruction then the [attributes] normal
   translation of the <type> element.  The
   [normalized value] of this attribute NamedType is an element with the string value [local name]
   "content", otherwise the normal translation of the
   second UserDefinedConstraintParameter.  An attribute NamedType is an
   element with the [local name] "elementType" is also added to the [attributes] "element".

   The member translation of a NamedType is an element with the
   <type> element.
   [local name] "member".

   The [normalized value] item translation of this attribute a NamedType is an element with the
   string value of
   [local name] "item".

      ASIDE: A Namedtype for which the third UserDefinedConstraintParameter.


   Example


      AnyType (CONSTRAINED BY {
                  OBJECT IDENTIFIER:id-constraint-dtd-type,
                  AnyURI:"http://www.example.com/inventory",
                  Name:"product" }) member or


      DTD-Type { "http://www.example.com/inventory", "product" }





Legg & Prager           Expires 17 December 2004               [Page 28]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



      <type context="http://www.example.com/inventory"
            elementType="product"/>


   If the ConstraintSpec in the Constraint item translation is
      invoked will never be subject to an ATTRIBUTE, ATTRIBUTE-REF,
      CONTENT or TYPE-AS-VERSION encoding instruction.  These encoding
      instructions are also mutually exclusive.

   If a GeneralConstraint and
   the GeneralConstraint NamedType is subject to a UserDefinedConstraint and the first
   UserDefinedConstraintParameter is an OBJECT IDENTIFIER with the same
   value as id-constraint-xml-element from the SchemaLanguageIntegration
   module TYPE-AS-VERSION encoding instruction
   then the translation of the ConstrainedType is an element with
   the [local name] "type".  An element attribute with the [local name] "choice"
   is "typeAsVersion" and
   [normalized value] "true" or "1" SHALL be added to the [children] of the <type> <element>
   element.  An element  For the normal translation, if a NamedType is not subject
   to an ATTRIBUTE, ATTRIBUTE-REF, CONTENT or TYPE-AS-VERSION encoding
   instruction then an attribute with the [local name] "element" is "typeAsVersion"
   and [normalized value] "false" or "0" MAY be added to the [children] of the <choice> <element>
   element.  An

   For the normal, member and item translations, if a NamedType is not
   subject to an ATTRIBUTE-REF, ELEMENT-REF or REF-AS-ELEMENT encoding
   instruction then an attribute with the [local name] "ref" is "name" SHALL be
   added to the [attributes] of the <element> element. <attribute>, <content>, <element>,
   <member> or <item> element, as appropriate.  The [normalized value]
   of this attribute is the qualified value of the local-name component of the
   effective name represented by [RXEREI] of the second and
   third UserDefinedConstraintParameter. NamedType.

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

   If the reduction of the local-name component (an NCName) of the
   effective name of the NamedType is not the same as the identifier of
   the NamedType then an attribute with the [local name] "context" is "identifier"
   SHALL be added to the [attributes] of the <element> <attribute>, <content>,
   <element>, <member> or <item> element, as appropriate, otherwise an



Legg & Prager            Expires 11 October 2005               [Page 31]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   attribute with the [local name] "identifier" MAY be added to the
   [attributes] of the <attribute>, <content>, <element>, <member> or
   <item> element.  The [normalized value] of this attribute is the string
   value
   identifier of the fourth UserDefinedConstraintParameter.


   Example


      AnyType (CONSTRAINED BY {
                  OBJECT IDENTIFIER:id-constraint-xml-element,
                  AnyURI:"http://www.example.com/IPO",
                  NCName:"purchaseOrder" })


         or


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


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

   If the ConstraintSpec in the Constraint is a GeneralConstraint and
   the GeneralConstraint is a UserDefinedConstraint and the first
   UserDefinedConstraintParameter NamedType is subject to an OBJECT IDENTIFIER with the same
   value as id-constraint-dtd-element from the SchemaLanguageIntegration
   module ATTRIBUTE-REF or ELEMENT-REF encoding
   instruction then the translation of the ConstrainedType is an element with
   the [local name] "type".  An element attribute with the [local name] "choice"
   is "ref" SHALL be
   added to the [children] [attributes] of the <type> element.  An element with
   the [local name] "element" <attribute> or <element> element, as
   appropriate.  The [normalized value] of this attribute is added to the [children] RXER
   encoding of the <choice>




Legg & Prager           Expires 17 December 2004               [Page 29]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   element.  An QNameValue from the encoding instruction.

   If a NamedType is subject to a REF-AS-ELEMENT encoding instruction
   then an attribute with the [local name] "context" is "elementType" SHALL be added
   to the [attributes] of the <element> element.  The [normalized value]
   of this attribute is the string value RXER encoding of the second
   UserDefinedConstraintParameter.  An NameValue from the
   REF-AS-ELEMENT encoding instruction.

   If the ContextParameter is present in the RefParameters in the
   ATTRIBUTE-REF, ELEMENT-REF or REF-AS-ELEMENT encoding instruction
   then an attribute with the [local name]
   "elementType" is also "context" SHALL be added to
   the [attributes] of the <attribute> or <element>
   element. element, as
   appropriate.  The [normalized value] of this attribute is the string
   value of the third UserDefinedConstraintParameter.


   Example


      AnyType (CONSTRAINED BY {
                  OBJECT IDENTIFIER:id-constraint-dtd-element,
                  AnyURI:"http://www.example.com/inventory",
                  Name:"product" })


         or


      Contained-DTD-Element {
          "http://www.example.com/inventory", "product"
      }


      <type>
       <choice>
        <element context="http://www.example.com/inventory"
                 elementType="product"/>
       </choice>
      </type>


   If none of the previous cases AnyURIValue in this section apply to the Constraint
   then the translation of ContextParameter.  If the ConstrainedType
   CanonicalizationParameter is either present in the attribute
   form translation of an anytype reference, or RefParameters in the element form
   translation of an anytype reference.


   The attribute form translation of an anytype reference is
   encoding instruction then an attribute with the [local name] "type".
   "canonicalization" SHALL be added to the [attributes] of the
   <attribute> or <element> element, as appropriate.  The
   [normalized value] of this attribute is a qualified name with the namespace name
   "http://xmled.info/ns/ASN.1" and the local part "AnyType".


   The element form translation string value of an anytype reference is an element
   with the [local name] "type".  An attribute with
   AnyURIValue in the [local name]
   "ref" CanonicalizationParameter.

   If a NamedType is added not subject to an ATTRIBUTE-REF, ELEMENT-REF or
   REF-AS-ELEMENT encoding instruction then the [attributes] translation of the <type> element.  The
   [normalized value] Type
   in the NamedType SHALL be added to the content of this attribute the <attribute>,
   <content>, <element>, <member> or <item> element, as appropriate.  If
   the enclosing combining type is a qualified name with SEQUENCE, SET or CHOICE type and
   the
   namespace name "http://xmled.info/ns/ASN.1" Type in the NamedType is a DummyReference and the local part
   "AnyType".


   Usually TagDefault for
   the translator module containing the NamedType is free to choose either "AUTOMATIC TAGS" then an
   attribute form translation of the Type in the NamedType SHALL NOT be
   used, and an attribute with the [local name] "explicit" and
   [normalized value] "true" or "1" SHALL be added to the [attributes]
   of the <type> element form resulting from the translation for an anytype reference, however of the Type in some
   contexts
   the NamedType.  Where the automatic tagging transformation applies,
   this attribute forms of indicates that explicit tagging applies to the Type are explicitly disallowed. in
   the NamedType instead of the usual implicit tagging.

   Example

      CHOICE {



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 30] 32]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004                April 11, 2005


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

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

6.12.2.  Constraint  SequenceType Translation

   The translation of a Constraint SequenceType is an element with the translation of [local name]
   "type".  An element with the
   ConstraintSpec followed by [local name] "sequence" SHALL be added
   to the translation [children] of the ExceptionSpec
   (possibly empty). <type> element.  The translation of a ConstraintSpec is each
   ComponentType in the translation ComponentTypeList of the
   contained SubtypeConstraint or GeneralConstraint.


   The translation initial
   RootComponentTypeList, if present, SHALL be appended to the
   [children] of a SubtypeConstraint the <sequence> element.

   If the ExtensionAndException is present then an element with the translation
   [local name] "extension" SHALL be appended to the [children] of the
   contained ElementSetSpecs.


   The
   <sequence> element, and the translation of a GeneralConstraint is the translation ExceptionSpec
   (possibly empty) SHALL be added to the [children] of the
   contained UserDefinedConstraint, TableConstraint or
   ContentsConstraint.


6.12.3.  UserDefinedConstraint Translation <extension>
   element.

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

   If the ExtensionEndMarker is an element with present then the
   [local name] "constrainedBy".  The translation of each
   UserDefinedConstraintParameter is



Legg & Prager            Expires 11 October 2005               [Page 33]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   ComponentType in the final RootComponentTypeList SHALL be appended to
   the [children] of the
   <constrainedBy> <sequence> element.

   The translation of a UserDefinedConstraintParameter of the
   "Governor : Value" form an ExtensionAdditionGroup is an element with the
   [local name]
   "valueParameter".  The content "extensionGroup".  If the VersionNumber is present then
   an attribute with the [local name] "version" SHALL be added to the
   [attributes] of the <valueParameter> element <extensionGroup> element.  The [normalized value]
   of this attribute is the
   translation number of the Type VersionNumber.  The
   translation of each ComponentType in the Governor followed by ExtensionAdditionGroup SHALL
   be appended to the translation [children] of the Value. <extensionGroup> element.

   The translation of a UserDefinedConstraintParameter ComponentType of the
   "Governor : ValueSet" "NamedType" form is an element with the [local name]
   "valueSetParameter".  The content of the <valueSetParameter> element
   is the translation of the Type in the Governor followed by the
   normal translation of the ValueSet. NamedType.

   The translation of a UserDefinedConstraintParameter ComponentType of the
   "Governor : Object" "NamedType OPTIONAL" form
   is an element with the [local name]
   "objectParameter". "optional".  The content of the <objectParameter> element is
   the normal
   translation of the DefinedObjectClass in the Governor followed by NamedType SHALL be added to the translation [children] of the Object.
   <optional> element.

   The translation of a UserDefinedConstraintParameter ComponentType of the
   "Governor : ObjectSet" "NamedType DEFAULT Value"
   form is an element with the [local name]
   "objectSetParameter". "optional".  The content of the <objectSetParameter>
   element is the normal
   translation of the DefinedObjectClass in the Governor
   followed by NamedType SHALL be added to the translation [children] of the ObjectSet.


   The translation of a UserDefinedConstraintParameter that is a Type is




Legg & Prager           Expires 17 December 2004               [Page 31]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   an
   <optional> element.  An element with the [local name] "typeParameter". "default" SHALL
   be appended to the [children] of the <optional> element.  The translation content
   of
   that Type the <default> element is added to the content translation of the <typeParameter> element. Value.

   The translation of a UserDefinedConstraintParameter that is a
   DefinedObjectClass ComponentType of the "COMPONENTS OF Type" form
   is an element with the [local name]
   "classParameter". "componentsOf".  The translation
   of that DefinedObjectClass is the Type SHALL be added to the content of the <classParameter> <componentsOf>
   element.


6.12.4.  TableConstraint

   Example

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

      <type>
       <sequence>
        <element name="one" type="asn1:INTEGER"/>



Legg & Prager            Expires 11 October 2005               [Page 34]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


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

6.12.3.  SetType Translation

   The translation of a TableConstraint that is SetType follows the same procedure as a SimpleTableConstraint
   is an element with
   SequenceType except that SetType replaces SequenceType, "SET"
   replaces "SEQUENCE", and the [local name] "table".  The translation of the
   ObjectSet in the SimpleTableConstraint "set" is added to the content used instead of the
   <table> element.
   "sequence".

6.12.4.  ChoiceType Translation

   The translation of a TableConstraint ChoiceType that is not subject to a
   ComponentRelationConstraint UNION
   encoding instruction is an element with the [local name]
   "table".  The translation of the DefinedObjectSet in "type".  An
   element with the
   ComponentRelationConstraint is [local name] "choice" SHALL be added to the content
   [children] of the <table> <type> element.  The normal translation of each AtNotation is
   NamedType in the RootAlternativeTypeList SHALL be appended to the
   [children] of the <table> <choice> element.


   The translation of an AtNotation

   If the ExtensionAndException is present then an element with the
   [local name]
   "restrictBy".  An attribute with the [local name] "component" "extension" is
   added appended to the [attributes] [children] of the <restrictBy> element.  The
   [normalized value]
   <choice> element, and the translation of this attribute the ExceptionSpec (possibly
   empty) is added to the concatenation [children] of the <extension> element.

   The translation of zero,
   one or more "../" strings, one for each Level ExtensionAdditionAlternativesGroup or
   NamedType in the AtNotation
   (including ExtensionAdditionAlternatives (if any) SHALL be
   appended to the empty one), followed by a "/" (U+002F) separated list [children] 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>
       </constrained>
      </type>


6.12.5.  ContentsConstraint Translation





Legg & Prager           Expires 17 December 2004               [Page 32]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004 <extension> element.  The normal
   translation of a ContentsConstraint the NamedType is used.

   The translation of an ExtensionAdditionAlternativesGroup is an
   element with the [local name] "contents". "extensionGroup".  If the ContentsConstraint VersionNumber
   is of the "CONTAINING Type" form present then an
   element attribute with the [local name] "containing" is "version" SHALL be
   added to the [children] [attributes] of the <contents> <extensionGroup> element.  The translation
   [normalized value] of the Type this attribute is added to the contents number of the <containing> element.


   If the ContentsConstraint is
   VersionNumber.  The normal translation of each NamedType in the "ENCODED BY Value" form then an
   element with the [local name] "encodedBy" is added



Legg & Prager            Expires 11 October 2005               [Page 35]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   ExtensionAdditionAlternativesGroup SHALL be appended to the
   [children] of the <contents> <extensionGroup> element.

   Example

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

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

6.12.5.  Translation of UNION Types

   The translation of a ChoiceType that is subject to a UNION encoding
   instruction follows the Value same procedure as a ChoiceType that is added not
   subject to a UNION encoding instruction except that the contents [local name]
   "union" is used instead of "choice", and the <encodedBy> element.


   If the ContentsConstraint member translation of
   each NamedType is used instead of the
   "CONTAINING Type ENCODED BY Value" form then the content of normal translation.

   In addition, if the
   <contents> element is UNION encoding instruction has a PrecedenceList
   then an element attribute with the [local name] "containing"
   followed by an element with "precedence" SHALL be added
   to the [local name] "encodedBy".  The
   translation [attributes] of the Type <union> element.  The [normalized value]
   of this attribute is added to the contents white space separated list of the <containing>
   element, and RXER
   encodings [RXER] of the translation effective names [RXEREI] of the Value is added NamedType
   instances corresponding to the contents of identifiers in the <encodedBy> element. PrecedenceList.

   Example

      [RXER:UNION PRECEDENCE utf8 visible] CHOICE {
          printable  PrintableString,



Legg & Prager            Expires 11 October 2005               [Page 36]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


          teletex    TeletexString,
          visible    [RXER:NAME AS "ascii"] VisibleString,
          ...,
          utf8       UTF8String
      }

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

6.12.6.  ExceptionSpec  SequenceOfType Translation

   The translation of a non-empty ExceptionSpec SequenceOfType that is not subject to a LIST
   encoding instruction is an element with the [local name] "exception".


   If the ExceptionSpec is a SignedNumber then the content of the
   <exception> "type".  An
   element is with the translation of a notional INTEGER Type
   followed by [local name] "sequenceOf" SHALL be added to the translation of a notional Value
   [children] of the INTEGER type
   with the IntegerValue of SignedNumber. <type> element.

   If the ExceptionSpec SequenceOfType is a DefinedValue then the content of the
   <exception> element is "SEQUENCE OF NamedType" form then the
   normal translation of a notional INTEGER Type
   followed by the translation NamedType SHALL be added to the content of
   the DefinedValue. <sequenceOf> element.

   If the ExceptionSpec SequenceOfType is of the "Type : Value" "SEQUENCE OF Type" form then the content
   of the <exception> an
   element is with the translation [local name] "element" SHALL be added to the
   [children] of the Type followed by <type> element.  An attribute with the translation [local name]
   "name" and [normalized value] "item" SHALL be added to the
   [attributes] of the Value.


   Examples


      !10


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


      !myValue


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




Legg & Prager           Expires 17 December 2004               [Page 33]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



      !PrintableString:"failure"


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


7.  Translation of Values


   The translation of a Value is <element> element.  An attribute with the translation
   [local name] "identifier" and empty [normalized value] SHALL be added
   to the [attributes] of either a
   BuiltinValue, ReferencedValue or ObjectClassFieldValue. the <element> element.  The translation of a ReferencedValue is the translation
   Type SHALL be added to the content of either a
   DefinedValue or a ValueFromObject. the <element> element.

   Examples


      zero

      SEQUENCE OF INTEGER ::= 0


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


      integerList

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




Legg & Prager            Expires 11 October 2005               [Page 37]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


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


      <namedValue name="integerList">

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


7.1.  DefinedValue

6.12.7.  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. LIST Types

   The attribute form translation of a value reference is an attribute
   with the [local name] "value".  The [normalized value] of this
   attribute SequenceOfType that is the qualified name referencing the value definition (see
   Section 5.1).


   The element form translation of subject to a value reference LIST
   encoding instruction is an element with the [local name] "value". "type".  An attribute
   element with the [local name] "meta",
   [namespace name] "http://xmled.info/ns/ASN.1" and [normalized value]
   "true" or "1" (e.g., asn1:meta="true") is "list" SHALL be added to the [attributes] [children]
   of the <value> <type> element.  An attribute with  The item translation of the [local name] "ref" is




Legg & Prager           Expires 17 December 2004               [Page 34]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004 NamedType SHALL
   be added to the [attributes] content of the <value> <list> element.  The
   [normalized value] of this attribute

      ASIDE: SequenceOfType is necessarily of the qualified name
   referencing the value definition (see Section 5.1).


   Usually the translator is free to choose either an attribute form or
   element
      "SEQUENCE OF NamedType" form translation for a DefinedValue, however in some contexts
   attribute forms LIST encoding instruction.

   Example

      [RXER:LIST] SEQUENCE OF number INTEGER

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

6.12.8.  SetOfType Translation

   The translation of Value are explicitly disallowed.


   If a DefinedValue is a DummyReference then SetOfType follows the translation of same procedure as a
   SequenceOfType except that SetOfType replaces SequenceOfType, "SET"
   replaces "SEQUENCE", and the
   DefinedValue [local name] "setOf" is the translation used instead of the Value in the ActualParameter
   corresponding to the DummyReference.
   "sequenceOf".

6.13.  Translation of Constrained Types

   If a DefinedValue ConstrainedType is a ParameterizedValue of the "Type Constraint" form then the
   translation of the
   Value ConstrainedType is an element with the translation of
   [local name] "type".  An element with the Value on [local name] "constrained"
   SHALL be added to the right hand side [children] of the
   referenced ParameterizedValueAssignment.


7.2.  BuiltinValue Translation <type> element.  The translation content
   of a BuiltinValue the <constrained> element is either the attribute form translation of a built-in value, or the element form Type followed
   by the translation of a
   built-in value. the Constraint.

   The attribute form translation of a built-in value ContainedType that is an attribute
   with the [local name] "literal" whose [normalized value] a TypeWithConstraint is
   the RXER
   [RXER] encoding of the BuiltinValue.


   The element form translation of the TypeWithConstraint.




Legg & Prager            Expires 11 October 2005               [Page 38]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   Definition: A LowerEndpoint or UpperEndpoint is a built-in simple endpoint if
   it is closed and its value is "MIN", "MAX" or a SignedNumber in an element with
   the [local name] "value" whose content is
   IntegerValue in a BuiltinValue in the RXER encoding Value of the
   BuiltinValue, except that endpoint.

   Definition: A SizeConstraint is a value of simple range if the EXTERNAL type (or Constraint in
   the SizeConstraint contains only a subtype
   thereof) ValueRange (i.e., a ValueRange in
   a SubtypeElements in an Elements in a single IntersectionElements in
   a single Intersections in a Unions in an ElementSetSpec in a lone
   RootElementSetSpec in an ElementSetSpecs in a SubtypeConstraint in a
   lone ConstraintSpec in the Constraint) and both endpoints are simple.

   Definition: A Constraint is encoded according to 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 associated type defined Constraint).

   If the Constraint or SizeConstraint in
   Clause 34.5 a TypeWithConstraint is a
   simple range then the compact translation of X.680 [X680]. the TypeWithConstraint
   MAY be used, otherwise the full translation of the TypeWithConstraint
   is used.

   The rules for translating compact translation of a Value apply
   recursively to any nested Value except that TypeWithConstraint is the [local name] translation of a
   nested Value will be determined according to RXER by
   the governing
   ASN.1 type parent type.  If the value of the enclosing Value.  An lower endpoint is not "MIN" or
   "0" then an attribute with the [local name] "meta", [namespace name] "http://xmled.info/ns/ASN.1"
   and [normalized value] "false" or "0" (e.g., asn1:meta="false") MAY "minSize" SHALL be added
   to the [attributes] of the <value> element.


   Note that <sequenceOf>, <setOf> or <list> element
   from the asn1:meta translation of the parent type.  The [normalized value] of
   this attribute operates as a switch that indicates
   whether is the content value of the <value> element containing lower endpoint.  If the attribute value of
   the upper endpoint is interpreted as ASN.1 Schema notation or as not "MAX" then an RXER encoding.


   The attribute form translation of BuiltinValue with the
   [local name] "maxSize" SHALL NOT be used if, added to the RXER encoding [attributes] of the Value contains items other than character
   information items,
   <sequenceOf>, <setOf> or <list> element.  The [normalized value] of
   this attribute forms is the value of Value have been explicitly
   disallowed, or the BuiltinValue has a nested Value that is not a
   BuiltinValue.





Legg & Prager           Expires 17 December 2004               [Page 35]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



7.3.  ValueFromObject Translation upper endpoint.

   The full translation of a ValueFromObject TypeWithConstraint is an element with the
   [local name] "value".  An attribute with the [local name] "meta",
   [namespace name] "http://xmled.info/ns/ASN.1" and [normalized value]
   "true" or "1" (e.g., asn1:meta="true") is added to the [attributes]
   of the <value> element. "type".  An element with the [local name]
   "fromObjects" is "constrained"
   SHALL be added to the [children] of the <value> <type> element.  The translation content
   of the ReferencedObjects in the ValueFromObject <constrained> element is
   added to the content of the <fromObjects> element.


   The translation of the FieldName in the ValueFromObject is appended
   to parent type
   followed by the content translation of the <fromObjects> element.


7.4.  ObjectClassFieldValue Constraint or SizeConstraint.

   Examples

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

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



Legg & Prager            Expires 11 October 2005               [Page 39]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


      </type>

      SEQUENCE SIZE(0..10) OF number INTEGER

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

      SEQUENCE SIZE(1..limit) OF number INTEGER

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


6.13.1.  Constraint Translation


   If an ObjectClassFieldValue is a BuiltinValue in a FixedTypeFieldVal
   then the

   The translation of the ObjectClassFieldValue a Constraint is the translation of the BuiltinValue.


   If an ObjectClassFieldValue is a ReferencedValue in a
   FixedTypeFieldVal then
   ConstraintSpec followed by the translation of the ObjectClassFieldValue ExceptionSpec
   (possibly empty).

   The translation of a ConstraintSpec is the translation of the ReferencedValue.


   If an ObjectClassFieldValue is an OpenTypeFieldVal then the
   contained SubtypeConstraint or GeneralConstraint.

   The translation of the ObjectClassFieldValue a SubtypeConstraint is the translation of the
   Value in the OpenTypeFieldVal.  Note that if the Value is
   contained ElementSetSpecs.

   The translation of a
   BuiltinValue (in which case it will be RXER encoded) then the Type in
   the OpenTypeFieldVal should be indicated by GeneralConstraint is the xsi:type attribute,
   if it comprises one translation of the productions in Table 1.


8.
   contained UserDefinedConstraint, TableConstraint or
   ContentsConstraint.

6.13.2.  UserDefinedConstraint Translation of Value Sets

   The translation of a ValueSet UserDefinedConstraint is an element with the



Legg & Prager            Expires 11 October 2005               [Page 40]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   [local name]
   "valueSet". "constrainedBy".  The translation of the ElementSetSpecs in the ValueSet
   is added each
   UserDefinedConstraintParameter SHALL be appended to the [children] of
   the <valueSet> <constrainedBy> element.


   Example


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


      <valueSet>
       <union>
        <value>1</value>
        <range>
         <minInclusive literal="3"/>
         <maxInclusive literal="7"/>




Legg & Prager           Expires 17 December 2004               [Page 36]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



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


8.1.  ElementSetSpecs Translation

   The translation of an ElementSetSpecs where a UserDefinedConstraintParameter of the ellipsis ("...")
   "Governor : Value" form is
   not present an element with the [local name]
   "valueParameter".  The content of the <valueParameter> element is the
   translation of the ElementSetSpec Type in the
   RootElementSetSpec. Governor followed by the translation
   of the Value.

   The translation of an ElementSetSpecs where a UserDefinedConstraintParameter of the ellipsis ("...")
   "Governor : ValueSet" form is
   present an element with the [local name]
   "valueSetParameter".  The content of the <valueSetParameter> element
   is the translation of the ElementSetSpec Type in the
   RootElementSetSpec Governor followed by the
   translation of the ValueSet.

   The translation of a UserDefinedConstraintParameter of the
   "Governor : Object" form is an element with the [local name]
   "extension".  If an AdditionalElementSetSpec
   "objectParameter".  The content of the <objectParameter> element is present then
   the translation of the ElementSetSpec DefinedObjectClass in the AdditionalElementSetSpec is
   added to the [children] of the <extension> element.


8.2.  ElementSetSpec Translation


   If Governor followed by
   the ElementSetSpec is translation of the "ALL Exclusions" form then the Object.

   The translation of a UserDefinedConstraintParameter of the ElementSetSpec
   "Governor : ObjectSet" form is an element with the [local name]
   "all".  An
   "objectSetParameter".  The content of the <objectSetParameter>
   element is the translation of the DefinedObjectClass in the Governor
   followed by the translation of the ObjectSet.

   The translation of a UserDefinedConstraintParameter that is a Type is
   an element with the [local name] "except" is "typeParameter".  The translation of
   the Type SHALL be added to the
   [children] content of the <all> <typeParameter>
   element.

   The translation of a UserDefinedConstraintParameter that is a
   DefinedObjectClass is an element with the Elements in [local name]
   "classParameter".  The translation of the Exclusions is DefinedObjectClass SHALL be
   added to the [children] content of the <except> <classParameter> element.


   If the ElementSetSpec is of the "Unions" form then the

6.13.3.  TableConstraint Translation

   The translation of
   the ElementSetSpec a TableConstraint that is a SimpleTableConstraint
   is an element with the [local name] "table".  The translation of the Unions.


   If
   ObjectSet in the Unions has only one Intersections then SimpleTableConstraint SHALL be added to the translation content
   of the
   Unions is the <table> element.

   The translation of a TableConstraint that Intersections, otherwise the
   translation of the Unions is a
   ComponentRelationConstraint is an element with the [local name]
   "union".
   "table".  The translation of each Intersections is appended to the
   [children] of DefinedObjectSet in the <union> element.



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 37] 41]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   If the Intersections has only one IntersectionElements then the
   translation of the Intersections is the translation of that
   IntersectionElements, otherwise                April 11, 2005


   ComponentRelationConstraint SHALL be added to the translation content of the Intersections
   is an element with the [local name] "intersection".
   <table> element.  The translation of each IntersectionElements is AtNotation SHALL be
   appended to the [children] of the
   <intersection> <table> element.


   If the IntersectionElements is of the "Elems Exclusions" form then
   the

   The translation of the IntersectionElements an AtNotation is an element with the [local name] "all".
   "restrictBy".  The content of the <all> <restrictBy> element is the
   translation of the Elements in the Elems followed
   character string formed by an element with the [local name] "except".  The translation concatenation of the Elements zero, one or more
   "../" strings, one for each Level in the
   Exclusions is added to the [children] of the <except> element.


   If the IntersectionElements is of the "Elements" form then AtNotation (including the
   translation
   empty one), followed by a "/" (U+002F) separated list of the IntersectionElements is the translation RXER
   encodings [RXER] of the
   Elements.


   The translation effective names [RXEREI] of an Elements is the translation of NamedType
   instances identified by the
   SubtypeElements, ObjectSetElements or ElementSetSpec, as appropriate.


8.3.  SubtypeElements Translation ComponentIdList identifiers.  If a SubtypeElements
   NamedType is a SingleValue subject to an ATTRIBUTE or ATTRIBUTE-REF encoding
   instruction then the translation encoding of the
   SubtypeElements effective name is prefixed with
   the "@" (U+0040) character.

   Examples

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

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

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

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



Legg & Prager            Expires 11 October 2005               [Page 42]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


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

6.13.4.  ContentsConstraint Translation

   The translation of the Value, except that a ContentsConstraint is an
   attribute form of element with the Value translation SHALL NOT be used.
   [local name] "contents".

   If a SubtypeElements is a ContainedSubtype then the translation ContentsConstraint is of the SubtypeElements is "CONTAINING Type" form then an
   element with the [local name] "includes". "containing" SHALL be added to the
   [children] of the <contents> element.  The translation of the Type in the ContainedSubtype is
   SHALL be added to the
   content contents of the <includes> <containing> element.

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


   If a SubtypeElements is a SizeConstraint "ENCODED BY Value" form then the translation of the
   SubtypeElements is an
   element with the [local name] "size".  The
   content of the <size> element is "encodedBy" SHALL be added to the
   [children] of the <contents> element.  The translation of the Constraint in Value
   SHALL be added to the SizeConstraint. contents of the <encodedBy> element.

   If a SubtypeElements the ContentsConstraint is a TypeConstraint of the
   "CONTAINING Type ENCODED BY Value" form then the translation content of the
   SubtypeElements
   <contents> element is an element with the [local name] "typeConstraint".
   The content of the <typeConstraint> "containing"
   followed by an element is with the [local name] "encodedBy".  The
   translation of the Type in SHALL be added to the TypeConstraint.


   If a SubtypeElements is a PermittedAlphabet then contents of the
   <containing> element, and the translation of the SubtypeElements Value SHALL be added
   to the contents of the <encodedBy> element.

6.13.5.  ExceptionSpec Translation

   The translation of an empty ExceptionSpec is empty.

   The translation of a non-empty ExceptionSpec is an element with the
   [local name] "from".  The "exception".

   If the ExceptionSpec is a SignedNumber then the content of the <from>
   <exception> element is the translation of the Constraint in a notional INTEGER Type



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 38] 43]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   the PermittedAlphabet.


   If a SubtypeElements is an InnerTypeConstraints then                April 11, 2005


   followed by the translation of a notional Value of the SubtypeElements is INTEGER type
   with the translation IntegerValue of the
   InnerTypeConstraints. SignedNumber.

   If a SubtypeElements the ExceptionSpec is a PatternConstraint DefinedValue then the translation of
   the SubtypeElements is an element with the [local name] "pattern".
   The content of the <pattern>
   <exception> element is the translation of a notional INTEGER Type
   followed by the Value
   in the PatternConstraint.


8.3.1.  ValueRange Translation


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

   If the LowerEndpoint in the ValueRange ExceptionSpec is of the "LowerEndValue <" "Type : Value" 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> <exception> element is the translation of the Value in the LowerEndValue.


   If the LowerEndpoint in Type followed by
   the ValueRange is translation of the "LowerEndValue" form
   and the LowerEndValue Value.

   Examples

      !10

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

      !myValue

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

      !PrintableString:"failure"

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

6.14.  Tag Defaults and Extension Defaults

   When a DummyReference or parameterized reference is not "MIN" then an element replaced by the
   definition it references the TagDefault and ExtensionDefault applying
   to any nested type definitions may no longer accord with the
   [local name] "minInclusive" is original
   ASN.1 specification.  This section describes attributes that are
   added to the [children] of the <range>
   element.  The content of the <minInclusive> element is the translation of a type definition so that the Value in the LowerEndValue. appropriate
   defaults for tagging and extensibility are applied.

   Definition: For encoding rules that use type tagging, a tag default
   affects how those tags are constructed.  Its value is either
   EXPLICIT, IMPLICIT or AUTOMATIC.  If the LowerEndpoint TagDefault in the ValueRange
   ModuleDefinition for a module is of empty then the "LowerEndValue" form
   and tag default for the LowerEndValue
   module is "MIN" then an element with the [local name]
   "minInclusive" MAY be added to EXPLICIT, otherwise the [children] of tag default for the <range> element.


   If module is the UpperEndpoint
   first keyword in the ValueRange TagDefault.  The tag default for a Type is the
   tag default of the "< UpperEndValue"
   form then an element with module containing the [local name] "maxExclusive" is added Type.

   Definition: An extension default indicates whether types are assumed
   to be extensible in the [children] absence of the <range> element. an explicit extension marker
   (which translates into an <extension> element).  Its value is either
   TRUE or FALSE.  If the UpperEndValue ExtensionDefault in the ModuleDefinition for a
   module is not
   "MAX" empty then the content of extension default for the <maxExclusive> element module is FALSE,
   otherwise the
   translation of extension default for the Value in module is TRUE.  The



Legg & Prager            Expires 11 October 2005               [Page 44]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   extension default for a Type is the UpperEndValue.


   If extension default of the UpperEndpoint in module
   containing the ValueRange Type.

   Definition: The contributing Type for a <type> element is of the "UpperEndValue" form
   and the UpperEndValue is not "MAX" then an element with the
   [local name] "maxInclusive" is added to Type
   whose translation produces the [children] content of the <range> that <type> element.

      ASIDE: The content translation of the <maxInclusive> element a Type that is a DummyReference,
      ParameterizedType or ParameterizedValueSetType (in a DefinedType
      in a ReferencedType) is normally the translation of the Value in the UpperEndValue.


   If the UpperEndpoint in referenced
      Type.  In such cases, the ValueRange referencing Type is of the "UpperEndValue" form
   and the UpperEndValue therefore not a
      contributing Type.

   Definition: If a <type> element is "MAX" then an not enclosed by another <type>
   element with then the [local name]
   "maxInclusive" MAY be added to inherited tag default for that <type> element is the [children]
   tag default of the <range> element.





Legg & Prager           Expires 17 December 2004               [Page 39]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   Examples


      1..10


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


      0..MAX


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


      0<..<MAX


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


8.3.2.  InnerTypeConstraints Translation


   The module whose translation of an InnerTypeConstraints of contains the
   "WITH COMPONENT SingleTypeConstraint" form is an element with <type>
   element, otherwise the
   [local name] "withComponent".  The content of inherited tag default for the <withComponent> <type> element
   is the translation tag default of the Constraint in contributing Type for the
   SingleTypeConstraint.


   The translation of an InnerTypeConstraints innermost
   enclosing <type> element.

   If a contributing Type is not a DefinedType and is not one of the
   "WITH COMPONENTS MultipleTypeConstraints" form is an
   productions in Table 1 (see Section 6.3) and the inherited tag
   default for its associated <type> element with is not the
   [local name] "withComponents".


   If same as the MultipleTypeConstraints is a PartialSpecification tag
   default of the contributing Type then an attribute with the
   [local name] "partial" and the [normalized value]
   "true" or "1" is "tagDefault" SHALL be added to the [attributes] of the <withComponents>
   element.  If the MultipleTypeConstraints is a FullSpecification then
   <type> element, otherwise an attribute with the [local name] "partial" and the
   [normalized value] "false" or "0"
   "tagDefault" MAY be added to the [attributes] of the <withComponents> <type> element.
   The translation [normalized value] of each NamedConstraint in the
   MultipleTypeConstraints this attribute is appended to the [children] tag default of the
   <withComponents> element.


   The translation of
   contributing Type.

   Definition: If a NamedConstraint <type> element is an not enclosed by another <type>
   element with the
   [local name] "component".  An attribute with then the [local name] "name"




Legg & Prager           Expires 17 December 2004               [Page 40]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004 inherited extension default for that <type> element
   is added to the [attributes] extension default of the <component> element.  The
   [normalized value] of this attribute module whose translation contains the
   <type> element, otherwise the inherited extension default for the
   <type> element is the identifier extension default of the
   NamedConstraint.


   If contributing Type for
   the PresenceConstraint innermost enclosing <type> element.

   If a contributing Type is not a DefinedType and is not one of the ComponentConstraint of
   productions in Table 1 and the
   NamedConstraint inherited extension default for its
   associated <type> element is not empty the same as the extension default of
   the contributing Type then an attribute with the [local name]
   "use" is
   "extensibilityImplied" SHALL be added to the [attributes] of the <component> element.  The
   [normalized value] of this
   <type> element, otherwise an attribute is with the text [local name]
   "extensibilityImplied" MAY be added to the [attributes] of the
   PresenceConstraint, either "PRESENT", "ABSENT" or "OPTIONAL". <type>
   element.  If the ValueConstraint in the ComponentConstraint of the
   NamedConstraint extension default is not empty TRUE then the the translation
   [normalized value] of the
   Constraint in the ValueConstraint this attribute is added to the [children] of the
   <component> element.


9. "true" or "1", otherwise it
   is "false" or "0".

7.  Translation of Object Classes


   The translation of Values



Legg & Prager            Expires 11 October 2005               [Page 45]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   A Value in an ObjectClass ASN.1 specification is a mix of literal values (e.g.,
   numbers and strings) and notations for referencing defined values.
   Likewise, the ASN.1 Schema translation of either a
   DefinedObjectClass, an ObjectClassDefn or a ParameterizedObjectClass.


   If an ObjectClass Value is a ParameterizedObjectClass then the translation mix of the ObjectClass markup
   for literal values and markup for referencing notations
   (meta-values).  A Value is categorized by the translation of following definitions.

   Definition: A Value is a literal value if and only if it is not a
   meta-value.

   Definition: A Value is a meta-value if and only if:

   (a) the ObjectClass on Value is a BuiltinValue, and

       (1) the right
   hand side of BuiltinValue is a TaggedValue and the referenced ParameterizedObjectClassAssignment.


   The ObjectClass that substitutes for Value in the
           TaggedValue is a ParameterizedObjectClass meta-value, or

       (2) the BuiltinValue is
   potentially in a different module scope to SequenceValue or SetValue and the surrounding
   translation, therefore
           ComponentValueList of the SequenceValue or SetValue contains
           a NamedValue where the translation of the ObjectClass may require
   a tagDefault or extensibilityImplied attribute, according to corresponding
           NamedType (from the
   provisions governing type of Section 5.9.


9.1.  DefinedObjectClass Translation


   If a DefinedObjectClass the Value) is not an objectclassreference (not
           <element> element and the Value of the NamedValue is a
   DummyReference), an ExternalObjectClassReference
           meta-value, or

       (3) the BuiltinValue is a
   UsefulObjectClassReference then ChoiceValue where the translation of
           the
   DefinedObjectClass is either NamedType corresponding to the attribute form translation identifier of the
           ChoiceValue is not an
   object class reference, <element> element and the Value of the
           ChoiceValue is a meta-value, or

       (4) the BuiltinValue is a SequenceOfValue with a NamedValueList
           that contains a NamedValue where the element form translation of an object
   class reference.


   The attribute form translation the
           corresponding NamedType (from the governing type of an object class reference the
           Value) is not an
   attribute with <element> element and the [local name] "class".  The [normalized value] Value of
   this attribute is the qualified name referencing
           NamedValue is a meta-value, or

   (b) the object class
   definition (see Section 5.1).  In Value is a ReferencedValue, and

       (1) the case of ReferencedValue is a
   UsefulObjectClassReference ValueFromObject, or

       (2) the namespace name ReferencedValue is
   "http://xmled.info/ns/ASN.1" a DefinedValue, and

           (i)   the local part DefinedValue is either "TYPE-
   IDENTIFIER" a valuereference (not a
                 DummyReference) or "ABSTRACT-SYNTAX", as appropriate.


   The element form translation of an object class reference ExternalValueReference, or

           (ii)  the DefinedValue is an




Legg & Prager           Expires 17 December 2004               [Page 41]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   element with a DummyReference and the [local name] "class".  An attribute with Value in
                 the
   [local name] "ref" is added ActualParameter corresponding to the [attributes] of the <class>
   element.  The [normalized value] of this attribute DummyReference
                 is a meta-value, or

           (iii) the qualified
   name referencing DefinedValue is a ParameterizedValue and the object class definition.  In Value



Legg & Prager            Expires 11 October 2005               [Page 46]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


                 on the case right hand side of the referenced
                 ParameterizedValueAssignment is a
   UsefulObjectClassReference meta-value, or

   (c) the namespace name Value is
   "http://xmled.info/ns/ASN.1" an ObjectClassFieldValue, and

       (1) the local part ObjectClassFieldValue is either "TYPE-
   IDENTIFIER" an OpenTypeFieldVal, or "ABSTRACT-SYNTAX", as appropriate.


   The translation of

       (2) the DefinedObjectClass ObjectClassFieldValue is a FixedTypeFieldVal, and

           (i)  the same whether the
   object class definition FixedTypeFieldVal is referenced by an objectclassreference a BuiltinValue that satisfies
                case (a), or
   an ExternalObjectClassReference.

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

7.1.  Translation of Literal Values

   The translator translation of a literal value is free to choose either the attribute form
   translation of a literal value, or the element form translation for an object class reference.


   If a DefinedObjectClass is of a DummyReference then the
   literal value.

   The attribute form translation of a literal value is an attribute
   with the DefinedObjectClass [local name] "literal" whose [normalized value] is the translation RXER
   encoding [RXER] of the DefinedObjectClass
   in the ActualParameter corresponding to the DummyReference.


9.2.  ObjectClassDefn Translation Value.

   The element form translation of an ObjectClassDefn a literal value is an element with
   the [local name] "class".  The translation "value" whose content is the RXER encoding of each FieldSpec in the
   ObjectClassDefn
   Value, except that a value of the EXTERNAL type (or a subtype
   thereof) is appended encoded according to the [children] associated type defined in
   Clause 34.5 of X.680 [X.680].  In addition, where the <class> element.


   The translation content of an
   element in the encoding corresponds to a FieldSpec is nested meta-value the
   translation specified in Section 7.2. SHALL be used instead (for the
   content of either a
   TypeFieldSpec, a FixedTypeValueFieldSpec, a
   VariableTypeValueFieldSpec, a FixedTypeValueSetFieldSpec, a
   VariableTypeValueSetFieldSpec, an ObjectFieldSpec or an
   ObjectSetFieldSpec.


9.2.1.  TypeFieldSpec Translation


   The translation of a TypeFieldSpec where that element).  If the TypeOptionalitySpec is
   absent is content of an element with in the [local name] "typeField".


   The translation of
   encoding corresponds to a TypeFieldSpec with nested literal Value that is a TypeOptionalitySpec of
   "OPTIONAL" BuiltinValue
   that is an element with the [local name] "optional". a a SequenceValue, SetValue, ChoiceValue, SequenceOfValue or
   SetOfValue then that nested literal Value MAY be translated as a
   meta-value.  An
   element attribute with the [local name] "typeField" is "meta",
   [namespace name] "http://xmled.info/ns/ASN.1" and [normalized value]
   "false" or "0" (e.g., asn1:meta="false") MAY be added to the [children]
   [attributes] of the <optional> <value> element.

      ASIDE: The translation of a TypeFieldSpec with asn1:meta attribute operates as a TypeOptionalitySpec of
   "DEFAULT" is an element with the [local name] "optional".  An element
   with the [local name] "typeField" is added to switch that indicates
      whether the [children] content of the
   <optional> element.  An element with containing the [local name] "default" attribute is
   appended to the [children] of the <optional> element.
      interpreted as ASN.1 Schema notation (a meta-value) or as an RXER
      encoding (a literal value).

   The content of
   the <default> element is the attribute form translation of a literal value SHALL NOT be used
   if, the Type in RXER encoding of the
   TypeOptionalitySpec. Value contains items other than



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 42] 47]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   An                April 11, 2005


   character information items, attribute with forms of Value have been
   explicitly disallowed, or the [local name] "name" Value has a nested meta-value.

7.2.  Translation of Meta-values

   The translation of a meta-value is added to the
   [attributes] translation of the <typeField> element. either a
   BuiltinValue, a ReferencedValue or an ObjectClassFieldValue.

   The [normalized value] translation of
   this attribute a ReferencedValue is the typefieldreference translation 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 either a
   DefinedValue or a ValueFromObject.

   The translation of a FixedTypeValueFieldSpec where the
   ValueOptionalitySpec is absent for each these cases is described as creating an
   element with the [local name]
   "valueField".


   The translation of "value", which is appropriate for a FixedTypeValueFieldSpec with
   meta-value that stands on its own.  However, a
   ValueOptionalitySpec of "OPTIONAL" is an element with the
   [local name] "optional".  An element with meta-value may also be
   nested within a literal value, in which case the [local name]
   "valueField" is added will be
   determined according to RXER and the [children] governing ASN.1 type of the <optional> element.


   The translation of a FixedTypeValueFieldSpec with
   enclosing literal Value.

   Examples

      zero INTEGER ::= 0

      <namedValue name="zero" type="asn1:INTEGER">
       <value>0</value><!-- A literal value. -->
      </namedValue>

      nothing INTEGER ::= zero

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

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

      <namedValue name="integerList">
       <type>
        <sequenceOf>
         <element name="number" type="asn1:INTEGER"/>
        </sequenceOf>
       </type>
       <value><!-- A literal value. -->
        <number asn1:meta="true" ref="tns:zero"/><!-- A meta-value. -->
        <number>3</number><!-- A literal value. -->
        <number>7</number><!-- A literal value. -->
       </value>
      </namedValue>

7.2.1.  DefinedValue Translation



Legg & Prager            Expires 11 October 2005               [Page 48]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   If a
   ValueOptionalitySpec of "DEFAULT" DefinedValue is a valuereference (not a DummyReference) or an element with
   ExternalValueReference then the [local name]
   "optional".  An element with translation of the [local name] "valueField" DefinedValue is added
   to
   either the [children] attribute form translation of a value reference, or the <optional> element.  An
   element with the
   [local name] "default" is appended to the [children] form translation of the
   <optional> element. a value reference.

   The content of the <default> element is the attribute form translation of the Value in the ValueOptionalitySpec.


   An a value reference is an attribute
   with the [local name] "name" is added to the
   [attributes] of the <valueField> element. "value".  The [normalized value] of this
   attribute is the valuefieldreference of the
   FixedTypeValueFieldSpec, without qualified name referencing the ampersand.  If value definition (see
   Section 5.1).  The attribute form translation SHALL NOT be used if
   the "UNIQUE"
   keyword qualified name is shared by two or more value definitions in
   separate modules, i.e., is ambiguous.

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




Legg & Prager           Expires 17 December 2004               [Page 43]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004 "meta",
   [namespace name] "http://xmled.info/ns/ASN.1" and [normalized value]
   "true" or "1" is SHALL be added to the [attributes] of the <valueField> element, otherwise an <value>
   element.  An attribute with the [local name] "unique" and [normalized value] "false" or "0" MAY "ref" SHALL be added to
   the [attributes] of the <valueField> <value> element.  The
   translation [normalized value] of the Type in the FixedTypeValueFieldSpec
   this attribute 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


   The translation of a FixedTypeValueSetFieldSpec where qualified name referencing the
   ValueSetOptionalitySpec is absent is an element with value definition
   (see Section 5.1).  If the [local name]
   "valueSetField".


   The translation of a FixedTypeValueSetFieldSpec with a
   ValueSetOptionalitySpec of "OPTIONAL" qualified name is shared by two or more
   value definitions in separate modules then an element with the
   [local name] "optional".  An element attribute with the
   [local name]
   "valueSetField" is "context" SHALL be added to the [children] [attributes] of the <optional>
   <value> element.  The translation of a FixedTypeValueSetFieldSpec with a
   ValueSetOptionalitySpec [normalized value] of "DEFAULT" this attribute is an element with the
   [local name] "optional".  An element with the [local name]
   "valueSetField" is added to
   character string value of the [children] AnyURIValue of the <optional> element.
   An element with SCHEMA-IDENTITY
   encoding instruction for the [local name] "default" module containing the value definition
   referenced by the DefinedValue.

      ASIDE: A SCHEMA-IDENTITY encoding instruction is appended to obligatory in
      such cases (see Section 5.1).

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

   If a DefinedValue is a DummyReference then the translation of the <default>
   element
   DefinedValue is the translation of the ValueSet Value in the
   ValueSetOptionalitySpec.


   An attribute with ActualParameter
   corresponding to the [local name] "name" DummyReference.

   If a DefinedValue is added to a ParameterizedValue then the translation of the
   Value is the translation of the Value on the right hand side of the
   referenced ParameterizedValueAssignment.

      ASIDE: Since this section is describing the translation of a
      DefinedValue for a meta-value, the Value that substitutes for a
      DummyReference or ParameterizedValue is necessarily also a
      meta-value.



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 44] 49]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   [attributes] of the <valueSetField> element.                April 11, 2005


7.2.2.  BuiltinValue Translation

   The [normalized value] translation of this attribute a BuiltinValue is the valuesetfieldreference translation of the
   FixedTypeValueSetFieldSpec, without the ampersand. either a
   ChoiceValue, a SequenceValue, a SequenceOfValue, a SetValue or a
   TaggedValue.

   The translation of the Type in the FixedTypeValueSetFieldSpec a TaggedValue is added to the content translation of the <valueSetField> element.


   Example


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


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


9.2.4.  VariableTypeValueFieldSpec Translation contained
   Value (which is necessarily a meta-value).

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


   The translation of a VariableTypeValueFieldSpec with a
   ValueOptionalitySpec of "OPTIONAL" is an element with the
   [local name] "optional".
   "value".  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 attribute with the [local name]
   "optional".  An element with the [local "meta", [namespace name] "valueField" is
   "http://xmled.info/ns/ASN.1" and [normalized value] "true" or "1"
   SHALL be added to the [children] [attributes] of the <optional> <value> element.  An
   element with the same [local name] "default" is appended to the [children] of (i.e., "attribute", "element",
   "content" or "member") as the




Legg & Prager           Expires 17 December 2004               [Page 45]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   <optional> element.  The translation of the Value NamedType
   corresponding to the identifier in the
   ValueOptionalitySpec is ChoiceValue SHALL be added to
   the content [children] of the <default> <value> element.  An attribute with the
   [local name] "name" is SHALL be added to the [attributes] of the <valueField>
   <attribute>, <element>, <content> or <member> element.  The
   [normalized value] of this attribute is the valuefieldreference RXER encoding of the
   VariableTypeValueFieldSpec, without the ampersand.  An element with
   the [local name] "typeFromField" is added to the [children]
   effective name of the
   <valueField> element. NamedType.  The translation of the FieldName Value in the
   VariableTypeValueFieldSpec is
   ChoiceValue SHALL be added to the content of the
   <typeFromField> <attribute>,
   <element>, <content> or <member> element.


   Example


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


      <class>
       <optional>
        <typeField name="Syntax"/>
        <default type="asn1:INTEGER/>
       </optional>
       <valueField name="one">
        <typeFromField fieldName="Syntax"/>
       </valueField>
       <optional>
        <valueField name="two">
         <typeFromField fieldName="Syntax"/>
        </valueField>
       </optional>
       <optional>
        <valueField name="three">
         <typeFromField fieldName="Syntax"/>
        </valueField>
        <default literal="0"/>
       </optional>
      </class>


9.2.5.  VariableTypeValueSetFieldSpec Translation


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




Legg & Prager           Expires 17 December 2004               [Page 46]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004

   The translation of a VariableTypeValueSetFieldSpec with a
   ValueSetOptionalitySpec of "OPTIONAL" SequenceValue or SetValue is an element with the
   [local name] "optional". "value".  An element attribute with the [local name]
   "valueSetField" is "meta",
   [namespace name] "http://xmled.info/ns/ASN.1" and [normalized value]
   "true" or "1" SHALL be added to the [children] [attributes] of the <optional> <value>
   element.  The translation of a VariableTypeValueSetFieldSpec with a
   ValueSetOptionalitySpec each NamedValue in the
   ComponentValueList of "DEFAULT" the SequenceValue or SetValue SHALL be appended
   to the [children] of the <value> element, in the order in which their
   corresponding NamedType instances appear in the definition of the
   governing type.

   The translation of a SequenceOfValue is an element with the
   [local name] "optional". "value".  An element attribute with the [local name]
   "valueSetField" is "meta",
   [namespace name] "http://xmled.info/ns/ASN.1" and [normalized value]
   "true" or "1" SHALL be added to the [attributes] of the <value>
   element.

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

   If the SequenceOfValue has a ValueList then an element with the
   [local name] "default" is "element" SHALL be appended to the [children] of the <optional>
   <value> element for each Value in the ValueList.  An attribute with
   the [local name] "name" and [normalized value] "item" SHALL be added



Legg & Prager            Expires 11 October 2005               [Page 50]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   to the [attributes] of the <element> element.  The translation of the
   Value (from the ValueList) SHALL be added to the content of the <default>
   element
   <element> element.

   The translation of a NamedValue is an element with the same
   [local name] as the translation of the ValueSet in the
   ValueSetOptionalitySpec. corresponding NamedType, i.e.,
   "attribute", "element", "content" or "item".  An attribute with the
   [local name] "name" is SHALL be added to the [attributes] of the <valueSetField>
   element.  The [normalized value] of this attribute is the valuesetfieldreference RXER
   encoding of the
   VariableTypeValueSetFieldSpec, without the ampersand.  An element
   with the [local name] "typeFromField" is added to the [children] effective name of the <valueSetField> element. NamedType.  The translation of
   the FieldName in the
   VariableTypeValueSetFieldSpec is Value SHALL be added to the content of the
   <typeFromField> element.


   Example


      CLASS

   Examples

      -- This is the governing type.
      MyType ::= SEQUENCE {
          &Syntax DEFAULT
           one    [ATTRIBUTE] INTEGER,
          &One    &Syntax,
          &Two    &Syntax OPTIONAL,
          &Three  &Syntax DEFAULT
           two    INTEGER,
           three  [ATTRIBUTE][LIST] SEQUENCE OF number INTEGER
      }

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

      myValue1 MyType ::= { 1 | 2
          one     456,
          two     123,
          three   { number 123, number 456 }
      }


      <class>
       <optional>
        <typeField name="Syntax"/>
        <default type="asn1:INTEGER/>
       </optional>
       <valueSetField name="One">
        <typeFromField fieldName="Syntax"/>
       </valueSetField>
       <optional>
        <valueSetField name="Two">
         <typeFromField fieldName="Syntax"/>
        </valueSetField>
       </optional>
       <optional>
        <valueSetField name="Three">
         <typeFromField fieldName="Syntax"/>
      -- No meta-values.

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



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 47] 51]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



        </valueSetField>
        <default>
         <valueSet>
          <union>
           <value>1</value>
           <value>2</value>
          </union>
         </valueSet>
        </default>
       </optional>
      </class>


9.2.6.  FieldName                April 11, 2005


      </namedValue>

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

      <namedValue name="myValue2" type="tns:MyType">
       <value one="456" three="123 456">
        <two asn1:meta="true">
         <fromObjects object="tns:myObject" fieldName="number"/>
        </two>
       </value>
      </namedValue>

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

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

7.2.3.  ValueFromObject Translation

   The translation of a FieldName ValueFromObject is either, at the translator's option, an element with the
   [local name] "value".  An attribute with the [local name] "fieldName" "meta",



Legg & Prager            Expires 11 October 2005               [Page 52]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   [namespace name] "http://xmled.info/ns/ASN.1" and [normalized value]
   "true" or "1" SHALL be added to the [attributes] of the enclosing element, or an <value>
   element.  An element with the [local name] "fieldName" appended "fromObjects" SHALL be
   added to the [children] of the enclosing <value> element.

   The [normalized value] translation of the attribute is a "/" (U+002F) separated
   list of ReferencedObjects in the primitive field names without ValueFromObject SHALL
   be added to the ampersand characters
   ("&", U+0026).


   The content of the <fieldName> element is (ignoring comment and
   processing instruction items) a "/" (U+002F) separated list <fromObjects> element.

   The translation of the
   primitive field names without FieldName in the ampersand characters ("&", U+0026).


   Example


      &Linked.&ArgumentType


      <fieldName>Linked/ArgumentType</fieldName>


9.2.7.  ObjectFieldSpec ValueFromObject SHALL be
   appended to the content of the <fromObjects> element.

7.2.4.  ObjectClassFieldValue Translation


   The

   If an ObjectClassFieldValue is a BuiltinValue in a FixedTypeFieldVal
   then the translation of an ObjectFieldSpec where the ObjectOptionalitySpec
   is absent ObjectClassFieldValue is an element with the [local name] "objectField".


   The translation
   of the BuiltinValue.

   If an ObjectClassFieldValue is a ObjectFieldSpec with ReferencedValue in a ObjectOptionalitySpec of
   "OPTIONAL" is an element with
   FixedTypeFieldVal then the [local name] "optional".  An
   element with translation of the [local name] "objectField" ObjectClassFieldValue
   is added to the
   [children] translation of the <optional> element.


   The ReferencedValue.

   If an ObjectClassFieldValue is an OpenTypeFieldVal then the
   translation of a ObjectFieldSpec with a ObjectOptionalitySpec of
   "DEFAULT" the ObjectClassFieldValue is an element with the
   [local name] "optional". "value".  An element attribute with the [local name] "objectField" is "meta",
   [namespace name] "http://xmled.info/ns/ASN.1" and [normalized value]
   "true" or "1" SHALL be added to the [children] [attributes] of the
   <optional> <value>
   element.  An element with the [local name] "default" is




Legg & Prager           Expires 17 December 2004               [Page 48]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   appended "openTypeValue" SHALL be
   added to the [children] of the <optional> <value> element.  The content of
   the <default> element is the translation of
   the Object Type in the
   ObjectOptionalitySpec.


   An attribute with the [local name] "name" is OpenTypeFieldVal SHALL be added to the
   [attributes] content of the <objectField>
   <openTypeValue> element.  The [normalized value] of
   this attribute is the objectfieldreference of the ObjectFieldSpec,
   without the ampersand.  The translation of the DefinedObjectClass Value in the ObjectFieldSpec is added
   OpenTypeFieldVal SHALL be appended to the content of the <objectField>
   <openTypeValue> 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>
       <optional>
        <objectField name="three" class="asn1:TYPE-IDENTIFIER"/>
        <default object="tns:myObject"/>
       </optional>
      </class>


9.2.8.  ObjectSetFieldSpec

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

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

8.  Translation of Value Sets




Legg & Prager            Expires 11 October 2005               [Page 53]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   The translation of an ObjectSetFieldSpec where the
   ObjectSetOptionalitySpec is absent a ValueSet is an element with the [local name] "objectSetField".
   "valueSet".  The translation of a ObjectSetFieldSpec with a
   ObjectSetOptionalitySpec of "OPTIONAL" is an element with the
   [local name] "optional".  An element with ElementSetSpecs in the [local name]
   "objectSetField" is ValueSet
   SHALL be added to the [children] of the <optional> <valueSet> element.


   The translation of a ObjectSetFieldSpec with a
   ObjectSetOptionalitySpec of "DEFAULT" is an element with the
   [local name] "optional".  An element with the [local name]
   "objectSetField"

   Example

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

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

8.1.  ElementSetSpecs Translation

   The translation of an ElementSetSpecs where the ellipsis ("...") is
   not present is added to the [children] translation of the <optional>
   element.  An 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] "default"
   "extension".  If an AdditionalElementSetSpec is appended present then the
   translation of the ElementSetSpec in the AdditionalElementSetSpec
   SHALL be added to the [children] of the <optional> <extension> element.  The content

8.2.  ElementSetSpec Translation

   If the ElementSetSpec is of the "ALL Exclusions" form then the



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 49] 54]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   <default> element is the                April 11, 2005


   translation of the ObjectSet in ElementSetSpec is an element with the
   ObjectSetOptionalitySpec. [local name]
   "all".  An attribute element with the [local name] "name" is "except" SHALL be added to
   the
   [attributes] [children] of the <objectSetField> <all> element.  The [normalized value]
   of this attribute is the objectsetfieldreference of the
   ObjectSetFieldSpec, without the ampersand.  The translation of the
   DefinedObjectClass Elements
   in the ObjectSetFieldSpec is Exclusions SHALL be added to the content [children] of the <objectSetField> <except>
   element.


   Example


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


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


10.  Translation of Objects


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

   If an Object the ElementSetSpec is a ParameterizedObject of the "Unions" form then the translation of
   the
   Object ElementSetSpec is the translation of the Object on Unions.

   If the right hand side Unions has only one Intersections then the translation of the
   referenced ParameterizedObjectAssignment.


   The Object that substitutes for a ParameterizedObject
   Unions is potentially
   in a different module scope to the surrounding translation, therefore translation of that Intersections, otherwise the
   translation of the Object may require a tagDefault or
   extensibilityImplied attribute, according Unions is an element with the [local name]
   "union".  The translation of each Intersections SHALL be appended to
   the provisions [children] of
   Section 5.9.




Legg & Prager           Expires 17 December 2004               [Page 50]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



10.1.  DefinedObject Translation the <union> element.

   If a DefinedObject is an objectreference (not a DummyReference) or an
   ExternalObjectReference the Intersections has only one IntersectionElements then the
   translation of the DefinedObject Intersections is
   either the attribute form translation of an object reference, or that
   IntersectionElements, otherwise the
   element form translation of an object reference.


   The attribute form translation of an object reference the Intersections
   is an attribute element with the [local name] "object". "intersection".  The [normalized value] translation
   of this
   attribute is each IntersectionElements SHALL be appended to the qualified name referencing [children] of
   the object definition
   (see Section 5.1).


   The element <intersection> element.

   If the IntersectionElements is of the "Elems Exclusions" form then
   the translation of an object reference the IntersectionElements is an element with the
   [local name] "object".  An attribute "all".  The content of the <all> element is the
   translation of the Elements in the Elems followed by an element with
   the [local name]
   "ref" is "except".  The translation of the Elements in the
   Exclusions SHALL be added to the [attributes] [children] of the <object> <except> element.  The
   [normalized value] of this attribute

   If the IntersectionElements is of the qualified name
   referencing "Elements" form then the object definition.


   The
   translation of the DefinedObject IntersectionElements is the same whether translation of the object
   definition is referenced by an objectreference or
   Elements.

   The translation of an
   ExternalObjectReference.


   Usually Elements is the translator is free to choose either translation of the attribute form
   SubtypeElements, ObjectSetElements or
   element form ElementSetSpec, as appropriate.

8.3.  SubtypeElements Translation

   If a SubtypeElements is a SingleValue then the translation for an object reference, however in some
   contexts of the
   SubtypeElements is the translation of the Value, except that an
   attribute form is explicitly disallowed. of the Value translation SHALL NOT be used.

   If a DefinedObject SubtypeElements is a DummyReference ContainedSubtype then the translation of
   the
   DefinedObject SubtypeElements is an element with the [local name] "includes".
   The translation of the Object Type in the ActualParameter
   corresponding ContainedSubtype SHALL be added to
   the DummyReference.


   The Object that substitutes for content of the <includes> element.

   If a DummyReference SubtypeElements is potentially in a
   different module scope to the surrounding translation, therefore ValueRange then the translation of the Object may require a tagDefault or
   extensibilityImplied attribute, according to



Legg & Prager            Expires 11 October 2005               [Page 55]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   SubtypeElements is the provisions translation of
   Section 5.9.


10.2.  ObjectDefn Translation


   An ObjectDefn in the DefinedSyntax form ValueRange.

   If a SubtypeElements is first converted to the
   equivalent DefaultSyntax and a SizeConstraint then translated.


   The the translation of an ObjectDefn the
   SubtypeElements is an element with the [local name]
   "object".  An element with "size".  The
   content of the [local name] "definition" <size> element is added to
   the [children] of the <object> element.  The translation of each
   FieldSetting the Constraint in
   the DefaultSyntax SizeConstraint.

   If a SubtypeElements is a TypeConstraint then the translation of the ObjectClassDefn
   SubtypeElements is appended
   to an element with the [children] [local name] "typeConstraint".
   The content of the <definition> element.


   The <typeConstraint> element is the translation of the
   Type in the TypeConstraint.

   If a FieldSetting SubtypeElements is a PermittedAlphabet then the translation of
   the SubtypeElements is an element with the




Legg & Prager           Expires 17 December 2004               [Page 51]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   PrimitiveFieldName (without the ampersand) as its [local name]. name] "from".  The
   content of this the <from> element is the translation of the Type, Value,
   ValueSet, Object or ObjectSet Constraint in
   the Setting PermittedAlphabet.

   If a SubtypeElements is an InnerTypeConstraints then the translation
   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"/>
        <objectSetField name="Five" class="asn1:TYPE-IDENTIFIER"/>
       </class>
      </namedClass>


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


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




Legg & Prager           Expires 17 December 2004               [Page 52]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



           <object ref="tns:myObject"/>
          </objectSet>
         </Five>
        </definition>
       </object>
      </namedObject>


10.3.  ObjectFromObject 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 an ObjectFromObject a ValueRange is an element with the [local name] "object".  An
   "range".

   If the LowerEndpoint in the ValueRange is of the "LowerEndValue <"
   form then an element with the [local name]
   "fromObjects" is "minExclusive" SHALL be
   added to the [children] of the <object> <range> element.


   The  If the LowerEndValue
   is not "MIN" then the content of the <minExclusive> element is the
   translation of the ReferencedObjects Value in the ObjectFromObject 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" SHALL be added to the content [children] of the <fromObjects>
   <range> element.  The content of the <minInclusive> element is the
   translation of the FieldName Value in the ObjectFromObject is appended
   to LowerEndValue.

   If the content of LowerEndpoint in the <fromObjects> element.


11.  Translation ValueRange is of Object Sets


   If an ObjectSet matches the "LowerEndValue" form "{ DefinedObjectSet }" (i.e., a
   DefinedObjectSet in an ObjectSetElements in an Elements in a single
   IntersectionElements in a single Intersections in a Unions in an
   ElementSetSpec in a lone RootElementSetSpec in
   and the ObjectSetSpec) LowerEndValue is "MIN" then an element with the translator [local name]
   "minInclusive" MAY use be added to the translation [children] of the DefinedObjectSet
   as the translation of <range> element.

   If the ObjectSet, otherwise UpperEndpoint in the translation of an
   ObjectSet ValueRange is of the "< UpperEndValue"



Legg & Prager            Expires 11 October 2005               [Page 56]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   form then an element with the [local name] "objectSet".  The
   translation of the ObjectSetSpec in the ObjectSet is "maxExclusive" SHALL be
   added to the [children] of the <objectSet> <range> element.


   Note that an ObjectSet that is directly a DefinedObjectSet  If the UpperEndValue
   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 "MAX" then the
   translation content of the ObjectSetSpec <maxExclusive> element is the
   translation of the
   ElementSetSpec Value in the RootElementSetSpec. UpperEndValue.

   If an ObjectSetSpec contains a RootElementSetSpec and the ellipsis
   ("...") then the translation of UpperEndpoint in the ObjectSetSpec ValueRange is the translation of the ElementSetSpec in "UpperEndValue" form
   and the RootElementSetSpec followed by UpperEndValue is not "MAX" then an element with the
   [local name] "extension".  If an
   AdditionalElementSetSpec is present then the translation of the
   ElementSetSpec in the AdditionalElementSetSpec is "maxInclusive" SHALL be added to the [children] of the <extension>
   <range> element.





Legg & Prager           Expires 17 December 2004               [Page 53]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   If an ObjectSetSpec does not contain a RootElementSetSpec then the
   translation  The content of the ObjectSetSpec is an <maxInclusive> element with the [local name]
   "extension".  If an AdditionalElementSetSpec is present then the
   translation of the ElementSetSpec Value in the AdditionalElementSetSpec is
   added to UpperEndValue.

   If the [children] of UpperEndpoint in the <extension> element.


   Contained within the ElementSetSpec will be one or more
   ObjectSetElements.


11.1.  DefinedObjectSet Translation


   If a DefinedObjectSet ValueRange is an objectsetreference (not a DummyReference)
   or an ExternalObjectSetReference then the translation of the
   DefinedObjectSet is either the attribute "UpperEndValue" form translation of an
   object set reference, or
   and the UpperEndValue is "MAX" then an element form translation with the [local name]
   "maxInclusive" MAY be added to the [children] of an object
   set reference. the <range> element.

   Examples

      1..10

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

      0..MAX

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

      0<..<MAX

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

8.3.2.  InnerTypeConstraints Translation

   The attribute form translation of an object set reference InnerTypeConstraints of the
   "WITH COMPONENT SingleTypeConstraint" form is an
   attribute element with the
   [local name] "objectSet". "withComponent".  The [normalized value] content of this attribute the <withComponent>
   element is the qualified name referencing translation of the object set
   definition (see Section 5.1). Constraint in the
   SingleTypeConstraint.

   The element form translation of an object set reference InnerTypeConstraints of the
   "WITH COMPONENTS MultipleTypeConstraints" form is an element with the
   [local name] "objectSet".  An "withComponents".



Legg & Prager            Expires 11 October 2005               [Page 57]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   If the MultipleTypeConstraints is a PartialSpecification then an
   attribute with the [local name] "ref" is "partial" and the [normalized value]
   "true" or "1" SHALL be added to the [attributes] of the <objectSet>
   <withComponents> element.  The  If the MultipleTypeConstraints is a
   FullSpecification then an attribute with the [local name] "partial"
   and the [normalized value] of this attribute is "false" or "0" MAY be added to the qualified
   name referencing
   [attributes] of the object set definition. <withComponents> element.

   The translation of each NamedConstraint in the DefinedObjectSet is
   MultipleTypeConstraints SHALL be appended to the same whether [children] of the
   object definition
   <withComponents> element.

   The translation of a NamedConstraint is referenced by an objectsetreference element with the same
   [local name] (i.e., "attribute", "element", "content" or an
   ExternalObjectSetReference.


   Usually "member") as
   the translator is free to choose either translation of the NamedType corresponding to the identifier of
   the NamedConstraint.  An attribute form with the [local name] "name" SHALL
   be added to the [attributes] of the <attribute>, <element>, <content>
   or
   element form translation for <member> element, as appropriate.  The [normalized value] of this
   attribute is the RXER encoding of the effective name of the NamedType
   corresponding to the identifier of the NamedConstraint.

   If the PresenceConstraint of the ComponentConstraint of the
   NamedConstraint is not empty then an object set reference, however in some
   contexts attribute with the [local name]
   "use" SHALL be added to the [attributes] of the <component> element.
   The [normalized value] of this attribute form is explicitly disallowed. the text of the
   PresenceConstraint, either "PRESENT", "ABSENT" or "OPTIONAL".

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

9.  Translation of Object Classes

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

   If an ObjectClass is a DummyReference ParameterizedObjectClass then the translation
   of the
   DefinedObjectSet ObjectClass is the translation of the ObjectSet in ObjectClass on the
   ActualParameter corresponding to right
   hand side of the DummyReference. referenced ParameterizedObjectClassAssignment.

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


11.2.  ObjectSetElements Translation 6.14.




Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 54] 58]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004                April 11, 2005


9.1.  DefinedObjectClass Translation

   If an ObjectSetElements a DefinedObjectClass is an Object objectclassreference (not a
   DummyReference), an ExternalObjectClassReference or a
   UsefulObjectClassReference then the translation of the
   ObjectSetElements
   DefinedObjectClass is the translation of the Object, except that either the attribute form of the DefinedObject translation SHALL NOT be used.


   If of an ObjectSetElements is a DefinedObjectSet then
   object class reference, or the element form translation of
   the ObjectSetElements is the translation of the DefinedObjectSet,
   except that the an object
   class reference.

   The attribute form of the DefinedObjectSet translation
   SHALL NOT be used.


   If of an ObjectSetElements object class reference is an ObjectSetFromObjects then
   attribute with the
   translation [local name] "class".  The [normalized value] of the ObjectSetElements
   this attribute is the translation of qualified name referencing the
   ObjectSetFromObjects.


   If an ObjectSetElements is an ParameterizedObjectSet then object class
   definition (see Section 5.1).  In the
   translation case of a
   UsefulObjectClassReference the ObjectSetElements namespace name is
   "http://xmled.info/ns/ASN.1" and the local part is either
   "TYPE-IDENTIFIER" or "ABSTRACT-SYNTAX", as appropriate.  The
   attribute form translation of the
   ObjectSet on the right hand side of SHALL NOT be used if the referenced
   ParameterizedObjectSetAssignment.


   Note that an ObjectSetElements that is an ObjectSet qualified name is a notational
   capability that does not exist
   shared by two or more object class definitions in ASN.1 specifications but separate modules,
   i.e., is allowed
   in ASN.1 Schema to avoid the need to manufacture a reference name for ambiguous.  Otherwise, the expanded parameterized definition.


   The ObjectSet that substitutes for a ParameterizedObjectSet translator is
   potentially in a different module scope free to choose
   either the surrounding
   translation, therefore the translation of the ObjectSet may require a
   tagDefault attribute form or extensibilityImplied attribute, according to the
   provisions of Section 5.9.


11.2.1.  ObjectSetFromObjects Translation element form translation for an object
   class reference.

   The element form translation of an ObjectSetFromObjects object class reference is an
   element with the [local name] "objectSet". "class".  An element attribute with the
   [local name]
   "fromObjects" is "ref" SHALL be added to the [children] [attributes] of the <objectSet> <class>
   element.  The translation [normalized value] of the ReferencedObjects in the ObjectSetFromObjects this attribute is added to the content of qualified
   name referencing the <fromObjects> element.


   The translation of object class definition.  In the FieldName in case of a
   UsefulObjectClassReference the ObjectSetFromObjects namespace name is
   appended to the content of
   "http://xmled.info/ns/ASN.1" and the <fromObjects> element.


12.  Translation of Information From Objects


   If a ReferencedObjects is a DefinedObject (not a DummyReference) then
   the translation of the ReferencedObjects local part is the translation of the
   DefinedObject. either
   "TYPE-IDENTIFIER" or "ABSTRACT-SYNTAX", as appropriate.  If a ReferencedObjects the
   qualified name is a DefinedObjectSet (not a DummyReference)




Legg & Prager           Expires 17 December 2004               [Page 55]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004 shared by two or more object class definitions in
   separate modules then an attribute with the translation of the ReferencedObjects is [local name] "context"
   SHALL be added to the translation [attributes] of the DefinedObjectSet.


   If a ReferencedObjects <class> element.  The
   [normalized value] of this attribute is a ParameterizedObject then the translation character string value of
   the ReferencedObjects is the translation AnyURIValue of the Object on SCHEMA-IDENTITY encoding instruction for the
   right hand side of
   module containing the object class definition referenced ParameterizedObjectAssignment.


   If a ReferencedObjects is a ParameterizedObjectSet then the
   translation of by the ReferencedObjects
   DefinedObjectClass.

      ASIDE: A SCHEMA-IDENTITY encoding instruction is the obligatory in
      such cases (see Section 5.1).

   The translation of the
   ObjectSet on DefinedObjectClass is the right hand side of same whether the
   object class definition is referenced
   ParameterizedObjectSetAssignment. by an objectclassreference or
   an ExternalObjectClassReference.

   If the ReferencedObjects a DefinedObjectClass is a DummyReference then the translation of
   the ReferencedObjects DefinedObjectClass is the translation of the Object or ObjectSet DefinedObjectClass
   in the ActualParameter corresponding to the DummyReference.


   Note that a ReferencedObjects that is an Object or ObjectSet is a
   notational capability that does not exist in



Legg & Prager            Expires 11 October 2005               [Page 59]

INTERNET-DRAFT                ASN.1 specifications but Schema                April 11, 2005


9.2.  ObjectClassDefn Translation

   The translation of an ObjectClassDefn is allowed an element with the
   [local name] "class".  The translation of each FieldSpec in ASN.1 Schema to avoid the need
   ObjectClassDefn SHALL be appended to manufacture a
   reference name for the expanded parameterized definition. [children] of the <class>
   element.

   The Object or ObjectSet that substitutes for translation of a ParameterizedObject,
   ParameterizedObjectSet or DummyReference FieldSpec is potentially in a
   different module scope to the surrounding translation, therefore the translation of the Object or ObjectSet may require either a tagDefault
   TypeFieldSpec, a FixedTypeValueFieldSpec, a
   VariableTypeValueFieldSpec, a FixedTypeValueSetFieldSpec, a
   VariableTypeValueSetFieldSpec, an ObjectFieldSpec or
   extensibilityImplied attribute, according to the provisions of
   Section 5.9.


13.  Security Considerations an
   ObjectSetFieldSpec.

9.2.1.  TypeFieldSpec Translation

   The ASN.1 Schema translation of an ASN.1 specification a TypeFieldSpec where the TypeOptionalitySpec is
   semantically equivalent to
   absent is an element with the original ASN.1 specification. [local name] "typeField".

   The
   security considerations that apply to translation of a TypeFieldSpec with a TypeOptionalitySpec of
   "OPTIONAL" is an application built from element with the
   original ASN.1 specification apply equally [local name] "optional".  An
   element with the [local name] "typeField" SHALL be added to an application built
   from the ASN.1 Schema translation.


14.  Acknowledgements


   This document and
   [children] of the technology it describes are a product <optional> element.

   The translation of a
   joint research project between Adacel Technologies Limited and Deakin
   University on leveraging existing directory technology to produce an
   XML-based directory service.


Appendix A. ASN.1 for ASN.1 Schema


   This appendix TypeFieldSpec with a TypeOptionalitySpec of
   "DEFAULT" is normative.


   ASN1-Schema




Legg & Prager           Expires 17 December 2004               [Page 56]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



       {iso(1) 2 36 79672281 xed(3) module(0) asn1-schema(0)}


   -- Copyright (C) an element with the [local name] "optional".  An element
   with the [local name] "typeField" SHALL be added to the [children] of
   the <optional> element.  An element with the [local name] "default"
   SHALL be appended to the [children] of the <optional> element.  The Internet Society (2004). This version
   content of
   --  this ASN.1 module the <default> element is part the translation of RFC XXXX; see the RFC itself
   --  for full legal notices.


   -- The namespace name for this module is:
   --     http://xmled.info/ns/ASN.1
   -- Type in
   the TypeOptionalitySpec.

   An attribute with the [local name] "name" SHALL be added to the
   [attributes] of the <typeField> element.  The SchemaIdentity for [normalized value] of
   this module is:
   --     http://xmled.info/id/ASN.1/Schema


   DEFINITIONS
   XER INSTRUCTIONS
   AUTOMATIC TAGS
   EXTENSIBILITY IMPLIED ::= BEGIN


   IMPORTS
       AnyType,
       AnyURI,
       NCName,
       Name,
       XML-Type{}
           FROM SchemaLanguageIntegration
               {iso(1) 2 36 79672281 xed(3) module(0) sli(1)}
       ;


   ModuleDefinition ::= SEQUENCE attribute is the typefieldreference of the TypeFieldSpec,
   without the ampersand ("&", U+0026).

   Example

      CLASS {
       name                  [ATTRIBUTE] ModuleReference OPTIONAL,
       identifier            [ATTRIBUTE] DefinitiveIdentifier OPTIONAL,
       targetNamespace       [ATTRIBUTE] AnyURI
          &One,
          &Two    OPTIONAL,
       tagDefault            [ATTRIBUTE] TagDefault DEFAULT automatic,
       extensibilityImplied  [ATTRIBUTE] BOOLEAN
          &Three  DEFAULT FALSE,
       imports               [UNTAGGED] SEQUENCE SIZE (1..MAX) OF
                                 import Import OPTIONAL,
       assignments           [UNTAGGED] AssignmentList
   }


   ModuleReference ::= TypeReference


   DefinitiveIdentifier ::= OBJECT IDENTIFIER


   Import ::= SEQUENCE {
       namespace       [ATTRIBUTE] AnyURI OPTIONAL,
       name            [ATTRIBUTE] ModuleReference OPTIONAL,
       identifier      [ATTRIBUTE] DefinitiveIdentifier OPTIONAL,
       schemaIdentity  [ATTRIBUTE] AnyURI OPTIONAL,
       schemaLocation  [ATTRIBUTE] AnyURI OPTIONAL
      }

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



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 57] 60]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   AssignmentList ::= SEQUENCE SIZE (1..MAX) OF
       assignment [UNTAGGED] Assignment


   Assignment ::= CHOICE {
       namedType       TypeAssignment,
       namedValue      ValueAssignment,
       namedValueSet   ValueSetTypeAssignment,
       namedClass      ObjectClassAssignment,
       namedObject     ObjectAssignment,
       namedObjectSet  ObjectSetAssignment
   }


   TypeAssignment ::= SEQUENCE {
       name     [ATTRIBUTE] ExtendedTypeReference,
       renames  [ATTRIBUTE] TypeReferenceOrEmpty OPTIONAL,
       typeRef  [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL,
       type     Type OPTIONAL
   } (WITH COMPONENTS { ..., typeRef PRESENT, type ABSENT } |
      WITH COMPONENTS { ..., typeRef ABSENT, type PRESENT })


   ExtendedTypeReference ::= NCName


   TypeReference ::= UTF8String
                         (PATTERN "[A-Z][A-Z0-9a-z]*(-[A-Z0-9a-z]+)*")


   TypeReferenceOrEmpty ::= UTF8String (INCLUDES TypeReference | "")


   ValueAssignment ::= SEQUENCE {
       name      [ATTRIBUTE] ValueReference,
       typeRef   [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL,
       type      Type OPTIONAL,
       literal   [ATTRIBUTE] AnySimpleType OPTIONAL,
       valueRef  [NAME AS "value"] [ATTRIBUTE] QName OPTIONAL,
       value     Value OPTIONAL
   } ((WITH COMPONENTS { ..., typeRef PRESENT, type ABSENT } |
       WITH COMPONENTS { ..., typeRef ABSENT, type PRESENT })
      INTERSECTION
      (WITH COMPONENTS                April 11, 2005


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

9.2.2.  FixedTypeValueFieldSpec Translation

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

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

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

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

   Example

      CLASS { ...,
          literal PRESENT, valueRef ABSENT, value ABSENT
          &one    OBJECT IDENTIFIER UNIQUE,
          &two    BOOLEAN OPTIONAL,
          &three  INTEGER DEFAULT 0
      } |
       WITH COMPONENTS

      <class>



Legg & Prager            Expires 11 October 2005               [Page 61]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


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

9.2.3.  FixedTypeValueSetFieldSpec Translation

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

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

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

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

   Example

      CLASS { ...,
          literal ABSENT, valueRef PRESENT, value ABSENT } |
       WITH COMPONENTS
          &One    UTF8String,
          &Two    BOOLEAN OPTIONAL,
          &Three  INTEGER DEFAULT { ...,
          literal ABSENT, valueRef ABSENT, 1 | 2 }
      }

      <class>



Legg & Prager            Expires 11 October 2005               [Page 62]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


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

9.2.4.  VariableTypeValueFieldSpec Translation

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

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

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

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

   Example



Legg & Prager            Expires 11 October 2005               [Page 63]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


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

      <class>
       <optional>
        <typeField name="Syntax"/>
        <default type="asn1:INTEGER/>
       </optional>
       <valueField name="one">
        <typeFromField fieldName="Syntax"/>
       </valueField>
       <optional>
        <valueField name="two">
         <typeFromField fieldName="Syntax"/>
        </valueField>
       </optional>
       <optional>
        <valueField name="three">
         <typeFromField fieldName="Syntax"/>
        </valueField>
        <default literal="0"/>
       </optional>
      </class>

9.2.5.  VariableTypeValueSetFieldSpec Translation

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

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

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



Legg & Prager            Expires 11 October 2005               [Page 64]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


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

   Example

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

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

9.2.6.  FieldName Translation




Legg & Prager            Expires 11 October 2005               [Page 65]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


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

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

   The content of the <fieldName> element is (ignoring comment and
   processing instruction items) a "/" (U+002F) separated list of the
   primitive field names without the ampersand characters ("&", U+0026).

   Example

      &Linked.&ArgumentType

      <fieldName>Linked/ArgumentType</fieldName>

9.2.7.  ObjectFieldSpec Translation

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

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

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

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

   Example

      CLASS {



Legg & Prager            Expires 11 October 2005               [Page 66]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


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

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

9.2.8.  ObjectSetFieldSpec Translation

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

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

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

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

   Example

      CLASS {
          &One    TYPE-IDENTIFIER,



Legg & Prager            Expires 11 October 2005               [Page 67]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


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

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

10.  Translation of Objects

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

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

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

10.1.  DefinedObject Translation

   If a DefinedObject is an objectreference (not a DummyReference) or an
   ExternalObjectReference then the translation of the DefinedObject is
   either the attribute form translation of an object reference, or the
   element form translation of an object reference.

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



Legg & Prager            Expires 11 October 2005               [Page 68]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   The element form translation of an object reference is an element
   with the [local name] "object".  An attribute with the [local name]
   "ref" SHALL be added to the [attributes] of the <object> element.
   The [normalized value] of this attribute is the qualified name
   referencing the object definition.  If the qualified name is shared
   by two or more object definitions in separate modules then an
   attribute with the [local name] "context" SHALL be added to the
   [attributes] of the <object> element.  The [normalized value] of this
   attribute is the character string value PRESENT }))


   TypeAndValue ::= SEQUENCE {
       typeRef   [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL,
       type of the AnyURIValue of the
   SCHEMA-IDENTITY encoding instruction for the module containing the
   object definition referenced by the DefinedObject.

      ASIDE: A SCHEMA-IDENTITY encoding instruction is obligatory in
      such cases (see Section 5.1).

   The translation of the DefinedObject is the same whether the object
   definition is referenced by an objectreference or an
   ExternalObjectReference.

   Usually the translator is free to choose either the attribute form or
   element form translation for an object reference, however in some
   contexts the attribute form is explicitly disallowed.

   If a DefinedObject is a DummyReference then the translation of the
   DefinedObject is the translation of the Object in the ActualParameter
   corresponding to the DummyReference.

      ASIDE: The Object that substitutes for a DummyReference is
      potentially in a different module scope to the surrounding
      translation, therefore the translation of a nested Type OPTIONAL,
       literal   [ATTRIBUTE] AnySimpleType OPTIONAL, may
      require a tagDefault or extensibilityImplied attribute, according
      to the provisions of Section 6.14.

10.2.  ObjectDefn Translation

   An ObjectDefn in the DefinedSyntax form is first converted to the
   equivalent DefaultSyntax and then translated.

   The translation of an ObjectDefn is an element with the [local name]
   "object".  The translation of each FieldSetting in the DefaultSyntax
   of the ObjectClassDefn SHALL be appended to the [children] of the
   <object> element.

   The translation of a FieldSetting is an element with the [local name]
   "field".  An attribute with the [local name] "name" SHALL be added to
   the [attributes] of the <field> element.  The [normalized value] of
   this attribute is the PrimitiveFieldName without the ampersand.  The
   translation of the Type, Value, ValueSet, Object or ObjectSet in the



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 58] 69]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



       valueRef  [NAME AS "value"] [ATTRIBUTE] QName OPTIONAL,
       value     Value OPTIONAL
   } ((WITH COMPONENTS { ..., typeRef PRESENT, type ABSENT } |
       WITH COMPONENTS { ..., typeRef ABSENT, type PRESENT })
      INTERSECTION
      (WITH COMPONENTS { ...,
          literal PRESENT, valueRef ABSENT, value ABSENT } |
       WITH COMPONENTS { ...,
          literal ABSENT, valueRef PRESENT, value ABSENT } |
       WITH COMPONENTS { ...,
          literal ABSENT, valueRef ABSENT, value PRESENT }))


   ValueReference ::= Identifier


   Identifier ::= UTF8String
                      (PATTERN "[a-z][A-Z0-9a-z]*(-[A-Z0-9a-z]+)*")


   ValueSetTypeAssignment ::= SEQUENCE {
       name      [ATTRIBUTE] ExtendedTypeReference,
       typeRef   [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL,
       type      Type OPTIONAL,
       valueSet  ValueSet
   } (WITH COMPONENTS { ..., typeRef PRESENT, type ABSENT } |
      WITH COMPONENTS { ..., typeRef ABSENT, type PRESENT })


   TypeAndValueSet ::= SEQUENCE {
       typeRef   [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL,
       type      Type OPTIONAL,
       valueSet  ValueSet
   } (WITH COMPONENTS { ..., typeRef PRESENT, type ABSENT } |
      WITH COMPONENTS { ..., typeRef ABSENT, type PRESENT })


   ObjectClassAssignment                April 11, 2005


   Setting of the FieldSetting SHALL be added to the [children] of the
   <field> element.

   Example

      ONE-OF-EVERYTHING ::= SEQUENCE {
       name      [ATTRIBUTE] ObjectClassReference,
       classRef  [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL,
       class     ObjectClass OPTIONAL
   } (WITH COMPONENTS CLASS { ..., classRef PRESENT, class ABSENT
          &One,
          &two    INTEGER,
          &Three  INTEGER,
          &four   TYPE-IDENTIFIER,
          &Five   TYPE-IDENTIFIER
      } |
      WITH COMPONENTS { ..., classRef ABSENT, class PRESENT })


   ObjectClassReference ::= UTF8String
                                (PATTERN "[A-Z][A-Z0-9]*(-[A-Z0-9]+)*")


   ObjectAssignment

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

      mixedBag ONE-OF-EVERYTHING ::= SEQUENCE {
       name       [ATTRIBUTE] ObjectReference,
       classRef   [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL,
       class      DefinedObjectClass OPTIONAL,
       objectRef  [NAME AS "object"] [ATTRIBUTE] QName OPTIONAL,
       object
          &One    BOOLEAN,
          &two    99,
          &Three  { 1 | 2 },
          &four   myObject,
          &Five   { myObject }
      }

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



Legg & Prager            Expires 11 October 2005               [Page 70]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


        </field>
       </object>
      </namedObject>

10.3.  ObjectFromObject Translation

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

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

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

11.  Translation of Object OPTIONAL Sets

   If an ObjectSet matches the form "{ DefinedObjectSet }" (i.e., a
   DefinedObjectSet in an ObjectSetElements in an Elements in a single
   IntersectionElements in a single Intersections in a Unions in an
   ElementSetSpec in a lone RootElementSetSpec in the ObjectSetSpec)
   then the translator MAY use the translation of the DefinedObjectSet
   as the translation of the ObjectSet, otherwise the translation of an
   ObjectSet is an element with the [local name] "objectSet".  The
   translation of the ObjectSetSpec in the ObjectSet SHALL be added to
   the [children] of the <objectSet> element.

      ASIDE: An ObjectSet that is directly a DefinedObjectSet is a
      notational capability that does not exist in ASN.1 specifications
      but is allowed in ASN.1 Schema to avoid excessive nesting of
      <objectSet> elements in the expansion of parameterized
      definitions.

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

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

   If an ObjectSetSpec does not contain a RootElementSetSpec then the



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 59] 71]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   } ((WITH COMPONENTS { ..., classRef PRESENT, class ABSENT } |
       WITH COMPONENTS { ..., classRef ABSENT, class PRESENT })
      INTERSECTION
      (WITH COMPONENTS { ..., objectRef PRESENT,                April 11, 2005


   translation of the ObjectSetSpec is an element with the [local name]
   "extension".  If an AdditionalElementSetSpec is present then the
   translation of the ElementSetSpec in the AdditionalElementSetSpec
   SHALL be added to the [children] of the <extension> element.

   Contained within the ElementSetSpec will be one or more
   ObjectSetElements.

11.1.  DefinedObjectSet Translation

   If a DefinedObjectSet is an objectsetreference (not a DummyReference)
   or an ExternalObjectSetReference then the translation of the
   DefinedObjectSet is either the attribute form translation of an
   object ABSENT } |
       WITH COMPONENTS { ..., objectRef ABSENT, set reference, or the element form translation of an object
   set reference.

   The attribute form translation of an object set reference is an
   attribute with the [local name] "objectSet".  The [normalized value]
   of this attribute is the qualified name referencing the object PRESENT }))


   ObjectClassAndObject ::= SEQUENCE {
       classRef   [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL,
       class      DefinedObjectClass OPTIONAL,
       objectRef  [NAME AS "object"] [ATTRIBUTE] QName OPTIONAL, set
   definition (see Section 5.1).  The attribute form translation SHALL
   NOT be used if the qualified name is shared by two or more object     Object OPTIONAL
   } ((WITH COMPONENTS { ..., classRef PRESENT, class ABSENT } |
       WITH COMPONENTS { ..., classRef ABSENT, class PRESENT })
      INTERSECTION
      (WITH COMPONENTS { ..., objectRef PRESENT, set
   definitions in separate modules, i.e., is ambiguous.

   The element form translation of an object ABSENT } |
       WITH COMPONENTS { ..., objectRef ABSENT, set reference is an element
   with the [local name] "objectSet".  An attribute with the
   [local name] "ref" SHALL be added to the [attributes] of the
   <objectSet> element.  The [normalized value] of this attribute is the
   qualified name referencing the object PRESENT }))


   ObjectReference ::= ValueReference


   ObjectSetAssignment ::= SEQUENCE { set definition.  If the
   qualified name          [ATTRIBUTE] ObjectSetReference,
       classRef      [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL,
       class         DefinedObjectClass OPTIONAL,
       objectSetRef  [NAME AS "objectSet"] [ATTRIBUTE] QName OPTIONAL,
       objectSet is shared by two or more object set definitions in
   separate modules then an attribute with the [local name] "context"
   SHALL be added to the [attributes] of the <objectSet> element.  The
   [normalized value] of this attribute is the character string value of
   the AnyURIValue of the SCHEMA-IDENTITY encoding instruction for the
   module containing the object set definition referenced by the
   DefinedObjectSet.

      ASIDE: A SCHEMA-IDENTITY encoding instruction is obligatory in
      such cases (see Section 5.1).

   The translation of the DefinedObjectSet is the same whether the
   object definition is referenced by an objectsetreference or an
   ExternalObjectSetReference.

   Usually the translator is free to choose either the attribute form or
   element form translation for an object set reference, however in some
   contexts the attribute form is explicitly disallowed.

   If a DefinedObjectSet is a DummyReference then the translation of the



Legg & Prager            Expires 11 October 2005               [Page 72]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   DefinedObjectSet is the translation of the ObjectSet OPTIONAL
   } ((WITH COMPONENTS { ..., classRef PRESENT, class ABSENT } |
       WITH COMPONENTS { ..., classRef ABSENT, class PRESENT })
      INTERSECTION
      (WITH COMPONENTS { ..., objectSetRef PRESENT, objectSet ABSENT } |
       WITH COMPONENTS { ..., objectSetRef ABSENT, objectSet PRESENT }))


   ObjectClassAndObjectSet ::= SEQUENCE {
       classRef      [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL,
       class         DefinedObjectClass OPTIONAL,
       objectSetRef  [NAME AS "objectSet"] [ATTRIBUTE] QName OPTIONAL,
       objectSet in the
   ActualParameter corresponding to the DummyReference.

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

11.2.  ObjectSetElements Translation

   If an ObjectSetElements is an Object then the translation of the
   ObjectSetElements is the translation of the Object, except that the
   attribute form of the DefinedObject translation SHALL NOT be used.

   If an ObjectSetElements is a DefinedObjectSet then the translation of
   the ObjectSetElements is the translation of the DefinedObjectSet,
   except that the attribute form of the DefinedObjectSet translation
   SHALL NOT be used.

   If an ObjectSetElements is an ObjectSetFromObjects then the
   translation of the ObjectSetElements is the translation of the
   ObjectSetFromObjects.

   If an ObjectSetElements is an ParameterizedObjectSet then the
   translation of the ObjectSetElements is the translation of the
   ObjectSet OPTIONAL
   } ((WITH COMPONENTS { ..., classRef PRESENT, class ABSENT } |
       WITH COMPONENTS { ..., classRef ABSENT, class PRESENT })
      INTERSECTION
      (WITH COMPONENTS { ..., objectSetRef PRESENT, objectSet ABSENT } |
       WITH COMPONENTS { ..., objectSetRef ABSENT, objectSet PRESENT }))


   ObjectSetReference ::= TypeReference


   TypeOnly ::= SEQUENCE {
       typeRef  [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL,
       type     Type OPTIONAL
   } (WITH COMPONENTS { typeRef PRESENT, type ABSENT } |




Legg & Prager           Expires 17 December 2004               [Page 60]
INTERNET-DRAFT on the right hand side of the referenced
   ParameterizedObjectSetAssignment.

      ASIDE: An ObjectSetElements that is an ObjectSet is a notational
      capability that does not exist in ASN.1 specifications but is
      allowed in ASN.1 Schema                 June 17, 2004



      WITH COMPONENTS { typeRef ABSENT, type PRESENT })


   Type ::= SEQUENCE {
       tagDefault            [ATTRIBUTE] TagDefault OPTIONAL,
       extensibilityImplied  [ATTRIBUTE] BOOLEAN OPTIONAL,
       explicit              [ATTRIBUTE] BOOLEAN DEFAULT FALSE,
       context               [ATTRIBUTE] AnyURI OPTIONAL,
       ref                   [ATTRIBUTE] QName OPTIONAL,
       elementType           [ATTRIBUTE] Name OPTIONAL,
       definition            [UNTAGGED] CHOICE {
           namedBitList          NamedBitList,
           namedNumberList       NamedNumberList,
           enumerated            EnumeratedType,
           tagged                TaggedType,
           selection             SelectionType,
           instanceOf            InstanceOfType,
           fromClass             ObjectClassFieldType,
           fromObjects           InformationFromObjects,
           sequence              SequenceType,
           set                   SetType,
           choice                ChoiceType,
           union                 UnionType,
           sequenceOf            SequenceOfType,
           setOf                 SetOfType,
           list                  ListType,
           constrained           ConstrainedType
       } OPTIONAL
   } (WITH COMPONENTS { ...,
         context OPTIONAL, ref PRESENT,
         elementType ABSENT, definition ABSENT } |
      WITH COMPONENTS { ...,
         context PRESENT, ref ABSENT,
         elementType PRESENT, definition ABSENT } |
      WITH COMPONENTS { ...,
         context ABSENT, ref ABSENT,
         elementType ABSENT, definition PRESENT })


   QName ::= XML-Type { "http://www.w3.org/2001/XMLSchema", "QName" }


   NamedBitList ::= SEQUENCE {
       namedBits  [UNTAGGED] SEQUENCE OF namedBit NamedBit
   }


   NamedBit ::= SEQUENCE {
       name     [ATTRIBUTE] TextIdentifier,
       renames  [ATTRIBUTE] Identifier OPTIONAL,
       bit      [ATTRIBUTE] INTEGER (0..MAX)
   } to avoid the need to manufacture a
      reference name for the expanded parameterized definition.

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

11.2.1.  ObjectSetFromObjects Translation

   The translation of an ObjectSetFromObjects is an element with the
   [local name] "objectSet".  An element with the [local name]
   "fromObjects" SHALL be added to the [children] of the <objectSet>
   element.

   The translation of the ReferencedObjects in the ObjectSetFromObjects



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 61] 73]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   TextIdentifier ::= UTF8String


   NamedNumberList ::= SEQUENCE {
       namedNumbers  [UNTAGGED] SEQUENCE OF namedNumber NamedNumber
   }


   NamedNumber ::= SEQUENCE {
       name     [ATTRIBUTE] TextIdentifier,
       renames  [ATTRIBUTE] Identifier OPTIONAL,
       number   [ATTRIBUTE] INTEGER
   }


   EnumeratedType ::= SEQUENCE {
       root       [UNTAGGED] Enumeration,
       extension  SEQUENCE {
           exception   ExceptionSpec OPTIONAL,
           additional  [UNTAGGED] Enumeration OPTIONAL
       } OPTIONAL
   }


   Enumeration ::= SEQUENCE SIZE (1..MAX) OF
       enumeration EnumerationItem


   EnumerationItem ::= SEQUENCE {                April 11, 2005


   SHALL be added to the content of the <fromObjects> element.

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

12.  Translation of Information From Objects

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

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

   If a ReferencedObjects is a DummyReference then the translation of
   the ReferencedObjects is the translation of the Object or ObjectSet
   in the ActualParameter corresponding to the DummyReference.

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

   If a ReferencedObjects is a ParameterizedObjectSet then the
   translation of the ReferencedObjects is the translation of the
   ObjectSet on the right hand side of the referenced
   ParameterizedObjectSetAssignment.

      ASIDE: A ReferencedObjects that is an Object or ObjectSet is a
      notational capability that does not exist in ASN.1 specifications
      but is allowed in ASN.1 Schema to avoid the need to manufacture a
      reference name     [ATTRIBUTE] TextIdentifier,
       renames  [ATTRIBUTE] Identifier OPTIONAL,
       number   [ATTRIBUTE] INTEGER OPTIONAL
   }


   TaggedType ::= SEQUENCE {
       tagClass  [ATTRIBUTE] TagClass OPTIONAL,
       tagging   [ATTRIBUTE] Tagging OPTIONAL,
       typeRef   [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL,
       type      Type OPTIONAL
   } (WITH COMPONENTS { ..., typeRef PRESENT, type ABSENT } |
      WITH COMPONENTS { ..., typeRef ABSENT, type PRESENT })


   SelectionType ::= SEQUENCE {
       alternative  [ATTRIBUTE] NameIdentifier,
       typeRef      [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL,
       type for an expanded parameterized definition.

      ASIDE: The Object or ObjectSet that substitutes for a
      ParameterizedObject, ParameterizedObjectSet or DummyReference is
      potentially in a different module scope to the surrounding
      translation, therefore the translation of a nested Type OPTIONAL
   } (WITH COMPONENTS { ..., typeRef PRESENT, type ABSENT } |
      WITH COMPONENTS { ..., typeRef ABSENT, type PRESENT })


   InstanceOfType ::= DefinedObjectClassOnly


   ObjectClassFieldType ::= SEQUENCE {
       classRef      [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL, may
      require a tagDefault or extensibilityImplied attribute, according
      to the provisions of Section 6.14.

13.  EncodingControlSection Translation

   If the encodingreference in an EncodingControlSection is RXER then
   the translation of the EncodingControlSection is empty.

      ASIDE: This is not suggesting that RXER encoding control sections
      are ignored.  Encoding control sections for RXER are not
      explicitly represented in ASN.1 Schema, but rather affect how an



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 62] 74]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



       class         DefinedObjectClass OPTIONAL,
       fieldNameAtt  [NAME AS "fieldName"]
                         [ATTRIBUTE] PrimitiveFieldNames OPTIONAL,
       fieldName     PrimitiveFieldNames OPTIONAL
   } ((WITH COMPONENTS { ..., classRef PRESENT, class ABSENT } |
       WITH COMPONENTS { ..., classRef ABSENT, class PRESENT })
      INTERSECTION
      (WITH COMPONENTS { ..., fieldNameAtt PRESENT, fieldName ABSENT } |
       WITH COMPONENTS { ..., fieldNameAtt ABSENT, fieldName PRESENT }))


   FieldNameOnly ::= SEQUENCE {
       fieldNameAtt  [NAME AS "fieldName"]
                         [ATTRIBUTE] PrimitiveFieldNames OPTIONAL,
       fieldName     PrimitiveFieldNames OPTIONAL
   } (WITH COMPONENTS { fieldNameAtt PRESENT, fieldName ABSENT } |
      WITH COMPONENTS { fieldNameAtt ABSENT, fieldName PRESENT })


   PrimitiveFieldNames ::= UTF8String


   InformationFromObjects ::= SEQUENCE {
       objectRef     [NAME AS "object"] [ATTRIBUTE] QName OPTIONAL,
       object        Object OPTIONAL,
       objectSetRef  [NAME AS "objectSet"] [ATTRIBUTE] QName OPTIONAL,
       objectSet     ObjectSet OPTIONAL,
       fieldNameAtt  [NAME AS "fieldName"]
                         [ATTRIBUTE] PrimitiveFieldNames OPTIONAL,
       fieldName     PrimitiveFieldNames OPTIONAL
   } ((WITH COMPONENTS { ...,
          objectRef PRESENT, object ABSENT,
              objectSetRef ABSENT, objectSet ABSENT } |
       WITH COMPONENTS { ...,
          objectRef ABSENT, object PRESENT,
              objectSetRef ABSENT, objectSet ABSENT } |
       WITH COMPONENTS { ...,
          objectRef ABSENT, object ABSENT,
              objectSetRef PRESENT, objectSet ABSENT } |
       WITH COMPONENTS { ...,
          objectRef ABSENT, object ABSENT,
              objectSetRef ABSENT, objectSet PRESENT })
      INTERSECTION
      (WITH COMPONENTS { ..., fieldNameAtt PRESENT, fieldName ABSENT } |
       WITH COMPONENTS { ..., fieldNameAtt ABSENT, fieldName PRESENT }))


   NamedType ::= CHOICE {
       attribute  TypedContainer,                April 11, 2005


      ASN.1 specification is translated into an ASN.1 Schema document.
      The effect of an RXER encoding control section on the translation
      is addressed in other parts of this specification.

      Encoding control sections for other encoding rules will have
      explicit representations in ASN.1 Schema.

   If the encodingreference in an EncodingControlSection is GSER then
   the translation of the EncodingControlSection is an element with the
   [local name] "encodingControl-GSER".  The translation of the
   EncodingInstructionAssignmentList SHALL be added to the content of
   the <encodingControl-GSER> element.

   The EncodingInstructionAssignmentList notation is different for each
   set of encoding instructions.  The translation into ASN.1 Schema of
   an EncodingInstructionAssignmentList for GSER is specified in a
   separate document [GSEREIT].

      ASIDE: The translation of an EncodingInstructionAssignmentList for
      GSER, as it is currently defined, is always empty.

   If the encodingreference in an EncodingControlSection is XER then the
   translation of the EncodingControlSection is an element    TypedContainer, with the
   [local name] "encodingControl-XER".  The translation of the
   EncodingInstructionAssignmentList SHALL be added to the content    TypedContainer
   } of
   the <encodingControl-XER> element.  The translation into ASN.1 Schema
   of an EncodingInstructionAssignmentList for XER is specified in a
   separate document [XEREIT].

14.  Security Considerations

   The ASN.1 Schema translation of an ASN.1 specification is
   semantically equivalent to the original ASN.1 specification.  The
   security considerations that apply to an application built from the
   original ASN.1 specification apply equally to an application built
   from the ASN.1 Schema translation.

15.  Acknowledgements

   This document and the technology it describes are a product of a
   joint research project between Adacel Technologies Limited and Deakin
   University on leveraging existing directory technology to produce an
   XML-based directory service.

16.  IANA Considerations

   This document has no actions for IANA.




Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 63] 75]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   NonAttributeNamedType                April 11, 2005


Appendix A. ASN.1 for ASN.1 Schema

   This appendix is normative.

   ASN1-Schema
       { iso(1) identified-organization(3) dod(6)
         internet(1) private(4) enterprise(1)
         xmled(21472) asn1(1) module(0) schema(1) }

   -- Copyright (C) The Internet Society 2005. This version of
   --  this ASN.1 module is part of RFC XXXX; see the RFC itself
   --  for full legal notices.

   DEFINITIONS
   RXER INSTRUCTIONS
   AUTOMATIC TAGS
   EXTENSIBILITY IMPLIED ::= NamedType
       (WITH COMPONENTS BEGIN

   IMPORTS
       AnyType,
       AnySimpleType,
       AnyURI,
       NCName,
       Name,
       QName
           FROM AdditionalBasicDefinitions
               { ..., attribute ABSENT })


   TypedContainer iso(1) identified-organization(3) dod(6)
                 internet(1) private(4) enterprise(1)
                 xmled(21472) asn1(1) module(0) basic(0) }
       GSER-EncodingInstruction,
       GSER-EncodingInstructionAssignmentList
           FROM GSER-EncodingInstructionSchema
               { iso(1) identified-organization(3) dod(6)
                 internet(1) private(4) enterprise(1)
                 xmled(21472) asn1(1) module(0) gser-ei-schema(2) }
       XER-EncodingInstruction,
       XER-EncodingInstructionAssignmentList
           FROM XER-EncodingInstructionSchema
               { iso(1) identified-organization(3) dod(6)
                 internet(1) private(4) enterprise(1)
                 xmled(21472) asn1(1) module(0) xer-ei-schema(3) }
       ;

   ModuleDefinition ::= SEQUENCE {
       context
       name                  [ATTRIBUTE] AnyURI OPTIONAL,
       ref ModuleReference,
       identifier            [ATTRIBUTE] QName DefinitiveIdentifier OPTIONAL,
       elementType
       schemaIdentity        [ATTRIBUTE] Name AnyURI OPTIONAL,
       name
       targetNamespace       [ATTRIBUTE] NameIdentifier AnyURI OPTIONAL,
       renames



Legg & Prager            Expires 11 October 2005               [Page 76]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


       tagDefault            [ATTRIBUTE] IdentifierOrEmpty OPTIONAL,
       typeRef      [NAME AS "type"] TagDefault DEFAULT automatic,
       extensibilityImplied  [ATTRIBUTE] QName BOOLEAN DEFAULT FALSE,
       imports               [CONTENT] ImportList OPTIONAL,
       type         Type OPTIONAL
   } (WITH COMPONENTS { context
       assignments           [CONTENT] AssignmentList OPTIONAL, ref PRESENT } |
      WITH COMPONENTS { context PRESENT, elementType PRESENT
       encodingControls      [CONTENT] EncodingControlSections OPTIONAL
   } |
      WITH COMPONENTS

   ModuleReference ::= TypeReference

   DefinitiveIdentifier ::= OBJECT IDENTIFIER

   TagDefault ::= [VALUES ALL UPPERCASED]
       ENUMERATED { name PRESENT, renames OPTIONAL, typeRef PRESENT explicit, implicit, automatic } |
      WITH COMPONENTS { name PRESENT, renames OPTIONAL, type PRESENT })


   NameIdentifier ::= NCName


   IdentifierOrEmpty

   ImportList ::= UTF8String (INCLUDES Identifier | "")


   SequenceType SEQUENCE SIZE (1..MAX) OF import Import

   Import ::= SEQUENCE {
       initialRoot  [UNTAGGED] ComponentTypeList
       name            [ATTRIBUTE] ModuleReference OPTIONAL,
       extension    SEQUENCE {
           exception    ExceptionSpec
       identifier      [ATTRIBUTE] DefinitiveIdentifier OPTIONAL,
           additional   [UNTAGGED] ExtensionAdditions OPTIONAL
       }
       schemaIdentity  [ATTRIBUTE] AnyURI OPTIONAL,
       finalRoot    [UNTAGGED] ComponentTypeList
       namespace       [ATTRIBUTE] AnyURI OPTIONAL,
       schemaLocation  [ATTRIBUTE] AnyURI OPTIONAL
   }


   ComponentTypeList

   AssignmentList ::= SEQUENCE SIZE (1..MAX) OF
       component [UNTAGGED] ComponentType


   ComponentType
       assignment [CONTENT] Assignment

   Assignment ::= CHOICE {
       named         [UNTAGGED] NamedType,
       optional
       namedType       TypeAssignment,
       namedValue      ValueAssignment,
       namedValueSet   ValueSetTypeAssignment,
       namedClass      ObjectClassAssignment,
       namedObject     ObjectAssignment,
       namedObjectSet  ObjectSetAssignment,
       component       [CONTENT] TopLevelNamedType
   }

   TypeAssignment ::= SEQUENCE {
           named         [UNTAGGED] NamedType,
           default       ValueOnly OPTIONAL
       },
       componentsOf  TypeOnly
       name  [ATTRIBUTE] TypeReference,
       type  [CONTENT] Type
   }


   ExtensionAdditions

   TypeReference ::= SEQUENCE SIZE (1..MAX) OF
       addition [UNTAGGED] ExtensionAddition


   ExtensionAddition UTF8String (PATTERN "[A-Z]\w*(-\w+)*")
                                 -- \w is equivalent to [a-zA-Z0-9]

   ValueAssignment ::= CHOICE SEQUENCE {
       group      ExtensionAdditionGroup,
       component  [UNTAGGED] ComponentType
       name   [ATTRIBUTE] ValueReference,
       type   [CONTENT] Type,



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 64] 77]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   }


   ExtensionAdditionGroup ::= SEQUENCE {
       version  [ATTRIBUTE] VersionNumber OPTIONAL,
       group    [UNTAGGED] ComponentTypeList                April 11, 2005


       value  [CONTENT] Value
   }


   VersionNumber

   ValueReference ::= INTEGER (2..MAX)


   SetType Identifier

   Identifier ::= SequenceType


   ChoiceType UTF8String (PATTERN "[a-z]\w(-\w+)*")

   ValueSetTypeAssignment ::= SEQUENCE {
       root       [UNTAGGED] AlternativeTypeList,
       extension  SEQUENCE {
           exception   ExceptionSpec OPTIONAL,
           additional  [UNTAGGED] ExtensionAdditionAlternatives OPTIONAL
       } OPTIONAL
       name      [ATTRIBUTE] TypeReference,
       type      [CONTENT] Type,
       valueSet  [CONTENT] ValueSet
   }


   AlternativeTypeList ::= SEQUENCE SIZE (1..MAX) OF
       named [UNTAGGED] NonAttributeNamedType


   ExtensionAdditionAlternatives ::= SEQUENCE SIZE (1..MAX) OF
       addition [UNTAGGED] ExtensionAdditionAlternative


   ExtensionAdditionAlternative

   ObjectClassAssignment ::= CHOICE SEQUENCE {
       group  ExtensionAdditionAlternativesGroup,
       named  [UNTAGGED] NonAttributeNamedType
       name         [ATTRIBUTE] ObjectClassReference,
       objectClass  [CONTENT] ObjectClass
   }


   ExtensionAdditionAlternativesGroup

   ObjectClassReference ::= UTF8String
                                (PATTERN "[A-Z][A-Z0-9]*(-[A-Z0-9]+)*")

   ObjectAssignment ::= SEQUENCE {
       version
       name         [ATTRIBUTE] VersionNumber OPTIONAL,
       alternatives  [UNTAGGED] AlternativeTypeList ObjectReference,
       objectClass  [CONTENT] DefinedObjectClass,
       object       [CONTENT] Object
   }


   UnionType

   ObjectReference ::= ChoiceType


   SequenceOfType ValueReference

   ObjectSetAssignment ::= SEQUENCE {
       minSize  [ATTRIBUTE] INTEGER (0..MAX) OPTIONAL,
       maxSize
       name         [ATTRIBUTE] INTEGER (0..MAX) OPTIONAL,
       named    [UNTAGGED] NonAttributeNamedType ObjectSetReference,
       objectClass  [CONTENT] DefinedObjectClass,
       objectSet    [CONTENT] ObjectSet
   }


   SetOfType

   ObjectSetReference ::= SequenceOfType


   ListType TypeReference

   TopLevelNamedType ::= SequenceOfType


   ConstrainedType NamedType
       (WITH COMPONENTS { ...,
           attribute (WITH COMPONENTS { ..., reference ABSENT }),
           element   (WITH COMPONENTS { ..., reference ABSENT }),
           content   ABSENT,
           member    ABSENT,
           item      ABSENT })

   NamedType ::= SEQUENCE CHOICE {
       attribute  Attribute,
       element    Element,



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 65] 78]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



       typeRef     [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL,
       type        Type OPTIONAL,
       constraint  [UNTAGGED] Constraint                April 11, 2005


       content    InvisibleNamedType,
       member     InvisibleNamedType,
       item       InvisibleNamedType
   }

   Attribute ::= GenericNamedType
       (WITH COMPONENTS { ..., typeRef PRESENT, type
           definition (WITH COMPONENTS { ...,
               typeAsVersion ABSENT } |
      WITH }) })

   Element ::= GenericNamedType

   InvisibleNamedType ::= GenericNamedType
       (WITH COMPONENTS { ..., typeRef
           reference  ABSENT, type PRESENT
           definition (WITH COMPONENTS { ...,
               typeAsVersion ABSENT })


   Constraint })

   GenericNamedType ::= SEQUENCE {
       constraintSpec  [UNTAGGED] CHOICE {
           subtype         [UNTAGGED] ElementSetSpecs,
           constrainedBy   UserDefinedConstraint,
           table           TableConstraint,
           contents        ContentsConstraint
       },
       exception       ExceptionSpec OPTIONAL
       reference   [CONTENT] GeneralReference,
       definition  [CONTENT] SEQUENCE {
           name           [ATTRIBUTE] NCName,
           identifier     [ATTRIBUTE] IdentifierOrEmpty OPTIONAL,
           typeAsVersion  [ATTRIBUTE] BOOLEAN DEFAULT FALSE,
           type           [CONTENT] Type
       }


   UserDefinedConstraint
   }

   IdentifierOrEmpty ::= SEQUENCE UTF8String (INCLUDES Identifier | "")

   Type ::= CHOICE {
       parameters  [UNTAGGED] ConstraintParameters OPTIONAL
       typeRef  [NAME AS "type"] [ATTRIBUTE] QName,
       type     ElementFormType
   }


   ConstraintParameters

   ElementFormType ::= SEQUENCE SIZE (1..MAX) OF
       parameter [UNTAGGED] UserDefinedConstraintParameter


   UserDefinedConstraintParameter ::= {
       tagDefault            [ATTRIBUTE] TagDefault OPTIONAL,
       extensibilityImplied  [ATTRIBUTE] BOOLEAN OPTIONAL,
       explicit              [ATTRIBUTE] BOOLEAN DEFAULT FALSE,
       definition            [CONTENT] CHOICE {
       valueParameter      TypeAndValue,
       valueSetParameter   TypeAndValueSet,
       objectParameter     ObjectClassAndObject,
       objectSetParameter  ObjectClassAndObjectSet,
       typeParameter       TypeOnly,
       classParameter      DefinedObjectClassOnly
           reference             [CONTENT] GeneralReference,
           ancestor              [ATTRIBUTE] INTEGER (1..MAX),
           namedBitList          NamedBitList,
           namedNumberList       NamedNumberList,
           enumerated            EnumeratedType,
           tagged                TaggedType,
           prefixed              EncodingPrefixedType,
           selection             SelectionType,



Legg & Prager            Expires 11 October 2005               [Page 79]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


           instanceOf            InstanceOfType,
           fromClass             ObjectClassFieldType,
           fromObjects           InformationFromObjects,
           sequence              SequenceType,
           set                   SetType,
           choice                ChoiceType,
           union                 UnionType,
           sequenceOf            SequenceOfType,
           setOf                 SetOfType,
           list                  ListType,
           constrained           ConstrainedType
       }
   }


   TableConstraint

   GeneralReference ::= SEQUENCE {
       objectSetRef       [NAME AS "objectSet"]
       reference         [CONTENT] CHOICE {
           ref               [ATTRIBUTE] QName OPTIONAL,
       objectSet          ObjectSet QName,
           elementType       [ATTRIBUTE] Name
       },
       context           [ATTRIBUTE] AnyURI OPTIONAL,
       componentRelation  [UNTAGGED] SEQUENCE SIZE (1..MAX) OF
                              restrictBy AtNotation
       canonicalization  [ATTRIBUTE] AnyURI OPTIONAL
   }

   Reference ::= GeneralReference
       (WITH COMPONENTS { ..., objectSetRef PRESENT, objectSet ABSENT } |
      WITH
           reference (WITH COMPONENTS { ..., objectSetRef ABSENT, objectSet PRESENT elementType ABSENT }),
           canonicalization ABSENT })


   AtNotation

   NamedBitList ::= SEQUENCE {
       component
       namedBits  [CONTENT] SEQUENCE SIZE (1..MAX) OF
                      namedBit NamedBit
   }

   NamedBit ::= SEQUENCE {
       name        [ATTRIBUTE] UTF8String NCName,
       identifier  [ATTRIBUTE] Identifier OPTIONAL,
       bit         [ATTRIBUTE] INTEGER (0..MAX)
   }


   ContentsConstraint

   NamedNumberList ::= SEQUENCE {
       containing  TypeOnly
       namedNumbers  [CONTENT] SEQUENCE SIZE (1..MAX) OF
                         namedNumber NamedNumber
   }

   NamedNumber ::= SEQUENCE {
       name        [ATTRIBUTE] NCName,
       identifier  [ATTRIBUTE] Identifier OPTIONAL,
       encodedBy   ValueOnly OPTIONAL
       number      [ATTRIBUTE] INTEGER



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 66] 80]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004                April 11, 2005


   } ((WITH COMPONENTS

   EnumeratedType ::= SEQUENCE { ..., containing PRESENT }) |
      (WITH COMPONENTS
       root       [CONTENT] Enumeration,
       extension  SEQUENCE { ..., encodedBy PRESENT }))
           exception  ExceptionSpec OPTIONAL,
           additions  [CONTENT] Enumeration OPTIONAL
       } OPTIONAL
   }

   Enumeration ::= TypeAndValue


   ValueOnly SEQUENCE SIZE (1..MAX) OF
       enumeration EnumerationItem

   EnumerationItem ::= SEQUENCE {
       literal
       name        [ATTRIBUTE] AnySimpleType OPTIONAL,
       valueRef  [NAME AS "value"] NCName,
       identifier  [ATTRIBUTE] QName Identifier OPTIONAL,
       value     Value
       number      [ATTRIBUTE] INTEGER OPTIONAL
   } (WITH COMPONENTS

   TaggedType ::= SEQUENCE { literal PRESENT, valueRef ABSENT, value ABSENT
       tagClass  [ATTRIBUTE] TagClass OPTIONAL,
       tagging   [ATTRIBUTE] Tagging OPTIONAL,
       type      [CONTENT] Type
   } |
      WITH COMPONENTS

   TagClass ::= [VALUES ALL UPPERCASED]
       ENUMERATED { literal ABSENT, valueRef PRESENT, value ABSENT universal, application, private } |
      WITH COMPONENTS

   Tagging ::= [VALUES ALL UPPERCASED]
       ENUMERATED { literal ABSENT, valueRef ABSENT, value PRESENT })


   AnySimpleType explicit, implicit }

   EncodingPrefixedType ::= AnyType
                         (WITH COMPONENTS SEQUENCE { ..., attributes ABSENT })


   Value
       prefixes  [CONTENT] EncodingPrefixes,
       type      [CONTENT] Type
   }

   EncodingPrefixes ::= AnyType


   ValueSetOnly SEQUENCE SIZE (1..MAX) OF
       prefix [CONTENT] EncodingPrefix

   EncodingPrefix ::= CHOICE {
       gser  [NAME AS "GSER"] GSER-EncodingInstructions,
       xer   [NAME AS "XER"] XER-EncodingInstructions
       -- plus encoding instructions
       -- for other encoding rules in the future
   }

   GSER-EncodingInstructions ::= SEQUENCE SIZE (1..MAX) OF
       instruction [CONTENT] GSER-EncodingInstruction



Legg & Prager            Expires 11 October 2005               [Page 81]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   XER-EncodingInstructions ::= SEQUENCE {
       valueSet  ValueSet
   }


   ValueSet SIZE (1..MAX) OF
       instruction [CONTENT] XER-EncodingInstruction

   SelectionType ::= SEQUENCE {
       definition  [UNTAGGED]
       alternative  [CONTENT] CHOICE {
           set         [UNTAGGED] ElementSetSpecs
       } OPTIONAL
           attribute    [ATTRIBUTE] QName,
           element      [ATTRIBUTE] QName,
           content      [ATTRIBUTE] QName,
           member       [ATTRIBUTE] QName
       },
       type         [CONTENT] Type
   }


   ElementSetSpecs

   InstanceOfType ::= SEQUENCE {
       root         [UNTAGGED] ElementSetSpec,
       extension
       objectClass  [CONTENT] DefinedObjectClass
   }

   ObjectClassFieldType ::= SEQUENCE {
           additional   [UNTAGGED] ElementSetSpec
       } OPTIONAL
       objectClass  [CONTENT] DefinedObjectClass,
       fieldName    [CONTENT] FieldName
   }


   ElementSetSpec

   FieldName ::= CHOICE {
       single  [UNTAGGED] Intersections,
       union
       fieldNameAtt  [NAME AS "fieldName"]
                         [ATTRIBUTE] PrimitiveFieldNames,
       fieldName     PrimitiveFieldNames
   }

   PrimitiveFieldNames ::= UTF8String

   InformationFromObjects ::= SEQUENCE {
           list    [UNTAGGED] IntersectionsList
       referencedObjects  [CONTENT] ReferencedObjects,
       fieldName          [CONTENT] FieldName
   }

   ReferencedObjects ::= CHOICE {
       object     [CONTENT] Object,
       objectSet  [CONTENT] ObjectSet
   }


   IntersectionsList

   SequenceType ::= SEQUENCE SIZE (2..MAX) OF
       item [UNTAGGED] Intersections {
       root               [CONTENT] ComponentTypeList OPTIONAL,
       extensionAndFinal  [CONTENT] SEQUENCE {
           extension          SEQUENCE {
               exception          ExceptionSpec OPTIONAL,
               additions          [CONTENT] ExtensionAdditions OPTIONAL
           },
           root               [CONTENT] ComponentTypeList OPTIONAL



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 67] 82]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   Intersections ::= CHOICE {
       single        [UNTAGGED] IntersectionElements,
       intersection  SEQUENCE {
           list          [UNTAGGED] IntersectionElementsList                April 11, 2005


       } OPTIONAL
   }


   IntersectionElementsList

   ComponentTypeList ::= SEQUENCE SIZE (2..MAX) (1..MAX) OF
       item [UNTAGGED] IntersectionElements


   IntersectionElements
       componentType [CONTENT] ComponentType

   ComponentType ::= CHOICE {
       all
       component     [CONTENT] SequenceNamedType,
       optional      SEQUENCE {
           elements  [UNTAGGED] Elements OPTIONAL,
           except
           component     [CONTENT] SequenceNamedType,
           default       SEQUENCE {
               exclusions  [UNTAGGED] Elements
               value         [CONTENT] Value
           } OPTIONAL
       },
       elements  [UNTAGGED] Elements
       componentsOf  SEQUENCE {
           type          [CONTENT] Type
       }


   Elements
   }

   SequenceNamedType ::= CHOICE NamedType
       (WITH COMPONENTS {
       value           Value,
       includes        TypeOnly,
       range           ValueRange,
       size            Constraint,
       typeConstraint  TypeOnly,
       from            Constraint,
       withComponent   Constraint,
       withComponents  MultipleTypeConstraints,
       pattern         ValueOnly,
       object          Object,
       objectSet       ObjectSet
   }


   ValueRange ..., member ABSENT, item ABSENT })

   ExtensionAdditions ::= SEQUENCE {
       minimum  [UNTAGGED] SIZE (1..MAX) OF
       addition [CONTENT] ExtensionAddition

   ExtensionAddition ::= CHOICE {
           minInclusive  OptionalValueOnly,
           minExclusive  OptionalValueOnly
       extensionGroup  ExtensionAdditionGroup,
       componentType   [CONTENT] ComponentType
   } DEFAULT minInclusive:{},
       maximum  [UNTAGGED] CHOICE

   ExtensionAdditionGroup ::= SEQUENCE {
           maxInclusive  OptionalValueOnly,
           maxExclusive  OptionalValueOnly
       } DEFAULT maxInclusive:{}
       version         [ATTRIBUTE] VersionNumber OPTIONAL,
       componentTypes  [CONTENT] ComponentTypeList
   }


   OptionalValueOnly

   VersionNumber ::= INTEGER (2..MAX)

   SetType ::= SequenceType

   ChoiceOrUnionType ::= SEQUENCE {
       literal
       precedence  [ATTRIBUTE] AnySimpleType PrecedenceList OPTIONAL,
       valueRef  [NAME AS "value"] [ATTRIBUTE] QName
       root        [CONTENT] AlternativeTypeList,
       extension   SEQUENCE {
           exception   ExceptionSpec OPTIONAL,
           additions   [CONTENT] ExtensionAdditionAlternatives OPTIONAL
       } OPTIONAL
   }




Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 68] 83]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



       value     Value OPTIONAL
   }                April 11, 2005


   PrecedenceList ::= [LIST] SEQUENCE SIZE (1..MAX) OF member QName

   AlternativeTypeList ::= SEQUENCE SIZE (1..MAX) OF
       component [CONTENT] ChoiceOrUnionNamedType

   ChoiceOrUnionNamedType ::= NamedType
       (WITH COMPONENTS { literal PRESENT } |
      WITH COMPONENTS { valueRef PRESENT } |
      WITH COMPONENTS { value OPTIONAL ..., item ABSENT })


   MultipleTypeConstraints

   ExtensionAdditionAlternatives ::= SEQUENCE {
       partial          [ATTRIBUTE] BOOLEAN DEFAULT FALSE,
       typeConstraints  [UNTAGGED] SEQUENCE SIZE (1..MAX) OF
       addition [CONTENT] ExtensionAdditionAlternative

   ExtensionAdditionAlternative ::= CHOICE {
       extensionGroup  ExtensionAdditionAlternativesGroup,
       component NamedConstraint       [CONTENT] ChoiceOrUnionNamedType
   }


   NamedConstraint

   ExtensionAdditionAlternativesGroup ::= SEQUENCE {
       name        [ATTRIBUTE] NameIdentifier,
       use
       version       [ATTRIBUTE] PresenceConstraint VersionNumber OPTIONAL,
       constraint  [UNTAGGED] Constraint
       alternatives  [CONTENT] AlternativeTypeList
   }


   DefinedObjectClassOnly

   ChoiceType ::= SEQUENCE ChoiceOrUnionType
       (WITH COMPONENTS {
       classRef  [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL,
       class     DefinedObjectClass OPTIONAL
   } ...,
           precedence ABSENT,
           root (WITH COMPONENT (INCLUDES ChoiceNamedType)),
           extension (WITH COMPONENTS { classRef PRESENT, class ABSENT } |
      WITH ...,
               additions (WITH COMPONENT (WITH COMPONENTS { classRef ABSENT, class PRESENT ...,
                   extensionGroup (WITH COMPONENTS { ...,
                       alternatives (WITH COMPONENT
                           (INCLUDES ChoiceNamedType)) }),
                   component (INCLUDES ChoiceNamedType) })) })


   ObjectClass })

   ChoiceNamedType ::= SEQUENCE ChoiceOrUnionNamedType
       (WITH COMPONENTS {
       tagDefault            [ATTRIBUTE] TagDefault OPTIONAL,
       extensibilityImplied  [ATTRIBUTE] BOOLEAN OPTIONAL,
       context               [ATTRIBUTE] AnyURI OPTIONAL,
       ref                   [ATTRIBUTE] QName OPTIONAL,
       definition            [UNTAGGED] CHOICE ..., member ABSENT })

   UnionType ::= ChoiceOrUnionType
       (WITH COMPONENTS {
           objectClassDefn       [UNTAGGED] SEQUENCE SIZE (1..MAX) OF
                                     fieldSpec [UNTAGGED] FieldSpec
       } OPTIONAL
   } ...,
           root (WITH COMPONENT (INCLUDES UnionNamedType)),
           extension (WITH COMPONENTS { ...,
         context OPTIONAL, ref PRESENT, definition ABSENT } |
      WITH
               additions (WITH COMPONENT (WITH COMPONENTS { ...,
         context ABSENT, ref ABSENT, definition PRESENT
                   extensionGroup (WITH COMPONENTS { ...,
                       alternatives (WITH COMPONENT
                           (INCLUDES UnionNamedType)) }),
                   component (INCLUDES UnionNamedType) })) })


   DefinedObjectClass })

   UnionNamedType ::= ObjectClass ChoiceOrUnionNamedType
       (WITH COMPONENTS { ..., definition
           attribute ABSENT, element ABSENT, content ABSENT })


   FieldSpec ::= CHOICE {
       typeField       TypeField,
       valueField      ValueField,
       valueSetField   ValueSetField,
       objectField     ObjectField,
       objectSetField  ObjectSetField,
       optional        SEQUENCE {
           optionalField   [UNTAGGED] CHOICE {



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 69] 84]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



               optionalTypeField       [UNTAGGED] SEQUENCE {
                   typeField               TypeField,
                   default                 TypeOnly
               },
               optionalValueField      [UNTAGGED] SEQUENCE {
                   valueField              ValueField,
                   default                 ValueOnly
               },
               optionalValueSetField   [UNTAGGED] SEQUENCE {
                   valueSetField           ValueSetField,
                   default                 ValueSetOnly
               },
               optionalObjectField     [UNTAGGED] SEQUENCE {
                   objectField             ObjectField,
                   default                 ObjectOnly
               },
               optionalObjectSetField  [UNTAGGED] SEQUENCE {
                   objectSetField          ObjectSetField,
                   default                 ObjectSetOnly
               }
           }
       }
   }


   TypeField ::= SEQUENCE {
       name  [ATTRIBUTE] TypeFieldReference
   }


   TypeFieldReference ::= TypeReference


   ValueField                April 11, 2005


   SequenceOfOrListType ::= SEQUENCE {
       name           [ATTRIBUTE] ValueFieldReference,
       unique         [ATTRIBUTE] BOOLEAN DEFAULT FALSE,
       typeRef        [NAME AS "type"]
       minSize    [ATTRIBUTE] QName INTEGER (0..MAX) OPTIONAL,
       type           Type
       maxSize    [ATTRIBUTE] INTEGER (0..MAX) OPTIONAL,
       typeFromField  FieldNameOnly OPTIONAL
   }
       component  [CONTENT] NamedType
                      (WITH COMPONENTS { ...,
          typeRef PRESENT, type
                          attribute ABSENT, typeFromField member ABSENT })
   } |
      WITH

   SequenceOfType ::= SequenceOfOrListType
       (WITH COMPONENTS { ...,
          typeRef ABSENT, type PRESENT, typeFromField
           component (WITH COMPONENTS { ..., item ABSENT } |
      WITH }) })

   SetOfType ::= SequenceOfType

   ListType ::= SequenceOfOrListType
       (WITH COMPONENTS { ..., unique ABSENT,
          typeRef ABSENT, type
           component (WITH COMPONENTS { ...,
                         element ABSENT, typeFromField PRESENT content ABSENT })


   ValueFieldReference })

   ConstrainedType ::= ValueReference


   ValueSetField SEQUENCE {
       type        [CONTENT] Type,
       constraint  [CONTENT] Constraint
   }

   Constraint ::= SEQUENCE {
       name           [ATTRIBUTE] ValueSetFieldReference,
       typeRef        [NAME AS "type"] [ATTRIBUTE] QName OPTIONAL,
       constraintSpec  [CONTENT] CHOICE {
           subtype         [CONTENT] ElementSetSpecs,
           constrainedBy   UserDefinedConstraint,
           table           TableConstraint,
           contents        ContentsConstraint
       },
       exception       ExceptionSpec OPTIONAL
   }

   UserDefinedConstraint ::= SEQUENCE {
       parameters  [CONTENT] ConstraintParameters OPTIONAL
   }

   ConstraintParameters ::= SEQUENCE SIZE (1..MAX) OF
       parameter [CONTENT] UserDefinedConstraintParameter

   UserDefinedConstraintParameter ::= CHOICE {
       valueParameter      SEQUENCE {
           type                [CONTENT] Type,
           value               [CONTENT] Value
       },
       valueSetParameter   SEQUENCE {
           type                [CONTENT] Type,



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 70] 85]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



       type           Type OPTIONAL,
       typeFromField  FieldNameOnly OPTIONAL
   } (WITH COMPONENTS                April 11, 2005


           valueSet            [CONTENT] ValueSet
       },
       objectParameter     SEQUENCE { ...,
          typeRef PRESENT, type ABSENT, typeFromField ABSENT } |
      WITH COMPONENTS
           objectClass         [CONTENT] DefinedObjectClass,
           object              [CONTENT] Object
       },
       objectSetParameter  SEQUENCE { ...,
          typeRef ABSENT, type PRESENT, typeFromField ABSENT } |
      WITH COMPONENTS
           objectClass         [CONTENT] DefinedObjectClass,
           objectSet           [CONTENT] ObjectSet
       },
       typeParameter       SEQUENCE { ...,
          typeRef ABSENT,
           type ABSENT, typeFromField PRESENT })


   ValueSetFieldReference ::= TypeReference


   ObjectField ::=                [CONTENT] Type
       },
       classParameter      SEQUENCE {
       name      [ATTRIBUTE] ObjectFieldReference,
       classRef  [NAME AS "class"] [ATTRIBUTE] QName OPTIONAL,
       class
           objectClass         [CONTENT] DefinedObjectClass OPTIONAL
       } (WITH COMPONENTS { ..., classRef PRESENT, class ABSENT
   } |
      WITH COMPONENTS

   TableConstraint ::= SEQUENCE { ..., classRef ABSENT, class PRESENT })


   ObjectFieldReference
       objectSet          [CONTENT] ObjectSet,
       componentRelation  [CONTENT] AtNotations OPTIONAL
   }

   AtNotations ::= ObjectReference


   ObjectSetField SEQUENCE SIZE (1..MAX) OF
       restrictBy AtNotation

   AtNotation ::= AnySimpleType

   ContentsConstraint ::= SEQUENCE {
       name      [ATTRIBUTE] ObjectSetFieldReference,
       classRef  [NAME AS "class"] [ATTRIBUTE] QName
       containing  SEQUENCE {
           type        [CONTENT] Type
       } OPTIONAL,
       class     DefinedObjectClass
       encodedBy   SEQUENCE {
           value       [CONTENT] Value
       } OPTIONAL
   } (WITH ((WITH COMPONENTS { ..., classRef PRESENT, class ABSENT } containing PRESENT }) |
      WITH
      (WITH COMPONENTS { ..., classRef ABSENT, class encodedBy PRESENT })


   ObjectSetFieldReference ::= ObjectSetReference


   ObjectOnly }))

   ExceptionSpec ::= SEQUENCE {
       objectRef  [NAME AS "object"] [ATTRIBUTE] QName OPTIONAL,
       object     Object OPTIONAL
   } (WITH COMPONENTS { objectRef PRESENT, object ABSENT
       type   [CONTENT] Type,
       value  [CONTENT] Value
   } |
      WITH COMPONENTS { objectRef ABSENT, object PRESENT })


   Object

   Value ::= SEQUENCE CHOICE {
       tagDefault            [ATTRIBUTE] TagDefault OPTIONAL,
       extensibilityImplied  [ATTRIBUTE] BOOLEAN OPTIONAL,
       context
       literal   [ATTRIBUTE] AnyURI OPTIONAL,
       ref AnySimpleType,
       valueRef  [NAME AS "value"] [ATTRIBUTE] QName OPTIONAL,
       definition            [UNTAGGED] CHOICE {
           definition            AnyType,
           fromObjects           InformationFromObjects
       } OPTIONAL
   } (WITH COMPONENTS { ...,
         context OPTIONAL, ref PRESENT, definition ABSENT QName,
       value     ElementFormValue
   } |
      WITH COMPONENTS { ...,
         context ABSENT, ref ABSENT, definition PRESENT })



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 71] 86]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   ObjectSetOnly                April 11, 2005


   ElementFormValue ::= AnyType

   -- If asn1:meta="true" then the governing type of Value.value
   -- is ElementFormMetaValue.
   ElementFormMetaValue ::= SEQUENCE {
       objectSetRef  [NAME AS "objectSet"] [ATTRIBUTE] QName OPTIONAL,
       objectSet     ObjectSet OPTIONAL
   } (WITH COMPONENTS
       definition  [CONTENT] CHOICE { objectSetRef PRESENT, objectSet ABSENT
           reference      [CONTENT] GeneralReference,
           fromObjects    InformationFromObjects,
           openTypeValue  SEQUENCE {
               type           [CONTENT] Type,
               value          [CONTENT] Value
           },
           components     [CONTENT] ComponentValueList
       } |
      WITH COMPONENTS
   }

   ComponentValueList ::= SEQUENCE SIZE (1..MAX) OF
       component [CONTENT] NamedValue

   NamedValue ::= CHOICE { objectSetRef ABSENT, objectSet PRESENT })


   ObjectSet
       attribute  GenericNamedValue,
       element    GenericNamedValue,
       content    GenericNamedValue,
       member     GenericNamedValue,
       item       GenericNamedValue
   }

   GenericNamedValue ::= SEQUENCE {
       tagDefault            [ATTRIBUTE] TagDefault OPTIONAL,
       extensibilityImplied  [ATTRIBUTE] BOOLEAN OPTIONAL,
       context               [ATTRIBUTE] AnyURI OPTIONAL,
       ref
       name   [ATTRIBUTE] QName OPTIONAL,
       definition            [UNTAGGED] QName,
       value  [CONTENT] Value
   }

   ValueSet ::= CHOICE {
           objectSetSpec         [UNTAGGED] ObjectSetSpec,
           fromObjects           InformationFromObjects
       } OPTIONAL
       valueSet  ElementFormValueSet
   } (WITH COMPONENTS

   ElementFormValueSet ::= SEQUENCE { ...,
         context OPTIONAL, ref PRESENT,
       definition ABSENT } |
      WITH COMPONENTS  [CONTENT] CHOICE { ...,
         context ABSENT, ref ABSENT, definition PRESENT })


   ObjectSetSpec
           elementSetSpecs  [CONTENT] ElementSetSpecs
       }
   }

   ElementSetSpecs ::= SEQUENCE {
       root         [UNTAGGED] ElementSetSpec OPTIONAL,       [CONTENT] ElementSetSpec,
       extension  SEQUENCE {
           additional  [UNTAGGED]
           additions  [CONTENT] ElementSetSpec
       } OPTIONAL
   }


   TagDefault ::= ENUMERATED { explicit, implicit, automatic }


   TagClass ::= ENUMERATED { universal, application, private }


   Tagging ::= ENUMERATED { explicit, implicit }


   PresenceConstraint ::= ENUMERATED { present, absent, optional }


   ENCODING-CONTROL XER
       GLOBAL-DEFAULTS MODIFIED-ENCODINGS
       TEXT TagDefault:ALL AS UPPERCASED
       TEXT TagClass:ALL AS UPPERCASED
       TEXT Tagging:ALL AS UPPERCASED
       TEXT PresenceConstraint:ALL AS UPPERCASED


   END


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


   This appendix is non-normative.





Legg & Prager           Expires 17 December 2004               [Page 72]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



   <?xml version="1.0"?>
   <asn1:schema xmlns:asn1="http://xmled.info/ns/ASN.1"
                xmlns:xsd="http://www.w3.org/2001/XMLSchema"
                xmlns:tns="http://xmled.info/ns/ASN.1"
                targetNamespace="http://xmled.info/ns/ASN.1"
                name="ASN1-Schema"
                extensibilityImplied="true">


    <import name="SchemaLanguageIntegration"
            schemaLocation="SchemaLanguageIntegration.asd"/>


    <namedType name="ModuleDefinition">
     <type>
      <sequence>
       <optional>
        <attribute name="name" type="tns:ModuleReference"/>
       </optional>
       <optional>
        <attribute name="identifier" type="tns:DefinitiveIdentifier"/>
       </optional>
       <optional>
        <attribute name="targetNamespace" type="asn1:AnyURI"/>
       </optional>
       <optional>
        <attribute name="tagDefault" type="tns:TagDefault"/>
        <default literal="automatic"/>
       </optional>
       <optional>
        <attribute name="extensibilityImplied" type="asn1:BOOLEAN"/>
        <default literal="false"/>
       </optional>
       <optional>
        <content name="imports">
         <type>
          <sequenceOf minSize="1">
           <element name="import" type="tns:Import"/>
          </sequenceOf>
         </type>
        </content>
       </optional>
       <content name="assignments" type="tns:AssignmentList"/>
      </sequence>
     </type>
    </namedType>


    <namedType name="ModuleReference" type="tns:TypeReference"/>


    <namedType name="DefinitiveIdentifier"




Legg & Prager           Expires 17 December 2004               [Page 73]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



               type="asn1:OBJECT-IDENTIFIER"/>


    <namedType name="Import">
     <type>
      <sequence>
       <optional>
        <attribute name="namespace" type="asn1:AnyURI"/>
       </optional>
       <optional>
        <attribute name="name" type="tns:ModuleReference"/>
       </optional>
       <optional>
        <attribute name="identifier" type="tns:DefinitiveIdentifier"/>
       </optional>
       <optional>
        <attribute name="schemaIdentity" type="asn1:AnyURI"/>
       </optional>
       <optional>
        <attribute name="schemaLocation" type="asn1:AnyURI"/>
       </optional>
      </sequence>
     </type>
    </namedType>


    <namedType name="AssignmentList">
     <type>
      <sequenceOf minSize="1">
       <content name="assignment" type="tns:Assignment"/>
      </sequenceOf>
     </type>
    </namedType>


    <namedType name="Assignment">
     <type>
      <choice>
       <element name="namedType" type="tns:TypeAssignment"/>
       <element name="namedValue" type="tns:ValueAssignment"/>
       <element name="namedValueSet" type="tns:ValueSetTypeAssignment"/>
       <element name="namedClass" type="tns:ObjectClassAssignment"/>
       <element name="namedObject" type="tns:ObjectAssignment"/>
       <element name="namedObjectSet" type="tns:ObjectSetAssignment"/>
      </choice>
     </type>
    </namedType>


    <namedType name="TypeAssignment">
     <type>
      <constrained>



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 74]
INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



       <type>
        <sequence>
         <attribute name="name" type="tns:ExtendedTypeReference"/>
         <optional>
          <attribute name="renames" type="tns:TypeReferenceOrEmpty"/>
         </optional>
         <optional>
          <attribute name="type" renames="typeRef" type="tns:QName"/>
         </optional>
         <optional>
          <element name="type" type="tns:Type"/>
         </optional>
        </sequence>
       </type>
       <union>
        <withComponents partial="true">
         <component name="@type" use="PRESENT"/>
         <component name="type" use="ABSENT"/>
        </withComponents>
        <withComponents partial="true">
         <component name="@type" use="ABSENT"/>
         <component name="type" use="PRESENT"/>
        </withComponents>
       </union>
      </constrained>
     </type>
    </namedType>


    <namedType name="ExtendedTypeReference" type="asn1:NCName"/>


    <namedType name="TypeReference">
     <type>
      <constrained type="asn1:UTF8String">
       <pattern literal="[A-Z][A-Z0-9a-z]*(-[A-Z0-9a-z]+)*"/>
      </constrained>
     </type>
    </namedType>


    <namedType name="TypeReferenceOrEmpty">
     <type>
      <constrained type="asn1:UTF8String">
       <union>
        <includes type="tns:TypeReference"/>
        <value/>
       </union>
      </constrained>
     </type>
    </namedType> 87]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


   ElementSetSpec ::= CHOICE {
       single  [CONTENT] Intersections,
       union   SEQUENCE {
           list    [CONTENT] IntersectionsList
       }
   }

   IntersectionsList ::= SEQUENCE SIZE (2..MAX) OF
       intersections [CONTENT] Intersections

   Intersections ::= CHOICE {
       single        [CONTENT] IntersectionElements,
       intersection  SEQUENCE {
           list          [CONTENT] IntersectionElementsList
       }
   }

   IntersectionElementsList ::= SEQUENCE SIZE (2..MAX) OF
       intersectionElements [CONTENT] IntersectionElements

   IntersectionElements ::= CHOICE {
       all       SEQUENCE {
           elements  [CONTENT] Elements OPTIONAL,
           except    SEQUENCE {
               exclusions  [CONTENT] Elements
           }
       },
       elements  [CONTENT] Elements
   }

   Elements ::= CHOICE {
       value           ElementFormValue,
       includes        SEQUENCE {
           containedSubtype  [CONTENT] Type
       },
       range           ValueRange,
       size            SEQUENCE {
           constraint      [CONTENT] Constraint
       },
       typeConstraint  SEQUENCE {
           type            [CONTENT] Type
       },
       from            SEQUENCE {
           permittedAlphabet  [CONTENT] Constraint
       },
       withComponent   SEQUENCE {
           singleTypeConstraint  [CONTENT] Constraint
       },



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 75] 88]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



    <namedType name="ValueAssignment">
     <type>
      <constrained>
       <type>
        <sequence>
         <attribute name="name" type="tns:ValueReference"/>
         <optional>
          <attribute name="type" renames="typeRef" type="tns:QName"/>
         </optional>
         <optional>
          <element name="type" type="tns:Type"/>
         </optional>
         <optional>
          <attribute name="literal" type="tns:AnySimpleType"/>
         </optional>
         <optional>
          <attribute name="value" renames="valueRef" type="tns:QName"/>
         </optional>
         <optional>
          <element name="value" type="tns:Value"/>
         </optional>
        </sequence>
       </type>
       <intersection>
        <union>
         <withComponents partial="true">
          <component name="@type" use="PRESENT"/>
          <component name="type" use="ABSENT"/>
         </withComponents>
         <withComponents partial="true">
          <component name="@type" use="ABSENT"/>
          <component name="type" use="PRESENT"/>
         </withComponents>
        </union>
        <union>
         <withComponents partial="true">
          <component name="@literal" use="PRESENT"/>
          <component name="@value" use="ABSENT"/>
          <component name="value" use="ABSENT"/>
         </withComponents>
         <withComponents partial="true">
          <component name="@literal" use="ABSENT"/>
          <component name="@value" use="PRESENT"/>
          <component name="value" use="ABSENT"/>
         </withComponents>
         <withComponents partial="true">
          <component name="@literal" use="ABSENT"/>
          <component name="@value" use="ABSENT"/>                April 11, 2005


       withComponents  MultipleTypeConstraints,
       pattern         SEQUENCE {
           patternConstraint  [CONTENT] Value
       },
       object          ElementFormObject,
       objectSet       ElementFormObjectSet
   }

   ValueRange ::= SEQUENCE {
       minimum      [CONTENT] CHOICE {
           minInclusive  SEQUENCE {
               lowerEndValue  [CONTENT] Value OPTIONAL
           },
           minExclusive  SEQUENCE {
               lowerEndValue  [CONTENT] Value OPTIONAL
           }
       } DEFAULT minInclusive:{},
       maximum      [CONTENT] CHOICE {
           maxInclusive  SEQUENCE {
               upperEndValue  [CONTENT] Value OPTIONAL
           },
           maxExclusive  SEQUENCE {
               upperEndValue  [CONTENT] Value OPTIONAL
           }
       } DEFAULT maxInclusive:{}
   }

   MultipleTypeConstraints ::= SEQUENCE {
       partial          [ATTRIBUTE] BOOLEAN DEFAULT FALSE,
       typeConstraints  [CONTENT] TypeConstraints
   }

   TypeConstraints ::= SEQUENCE SIZE (1..MAX) OF
       namedConstraint [CONTENT] NamedConstraint

   NamedConstraint ::= CHOICE {
       attribute  GenericNamedConstraint,
       element    GenericNamedConstraint,
       content    GenericNamedConstraint,
       member     GenericNamedConstraint,
       item       GenericNamedConstraint
   }

   GenericNamedConstraint ::= SEQUENCE {
       name        [ATTRIBUTE] QName,
       use         [ATTRIBUTE] PresenceConstraint OPTIONAL,
       constraint  [CONTENT] Constraint OPTIONAL
   }



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 76] 89]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



          <component name="value" use="PRESENT"/>
         </withComponents>
        </union>
       </intersection>
      </constrained>
     </type>
    </namedType>


    <namedType name="TypeAndValue">
     <type>
      <constrained>
       <type>
        <sequence>
         <optional>
          <attribute name="type" renames="typeRef" type="tns:QName"/>
         </optional>
         <optional>
          <element name="type" type="tns:Type"/>
         </optional>
         <optional>
          <attribute name="literal" type="tns:AnySimpleType"/>
         </optional>
         <optional>
          <attribute name="value" renames="valueRef" type="tns:QName"/>
         </optional>
         <optional>
          <element name="value" type="tns:Value"/>
         </optional>
        </sequence>
       </type>
       <intersection>
        <union>
         <withComponents partial="true">
          <component name="@type" use="PRESENT"/>
          <component name="type" use="ABSENT"/>
         </withComponents>
         <withComponents partial="true">
          <component name="@type" use="ABSENT"/>
          <component name="type" use="PRESENT"/>
         </withComponents>
        </union>
        <union>
         <withComponents partial="true">
          <component name="@literal" use="PRESENT"/>
          <component name="@value" use="ABSENT"/>
          <component name="value" use="ABSENT"/>
         </withComponents>
         <withComponents partial="true">                April 11, 2005


   PresenceConstraint ::= [VALUES ALL UPPERCASED]
       ENUMERATED { present, absent, optional }

   ObjectClass ::= CHOICE {
       classRef  [NAME AS "class"] [ATTRIBUTE] QName,
       class     ElementFormObjectClass
   }

   DefinedObjectClass ::= ObjectClass
       (WITH COMPONENTS { ...,
           class (WITH COMPONENTS { ...,
               definition (WITH COMPONENTS { ...,
                   objectClassDefn ABSENT }) }) })

   ElementFormObjectClass ::= SEQUENCE {
       definition  [CONTENT] CHOICE {
           reference        [CONTENT] Reference,
           objectClassDefn  [CONTENT] ObjectClassDefn
       }
   }

   ObjectClassDefn ::= SEQUENCE SIZE (1..MAX) OF
       fieldSpec [CONTENT] FieldSpec

   FieldSpec ::= CHOICE {
       typeField       TypeField,
       valueField      ValueField,
       valueSetField   ValueSetField,
       objectField     ObjectField,
       objectSetField  ObjectSetField,
       optional        OptionalField
   }

   OptionalField ::= SEQUENCE {
       field    [CONTENT] CHOICE {
           typeField       TypeField,
           valueField      ValueField,
           valueSetField   ValueSetField,
           objectField     ObjectField,
           objectSetField  ObjectSetField
       },
       default  SEQUENCE {
           setting  [CONTENT] Setting
       } OPTIONAL
   } (WITH COMPONENTS { ...,
         field (WITH COMPONENTS { typeField PRESENT }),
         default (WITH COMPONENTS {
             setting (WITH COMPONENTS { type PRESENT }) }) } |



Legg & Prager            Expires 11 October 2005               [Page 90]

INTERNET-DRAFT                ASN.1 Schema                April 11, 2005


      WITH COMPONENTS { ...,
         field (WITH COMPONENTS { valueField PRESENT }),
         default (WITH COMPONENTS {
             setting (WITH COMPONENTS { value PRESENT }) }) } |
      WITH COMPONENTS { ...,
         field (WITH COMPONENTS { valueSetField PRESENT }),
         default (WITH COMPONENTS {
             setting (WITH COMPONENTS { valueSet PRESENT }) }) } |
      WITH COMPONENTS { ...,
         field (WITH COMPONENTS { objectField PRESENT }),
         default (WITH COMPONENTS {
             setting (WITH COMPONENTS { object PRESENT }) }) } |
      WITH COMPONENTS { ...,
         field (WITH COMPONENTS { objectSetField PRESENT }),
         default (WITH COMPONENTS {
             setting (WITH COMPONENTS { objectSet PRESENT }) }) })

   TypeField ::= SEQUENCE {
       name  [ATTRIBUTE] TypeFieldReference
   }

   TypeFieldReference ::= TypeReference

   ValueField ::= SEQUENCE {
       name      [ATTRIBUTE] ValueFieldReference,
       unique    [ATTRIBUTE] BOOLEAN DEFAULT FALSE,
       governor  [CONTENT] CHOICE {
           type           [CONTENT] Type,
           typeFromField  SEQUENCE {
               fieldName      [CONTENT] FieldName
           }
       }
   } ((WITH COMPONENTS { ..., unique ABSENT }) |
      (WITH COMPONENTS { ...,
          governor (WITH COMPONENTS { ..., typeFromField ABSENT }) }))

   ValueFieldReference ::= ValueReference

   ValueSetField ::= SEQUENCE {
       name      [ATTRIBUTE] ValueSetFieldReference,
       governor  [CONTENT] CHOICE {
           type           [CONTENT] Type,
           typeFromField  SEQUENCE {
               fieldName      [CONTENT] FieldName
           }
       }
   }




Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 77] 91]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



          <component name="@literal" use="ABSENT"/>
          <component name="@value" use="PRESENT"/>
          <component name="value" use="ABSENT"/>
         </withComponents>
         <withComponents partial="true">
          <component name="@literal" use="ABSENT"/>
          <component name="@value" use="ABSENT"/>
          <component name="value" use="PRESENT"/>
         </withComponents>
        </union>
       </intersection>
      </constrained>
     </type>
    </namedType>


    <namedType name="ValueReference" type="tns:Identifier"/>


    <namedType name="Identifier">
     <type>
      <constrained type="asn1:UTF8String">
       <pattern literal="[a-z][A-Z0-9a-z]*(-[A-Z0-9a-z]+)*"/>
      </constrained>
     </type>
    </namedType>


    <namedType name="ValueSetTypeAssignment">
     <type>
      <constrained>
       <type>
        <sequence>
         <attribute name="name" type="tns:ExtendedTypeReference"/>
         <optional>
          <attribute name="type" renames="typeRef" type="tns:QName"/>
         </optional>
         <optional>
          <element name="type" type="tns:Type"/>
         </optional>
         <element name="valueSet" type="tns:ValueSet"/>
        </sequence>
       </type>
       <union>
        <withComponents partial="true">
         <component name="@type" use="PRESENT"/>
         <component name="type" use="ABSENT"/>
        </withComponents>
        <withComponents partial="true">
         <component name="@type" use="ABSENT"/>
         <component name="type" use="PRESENT"/>                April 11, 2005


   ValueSetFieldReference ::= TypeReference

   ObjectField ::= SEQUENCE {
       name         [ATTRIBUTE] ObjectFieldReference,
       objectClass  [CONTENT] DefinedObjectClass
   }

   ObjectFieldReference ::= ObjectReference

   ObjectSetField ::= SEQUENCE {
       name         [ATTRIBUTE] ObjectSetFieldReference,
       objectClass  [CONTENT] DefinedObjectClass
   }

   ObjectSetFieldReference ::= ObjectSetReference

   Object ::= CHOICE {
       objectRef  [NAME AS "object"] [ATTRIBUTE] QName,
       object     ElementFormObject
   }

   ElementFormObject ::= SEQUENCE {
       definition  [CONTENT] CHOICE {
           reference    [CONTENT] Reference,
           fromObjects  InformationFromObjects,
           fields       [CONTENT] ObjectDefn
       }
   }

   ObjectDefn ::= SEQUENCE OF field FieldSetting

   FieldSetting ::= SEQUENCE {
       name     [ATTRIBUTE] NCName,
       setting  [CONTENT] Setting
   }

   Setting ::= CHOICE {
       type       [CONTENT] Type,
       value      [CONTENT] Value,
       valueSet   [CONTENT] ValueSet,
       object     [CONTENT] Object,
       objectSet  [CONTENT] ObjectSet
   }

   ObjectSet ::= CHOICE {
       objectSetRef  [NAME AS "objectSet"] [ATTRIBUTE] QName,
       objectSet     ElementFormObjectSet
   }



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 78] 92]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



        </withComponents>
       </union>
      </constrained>
     </type>
    </namedType>


    <namedType name="TypeAndValueSet">
     <type>
      <constrained>
       <type>
        <sequence>
         <optional>
          <attribute name="type" renames="typeRef" type="tns:QName"/>
         </optional>
         <optional>
          <element name="type" type="tns:Type"/>
         </optional>
         <element name="valueSet" type="tns:ValueSet"/>
        </sequence>
       </type>
       <union>
        <withComponents partial="true">
         <component name="@type" use="PRESENT"/>
         <component name="type" use="ABSENT"/>
        </withComponents>
        <withComponents partial="true">
         <component name="@type" use="ABSENT"/>
         <component name="type" use="PRESENT"/>
        </withComponents>
       </union>
      </constrained>
     </type>
    </namedType>


    <namedType name="ObjectClassAssignment">
     <type>
      <constrained>
       <type>
        <sequence>
         <attribute name="name" type="tns:ObjectClassReference"/>
         <optional>
          <attribute name="class" renames="classRef" type="tns:QName"/>
         </optional>
         <optional>
          <element name="class" type="tns:ObjectClass"/>
         </optional>
        </sequence>
       </type>




Legg & Prager           Expires 17 December 2004               [Page 79]
INTERNET-DRAFT                April 11, 2005


   ElementFormObjectSet ::= SEQUENCE {
       definition  [CONTENT] CHOICE {
           reference      [CONTENT] Reference,
           objectSetSpec  [CONTENT] ObjectSetSpec,
           fromObjects    InformationFromObjects
       }
   }

   ObjectSetSpec ::= SEQUENCE {
       root       [CONTENT] ElementSetSpec OPTIONAL,
       extension  SEQUENCE {
           additions  [CONTENT] ElementSetSpec
       } OPTIONAL
   }

   EncodingControlSections ::= SEQUENCE SIZE (1..MAX) OF
       section [CONTENT] EncodingControlSection

   EncodingControlSection ::= CHOICE {
       encodingControl-GSER  GSER-EncodingInstructionAssignmentList,
       encodingControl-XER   XER-EncodingInstructionAssignmentList
       -- plus encoding control sections
       -- for other encoding rules in the future
   }

   ENCODING-CONTROL RXER

       SCHEMA-IDENTITY "http://xmled.info/id/ASN.1/Schema"
       TARGET-NAMESPACE "http://xmled.info/ns/ASN.1"

       COMPONENT schema ModuleDefinition

       COMPONENT meta [ATTRIBUTE] BOOLEAN

   END

Appendix B. ASN.1 Schema                 June 17, 2004



       <union>
        <withComponents partial="true">
         <component name="@class" use="PRESENT"/>
         <component name="class" use="ABSENT"/>
        </withComponents>
        <withComponents partial="true">
         <component name="@class" use="ABSENT"/>
         <component name="class" use="PRESENT"/>
        </withComponents>
       </union>
      </constrained>
     </type>
    </namedType>


    <namedType name="ObjectClassReference">
     <type>
      <constrained type="asn1:UTF8String">
       <pattern literal="[A-Z][A-Z0-9]*(-[A-Z0-9]+)*"/>
      </constrained>
     </type>
    </namedType>


    <namedType name="ObjectAssignment">
     <type>
      <constrained>
       <type>
        <sequence>
         <attribute name="name" type="tns:ObjectReference"/>
         <optional>
          <attribute name="class" renames="classRef" type="tns:QName"/>
         </optional>
         <optional>
          <element name="class" type="tns:DefinedObjectClass"/>
         </optional>
         <optional>
          <attribute name="object" renames="objectRef"
                     type="tns:QName"/>
         </optional>
         <optional>
          <element name="object" type="tns:Object"/>
         </optional>
        </sequence>
       </type>
       <intersection>
        <union>
         <withComponents partial="true">
          <component name="@class" use="PRESENT"/>
          <component name="class" use="ABSENT"/> for ASN.1 Schema

   This appendix is non-normative.

   <?xml version="1.0"?>
   <asn1:schema xmlns:asn1="http://xmled.info/ns/ASN.1"
                xmlns:gser="http://xmled.info/ns/ASN.1"
                xmlns:xer="http://xmled.info/ns/ASN.1"
                name="ASN1-Schema"
                identifier="1.3.6.1.4.1.21472.1.0.1"
                schemaIdentity="http://xmled.info/id/ASN.1/Schema"
                xmlns:asd="http://xmled.info/ns/ASN.1"



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 80] 93]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



         </withComponents>
         <withComponents partial="true">
          <component name="@class" use="ABSENT"/>
          <component name="class" use="PRESENT"/>
         </withComponents>
        </union>
        <union>
         <withComponents partial="true">
          <component name="@object" use="PRESENT"/>
          <component name="object" use="ABSENT"/>
         </withComponents>
         <withComponents partial="true">
          <component name="@object" use="ABSENT"/>
          <component name="object" use="PRESENT"/>
         </withComponents>
        </union>
       </intersection>
      </constrained>
     </type>
    </namedType>                April 11, 2005


                targetNamespace="http://xmled.info/ns/ASN.1"
                extensibilityImplied="true">

    <!-- Copyright (C) The Internet Society 2005. This version of
          this ASN.1 Schema is part of RFC XXXX; see the RFC itself
          for full legal notices. -->

    <import name="GSER-EncodingInstructionSchema"
            identifier="1.3.6.1.4.1.21472.1.0.2"
            schemaIdentity=
             "http://xmled.info/id/ASN.1/GSER-EncodingInstructionSchema"
            namespace="http://xmled.info/ns/ASN.1"
            schemaLocation="GSER-EncodingInstructionSchema.asd"/>

    <import name="XER-EncodingInstructionSchema"
            identifier="1.3.6.1.4.1.21472.1.0.3"
            schemaIdentity=
             "http://xmled.info/id/ASN.1/XER-EncodingInstructionSchema"
            namespace="http://xmled.info/ns/ASN.1"
            schemaLocation="XER-EncodingInstructionSchema.asd"/>

    <namedType name="ObjectClassAndObject">
     <type>
      <constrained> name="ModuleDefinition">
     <type>
      <sequence>
       <attribute name="name" type="asd:ModuleReference"/>
       <optional>
        <attribute name="class" renames="classRef" type="tns:QName"/> name="identifier" type="asd:DefinitiveIdentifier"/>
       </optional>
       <optional>
          <element name="class" type="tns:DefinedObjectClass"/>
        <attribute name="schemaIdentity" type="asn1:AnyURI"/>
       </optional>
       <optional>
        <attribute name="object" renames="objectRef"
                     type="tns:QName"/> name="targetNamespace" type="asn1:AnyURI"/>
       </optional>
       <optional>
          <element name="object" type="tns:Object"/>
        <attribute name="tagDefault" type="asd:TagDefault"/>
        <default literal="AUTOMATIC"/>
       </optional>
       <optional>
        <attribute name="extensibilityImplied" type="asn1:BOOLEAN"/>
        <default literal="false"/>
       </optional>
       <optional>
        <content name="imports" type="asd:ImportList"/>
       </optional>
       <optional>
        <content name="assignments" type="asd:AssignmentList"/>
       </optional>
        </sequence>
       </type>
       <intersection>
        <union>
         <withComponents partial="true">
          <component name="@class" use="PRESENT"/>
          <component name="class" use="ABSENT"/>
         </withComponents>
         <withComponents partial="true">



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 81] 94]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



          <component name="@class" use="ABSENT"/>
          <component name="class" use="PRESENT"/>
         </withComponents>
        </union>
        <union>
         <withComponents partial="true">
          <component name="@object" use="PRESENT"/>
          <component name="object" use="ABSENT"/>
         </withComponents>
         <withComponents partial="true">
          <component name="@object" use="ABSENT"/>
          <component name="object" use="PRESENT"/>
         </withComponents>
        </union>
       </intersection>
      </constrained>                April 11, 2005


       <optional>
        <content name="encodingControls"
                 type="asd:EncodingControlSections"/>
       </optional>
      </sequence>
     </type>
    </namedType>

    <namedType name="ObjectReference" type="tns:ValueReference"/> name="ModuleReference" type="asd:TypeReference"/>

    <namedType name="ObjectSetAssignment"> name="DefinitiveIdentifier"
               type="asn1:OBJECT-IDENTIFIER"/>

    <namedType name="TagDefault">
     <type>
      <constrained>
      <enumerated>
       <enumeration name="EXPLICIT" identifier="explicit"/>
       <enumeration name="IMPLICIT" identifier="implicit"/>
       <enumeration name="AUTOMATIC" identifier="automatic"/>
      </enumerated>
     </type>
    </namedType>

    <namedType name="ImportList">
     <type>
      <sequenceOf minSize="1">
       <element name="import" type="asd:Import"/>
      </sequenceOf>
     </type>
    </namedType>

    <namedType name="Import">
     <type>
      <sequence>
       <optional>
        <attribute name="name" type="tns:ObjectSetReference"/> type="asd:ModuleReference"/>
       </optional>
       <optional>
        <attribute name="class" renames="classRef" type="tns:QName"/> name="identifier" type="asd:DefinitiveIdentifier"/>
       </optional>
       <optional>
          <element name="class" type="tns:DefinedObjectClass"/>
        <attribute name="schemaIdentity" type="asn1:AnyURI"/>
       </optional>
       <optional>
        <attribute name="objectSet" renames="objectSetRef"
                     type="tns:QName"/> name="namespace" type="asn1:AnyURI"/>
       </optional>
       <optional>
          <element name="objectSet" type="tns:ObjectSet"/>
         </optional>
        </sequence>
       </type>
       <intersection>
        <union>
         <withComponents partial="true">
          <component name="@class" use="PRESENT"/>
          <component name="class" use="ABSENT"/>
         </withComponents>
        <attribute name="schemaLocation" type="asn1:AnyURI"/>



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 82] 95]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



         <withComponents partial="true">
          <component name="@class" use="ABSENT"/>
          <component name="class" use="PRESENT"/>
         </withComponents>
        </union>
        <union>
         <withComponents partial="true">
          <component name="@objectSet" use="PRESENT"/>
          <component name="objectSet" use="ABSENT"/>
         </withComponents>
         <withComponents partial="true">
          <component name="@objectSet" use="ABSENT"/>
          <component name="objectSet" use="PRESENT"/>
         </withComponents>
        </union>
       </intersection>
      </constrained>                April 11, 2005


       </optional>
      </sequence>
     </type>
    </namedType>

    <namedType name="ObjectClassAndObjectSet"> name="AssignmentList">
     <type>
      <constrained>
      <sequenceOf minSize="1">
       <content name="assignment" type="asd:Assignment"/>
      </sequenceOf>
     </type>
    </namedType>

    <namedType name="Assignment">
     <type>
        <sequence>
         <optional>
          <attribute name="class" renames="classRef" type="tns:QName"/>
         </optional>
         <optional>
      <choice>
       <element name="class" type="tns:DefinedObjectClass"/>
         </optional>
         <optional>
          <attribute name="object" renames="objectSetRef"
                     type="tns:QName"/>
         </optional>
         <optional> name="namedType" type="asd:TypeAssignment"/>
       <element name="objectSet" type="tns:ObjectSet"/>
         </optional> name="namedValue" type="asd:ValueAssignment"/>
       <element name="namedValueSet" type="asd:ValueSetTypeAssignment"/>
       <element name="namedClass" type="asd:ObjectClassAssignment"/>
       <element name="namedObject" type="asd:ObjectAssignment"/>
       <element name="namedObjectSet" type="asd:ObjectSetAssignment"/>
       <content name="component" type="asd:TopLevelNamedType"/>
      </choice>
     </type>
    </namedType>

    <namedType name="TypeAssignment">
     <type>
      <sequence>
       <attribute name="name" type="asd:TypeReference"/>
       <content name="type" type="asd:Type"/>
      </sequence>
     </type>
       <intersection>
        <union>
         <withComponents partial="true">
          <component name="@class" use="PRESENT"/>
          <component name="class" use="ABSENT"/>
         </withComponents>
         <withComponents partial="true">
          <component name="@class" use="ABSENT"/>
    </namedType>

    <namedType name="TypeReference">
     <type>
      <constrained type="asn1:UTF8String">
       <pattern literal="[A-Z]\w*(-\w+)*"/>
      </constrained>
     </type>
    </namedType>

    <namedType name="ValueAssignment">
     <type>
      <sequence>
       <attribute name="name" type="asd:ValueReference"/>



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 83] 96]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



          <component name="class" use="PRESENT"/>
         </withComponents>
        </union>
        <union>
         <withComponents partial="true">
          <component name="@objectSet" use="PRESENT"/>
          <component name="objectSet" use="ABSENT"/>
         </withComponents>
         <withComponents partial="true">
          <component name="@objectSet" use="ABSENT"/>
          <component name="objectSet" use="PRESENT"/>
         </withComponents>
        </union>
       </intersection>
      </constrained>                April 11, 2005


       <content name="type" type="asd:Type"/>
       <content name="value" type="asd:Value"/>
      </sequence>
     </type>
    </namedType>

    <namedType name="ObjectSetReference" type="tns:TypeReference"/> name="ValueReference" type="asd:Identifier"/>

    <namedType name="TypeOnly"> name="Identifier">
     <type>
      <constrained>
      <constrained type="asn1:UTF8String">
       <pattern literal="[a-z]\w(-\w+)*"/>
      </constrained>
     </type>
    </namedType>

    <namedType name="ValueSetTypeAssignment">
     <type>
      <sequence>
         <optional>
       <attribute name="name" type="asd:TypeReference"/>
       <content name="type" renames="typeRef" type="tns:QName"/>
         </optional>
         <optional>
          <element name="type" type="tns:Type"/>
         </optional> type="asd:Type"/>
       <content name="valueSet" type="asd:ValueSet"/>
      </sequence>
     </type>
       <union>
        <withComponents>
         <component name="@type" use="PRESENT"/>
         <component name="type" use="ABSENT"/>
        </withComponents>
        <withComponents>
         <component name="@type" use="ABSENT"/>
         <component name="type" use="PRESENT"/>
        </withComponents>
       </union>
    </namedType>

    <namedType name="ObjectClassAssignment">
     <type>
      <sequence>
       <attribute name="name" type="asd:ObjectClassReference"/>
       <content name="objectClass" type="asd:ObjectClass"/>
      </sequence>
     </type>
    </namedType>

    <namedType name="ObjectClassReference">
     <type>
      <constrained type="asn1:UTF8String">
       <pattern literal="[A-Z][A-Z0-9]*(-[A-Z0-9]+)*"/>
      </constrained>
     </type>
    </namedType>

    <namedType name="Type"> name="ObjectAssignment">
     <type>
      <sequence>
       <attribute name="name" type="asd:ObjectReference"/>
       <content name="objectClass" type="asd:DefinedObjectClass"/>



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 84] 97]

INTERNET-DRAFT                ASN.1 Schema                 June 17, 2004



     <type>
      <constrained>                April 11, 2005


       <content name="object" type="asd:Object"/>
      </sequence>
     </type>
    </namedType>

    <namedType name="ObjectReference" type="asd:ValueReference"/>

    <namedType name="ObjectSetAssignment">
     <type>
      <sequence>
         <optional>
          <attribute name="tagDefault" type="tns:TagDefault"/>
         </optional>
         <optional>
          <attribute name="extensibilityImplied" type="asn1:BOOLEAN"/>
         </optional>
         <optional>
          <attribute name="explicit" type="asn1:BOOLEAN"/>
          <default literal="false"/>
         </optional>
         <optional>
          <attribute name="context" type="asn1:AnyURI"/>
         </optional>
         <optional>
          <attribute name="ref" type="tns:QName"/>
         </optional>
         <optional>
       <attribute name="elementType" type="asn1:Name"/>
         </optional>
         <optional> name="name" type="asd:ObjectSetReference"/>
       <content name="definition"> name="objectClass" type="asd:DefinedObjectClass"/>
       <content name="objectSet" type="asd:ObjectSet"/>
      </sequence>
     </type>
    </namedType>

    <namedType name="ObjectSetReference" type="asd:TypeReference"/>

    <namedType name="TopLevelNamedType">
     <type>
            <choice>
             <element name="namedBitList" type="tns:NamedBitList"/>
             <element name="namedNumberList"
                      type="tns:NamedNumberList"/>
             <element name="enumerated" type="tns:EnumeratedType"/>
             <element name="tagged" type="tns:TaggedType"/>
             <element name="selection" type="tns:SelectionType"/>
             <element name="instanceOf" type="tns:InstanceOfType"/>
             <element name="fromClass" type="tns:ObjectClassFieldType"/>
      <constrained type="asd:NamedType">
       <withComponents partial="true">
        <element name="fromObjects"
                      type="tns:InformationFromObjects"/> name="attribute">
         <withComponents partial="true">
          <content name="reference" use="ABSENT"/>
         </withComponents>
        </element>
        <element name="sequence" type="tns:SequenceType"/> name="element">
         <withComponents partial="true">
          <content name="reference" use="ABSENT"/>
         </withComponents>
        </element>
        <element name="set" type="tns:SetType"/> name="content" use="ABSENT"/>
        <element name="choice" type="tns:ChoiceType"/> name="member" use="ABSENT"/>
        <element name="union" type="tns:UnionType"/> name="item" use="ABSENT"/>
       </withComponents>
      </constrained>
     </type>
    </namedType>

    <namedType name="NamedType">
     <type>
      <choice>
       <element name="sequenceOf" type="tns:SequenceOfType"/> name="attribute" type="asd:Attribute"/>
       <element name="setOf" type="tns:SetOfType"/> name="element" type="asd:Element"/>
       <element name="list" type="tns:ListType"/> name="content" type="asd:InvisibleNamedType"/>
       <element name="constrained" type="tns:ConstrainedType"/>
            </choice>
           </type>
          </content> name="member" type="asd:InvisibleNamedType"/>



Legg & Prager            Expires 17 December 2004 11 October 2005               [Page 85] 98]

INTERNET-DRAFT