This document describes the command line tools available for different types of schema conversion.
This information is provided under the following headings:
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. |
Converts a DTD to Tamino schema format.
inodtdconv [options]
where options are:
Print out this message and exit
Display the version of the converter.
Mandatory. Input DTD file. Use the notation: "file://.." (under Windows: "file:///drive:\....".
Mandatory. Output TSD file. Use system-dependent notation (under Windows: "drive:\filename.tsd")
Set the encoding for the output file. The default is UTF-8.
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 name to be used in the TSD schema. If this option is not specified, the DTD file name is used.
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.
The DTD is not validated.
Converts a Tamino version 2.x schema (TSD2) to Tamino schema format.
inotsd2conv [options]
where options are:
Print out this message and exit.
Mandatory. Input TSD2 file.
Output TSD file. If this option is not set, the TSD2 file name is used with the extension .tsd.
Set the encoding for the input file. If not set, UTF-8 is used.
Set the encoding for the output file. The default is UTF-8.
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 name to be used in the TSD schema. If this option is not specified, the collection name specified in the TSD2 schema is used.
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.
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.
Print version information.