Document Type Definition validation |
|
XML relationship to DTD |
|
What does an XML document do? |
|
What does an DTD document do? |
|
An XML document does not need to be related to a DTD.
If it has no DTD to specify what the XML document must contain,
then the XML document may contain anything.
For example, it might contain the country of birth of the first 97
presidents of the United States of America. |
|
An XML document can be related to a DTD.
When you relate your XML document to a DTD, it means you intend to meet the
spcifications given in the DTD. |
|
Validate your XML document |
|
There are two steps needed to validate your XML document. Always do the first step, then the second step.
|
|
Build a good DTD |
|
Do not try to just sit down and build a complete DTD all at once. Follow the following set of simple steps, adding a little at a time.
By taking small steps, you can correct problems as you go along. It can dificult to sort out a combination of problems that may be in the XML, or may be in the DTD, or may be due to an interaction of both. Taking small steps makes this much easier. At some point in the process, you may wish to introduce an additional XML document, to test other capabilities of the DTD you are building. |
|
Lab 3 assignment |
|
Create a DTD document that will validate your lab 2 XML document.
Design your DTD document carefully, so it will validate other similar XML documents. |
|
Put your web page on the Internet |
|
You have built your DTD doucment; now put it on the Internet, so it can be used there. |
|
Complete lab |
|
You have built your lab 3 DTD document and uploaded it to voyager.
|
|