December 2002
Intermediate to advanced
576 pages
32h
English
<!DOCTYPE>
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.
<!DOCTYPE root-element SYSTEM|PUBLIC
["name"] "URI_of_DTD">Read now
Unlock full access