Basic HTML version of Foils prepared May 19 99

Foil 27 DTD definitions

From An Introduction to XML Basic Information Track Computational Science Course CPS616 -- Spring Semester 1999. by Nancy McCracken,Ozgur Balsoy, Tom Scavo


A DTD allows you to create new tags by writing grammar rules which the tags must obey. The rules specify which tags and attributes are valid and their context.
A DTD element declaration looks like: <!ELEMENT person(name, email*)>
  • ELEMENT is the type
  • person is the element declaration
  • (name,email*) is the element content model
  • name and email are the children of person and define the hierarchy of the document.
  • Note that this is called a grammar rule because it could have been written in BNF: person ::= (name, email*)



© Northeast Parallel Architectures Center, Syracuse University, npac@npac.syr.edu

If you have any comments about this server, send e-mail to webmaster@npac.syr.edu.

Page produced by wwwfoil on Wed May 19 1999