§ DITA 1.3 support
As of version 3.0, XMLmind DITA
Converter (ditac for short) fully supports
DITA 1.3 and as such, allows to convert DITA
documents conforming to the DITA 1.3 DTD, W3C XML Schema or
RELAX NG
schema. However, there are still limitations, deemed minor, and
implementation specificities which are documented in
Appendix C.
In fact, when ditac v2.6+ is used, DITA
1.2 documents are automatically “upgraded” to DITA 1.3. This is caused by
the fact that the following <!DOCTYPE>
means "use
latest version of the DITA DTD":
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="MyTopic">
...
</topic>
This should not be a problem as DITA 1.3 is a superset
of DITA 1.2.
§ DITA 1.3 RELAX NG schema
Ditac has no problem
processing a DITA document pointing to a RELAX NG schema, rather than to a
DTD or W3C XML Schema:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="urn:oasis:names:tc:dita:rng:topic.rng"?>
<topic id="MyTopic">
...
</topic>
§ The DTDToSchema
facility
The
DTDToSchema
facility can be used to “upgrade” your
documents conforming to a DITA 1.3 DTD to the equivalent DITA 1.3 W3C XML
Schema or RELAX NG schema. Command-line example showing how to invoke the
DTDToSchema
facility:
$ java -cp ditac_install_dir/lib/ditac.jar com.xmlmind.ditac.tool.DTDToSchema¬
-rng MyTopic.dita
Before invoking the
DTDToSchema
facility, MyTopic.dita
contained:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE topic PUBLIC "-//OASIS//DTD DITA Topic//EN" "topic.dtd">
<topic id="MyTopic">
...
</topic>
After invoking
the DTDToSchema
facility,
MyTopic.dita
contains:
<?xml version="1.0" encoding="UTF-8"?>
<?xml-model href="urn:oasis:names:tc:dita:rng:topic.rng"?>
<topic id="MyTopic">
...
</topic>
The DTDToSchema
facility is auto-documented:
$ java -cp ditac_install_dir/lib/ditac.jar com.xmlmind.ditac.tool.DTDToSchema
Usage: java -cp ditac.jar com.xmlmind.ditac.tool.DTDToSchema
-rng|-xsd [ in_dita_file|in_dir_containing_dita_files ]+
"Upgrades" specified DITA documents conforming to a standard
DITA 1.3 DTD to the corresponding W3C XML schema or
RELAX NG schema.
Processes files or directories. Files are modified in place.
Directories are recursively processed. All the '.ditamap', '.dita'
and '.ditaval' files found in specified directories are processed.
Options:
-rng Upgrade to RELAX NG schema.
-xsd Upgrade to W3C XML schema.