|
Document Type Definition
DTD (Document Type Definition) is the most widely used xml validating schema.
It has been around for many years and is widely supported. It is easy to read
and relatively simple to create a DTD. The DTD however does have its
limitations. DTDs are written in a syntax that has little to do with XML,
which means that it cannot be parsed with an XML parser. All declarations in a
DTD are global, which means you can't define two different elements with the
same name. DTDs cannot control what kind of information a given element or
attribute can contain. Any kind of text is defined with #PCDATA which accepts
all forms of text (characters and integers). This means that invalid values
will be accepted as valid values. For example, if the element is zip code
it will accept a name as a valid zip code, when ideally it should only accept a
5 digit number.
|