Name
<!DOCTYPE>
Synopsis
The <!DOCTYPE>
instruction allows you to
specify a DTD for an XML document. This instruction currently takes
one of two forms:
<!DOCTYPEroot-element
SYSTEM "URI_of_DTD
"> <!DOCTYPEroot-element
PUBLIC "name
" "URI_of_DTD
">
Keywords
-
SYSTEM
The
SYSTEM
variant specifies the URI location of a DTD for private use in the document. For example:<!DOCTYPE Book SYSTEM "http://mycompany.com/dtd/mydoctype.dtd">
-
PUBLIC
The
PUBLIC
variant is used in situations in which a DTD has been publicized for widespread use. In these cases, the DTD is assigned a unique name, which the XML processor may use by itself to attempt to retrieve the DTD. If this fails, the URI is used:<!DOCTYPE Book PUBLIC "-//O'Reilly//DTD//EN" "http://www.oreilly.com/dtd/xmlbk.dtd">
Public DTDs follow a specific naming convention. See the XML specification for details on naming public DTDs.
<!DOCTYPE
root-element
SYSTEM|PUBLIC ["name"] "URI_of_DTD">
Get Webmaster in a Nutshell, Third Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.