Every document instance must follow the rules of a schema that describes a particular markup language:
- lexicon or available vocabulary: elements & attributes
- grammar for how the lexicon is used: rules for nesting, sequencing, etc.
- e.g., a paragraph can be inside a chapter, but a chapter cannot be inside a
paragraph
- e.g., a chapter must begin with a heading followed by least one
paragraph
- DTDs can minimally constrain the data content of attribute values
- other schema languages do a much better job, and many can constrain element
data content as well
In order to be valid, an instance must be well-formed first
|
Introduction to XML |
© 2006 Kevin S. Hawkins, Syd Bauman, and the Brown Women Writers Project |