External DTD

An external DTD is one that resides in a separate document.

To use the external DTD, you need to link to it from your XML document by providing the URI of the DTD file. This URI is typically in the form of a URL. The URL can point to a local file using a relative reference, or a remote one (eg, using HTTP) using an absolute reference.

Example External DTD

Here's an example of an XML document that uses an external DTD. Note that the standalone attribute is set to no. This is because the document relies on an external resource (the DTD):

And, using the above XML document as an example, here's an example of what tutorials.dtd (the external DTD file) could look like. Note that the external DTD file doesn't need the DOCTYPE declaration — it is already on the XML file that is using this DTD: