A schema definition language for XML
Declaration
- Element
<>
Element Declaration
- the element book must contain the following child elements, in order:
- one title
- zero or more authors
- zero or one publisher
- zero or one year
- zero or more sections
- element
p
may contain:{dtd}#PCDATA
pure text only (no child elements)p
elementsul
elements- etc.
*
→ and zero or more repetitions of them.
Attribute Declaration
- Type is…
ID
: is the unique id of that element.- !
ID
is globally unique, regardless of attribute name, element name, etc. - See xml - DTD - uniqueness of ID attributes - Stack Overflow
- !
IDREF
: reference of some idCDATA
: any string(val1|…)
: can only be either of these values.
- Value is…
#REQUIRED
: necessary#IMPLIED
: optional#FIXED
: constant- ⇒ “Final column
"default"
: default value of that attribute