DtdAnalyzer provides a set of tools:
- dtdanalyzer - creates an XML representation (using elements and attributes) of an XML DTD
- dtddocumentor - generates pretty HTML documentation, including annotations (if present) from specially-formatted comments of the DTD
- dtdflatten - flattens a multi-file DTD into one big file
- dtdcompare - compares two DTDs and generate a report of differences
- dtd2xml2json - generates XSLT to convert instance documents into JSON format.
- dtdschematron.xsl - generates a schematron file from the DTD, including extra schematron rules (if present) from specially-formatted comments of the DTD
- scaffold.xsl - generates XSLT scaffolding that can be used as a starting point for writing a transform from one schema to another
Note: Do not use the "Zip" download button on the main GitHub page! That button downloads the source files, not the pre-built packages. They are different!
Unzip that file on your machine.
Open up a Windows command or a bash shell window. Add the path to the package root to your PATH environment variable.
Try the following command, which analyzes the Journal Archiving and Interchange flavor of the NLM/NISO Journal Article Tag Suite, and writes the output to a file (make sure you enter it all on one line):
dtdanalyzer http://jats.nlm.nih.gov/archiving/1.0/JATS-archivearticle1.dtd out.daz.xml
Check that you have sensible results in the output file,
As another example, the next command produces HTML documentation for that DTD. It should run for a little while and then announce that it's done, and that the documentation is in the
dtddocumentor http://jats.nlm.nih.gov/archiving/1.0/JATS-archivearticle1.dtd --exclude mml: --exclude-except mml:math
doc/index.htmlfile there in a browser, and check that it looks correct.
--helpwith any of the tools for more complete usage information, or continue by visiting the documentation pages on the GitHub wiki.
Detailed documentation is available on the GitHub wiki.
This software is in beta stage.
Join the DtdAnalyzer Google group for discussions.
File bug reports at the GitHub issues page.
This work is in the public domain and may be reproduced, published or otherwise used without permission of the National Library of Medicine (NLM).
Although all reasonable efforts have been taken to ensure the accuracy and reliability of the software and data, the NLM and the U.S. Government do not and cannot warrant the performance or results that may be obtained by using this software or data. The NLM and the U.S. Government disclaim all warranties, express or implied, including warranties of performance, merchantability or fitness for any particular purpose.