eWebProgrammer eweb  





DTD Basics   «Prev  Next»
Lesson 1

Introduction to DTD Basics

XML documents are valid only if they conform to the structural and syntactical rules of a DTD.
Therefore it is important to know the basics of creating DTDs.
In this module, you will create DTDs for existing XML documents.
You will also use a DTD as a guideline for creating new XML documents that conform to the rules laid out in the DTD.

Module learning objectives

After completing this module, you will have the skills and knowledge necessary to:
  1. Describe a valid XML document
  2. Describe the process for creating a DTD
  3. Declare basic elements in a DTD and specify their content
  4. Write element declarations for mixed content and declare empty elements
  5. Reference DTD declarations in XML
  6. Create a DTD file which works with a separate XML file
  7. Create a DTD from an existing set of tags
In the next lesson, the concept of a valid XML document will be discussed.

An XML document can result from the aggregation of various chunks of data
  1. entities,
  2. schemas, and
  3. DTDs
coming from different network locations. In these cases, the BaseURI property tells you where these nodes come from. If the XML document is being processed through a stream (for example, an in-memory string), no URI is available and the BaseURI property returns the empty string.