
112 • XML & Related Technologies
3.3.2 Specifying Sequences, Occurrences and Choices
So far, we have discussed examples where the DTD contained just one element inside the root element. Real-
life examples are often far more complex than this.
Sequence
The first question is how we add more element type declarations to a DTD. For example, suppose that our
book DTD needs to contain the book name and author name. For this, we simply need to add a comma
between these two element type declarations. For example:
<!ELEMENT myBook (book_name, author)>
This declaration specifies that our XML document should contain exactly one book name, followed by
exactly ...