The standalone declaration is a way of telling the parser to ignore any markup declarations in the DTD. The DTD is thereafter used for validation only.
- The standalone directive is an optional attribute on the XML declaration.
- Valid values are yes and no, where no is the default value.
- The attribute is only relevant when a DTD is used. (The attribute is irrelevant when using a schema instead of a DTD.)
- standalone=”yes” means that the XML processor must use the DTD for validation only. In that case it will not be used for default values for attributes , entity declarations and normalization
- Note that standalone=”yes” may add validity constraints if the document uses an external DTD. When the document contains things that would require modification of the XML, such as default values for attributes, and standalone=”yes” is used then the document is invalid.
- Standalone=”yes” may help to optimize performance of document processing.