Command Line Tools for Schema Conversions

This document describes the command line tools available for different types of schema conversion.

This information is provided under the following headings:


Conversion Scripts

The conversion scripts are provided in installation-directory\Tamino\Tamino n.n\X_Tools\Tamino_Schema_Editor.

The conversion scripts are provided under Windows as .cmd files and under UNIX as .sh files.

The names of the scripts are:

Name Description
inodtdconv For the conversion from DTDs.
inotsd2conv For the conversion from TSD2 schemas.

Tamino DTD Converter

Converts a DTD to Tamino schema format.

Usage:

inodtdconv [options]

where options are:

-help

Print out this message and exit

-version

Display the version of the converter.

-dtd file

Mandatory. Input DTD file. Use the notation: "file://.." (under Windows: "file:///drive:\....".

-tsd file

Mandatory. Output TSD file. Use system-dependent notation (under Windows: "drive:\filename.tsd")

-outputEncoding encoding

Set the encoding for the output file. The default is UTF-8.

-collection collectionname

Collection name to be used in the TSD schema. If this is not specified, no TSD-specific information will be generated. Neither the -schema nor the -doctype options will be permitted and the schema cannot be defined to Tamino.

-schema schemaname

Schema name to be used in the TSD schema. If this option is not specified, the DTD file name is used.

-doctype doctypename

Specifies the doctype to be created in the TSD schema. If you specify this option with no value, the schema file name is used. If this option is not specified, no doctype is created.

-noValidation

The DTD is not validated.

Tamino TSD2 Converter

Converts a Tamino version 2.x schema (TSD2) to Tamino schema format.

Usage:

inotsd2conv [options]

where options are:

-help

Print out this message and exit.

-tsd2 file

Mandatory. Input TSD2 file.

-tsd file

Output TSD file. If this option is not set, the TSD2 file name is used with the extension .tsd.

-inputEncoding encoding

Set the encoding for the input file. If not set, UTF-8 is used.

-outputEncoding encoding

Set the encoding for the output file. The default is UTF-8.

-schema schemaname

Schema name to be used in the TSD schema. If this option is not specified, the collection name specified in the TSD2 schema is used.

-collection collectionname

Collection name to be used in the TSD schema. If this option is not specified, the collection name specified in the TSD2 schema is used.

-strict

Enable strict conversion mode. If not set, loose mode is used.

  • loose mode
    This is the default conversion mode. It generates a Tamino schema against which all existing instances are most likely to validate. Note, however, that it may loosen a logical schema quite dramatically.

    V2.x schema nodes defined with Object Type "SEQ" are declared as complex elements containing xs:choice with maxOccurs="*" (declared child elements can occur in any number in any order).

    V2.x schema nodes defined with Object Type "ANY" are declared as complex elements with mixed="true" and containing an xs:any element. Any well-formed XML content is allowed (including elements from other namespaces), in mixed content.

    The Doctype is always generated with "open" content, and all elements are declared with mixed content:

    <tsd:doctype name = "...">
      <tsd:logical>
        <tsd:content>open</tsd:content>
      </tsd:logical>
    .....
      <xs:element name = "...">
        <xs:complexType mixed = "true"></xs:complexType>
      </xs:element>
  • strict mode
    In strict mode, the conversion attempts to infer the real or imagined DTD from which the V2.x schema was generated in order to maximize the chances that the logical schema will reflect the original DTD. This approach works in cases where it is known that the instances will parse against the original DTD.

    V2.x schema nodes defined with Object Type "SEQ" are declared as complex elements containing xs:sequence (the declared child elements must appear in the declared order).

    V2.x schema nodes defined with Object Type "ANY" are declared as complex elements with mixed="true" and containing xs:choice. The declared child elements can appear in any number and order, in mixed content.

-content mode

Mode is "open" or "close".

If mode is set to "open", the content property of all doctypes is set to "open".

If mode is set to "close", the content property of all doctypes is set to "close".

This option overrides the content property value that is specified for strict (default: close) or loose (default: open) mapping.

-version

Print version information.