[...]
My current reading is:
<!DOCTYPE FOO PUBLIC "-//FOO-BAR//DTD V1.23//" "foo.dtd">
FOO:
The FOO simply means that the root of the document is a single FOO element.
The only reason things it can be used for are:
- telling you what is in the document (i.e. you might want to keep on
reading if the document root was POEM).
- telling that parser that if the document does NOT have a
root element of type FOO it can throw a Draconian error and
not do any more work.
IMO I can live without this :-)
You left out another use of the FOO in that declaration, which is
that it identfies which element type in the DTD is "topmost".
I have a collection of pages which are a catalog of sheet music.
The various pages have different high-level structure but the
low-level "paragraphs" are the same. I can have a single DTD that
describes each of the following:
* ComposerPage (contains a biography and a list of compositions)
* PublisherPage (contains contact information, shipping costs,
and a list (sorted by title) of compositions)
* NationalityPage (contains a description of national musical history
and a list (sorted by composer) of compositions)
And so each of these XML files can start off with the appropriate
document type identifier:
<!DOCTYPE ComposerPage SYSTEM "musicDB.dtd">
<!DOCTYPE PublisherPage SYSTEM "musicDB.dtd">
<!DOCTYPE NationalityPage SYSTEM "musicDB.dtd">
I *can* live without this, but I'd rather not have to! :-)
- Andrew Greene