OSS XSD to ASN.1 Translator
True Interoperability, the Compactness of ASN.1, and the
Flexibility of XML
Technical Description
A Simple Example
A More Complex Example
Convert your XML Schema into ASN.1
Technical Description
This command line tool maps your XSD schemas into ASN.1 modules.
One module is generated for each target XML namespace.
The generated ASN.1 can be used with the
OSS ASN.1 Tools,
or any ASN.1 tools that support E-XER,
to generate binary or XML encodings of the global XML elements
defined in the XSD. The generated XML documents
(also known as ASN.1 E-XER encodings)
will conform to the original XML Schema. This conversion allows
you to interoperate, using XML, with the peers that use XSD,
and at the same time, you can exchange data with other peers that
use ASN.1 and can understand binary encodings.
Figure 1: The OSS XSDASN1 Translator
Figure 2: Interoperability between XSD and ASN.1 tools
Figure 2 demonstrates how various ASN.1 and XSD peers can
exchange data. Once you convert your XML Schema into ASN.1, you
can use any XSD tools and any ASN.1 tools which support E-XER
to exchange data using XML. If you use the
OSS XSD tools, you will be able to exchange
data with any XSD tools using XML, and at the same time with any
ASN.1 tools using highly efficient binary encoding formats such as PER.
A Simple Example:
This example is based on the "W3C XML Schema Part 0: Primer"
Purchase Order schema. It shows how you can convert schema
po.xsd, into equivalent ASN.1, po.asn.
-
Input XML schema
(
po.xsd)
-
Command line syntax to translate schema:
xsdasn1.exe po.xsd
-
Output ASN.1 modules (
po.asn, xsd.asn)
Download zip file of the simple example
A more complex example:
This example shows an advanced use of the XSDASN1 Translator using
the
NewsML 1.2 Schema.
It shows three variations on generating E-XER instructions:
-
E-XER instructions generated inline within the ASN.1 modules
(default mode)
In this mode, all of the E-XER instructions
are generated inline with the ASN.1 syntax.
Download zip file of ASN.1 Inline example
-
E-XER Instructions generated in an XER control section of the
ASN.1 module
In this mode, all of the E-XER instructions are generated under an XER
control section. Note that the generated
ASN.1 files describe the same binary and XML data as in the previous
example, but the files look different because in this example the
E-XER syntax is localized and not spread across the file.
Download zip file of ASN.1 Control example
-
E-XER instructions generated within ASN.1 comments
In this mode, all of the E-XER instructions
are generated within ASN.1 comments. This allows you to use the
generated ASN.1 with an old ASN.1 compiler that does not understand
E-XER instructions. However, these ASN.1 modules can not be used to
generate XML (E-XER). They can be used to generate binary encodings
only.
Download zip file of ASN.1 Comment example
Convert your XML Schema into ASN.1:
If you would like to see the ASN.1 modules translated from your
XSD schema, our online conversion tool is available.
Click here to access this tool.
If you prefer not to use an online tool for your schema conversion
(for instance, due to security regulations that apply to your
proprietary schemas), and would like to trial or purchase your own copy,
please contact us at info@oss.com.
Whether you trial or purchase our conversion tool you can take
advantage of OSS' support services
should you have any difficulties, questions or feature requests.
Once you convert your XML Schema into ASN.1 modules, download the
OSS ASN.1 Tools with E-XER support to generate
XML and Binary encodings.
.:. Top
Copyright © 2008 OSS Nokalva, Inc. All Rights Reserved.