By default, when using the constructor without arguments, the this parser coerces XML 1.0-incompatible infosets into XML 1.0-compatible infosets. This corresponds to ALTER_INFOSET as the general XML violation policy. To make the parser support non-conforming HTML fully per the HTML 5 spec while on the other hand potentially violating the SAX2 API contract, set the general XML violation policy to ALLOW. This does not work with a standard DOM implementation. It is possible to treat XML 1.0 infoset violations as fatal by setting the general XML violation policy to FATAL.
The doctype is not represented in the tree.
The document mode is represented as user data DocumentMode object with the key nu.validator.document-mode on the document node.
The form pointer is also stored as user data with the key nu.validator.form-pointer.
@version $Id$
@author hsivonen
| |
| |
| |