DTD2RELAX

$Id: DTD2RELAX.html,v 1.6 2000/09/24 05:43:14 nanba Exp $

[English]/[Japanese]

Updates

Abstract

GUI version of converter

DTD2RELAX converts DTD schema into RELAX module.

Example:

Both command line version and GUI version are available.

Distribution

DTD2RELAX_*-bin.jar is executable JAR file. If you don't have XML4J 1.1.16, you can download DTD2RELAX_*-bin-XML4J.jar.

DTD2RELAX_*-src.zip is source code package. It contains sources and docs.

(packages of version 1.1.0 or earlier, DTD2RELAX_*.jar contains sources and classes.)


VERSIONFILECHANGES
1.1.1 DTD2RELAX_1_1_1-src.zip [50KB]
DTD2RELAX_1_1_1-bin.jar [25KB]
DTD2RELAX_1_1_1-bin-XML4J.jar [250KB]
change default output format. output format option added.
1.1.0 DTD2RELAX_1_1_0.jar [28KB]
DTD2RELAX_1_1_0-with-XML4J_1_1_16.jar [250KB]
SAX output.
1.0.2 DTD2RELAX_1_0_2.jar [24KB]
DTD2RELAX_1_0_2-with-XML4J_1_1_16.jar [250KB]
print error for unsupported encoding. UTF-16BE,LE output has not been supported.
1.0.1 DTD2RELAX_1_0_1.jar [24KB]
DTD2RELAX_1_0_1-with-XML4J_1_1_16.jar [250KB]
new keywords. standard output. bug fix for 'any' content model.
1.0.0 DTD2RELAX_1_0_0.jar [24KB]
DTD2RELAX_1_0_0-with-XML4J_1_1_16.jar [250KB]

Usage

Command Line Version:

java com.horobi.relax.DTD2RELAX [-e encoding] dtd [relax] topLevelElement

If you omit 'relax', you get output on standard output.

GUI Version:

java com.horobi.relax.DTDtoRELAXConverterGUI

or, on Java2 JRE,

java -jar DTD2RELAX_1_1_1-bin.jar

Requirment

Common:

You need XML4J 1.1.16.

DTD2RELAX not works with XML4J 2.0.x nor Xerces-J.

Command Line Version:

JDK 1.1.x or greater.

GUI Version:

JDK 1.1.x + Swing 1.1, or Java2.

SAX Output:

After version 1.1.0, DTD2RELAX can output RELAX module via SAX API.

To receive SAX event with your DocumehtHandler, use com.horobi.relax.DTD2RELAXParser such as:

  DTD2RELAXParser dtd2relax = new DTD2RELAXParser();
  dtd2relax.setFinalElementType("spec");
  dtd2relax.setDocumentHandler(yourDocumentHandler);
  dtd2relax.parse("xmlspec.dtd");
	

Output Format:

After version 1.1.1, DTD2RELAX output format become more easy-to-read.

If you prefer format of earlier version, specify the format with system property option.

java -Dcom.horobi.relax.printer=com.horobi.relax.RELAXPrinter com.horobi.relax.DTD2RELAX ...

'com.horobi.relax.printer' system property is class name to format output( You can specify any class which implements com.horobi.relax.SAXPrinter.)

BUGS

TODO

COPYRIGHT

copyright (c) 2000 by MURATA Makoto & NANBA Ryosuke. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:

  1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.