Back in '99 I came up with a Tree structure for me to visualize my DTDs. The concept is simple and helps to visually see the structure of the DTD - albeit a bit simplified than the actual structure.
for the DTD
<!ELEMENT root (firstChild, secondChild*, lastChild?)>
version CDATA #FIXED
<!ELEMENT secondChild (#PCDATA)>
<!ELEMENT lastChild (#PCDATA)>
<!ELEMENT firstChild (#PCDATA)>
the tree structure will look like
The DTDTree will show the parent-child relationship between the elements and the attributes associated with the elements. Note that it doesn't show any complex content specifications that the DTD specifications (or rather the XML specifications) allow - but simplifies the structure for easier digestion.
By 2000 I wanted to automate the creation of the DTDTree, but could not find a DTD Parser (in java) that I could readily use. So I went about creating my own. The initial parser was written keeping the DTDTree in mind, but its evolved over time to be usable for other purposes - and it continues to evolve.
The Matra project started as being centered on the DTDTree and then on the DTD Parser, I forsee it to have the parser core with a lot of utilities built on top of it. Lets see how it goes!
You can get the code for the Matra DTD Parser and utilities at sourceforge - at http://matra.sourceforge.net.