CSN1String Mapping Procedure

This procedure is only used when invoked by another procedure.

Angle brackets are a syntactic feature in CSN.1. We do not have a separate procedure for mapping a string in angle brackets. If the angle brackets are used to make a reference, the string is a reference and is mapped as such. If the angle brackets are used to apply a label (possibly in addition to being used to make a reference), we map the string as though it were not labeled, and then we take account of the label.

  1. If the CSN1String is an Alternation, invoke the Alternation mapping procedure for the string.

  2. Otherwise, if the CSN1String has an exponent, invoke the Exponential mapping procedure on it.

  3. Otherwise, if the CSN1String is a literal bit string (a sequence of 1 or more literal bits), then invoke the Literal mapping procedure for the string.

  4. Otherwise, if the CSN1String is a Concatenation (without an exponent and other than a simple concatenation of literal bits forming a literal bit string), invoke the Concatenation mapping procedure for the string.

  5. Otherwise, if the CSN1String is an Intersection, invoke the Intersection Mapping procedure for the string.

  6. Otherwise, if the CSN1String is a reference, invoke the Reference Mapping procedure on it.

  7. Otherwise, if the CSN1String is a Send expression, invoke the Send mapping procedure for the string.

  8. If the string has a label name and the result of the above procedures is an ASN.1 type, T, rather than an ASN.1 component, then the result of these procedures is an ASN.1 component, C. C is non-optional. C's type is T. C's CSN.1 name is the label name. The purpose of this rule is to preserve the label name from the CSN.1 in the ASN.1.