Skip to content

Latest commit

 

History

History

contextmodel

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

DtdAnalyzer

[Note: Name was changed from "Context Model".]

Overview

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.

Usage

/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.

XML Structure

elements element+ @name @dtdOrder @model @note @modelNote @group attributes? attribute+ @attName @mode @type [content is the attribute value] context parent* 

Development environment

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

Dependencies

This utility is dependent on the Apache Xerces2 Java parser, version 2.4.0 or later.

Discussion forum / mailing list

Please join the DtdAnalyzer Google group for discussions.

Public domain

This work is in the public domain and may be used and reproduced without special permission.

close