DTD

The educational technology and digital learning wiki
Revision as of 13:04, 30 January 2007 by Kalli (talk | contribs) (cat)
Jump to navigation Jump to search

Draft

Definiton

Document Type Definition (DTD) is an SGML and XML schema language. A DTD is used to define and describe the elements and groups thereof and the order in which they are allowed (or not) to appear within an SGML or XML document. A document must conform to the specifications of an associated DTD (i.e. be valid) before it can be processed for output.

Structure

DTDs are made up of element and attribute-list declarations.

  • elements declare what types of data, how and whether or not they are allowed within other declared elements.
  • attribute-lists declare the attributes allowed for each element and their value type.

For example, the following XML document would be valid according to the DTD that follows.

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE people_list SYSTEM "example.dtd">
<people>
  <person gender="female">
     <name>
        <first>Jane</first>
        <middle>Jean</middle>
        <last>Doe</last>
        <maidenName></maidenName>
     </name>
  </person>
<people>

Corresponding DTD:

<!ELEMENT people (person*)> //* one or more person must appear in the list
<!ELEMENT person (name)> // person element must have exactly one name element
 <!ATTLIST person  gender CDATA #REQUIRED> //the person element must have an attribute gender
<!ELEMENT name (first, middle?, last, maidenName?)> //middle and maidenName elements are optional
<!ELEMENT first (#PCDATA)>
<!ELEMENT middle (#PCDATA)>
<!ELEMENT last (#PCDATA)>
<!ELEMENT maidenName (#PCDATA)>

None of the above documents define the style of the documents. They describe the content and its syntactical expression (descriptive language), not its form or style (procedural language, e.g. HTML). The style and form of the document is attributed during processing (e.g. through CSS, XSLT, XHTML)

Interpretive software is then used to convert the "structured" document for multiple output formats including print and web pages containing HTML (hypertext markup language) or the recently defined standard of XML (extensible markup language).


Alternatives


Use of DTDs in education

DTDs and other schema languages lend themselves to particular learning activities and pedagogical scenarios where either knowledge representations and requirements, the creation of ontologies or the definition of rubrics are individually or collaboratively constructed.

Examples

The English Department at the University of Georgia has composition students collaboratively create their own DTDs from templates, that describe the components and evaluation criteria for various writing genres and such as narrative, expository or argumentative writing.

others needed
kalli

References