6.4. Extending the DTD

The DTD syntax is very efficient in expressing a certain set of constraints on conforming documents. However, it knows nothing about concepts such as key relationships. We'll extend the DTD to capture such additional information for the element types and attributes that we define in our schema. We'll use fixed attributes to accomplish this because the value of fixed attributes is unchangeable in individual elements, so they can be thought of as properties of the element type itself rather than of an instance. So:

  1. For element types, we associate the property by adding a fixed nmtoken attribute whose name is preceded by an e-. The value of this attribute is the value of the property. For example, to associate 'red' as the ...

Get Enterprise Application Integration With XML and Java™ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.