O'Reilly logo

Real World XML by Steven Holzner

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating Document Type Declarations

You define the syntax and structure of elements using a document type definition (DTD), and you declare that definition in a document using a document type declaration. We've seen that you use the <!DOCTYPE> element to create a document type declaration. This element can take many different forms, as you see here (here, URL is the URL of a DTD, and rootname is the name of the root element); we'll see all these forms in this chapter:

  • <!DOCTYPE rootname [DTD]>

  • <!DOCTYPE rootname SYSTEM URL>

  • <!DOCTYPE rootname SYSTEM URL [DTD]>

  • <!DOCTYPE rootname PUBLIC identifier URL>

  • <!DOCTYPE rootname PUBLIC identifier URL [DTD]>

To use a DTD, you need a document type declaration, which means that you need a <!DOCTYPE> element. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required