edu.ucsb.adl.reports
Class DtdTableGenerator

java.lang.Object
  |
  +--edu.ucsb.adl.reports.DtdTableGenerator

public final class DtdTableGenerator
extends java.lang.Object

Standalone, offline program that generates the parse tables for a given XML DTD. Part of the high-performance, DTD-based, table-driven validating XML parser.

This program should be invoked with the command

java edu.ucsb.adl.reports.DtdTableGenerator
  
dtd-file [package-name] class-name
Given a DTD contained in the file named by dtd-file, this program creates, in the current directory, a Java source file named "class-name.java" that defines class-name, a concrete subclass of class XmlDtd. The subclass is defined in package package-name if the latter is specified, or in the anonymous package otherwise. (An instance of) this subclass can then be passed to the parser to validate against the DTD, as in
new ValidatingXmlParser(new class-name(), ...)
For convenience, this program defines constants in class class-name that identify DTD elements and attributes. For each DTD element E, an integer constant is defined whose value is the element's code as used by the parser. The name of the constant is "E_E' " where E' is a transformation of E (namely, E with alphabetic characters uppercased and nonalphanumeric characters converted to underscores). For example, the constant for element foo-bar is
public static final int E_FOO_BAR = ...;
Similarly, for each attribute A of element E, an integer constant is defined whose value is the attribute's code. The name of the constant is "A_E'_A' " where E' and A' is are the respective transformations of E and A. For example, the constant for attribute baz of element foo-bar is
public static final int A_FOO_BAR_BAZ = ...;

Version:
$Header: /export/home/gjanee/utils/reports/edu/ucsb/adl/reports/RCS/DtdTableGenerator.java,v 1.1 2003/04/05 02:24:30 gjanee Exp $

$Log: DtdTableGenerator.java,v $ Revision 1.1 2003/04/05 02:24:30 gjanee Initial revision


Method Summary
static void main(java.lang.String[] args)
          Main program.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

main

public static void main(java.lang.String[] args)
                 throws java.io.IOException,
                        edu.ucsb.adl.reports.DtdTableGenerator.ProcessingException
Main program.

java.io.IOException
edu.ucsb.adl.reports.DtdTableGenerator.ProcessingException