.... Ian's: Articles collection |
Books
Examples of XML DTDs
To view the source code, simply use your browser's "View Source"
function. YOu can also use the browser's "Save as" function to select
a link and then save a copy of the document to your computer. You
can then open it with a text editor.
save a copy to your own computer.
- test1.xml -- the first example document
that uses the DTD to declare a single internal entity.
- book.xml -- the example document
that uses external entity references to refer to different
parts. Note that there is no resource at:
http://www.iansgraham.com/book3/chapter2.xml,
so the XML software processing this file will have to inform
you of this absence in some way. (IE 5.5 retrieves some sort
of weird erroneous data).
- full-dtd.xml -- the
example document that includes a complete DTD inside the
document. This file is valid, in the XML sense.
- external-dtd.xml -- the
example document as in the previous example, but with an
external DTD (test-dtd.dtd).