XML Tutorials - Herong's Tutorial Notes
Dr. Herong Yang, Version 4.00

Syntaxes of DTD Statements

This chapter provides tutorial notes and example codes on DTD statement syntax. Topics include using DOCTYPE to declare document type, using ELEMENT to declare elements, using ATTLIST to declare attribute list, using ENTITY to declare entities.

DOCTYPE - Document Type Declaration Statement

ELEMENT - Element Declaration Statement

ATTLIST - Attribute List Declaration Statement

ENTITY - Entity Declaration Statement

dictionary_dtd.xml - XML DTD Document Type Example

Conclusion:

  • The DOCTYPE statement specifies the root element name, internal DTD sub statement body and/or external DTD file.
  • The ELEMENT statement specifies an element name, and structure of its content.
  • The ATTRIBUTE statement specifies a list of attributes for a given element name. The attribute list contains attribute names, value types and default values.
  • The ENTITY statement specifies an entity and its replacement value.
  • Comments can be entered in the format of "<-- comments -->".

Table of Contents

 About This Book

 Introduction of XML (eXtensible Markup Language)

 XML File Syntax

 XML File Browsers

 DOM (Document Object Model) Programming Interface

 SAX (Simple API for XML) Programming Interface

 DTD (Document Type Definition) Introduction

Syntaxes of DTD Statements

 Validating an XML Document against the Specified DTD Document Type

 XSD (XML Schema Definition) Introduction

 Syntaxes of XSD Statements

 Validating an XML Document against the Specified XML Schema

 XSL (Extensible Stylesheet Language) Introduction

 XSLT (XSL Transformations) Introduction

 Java Implementation of XSLT

 XPath (XML Path) Language

 XSLT Elements as Programming Statements

 Control and Generate XML Element in the Result

 References

 Printable Copy - PDF Version

Dr. Herong Yang, updated in 2009
Syntaxes of DTD Statements