[Note: Name was changed from "Context Model".]
This tool will create an XML representation (using elements and attributes) of an XML DTD. The XML representation can be used to create a Context Table or to compare versions of a DTD.
/pmc/bin/contextmodel.sh foo.xml my-catalog.xml > foo-info.xml
Note: catalog is optional; if not specified, defaults to /pmc/load/catalog/pmc3-catalog.xml
This generates an XML representation of the DTD specified in the DOCTYPE declaration in foo.xml.
elements element+ @name @dtdOrder @model @note @modelNote @group attributes? attribute+ @attName @mode @type [content is the attribute value] context parent*
The development environment for this project is very rudimentary at present, and uses make. Here are the contents:
Makefile - targets are:
* all - default target, everything below. * clean - deletes intermediat files * build - compiles all .java → .class; results go into 'class' directory * doc - builds javadocs; puts results into 'doc' * t - runs the script over the test file in the 'test' directory
setenv.sh - sets up PATH and CLASSPATH to point to the (hard-coded) development directories
bin - directory containing the script contextmodel.sh
src/pmctools/*.java - the Java source files
test/*.xml - a few samples files
This utility is dependent on the Apache Xerces2 Java parser, version 2.4.0 or later.
Please join the DtdAnalyzer Google group for discussions.
This work is in the public domain and may be used and reproduced without special permission.