Imposing Structure on XML Documents Using a DTD
An Introduction to Document Type Definitions |
Prof. David Bernstein
|
Computer Science Department |
bernstdh@jmu.edu |
DOCTYPE
declaration in
the XML documentDOCTYPE
Declaration:
DOCTYPE
Declaration (in the XML Document)
DOCTYPE
|
The root declaration. |
ELEMENT
|
Declares an element type. |
ATTLIST
|
Declares an attribute list for an element type. |
+
|
The element can appear one or more times. |
*
|
The element can appear zero or more times. |
?
|
The element can appear zero or one times. |
|
|
Essentially the delimiter in a list of possible elements. |
#PCDATA
|
The element can contain any text (i.e., parsed character data). |
EMPTY
|
The element has no content. |
ANY
|
The element can have any type of content. |
DOCTYPE
Declaration (in a DTD)ELEMENT
Declaration (in a DTD)ELEMENT
Declaration (cont.)
ATTLIST
Declaration (in a DTD)ATTLIST
Declaration (cont.)