Table of Contents
The version 5.8 release of ASN1C contains a separate command-line utility program that translates an XML Schema Definitions (XSD) source file into an equivalent ASN.1 source file. This conversion process is based on the ITU-T X.694 standard which specifies a mapping from XSD to ASN.1.
The mapping specified in the standard consists of two parts:
A mapping of XSD elements, types, and attributes to equivalent ASN.1 items, and
The addition of "extended-XER" (E-XER) annotations to allow the ASN.1 source file to act as a stand-alone schema for use in both XML and ASN.1 applications.
The ASN1C translation process supports only the first item at this time. The main goal of the translation process is to get the XML schema into a form that allows the generation of efficient binary encoders/decoders that utilize the ASN.1 encoding rules. Option 1 supports this goal by creating an ASN.1 file that can be used with any ASN.1 compiler product or tool that supports standard ASN.1 syntax.
It should also be noted that the translation process of going from ASN.1 to XSD described in the previous section is not "round-trippable" with the XSD to ASN.1 process described in this section. That is to say, one cannot start with an XSD file (for example) and translate it to ASN.1 using this tool and then translate that file back to XSD and expect the final XSD file to be the same as the original. Certain naming conventions that are utilized make this type of round-trip conversion process very problematic. It is therefore a one-way process - a user must work either in XSD or ASN.1 and then use the tools to get an equivalent representation in the alternative form.