XML DTDs
XML DTDs
What is XML?
XML is a Meta Markup Language
A Song Description in HTML
A Song Description in XML
A DTD for Songs
A Valid Song Document
Validity
Checking Validity
What is XML used for?
Domain-Specific Markup Languages
Self-Describing Data
Interchange of Data Among Applications
Structured and Integrated Data
XML Applications
Well-formedness vs validity
Well-formedness Rules
Open and close all tags
Empty tags end with />
There is a unique root element
Elements may not overlap
Attribute values are quoted
< and & are only used to start tags and entities
Only the five predefined entity references are used
DTDs and Validity
What is a DTD?
The importance of validation
A DTD for greeting.xml
Document Type Declarations
Invalid Documents
Validating Tools
Internal DTDs
An Example Document
Element Declarations
Content Specifications
ANY
#PCDATA
#PCDATA
#PCDATA
Comments in DTDs
Child Elements
Child Elements
Sequences
More Sequences
One or More Children +
Zero or More Children *
Zero or One Children ?
Choices
Grouping With Parentheses
Mixed Content
Empty elements
Content Models You Can't Declare
Attribute Declarations
Multiple Attribute Declarations
Attribute Default Values
#REQUIRED
#IMPLIED
#FIXED
Attribute Types
CDATA
ID
IDREF
IDREFS
Finished DTD
ENTITY
ENTITIES
NOTATION
NMTOKEN
NMTOKENS
Enumerated
The description element
XHTML
XHTML strict DTD
External Parameter Entity References
Finished DTD
Internal DTD Subsets
Schemas
To Learn More
Questions?
Entire Presentation as Single File
Start
|
Cafe con Leche
Copyright 1999 Elliotte Rusty Harold
Last Modified January 5, 2003