Sample XML documents, each with an internal DTD, are given below. To see the internal DTD using a browser, you will need to view the source of the file (control-U under Firefox).
stock.xml. Note that, because we want different content models for new cars and used cars, we have to use different element names for each. We might have preferred to use simply the element name
car, with say an attribute giving the type (new or used), but then we would be required to have the same content model for both types. Some other schema languages do allow for this kind of flexibility.
games.xml. There are many other alternatives. One could, for example, use an attribute on the
goalelement to indicate a penalty, rather than using a separate element. Instead of grouping all goals and all bookings under separate elements, one could change the content model of
(name, (goal | penalty | booking)*), for example.