Open Type

An Open Type as defined in the X.680 standard is specified as a reference to a Type Field in an Information Object Class. The most common form of this is when the Type field in the built-in TYPE-IDENTIFIER class is referenced as follows:

   TYPE-IDENTIFIER.&Type

A reference to an Open Type within a SEQUENCE or CHOICE construct is converted into an XSD any element type. Note that the conversion is only done if the element is in one of these constructs. An open type declaration on its own has no equivalent XSD type and is therefore ignore

An example showing how an open type might be referenced in a SEQUENCE type and the corresponding conversion to XSD is as follows:

   SeqWithOpenType ::= SEQUENCE {
      anOpenType TYPE-IDENTIFIER.&Type
   }

Generated XSD type:

   <xsd:complexType name="SeqWithOpenType">
      <xsd:sequence>
         <xsd:any/>
      </xsd:sequence>
   </xsd:complexType>

In this case, any valid XML instance can be used in the type. Note that the ASN.1 element name (anOpenType) is ignored.

If the open type is bound a by a relational table constraint and -tables was specified on the command-line, an XSD choice is created that contains all of the possible types that may appear in the field. This is further described in the section on mapping items from table constraints.