Converting Between Schema Languages

The Generate/Convert Schema dialog allows you to convert a DTD or Relax NG (full or compact syntax) schema or a set of XML files to an equivalent XML Schema, DTD or Relax NG (full or compact syntax) schema. Where perfect equivalence is not possible due to limitations of the target language, Oxygen XML Editor generates an approximation of the source schema. Oxygen XML Editor uses Trang multi-format converter to perform the actual schema conversions.

To open the Generate/Convert Schema dialog, select the Generate/Convert Schema... (Alt Shift C (Command Alt C on OS X)) action from the Tools menu or from the Open with submenu when invoking the contextual menu in the Project view.

A schema being edited can be converted with just one click on a toolbar button if that schema can be the subject of a supported conversion.

Figure: Convert a Schema to Other Schema Language

The language of the source schema is specified with one of the four radio buttons in the Input panel. If the conversion is based on a set of XML files, not just a single XML file, select the XML Documents option. Then use the file selector to add the XML files involved in the conversion.

The language of the target schema is specified with one of the four options in the Output panel. Here you can also choose the encoding, the maximum line width and the number of spaces for one level of indentation.

The conversion can be further fine-tuned by specifying more advanced options available from the Advanced options button. For example if the input is a DTD and the output is an XML Schema the following options are available:

Input panel:

Output panel: