April 2001
Intermediate to advanced
112 pages
2h 15m
English
<!DOCTYPE>
<!DOCTYPE root-element SYSTEM|PUBLIC
["name"] “URI_of_DTD">
The !DOCTYPE instruction allows you to specify
a DTD for an XML document. This instruction currently takes one
of two forms:
<!DOCTYPEroot-elementSYSTEM "URI_of_DTD"> <!DOCTYPEroot-elementPUBLIC "name" "URI_of_DTD">
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.
Read now
Unlock full access