The standalone Attribute
If the standalone
attribute has the value no, then an application may be required to
read an external DTD (that is, a DTD in a file other than the one it’s
reading now) to determine the proper values for parts of the
document. For instance, a DTD may provide default values for
attributes that a parser is required to report, even though they
aren’t actually present in the document.
Documents that do not have DTDs, like all the documents in
this chapter, can have the value yes for the standalone attribute. Documents that do
have DTDs can also have the value yes for the standalone attribute if the DTD doesn’t
change the content of the document in any way or if the DTD is
purely internal. Details for documents with DTDs are covered in
Chapter 3.
The standalone attribute is
optional in an XML declaration. If it is omitted, then the value
no is assumed.
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access