Copyright by Kevin Howard Goldberg

Safari, the world’s most comprehensive technology and business learning platform.

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required

O'Reilly logo

Chapter 6. Creating a DTD

In Part 1 of the book, you learned XML’s underlying grammar, which forms the rules for writing an XML document. In Part 2, you learned how to transform an XML document into another form, in this case HTML. Now, in Part 3, you’ll learn how to define a custom markup language in XML.

To define such a language, you will first identify its elements and their attributes, declaring which are required, and which are not. This information is called a schema. For example, an historian might create WowML, the (fictitious) Wonders of the World Markup Language, as a system for cataloging data about the wonders of the world. WowML might have elements like wonder, name, year_built, and story.

Schemas, while not required, are exceptionally ...

Find the exact information you need to solve a problem on the fly, or go deeper to master the technologies and skills you need to succeed

Start Free Trial

No credit card required