Skip to content


Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

README for DTDParse version V2.0beta3

N.B. This is a long since moribund project. It exists here mostly as an historical curiosity.

DTDParse is a tool for processing SGML and XML DTDs. The primary motivation for writing DTDParse was to provide a framework for building documentation for DTDs, but other applications are easy to imagine.

Using DTDParse is a two-step process. First the DTD is parsed with ''. This produces an XML version of the DTD. Subsequent processing is performed against this XML version.


  • README, this document
  • SGML, modules used by DTDParse
  • dtd.dtd, the XML DTD for the XML instances procued by
  •, '' library for HTML output
  •, '' library for DocBook RefEntry output
  •, format a parsed DTD into documentation
  •, parse an SGML/XML DTD into XML
  •, print thes tatus of a parsed DTD
  •, lists element/mixed content elements for a given DTD
  •, the default library for '' conversions.
  • test, a directory of test DTDs.

System Requirements

DTDParse version V2.0beta3 requires Perl5 and the Text::DelimMatch module available from CPAN (


At this point, I haven't arranged a proper Makefile.PL for DTDParse. Simply unpack the distribution somewhere and run the tools with Perl. Each of the programs adjusts its @INC path to make sure it can find the modules it needs.


In the fullness of time [hahaha! —ed], each of the applications will include appropriate POD documentation. At present, it's pretty sparse.

Getting Started

Go to the 'test' directory, run

perl ../ --title "Test DTD" --output test.xml test.dtd

Peek in test.xml and you'll see the XML version of the DTD. Run

perl ../ --html test.xml

Point your favorite web browser at test/index.html and you'll see the default HTML documentation for the DTD.

Delete the test directory, then run

perl ../ --refentry test.xml

Look in test/* and you'll find DocBook RefEntry pages of documentation for the DTD.

You can provide your own library (defining a few perl functions) to provide additional information for the documentation (such as reasonable descriptions).


The HTML form of the documentation for the HTML 4.0 Transitional DTD is online. The XML “database” produced by dtdparse is also online.


Reads an XML (or SGML) DTD and produces a database of its content







No releases published


No packages published