Make your own free website on

DTD sucks, XML-Schema is only marginally better, we need something more flexible. You might be interested in reading an interesting paper Dave Raggett (the HTML 4.0, Tidy guy) wrote that includes your 'parent model' idea. The paper is at: I wouldn't mind having this 'Assertion Grammars' replace the current XML-Schema proposal. Frankly, I am tired of tip-toeing around what W3C thinks is the right way of doing things.

The only standard per se is the XML 1.0 standard. For guidelines, David Megginson's "Structuring XML Documents" is very good. Before that, the only book on DTD development that I know of was Eve Maler and Jeanne El Andaloussi's "Developing SGML DTDs." The SGML DTD syntax is slightly different, but the principles are the same, and there's a lot to learn from this book as well.

Can a XML DTD be written in XML itself??

No, DTDs use a slightly different syntax (DTDs and their syntax are inherited from SGML).

You might want to take a look at the various pending XML _schema_ proposals -- these _are_ written in XML. There seems to be a growing consensus that schemas will replace DTDs, since the former can share parser/processor code with the content, and provides stronger data-typing and other features necessary for e-commerce and other non-document data exchange (the real strength and promise of XML, IMHO).

Some good links for more information are:
Robin Cover's SGML/XML Web Page (;
Peter Flynn's XML FAQ (;
James Tauber's XML-INFO (

Microsoft has released what they call "element declarations" for Word and Excel in a file available in an archived collection of 18 Word documents at l9/concepts/default.htm. At first glance, it looks like a DTD, but look closer and you'll see declarations like these:

<!ELEMENT View (#PCDATA[1])>
<!ELEMENT Zoom (#PCDATA)[2]> Bracketed numbers refer to footnotes at the bottom, e.g.

There are other typos--I found a missing comma in a content model and stopped looking when I found the bracketed numbers--so this these aren't intended for use to create actual documents, but they're still interesting.

Try this URL for "the innards" of DocBook:
or read local copy - DocBook