Tech-invite3GPPspaceIETFspace
959493929190898887868584838281807978777675747372717069686766656463626160595857565554535251504948474645444342414039383736353433323130292827262524232221201918171615141312111009080706050403020100
in Index   Prev   Next

RFC 4912

Abstract Syntax Notation X (ASN.X)

Pages: 165
Experimental
Part 3 of 6 – Pages 43 to 66
First   Prev   Next

Top   ToC   RFC4912 - Page 43   prevText

6.13. Translation of Constrained Types

If a ConstrainedType is of the "Type Constraint" form, then the translation of the ConstrainedType is an element item with the [local name] "type". An element item with the [local name] "annotation" MAY be added to the [children] of the <type> element item. An element item with the [local name] "constrained" SHALL be appended to the [children] of the <type> element item. The translation of the Type SHALL be added to the [children] or
Top   ToC   RFC4912 - Page 44
   [attributes] of the <constrained> element item.  The translation of
   the Constraint SHALL be added to the [children] of the <constrained>
   element item.

   The translation of a ContainedType that is a TypeWithConstraint is
   the translation of the TypeWithConstraint.

   Definition (simple endpoint):  A LowerEndpoint or UpperEndpoint is a
   simple endpoint if it is closed and its value is "MIN", "MAX", or a
   SignedNumber in an IntegerValue in a BuiltinValue in the Value of the
   endpoint.

   Definition (simple range SizeConstraint): A SizeConstraint is a
   simple range if the Constraint in the SizeConstraint contains only a
   ValueRange (i.e., a ValueRange in a SubtypeElements instance in an
   Elements instance in a lone IntersectionElements instance in a lone
   Intersections instance in a Unions instance in an ElementSetSpec in a
   RootElementSetSpec in an ElementSetSpecs instance without an
   AdditionalElementSetSpec in a SubtypeConstraint in a ConstraintSpec
   in the Constraint) and both endpoints are simple.

   Definition (simple range Constraint): A Constraint is a simple range
   if contains only a SizeConstraint that is a simple range (i.e., a
   simple range SizeConstraint in a SubtypeElements instance in an
   Elements instance in a lone IntersectionElements instance in a lone
   Intersections instance in a Unions instance in an ElementSetSpec in a
   RootElementSetSpec in an ElementSetSpecs instance without an
   AdditionalElementSetSpec in a SubtypeConstraint in a ConstraintSpec
   in the Constraint).

   If the Constraint or SizeConstraint in a TypeWithConstraint is a
   simple range, then the compact translation of the TypeWithConstraint
   MAY be used; otherwise, the full translation of the
   TypeWithConstraint is used.

   The compact translation of a TypeWithConstraint is initially the
   translation of its notional parent type.  If the value of the lower
   endpoint is not "MIN" or "0", then an attribute item with the
   [local name] "minSize" SHALL be added to the [attributes] of the
   <sequenceOf>, <setOf>, or <list> element item resulting from the
   translation of the parent type.  The [normalized value] of this
   attribute item is the value of the lower endpoint.  If the value of
   the lower endpoint is "MIN" or "0", then an attribute item with the
   [local name] "minSize" and [normalized value] "0" MAY be added to the
   [attributes] of the <sequenceOf>, <setOf>, or <list> element item.
   If the value of the upper endpoint is not "MAX", then an attribute
   item with the [local name] "maxSize" SHALL be added to the
   [attributes] of the <sequenceOf>, <setOf>, or <list> element item.
Top   ToC   RFC4912 - Page 45
   The [normalized value] of this attribute item is the value of the
   upper endpoint.

   The full translation of a TypeWithConstraint is an element item with
   the [local name] "type".  An element item with the [local name]
   "annotation" MAY be added to the [children] of the <type> element
   item.  An element item with the [local name] "constrained" SHALL be
   appended to the [children] of the <type> element item.  The
   translation of the notional parent type of the TypeWithConstraint
   SHALL be added to the [children] or [attributes] of the <constrained>
   element item.  The translation of the Constraint or SizeConstraint in
   the TypeWithConstraint SHALL be added to the [children] of the
   <constrained> element item.

   Examples

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

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

      SEQUENCE SIZE(0..10) OF number INTEGER

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

      SEQUENCE SIZE(1..limit) OF number INTEGER

      <type>
       <constrained>
        <type>
         <sequenceOf>
          <element name="number" type="asnx:INTEGER"/>
         </sequenceOf>
        </type>
        <size>
         <range>
          <minInclusive literalValue="1"/>
          <maxInclusive value="tns:limit"/>
         </range>
Top   ToC   RFC4912 - Page 46
        </size>
       </constrained>
      </type>

6.13.1. Constraint Translation

The translation of a Constraint is the translation of the ConstraintSpec in the Constraint followed by the translation of the ExceptionSpec (possibly empty) in the Constraint. The translation of a ConstraintSpec is the translation of the SubtypeConstraint or GeneralConstraint in the ConstraintSpec. The translation of a SubtypeConstraint is the translation of the ElementSetSpecs in the SubtypeConstraint. The translation of a GeneralConstraint [X.682] is the translation of the UserDefinedConstraint, TableConstraint, or ContentsConstraint in the GeneralConstraint.

6.13.2. UserDefinedConstraint Translation

The translation of a UserDefinedConstraint is an element item with the [local name] "constrainedBy". An element item with the [local name] "annotation" MAY be added to the [children] of the <constrainedBy> element item. The translation of each UserDefinedConstraintParameter in the UserDefinedConstraint SHALL be appended to the [children] of the <constrainedBy> element item. The translation of a UserDefinedConstraintParameter of the "Governor : Value" form is an element item with the [local name] "valueParameter". The translation of the Type in the Governor SHALL be added to the [children] or [attributes] of the <valueParameter> element item. The translation of the Value SHALL be added to the [children] or [attributes] of the <valueParameter> element item. The translation of a UserDefinedConstraintParameter of the "Governor : ValueSet" form is an element item with the [local name] "valueSetParameter". The translation of the Type in the Governor SHALL be added to the [children] or [attributes] of the <valueSetParameter> element item. The translation of the ValueSet SHALL be added to the [children] of the <valueSetParameter> element item. The translation of a UserDefinedConstraintParameter of the "Governor : Object" form is an element item with the [local name] "objectParameter". The translation of the DefinedObjectClass in the Governor SHALL be added to the [children] or [attributes] of the
Top   ToC   RFC4912 - Page 47
   <objectParameter> element item.  The translation of the Object SHALL
   be added to the [children] or [attributes] of the <objectParameter>
   element item.

   The translation of a UserDefinedConstraintParameter of the
   "Governor : ObjectSet" form is an element item with the [local name]
   "objectSetParameter".  The translation of the DefinedObjectClass in
   the Governor SHALL be added to the [children] or [attributes] of the
   <objectSetParameter> element item.  The translation of the ObjectSet
   SHALL be added to the [children] or [attributes] of the
   <objectSetParameter> element item.

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

   The translation of a UserDefinedConstraintParameter that is a
   DefinedObjectClass is an element item with the [local name]
   "classParameter".  The translation of the DefinedObjectClass SHALL be
   added to the [children] or [attributes] of the <classParameter>
   element item.

   Example

      OCTET STRING
          (CONSTRAINED BY {
              -- contains the hash of the value -- MyType:myValue })

      <type>
       <constrained type="asnx:OCTET-STRING">
        <constrainedBy>
         <annotation> contains the hash of the value </annotation>
         <valueParameter type="tns:MyType" value="tns:myValue"/>
        </constrainedBy>
       </constrained>
      </type>

6.13.3. TableConstraint Translation

The translation of a TableConstraint that is a SimpleTableConstraint is an element item with the [local name] "table". The translation of the ObjectSet in the SimpleTableConstraint SHALL be added to the [children] or [attributes] of the <table> element item. The translation of a TableConstraint that is a ComponentRelationConstraint is an element item with the [local name] "table". The translation of the DefinedObjectSet in the
Top   ToC   RFC4912 - Page 48
   ComponentRelationConstraint SHALL be added to the [children] or
   [attributes] of the <table> element item.  The translation of each
   AtNotation in the ComponentRelationConstraint SHALL be appended to
   the [children] of the <table> element item.

   The translation of an AtNotation is an element item with the
   [local name] "restrictBy".  The [children] property of the
   <restrictBy> element item is set to the sequence of character items
   for the character string formed by the concatenation of zero, one, or
   more "../" strings, one for each Level in the AtNotation (including
   the empty one), followed by a solidus ('/', U+002F) separated list of
   qualified names for the expanded names of the NamedType instances
   [RXEREI] identified by the identifiers in the ComponentIdList in the
   AtNotation.  If a NamedType is subject to an ATTRIBUTE or
   ATTRIBUTE-REF encoding instruction, or subject to a COMPONENT-REF
   encoding instruction that references a top-level NamedType that is
   subject to an ATTRIBUTE encoding instruction, then the qualified name
   for the expanded name is prefixed with the commercial at character
   ('@', U+0040).  Leading and/or trailing white space character items
   MAY be added to the [children] of the <restrictBy> element item.
   White space character items MAY be added immediately before and/or
   after any character item for the solidus character ('/', U+002F).

   Examples

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

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

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

      <type>
       <sequence>
        <attribute name="ID" identifier="id-att">
Top   ToC   RFC4912 - Page 49
         <type>
          <constrained>
           <type>
            <fromClass class="asnx:TYPE-IDENTIFIER" fieldName="id"/>
           </type>
           <table objectset="tns:AllTypes"/>
          </constrained>
         </type>
        </attribute>
        <element name="value">
         <type>
          <constrained>
           <type>
            <fromClass class="asnx:TYPE-IDENTIFIER" fieldName="Type"/>
           </type>
           <table objectset="tns:AllTypes">
            <restrictBy>@ID</restrictBy>
           </table>
          </constrained>
         </type>
        </element>
       </sequence>
      </type>

   The <restrictBy> element item is required to be self-contained
   [RXER].

      Aside: An element item is self-contained if all namespace prefixes
      used by the element item and its contents are declared within the
      element item.

6.13.4. ContentsConstraint Translation

The translation of a ContentsConstraint is an element item with the [local name] "contents". If the ContentsConstraint is of the "CONTAINING Type" form, then an element item with the [local name] "containing" SHALL be added to the [children] of the <contents> element item. The translation of the Type SHALL be added to the [children] or [attributes] of the <containing> element item. If the ContentsConstraint is of the "ENCODED BY Value" form, then an element item with the [local name] "encodedBy" SHALL be added to the [children] of the <contents> element item. The translation of the Value SHALL be added to the [children] or [attributes] of the <encodedBy> element item.
Top   ToC   RFC4912 - Page 50
   If the ContentsConstraint is of the
   "CONTAINING Type ENCODED BY Value" form, then an element item with
   the [local name] "containing" and an element item with the
   [local name] "encodedBy" SHALL be added to the [children] of the
   <contents> element item.  The translation of the Type SHALL be added
   to the [children] or [attributes] of the <containing> element item.
   The translation of the Value SHALL be added to the [children] or
   [attributes] of the <encodedBy> element item.

   Example

      OCTET STRING
          (CONTAINING MyType
           ENCODED BY { joint-iso-itu-t asn1(1) basic-encoding(1) })

      <type>
       <constrained type="asnx:OCTET-STRING">
        <contents>
         <containing type="tns:MyType"/>
         <encodedBy literalValue="2.1.1"/>
        </contents>
       </constrained>
      </type>

6.13.5. ExceptionSpec Translation

The translation of an empty ExceptionSpec is empty. The translation of a non-empty ExceptionSpec is an element item with the [local name] "exception". If the ExceptionIdentification in a non-empty ExceptionSpec is a SignedNumber, then the translation of a notional INTEGER Type SHALL be added to the [children] or [attributes] of the <exception> element item, and the translation of a notional Value of the INTEGER type with the SignedNumber as its IntegerValue SHALL be added to the [children] or [attributes] of the <exception> element item. If the ExceptionIdentification in a non-empty ExceptionSpec is a DefinedValue, then the translation of a notional INTEGER Type SHALL be added to the [children] or [attributes] of the <exception> element item, and the translation of the DefinedValue SHALL be added to the [children] or [attributes] of the <exception> element item.
Top   ToC   RFC4912 - Page 51
   If the ExceptionIdentification in a non-empty ExceptionSpec is of the
   "Type : Value" form, then the translation of the Type SHALL be added
   to the [children] or [attributes] of the <exception> element item,
   and the translation of the Value SHALL be added to the [children] or
   [attributes] of the <exception> element item.

   Examples

      !10

      <exception type="asnx:INTEGER" literalValue="10"/>

      !myValue

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

      !PrintableString:"failure"

      <exception type="asnx:PrintableString" literalValue="failure"/>

7. Translation of Values

A Value in an ASN.1 specification is a mix of literal values (e.g., numbers and character strings) and notations for referencing defined values. Likewise, the ASN.X translation of a Value is a mix of markup for literal values and markup for referencing notations (notational values). A Value is categorized by the following definitions. Definition (literal value): A Value is a literal value if and only if it is not a notational value. Definition (notational value): A Value is a notational value if and only if: (1) the Value is a BuiltinValue, and (a) the BuiltinValue is a TaggedValue and the Value in the TaggedValue is a notational value, or (b) the BuiltinValue is a SequenceValue or SetValue with a ComponentValueList that contains a NamedValue where the Value in the NamedValue is a notational value and the translation of the corresponding NamedType (from the governing type of the outer Value) is not an <element> or <component> element item, or
Top   ToC   RFC4912 - Page 52
       (c) the BuiltinValue is a ChoiceValue where the Value of the
           ChoiceValue is a notational value and the translation of the
           NamedType corresponding to the identifier in the ChoiceValue
           is not an <element> or <component> element item, or

       (d) the BuiltinValue is a SequenceOfValue or SetOfValue with a
           NamedValueList that contains a NamedValue where the Value of
           the NamedValue is a notational value and the translation of
           the corresponding NamedType (from the governing type of the
           outer Value) is not an <element> or <component> element item,
           or

   (2) the Value is a ReferencedValue, and

       (a) the ReferencedValue is a ValueFromObject, or

       (b) the ReferencedValue is a DefinedValue, and

           (i)   the DefinedValue is a valuereference (not a
                 DummyReference) or an ExternalValueReference, or

           (ii)  the DefinedValue is a DummyReference or
                 ParameterizedValue and the substitute definition for
                 the DummyReference or ParameterizedValue (see
                 Section 13) is a notational value, or

           (iii) the DefinedValue is a DummyReference or
                 ParameterizedValue where the translation of the
                 DummyReference or ParameterizedValue will use a fully
                 expanded reference (see Section 13), or

   (3) the Value is an ObjectClassFieldValue, and

       (a) the ObjectClassFieldValue is an OpenTypeFieldVal, or

       (b) the ObjectClassFieldValue is a FixedTypeFieldVal, and

           (i)  the FixedTypeFieldVal is a BuiltinValue that satisfies
                case (1), or

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

   A literal value that is a BuiltinValue that is a SequenceValue,
   SetValue, ChoiceValue, SequenceOfValue, or SetOfValue MAY be
   translated as a notational value.
Top   ToC   RFC4912 - Page 53
   Definition (directly nested):  A notational value is directly nested
   (within a literal value) if the innermost enclosing Value is a
   literal value.

7.1. Translation of Literal Values

The translation of a literal value is either the attribute form translation of a literal value, or the element form translation of a literal value. The attribute form translation of a literal value is an attribute item with the [local name] "literalValue". The [normalized value] of this attribute item is the RXER character data translation [RXER] of the literal value. The attribute form translation of a literal value SHALL NOT be used if: (1) the RXER Infoset translation of the literal value is not a character data translation [RXER] or is a character data translation that contains qualified names [XMLNS10][XMLNS11], or (2) attribute form translations of Value have been explicitly disallowed in the context where the literal value appears, or (3) the literal value has a nested notational value. The element form translation of a literal value is an element item with the [local name] "literalValue". The [children] and [attributes] of the <literalValue> element item are set to the RXER Infoset translation of the literal value, except that a value of the EXTERNAL type (or a subtype thereof) is translated according to the associated type defined in Clause 34.5 of X.680 [X.680]. In addition, where the [children] and [attributes] of an element item in the translation correspond to a directly nested notational value, the translation specified in Section 7.2 MUST be used for the [children] and [attributes] of that element item, and an attribute item with the [local name] "literal", [namespace name] "urn:ietf:params:xml:ns:asnx", and [normalized value] "false" or "0" (i.e., asnx:literal="false") MUST be added to the [attributes] of that element item. Each outermost <literalValue> element item is required to be self-contained [RXER]. Aside: An element item is self-contained if all namespace prefixes used by the element item and its contents are declared within the element item.
Top   ToC   RFC4912 - Page 54
      Aside: A <literalValue> element item nested within another
      <literalValue> element item is not required to be self-contained.

   An attribute item with the [local name] "literal", [namespace name]
   "urn:ietf:params:xml:ns:asnx" and [normalized value] "true" or "1"
   (i.e., asnx:literal="true") MAY be added to the [attributes] of the
   <literalValue> element item and/or any nested element item with
   content and attributes that correspond to a literal value.

      Aside: The asnx:literal attribute operates as a switch that
      indicates whether the content and other attributes of the element
      containing the attribute are interpreted as ASN.X notation (a
      notational value) or as an RXER encoding (a literal value).

   Example

      zero INTEGER ::= 0

      <namedValue name="zero" type="asnx:INTEGER" literalValue="0"/>

          OR

      <namedValue name="zero" type="asnx:INTEGER">
       <literalValue>0</literalValue>
      </namedValue>

   From the perspective of an ASN.X module as the RXER encoding of an
   ASN.1 value (an abstract value of the ModuleDefinition type in
   Appendix A), the type of the <literalValue> element is the
   unconstrained Markup type [RXER], not the governing type of the Value
   according to the ASN.1 specification.  This means that the Infoset
   representation of the <literalValue> element must be preserved in
   re-encodings of the ASN.X module.

   Similarly, the type of the literalValue attribute is a UTF8String,
   not the governing type of the Value according to the ASN.1
   specification.  This means that the exact characters of the
   [normalized value] of the attribute must be preserved in re-encodings
   of the ASN.X module.

7.2. Translation of Notational Values

The translation of a notational value is the translation of the BuiltinValue, ReferencedValue, or ObjectClassFieldValue in the notational value. The translation of a ReferencedValue is the translation of the DefinedValue or ValueFromObject in the ReferencedValue.
Top   ToC   RFC4912 - Page 55
   The translation for each of these cases is described as creating an
   element item with the [local name] "value", which is appropriate for
   a notational value that stands on its own.  However, a notational
   value may also be directly nested within a literal value, in which
   case the [local name] will be determined according to RXER and the
   governing ASN.1 type of the enclosing literal value.

      Aside: In the latter case, the element item will also have a
      literal attribute item with the [normalized value] "false" or "0".

   A notational value that is not directly nested within a literal value
   MAY instead have the [local name] "literalValue" provided an
   attribute item with the [local name] "literal", [namespace name]
   "urn:ietf:params:xml:ns:asnx", and [normalized value] "false" or "0"
   is added to the [attributes] of the <literalValue> element item.

   Examples

      nothing INTEGER ::= zero

      <namedValue name="nothing" type="asnx:INTEGER" value="tns:zero"/>

          OR

      <namedValue name="nothing" type="asnx:INTEGER">
       <value ref="tns:zero"/><!-- A notational value. -->
      </namedValue>

          OR

      <namedValue name="nothing" type="asnx:INTEGER">
       <literalValue xmlns:asnx="urn:ietf:params:xml:ns:asnx"
                     xmlns:tns="http://example.com/ns/MyModule"
                     asnx:literal="false"
                     ref="tns:zero"/><!-- A notational value. -->
      </namedValue>

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

      <namedValue name="integerList">
       <type>
        <sequenceOf>
         <element name="number" type="asnx:INTEGER"/>
        </sequenceOf>
       </type>
       <literalValue xmlns:asnx="urn:ietf:params:xml:ns:asnx"
                     xmlns:tns="http://example.com/ns/MyModule">
        <number asnx:literal="false"
Top   ToC   RFC4912 - Page 56
                ref="tns:zero"/><!-- A notational value. -->
        <number>3</number><!-- A literal value. -->
        <number>7</number><!-- A literal value. -->
       </literalValue>
      </namedValue>

7.2.1. DefinedValue Translation

If a DefinedValue is a valuereference (not a DummyReference) or an ExternalValueReference, then the translation of the DefinedValue is either the attribute form translation of a value reference, or the element form translation of a value reference. The attribute form translation of a value reference is an attribute item with the [local name] "value". The [normalized value] of this attribute item is a qualified name for the expanded name of the referenced value definition (see Section 5.1). The attribute form translation SHALL NOT be used if this expanded name is not distinct with respect to the current module and the modules referenced by its <import> element items (see Section 5.1). The element form translation of a value reference is an element item with the [local name] "value". An element item with the [local name] "annotation" MAY be added to the [children] of the <value> element item. An attribute item with the [local name] "ref" SHALL be added to the [attributes] of the <value> element item. The [normalized value] of this attribute item is a qualified name for the expanded name of the referenced value definition. If this expanded name is not distinct with respect to the current module and the modules referenced by its <import> element items, then an attribute item with the [local name] "context" SHALL be added to the [attributes] of the <value> element item; otherwise, if the module containing the referenced value definition has a schema identity URI, then an attribute item with the [local name] "context" MAY be added to the [attributes] of the <value> element item. The [normalized value] of this attribute item is the schema identity URI of the module containing the value definition referenced by the DefinedValue. Aside: If a reference name is not distinct, then the module containing the referenced definition must have a schema identity URI (see Section 5.1). Usually the translator is free to choose either an attribute form or element form translation for a DefinedValue; however, in some contexts attribute forms of Value are explicitly disallowed. In
Top   ToC   RFC4912 - Page 57
   particular, the attribute form translation SHALL NOT be used for a
   DefinedValue in a ReferencedValue in a Value that is directly nested
   in a literal value.

   If a DefinedValue is a DummyReference or ParameterizedValue, then the
   translation of the DefinedValue is the translation of that
   DummyReference or ParameterizedValue (see Section 13).

7.2.2. BuiltinValue Translation

The translation of a BuiltinValue is the translation of the ChoiceValue, SequenceValue, SetValue, SequenceOfValue, SetOfValue, or TaggedValue in the BuiltinValue. Aside: There are other possibilities for a BuiltinValue, but these will all be literal values. This section applies to a BuiltinValue that is a notational value. The translation of a TaggedValue is the translation of the Value in the TaggedValue (which is necessarily a notational value). The translation of a ChoiceValue is an element item with the [local name] "value". An element item with the [local name] "annotation" MAY be added to the [children] of the <value> element item. An element item with the same [local name] (i.e., "attribute", "element", "component", "group", or "member") as the translation of the NamedType corresponding to the identifier in the ChoiceValue SHALL be appended to the [children] of the <value> element item. An attribute item with the [local name] "name" SHALL be added to the [attributes] of the <attribute>, <element>, <component>, <group>, or <member> element item. The [normalized value] of this attribute item is a qualified name for the expanded name of the NamedType. The translation of the Value in the ChoiceValue SHALL be added to the [children] or [attributes] of the <attribute>, <element>, <component>, <group>, or <member> element item. The translation of a SequenceValue or SetValue is an element item with the [local name] "value". An element item with the [local name] "annotation" MAY be added to the [children] of the <value> element item. If the SequenceValue or SetValue has a ComponentValueList, then the translation of each NamedValue nested in the ComponentValueList SHALL be appended to the [children] of the <value> element item in the order in which their corresponding NamedType instances appear in the definition of the governing type.
Top   ToC   RFC4912 - Page 58
   The translation of a SequenceOfValue or SetOfValue is an element item
   with the [local name] "value".  An element item with the [local name]
   "annotation" MAY be added to the [children] of the <value> element
   item.

   If the SequenceOfValue or SetOfValue has a NamedValueList, then the
   translation of each NamedValue nested in the NamedValueList SHALL be
   appended to the [children] of the <value> element item.

   If the SequenceOfValue or SetOfValue has a ValueList, then an element
   item with the same [local name] (i.e., "element" or "component") as
   the element item in the [children] of the <sequenceOf> or <setOf>
   element item in the translation of the governing type SHALL be
   appended to the [children] of the <value> element item for each Value
   nested in the ValueList.  An attribute item with the [local name]
   "name" and [normalized value] "item" SHALL be added to the
   [attributes] of the <element> or <component> element item.  The
   translation of the Value (from the ValueList) SHALL be added to the
   [children] or [attributes] of the <element> or <component> element
   item.

   The translation of a NamedValue is an element item with the same
   [local name] as the translation of the corresponding NamedType, i.e.,
   "attribute", "element", "component", "group", "item", or
   "simpleContent".  An attribute item with the [local name] "name"
   SHALL be added to the [attributes] of the element item.  The
   [normalized value] of this attribute item is a qualified name for the
   expanded name of the NamedType.  The translation of the Value in the
   NamedValue SHALL be added to the [children] or [attributes] of the
   element item.

   Examples

      -- This is the governing type.
      MyType ::= SEQUENCE {
           one    [ATTRIBUTE] INTEGER,
           two    INTEGER,
           three  [ATTRIBUTE][LIST] SEQUENCE OF number INTEGER
      }

      <namedType name="MyType">
       <type>
        <sequence>
         <attribute name="one" type="asnx:INTEGER"/>
         <element name="two" type="asnx:INTEGER"/>
         <attribute name="three">
          <type>
           <list>
Top   ToC   RFC4912 - Page 59
            <item name="number" type="asnx:INTEGER"/>
           </list>
          </type>
         </attribute>
        </sequence>
       </type>
      </namedType>

      myValue1 MyType ::= {
          one     456,
          two     123,
          three   { number 123, number 456 }
      }
      -- All literal values.

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

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

      <namedValue name="myValue2" type="tns:MyType">
       <literalValue xmlns:asnx="urn:ietf:params:xml:ns:asnx"
                     xmlns:tns="http://example.com/ns/MyModule"
                     one="456" three="123 456">
        <two asnx:literal="false">
         <fromObjects object="tns:myObject" fieldName="number"/>
        </two>
       </literalValue>
      </namedValue>

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

      <namedValue name="myValue3" type="tns:MyType">
       <value>
        <attribute name="one">
         <value>
Top   ToC   RFC4912 - Page 60
          <fromObjects object="tns:myObject" fieldName="number"/>
         </value>
        </attribute>
        <element name="two" literalValue="123"/>
        <attribute name="three">
         <value>
          <item name="number" literalValue="123"/>
          <item name="number">
           <value>
            <fromObjects object="tns:myObject" fieldName="number"/>
           </value>
          </item>
         </value>
        </attribute>
       </value>
      </namedValue>

7.2.3. ValueFromObject Translation

The translation of a ValueFromObject is an element item with the [local name] "value". An element item with the [local name] "annotation" MAY be added to the [children] of the <value> element item. An element item with the [local name] "fromObjects" SHALL be appended to the [children] of the <value> element item. The translation of the ReferencedObjects instance in the ValueFromObject SHALL be added to the [children] or [attributes] of the <fromObjects> element item. The translation of the FieldName in the ValueFromObject SHALL be added to the [children] or [attributes] of the <fromObjects> element item.

7.2.4. ObjectClassFieldValue Translation

If an ObjectClassFieldValue is a BuiltinValue in a FixedTypeFieldVal, then the translation of the ObjectClassFieldValue is the translation of the BuiltinValue. If an ObjectClassFieldValue is a ReferencedValue in a FixedTypeFieldVal, then the translation of the ObjectClassFieldValue is the translation of the ReferencedValue. If an ObjectClassFieldValue is an OpenTypeFieldVal, then the translation of the ObjectClassFieldValue is an element item with the [local name] "value". An element item with the [local name] "annotation" MAY be added to the [children] of the <value> element item. An element item with the [local name] "openTypeValue" SHALL be
Top   ToC   RFC4912 - Page 61
   appended to the [children] of the <value> element item.  The
   translation of the Type in the OpenTypeFieldVal SHALL be added to the
   [children] or [attributes] of the <openTypeValue> element item.  The
   translation of the Value in the OpenTypeFieldVal SHALL be added to
   the [children] or [attributes] of the <openTypeValue> element item.

   Example

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

      <namedValue name="myValue">
       <type>
        <fromClass class="asnx:TYPE-IDENTIFIER" fieldName="Type"/>
       </type>
       <value>
        <openTypeValue type="asnx:INTEGER" literalValue="123"/>
       </value>
      </namedValue>

8. Translation of Value Sets

The translation of a ValueSet is an element item with the [local name] "valueSet". An element item with the [local name] "annotation" MAY be added to the [children] of the <valueSet> element item. The translation of the ElementSetSpecs instance in the ValueSet SHALL be appended to the [children] of the <valueSet> element item. Example { 1 | 3..7, ..., 9..19 EXCEPT ( 11 | 12 ) } <valueSet> <union> <literalValue>1</literalValue> <range> <minInclusive literalValue="3"/> <maxInclusive literalValue="7"/> </range> </union> <extension> <all> <range> <minInclusive literalValue="9"/> <maxInclusive literalValue="19"/> </range> <except> <union>
Top   ToC   RFC4912 - Page 62
           <literalValue>11</literalValue>
           <literalValue>12</literalValue>
          </union>
         </except>
        </all>
       </extension>
      </valueSet>

8.1. ElementSetSpecs Translation

The translation of an ElementSetSpecs instance where the ellipsis ("...") is not present is the translation of the ElementSetSpec in the RootElementSetSpec. The translation of an ElementSetSpecs instance where the ellipsis ("...") is present is the translation of the ElementSetSpec in the RootElementSetSpec followed by an element item with the [local name] "extension". If an AdditionalElementSetSpec is present in the ElementSetSpecs, then the translation of the ElementSetSpec in the AdditionalElementSetSpec SHALL be added to the [children] of the <extension> element item.

8.2. ElementSetSpec Translation

If an ElementSetSpec is of the "ALL Exclusions" form, then the translation of the ElementSetSpec is an element item with the [local name] "all". An element item with the [local name] "except" SHALL be added to the [children] of the <all> element item. The translation of the Elements instance in the Exclusions SHALL be added to the [children] of the <except> element item. If an ElementSetSpec is a Unions instance, then the translation of the ElementSetSpec is the translation of the Unions instance. If a Unions instance has only one nested Intersections instance, then the translation of the Unions instance is the translation of that Intersections instance; otherwise, the translation of the Unions instance is an element item with the [local name] "union". In the latter case, the translation of each nested Intersections instance SHALL be appended to the [children] of the <union> element item. If an Intersections instance has only one nested IntersectionElements instance, then the translation of the Intersections instance is the translation of that IntersectionElements instance; otherwise, the translation of the Intersections instance is an element item with the [local name] "intersection". In the latter case, the translation of each nested IntersectionElements instance SHALL be appended to the [children] of the <intersection> element item.
Top   ToC   RFC4912 - Page 63
   If an IntersectionElements instance is of the "Elems Exclusions"
   form, then the translation of the IntersectionElements instance is an
   element item with the [local name] "all".  The translation of the
   Elements instance in the Elems SHALL be added to the [children] of
   the <all> element item.  An element item with the [local name]
   "except" SHALL be appended to the [children] of the <all> element
   item.  The translation of the Elements instance in the Exclusions
   SHALL be added to the [children] of the <except> element item.

   If an IntersectionElements instance is an Elements instance, then the
   translation of the IntersectionElements instance is the translation
   of the Elements instance.

   The translation of an Elements instance is the translation of the
   SubtypeElements, ObjectSetElements, or ElementSetSpec in the Elements
   instance.

8.3. SubtypeElements Translation

If a SubtypeElements instance is a SingleValue, then the translation of the SubtypeElements instance is the translation of the Value in the SingleValue, except that an attribute form of the Value translation SHALL NOT be used. If a SubtypeElements instance is a ContainedSubtype, then the translation of the SubtypeElements instance is an element item with the [local name] "includes". The translation of the Type in the ContainedSubtype SHALL be added to the [children] or [attributes] of the <includes> element item. If a SubtypeElements instance is a ValueRange, then the translation of the SubtypeElements instance is the translation of the ValueRange. If a SubtypeElements instance is a SizeConstraint, then the translation of the SubtypeElements instance is an element item with the [local name] "size". The translation of the Constraint in the SizeConstraint SHALL be added to the [children] of the <size> element item. If a SubtypeElements instance is a TypeConstraint, then the translation of the SubtypeElements instance is an element item with the [local name] "typeConstraint". The translation of the Type in the TypeConstraint SHALL be added to the [children] or [attributes] of the <typeConstraint> element item.
Top   ToC   RFC4912 - Page 64
   If a SubtypeElements instance is a PermittedAlphabet, then the
   translation of the SubtypeElements instance is an element item with
   the [local name] "from".  The translation of the Constraint in the
   PermittedAlphabet SHALL be added to the [children] of the <from>
   element item.

   If a SubtypeElements instance is an InnerTypeConstraints instance,
   then the translation of the SubtypeElements instance is the
   translation of the InnerTypeConstraints instance.

   If a SubtypeElements instance is a PatternConstraint, then the
   translation of the SubtypeElements instance is an element item with
   the [local name] "pattern".  The translation of the Value in the
   PatternConstraint SHALL be added to the [children] or [attributes] of
   the <pattern> element item.

8.3.1. ValueRange Translation

The translation of a ValueRange is an element item with the [local name] "range". If the LowerEndpoint in the ValueRange is of the "LowerEndValue <" form, then an element item with the [local name] "minExclusive" SHALL be added to the [children] of the <range> element item. If the LowerEndValue is a Value, then the translation of the Value SHALL be added to the [children] or [attributes] of the <minExclusive> element item. If the LowerEndpoint in the ValueRange is of the "LowerEndValue" form and the LowerEndValue is a Value, then an element item with the [local name] "minInclusive" SHALL be added to the [children] of the <range> element item. The translation of the Value in the LowerEndValue SHALL be added to the [children] or [attributes] of the <minInclusive> element item. If the LowerEndpoint in the ValueRange is of the "LowerEndValue" form and the LowerEndValue is "MIN", then an element item with the [local name] "minInclusive" MAY be added to the [children] of the <range> element item. If the UpperEndpoint in the ValueRange is of the "< UpperEndValue" form, then an element item with the [local name] "maxExclusive" SHALL be added to the [children] of the <range> element item. If the UpperEndValue is a Value, then the translation of the Value SHALL be added to the [children] or [attributes] of the <maxExclusive> element item.
Top   ToC   RFC4912 - Page 65
   If the UpperEndpoint in the ValueRange is of the "UpperEndValue" form
   and the UpperEndValue is a Value, then an element item with the
   [local name] "maxInclusive" SHALL be added to the [children] of the
   <range> element item.  The translation of the Value in the
   UpperEndValue SHALL be added to the [children] or [attributes] of the
   <maxInclusive> element item.

   If the UpperEndpoint in the ValueRange is of the "UpperEndValue" form
   and the UpperEndValue is "MAX", then an element item with the
   [local name] "maxInclusive" MAY be added to the [children] of the
   <range> element item.

   Examples

      1..10

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

      0..MAX

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

      0<..<MAX

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

8.3.2. InnerTypeConstraints Translation

The translation of an InnerTypeConstraints instance that has a SingleTypeConstraint is an element item with the [local name] "withComponent". The translation of the Constraint in the SingleTypeConstraint SHALL be added to the [children] of the <withComponent> element item. The translation of an InnerTypeConstraints instance that has a MultipleTypeConstraints instance is an element item with the [local name] "withComponents". If the MultipleTypeConstraints instance is a PartialSpecification, then an attribute item with the [local name] "partial" and the [normalized value] "true" or "1" SHALL be added to the [attributes] of the <withComponents> element item.
Top   ToC   RFC4912 - Page 66
   If the MultipleTypeConstraints instance is a FullSpecification, then
   an attribute item with the [local name] "partial" and the
   [normalized value] "false" or "0" MAY be added to the [attributes] of
   the <withComponents> element item.  The translation of each
   NamedConstraint nested in the TypeConstraints instance in the
   FullSpecification or PartialSpecification SHALL be appended to the
   [children] of the <withComponents> element item.

   The translation of a NamedConstraint is an element item with the same
   [local name] (i.e., "attribute", "element", "component", "group",
   "member", or "simpleContent") as the translation of the NamedType
   corresponding to the identifier in the NamedConstraint.  An attribute
   item with the [local name] "name" SHALL be added to the [attributes]
   of the <attribute>, <element>, <component>, <group>, <member>, or
   <simpleContent> element item.  The [normalized value] of this
   attribute item is a qualified name for the expanded name of the
   NamedType corresponding to the identifier in the NamedConstraint.

   If the PresenceConstraint in the ComponentConstraint in the
   NamedConstraint is not empty, then an attribute item with the
   [local name] "use" SHALL be added to the [attributes] of the
   <attribute>, <element>, <component>, <group>, <member>, or
   <simpleContent> element item.  The [normalized value] of this
   attribute item is the text of the PresenceConstraint with all letters
   downcased, i.e., either "present", "absent", or "optional".

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



(page 66 continued on part 4)

Next Section