tags:

views:

263

answers:

3

The description of DTDs in the XML 1.1 specification is very terse, and it is difficult to gain an appreciation of what features are available. For example, from looking at the unflattened XHTML+MathML+SVG DTD, I know it is possible to import and partially redefine external DTDs, but I would never have guessed that was possible from reading the spec.

Does anyone know of a good resource for learning the finer points of DTD writing?

+1  A: 

May be too basic for your needs, but W3 schools often has good primers?

toolkit
That is surprisingly useful. I didn't even think to try W3Schools since usually their content is rubbish :). Thanks.
Daniel Cassidy
I find their content reaching into some quite reasonably good technical stuff these days. I used to think it was rubbish too but find it to be a reasonably good jumping in point on some stuff I've never used before.
Kev
However, it doesn't cover <![INCLUDE[...]]>, <![IGNORE[...]]> and probably some other things, so I'm still interested in hearing about something better.
Daniel Cassidy
Therefore, read the book specified in my answer. :)
Dimitre Novatchev
+2  A: 

I would recommend Elliotte-Rusty Harold's book "XML Bible".

This is not "documentation", document type definitions (DTDs) are one of the most complex parts of XML and deserve to be learnt from the best sources.

One can also learn from examining good existing DTDs. Look for example at the following DTD, required to be used for the Balisage Conference slideshow presentations:

Cheers,

Dimitre Novatchev

Dimitre Novatchev
A: 

I just kind of winged it using auto completion from Liquid Technologies XML Studio ; they even had a tool that let me give a sample of the XML I was writing a XSD for and it would try to infer the definition. Of course I now realize this was an XSD not a DTD.

dlamblin