Trang

Multi-format schema converter based on RELAX NG

Copyright © 2002, 2003 Thai Open Source Software Center Ltd

See the file copying.txt for copying permission.

Version 20030619

Trang converts between different schema languages for XML. It supports the following languages:

A schema written in any of the supported schema languages can be converted into any of the other supported schema languages, except that W3C XML Schema is supported for output only, not for input.

Trang can also infer a schema from one or more example XML documents.

Trang is constructed around an RELAX NG object model designed to support schema conversion. For each schema language supported for input, there is an input module that can convert from the schema language into this internal object model. Similarly, for each schema language supported for output, there is an output module that can convert from the internal object model in the schema language.

Trang aims to produce human-understandable schemas; it tries for a translation that preserves all aspects of the input schema that may be significant to a human reader, including the definitions, the way the schema is divided into files, annotations and comments.

Trang has a command-line user interface. It has no graphical user interface.

Downloads

Trang is available in the download directory in a number of forms:

trang-version.zip
the main Trang distribution for use with a Java Runtime Environment, including binaries, source code, documentation
gcj/trang-version.tar.gz
source code packaged for compilation with GCJ (GNU Compiler for Java)
gcj/trang-version-release.i386.rpm
RPM for Linux compiled with GCJ
gcj/trang-version-release.src.rpm
source RPM for Linux for compilation with GCJ

Further information

Detailed information about using Trang is in the manual.

Some background information on the conversion to W3C XML Schema is available in the slides for a talk given a XML 2002.

Related software

Trang's DTD input module uses DTDinst. The Trang distribution already includes the necessary parts of DTDinst, so there is no need to download DTDinst just in order to use Trang. DTDinst is also available as an independent program that outputs an XML representation of an XML DTD.

The Sun RELAX NG Converter converts from a variety of different schema languages into RELAX NG. However, it is based on an object model which is designed to support validation, and so does not preserve aspects of the input schemas that are irrelevant for validation (such as the definitional structure).

James Clark