External DTDs

The DTDs I've created in this chapter so far have all been built into the documents that they are targeted for. However, you can also create and use external DTDs, where the actual DTD is stored in an external file (usually with the extension .dtd).

Using external DTDs makes it easy to create an XML application that can be shared by many people—in fact, that's the way many XML applications are supported. There are two ways to specify external DTDs—as private DTDs or as public DTDs. I'll take a look at private DTDs first.

Private DTDs are intended for use by people or groups privately—not for public distribution. You specify an external private DTD with the SYSTEM keyword in the <!DOCTYPE> element like this (notice also that because ...

Get Inside XML now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.