NOTE: The current preferred location for bug reports is the GitHub issue tracker.
Bug 889 - HtmlDocumentBuilder doesn't append DOCTYPE
HtmlDocumentBuilder doesn't append DOCTYPE
Status: NEW
Product: Validator.nu
Classification: Unclassified
Component: HTML parser
HEAD
All All
: P2 normal
Assigned To: Nobody
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2011-12-21 16:08 CET by Ivan Bondarenko
Modified: 2011-12-21 16:08 CET (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ivan Bondarenko 2011-12-21 16:08:49 CET
Hi all.

HtmlDocumentBuilder constructor creates a TreeBuilder as
this.treeBuilder = new DOMTreeBuilder(implementation); //treeBuilder is a private field
DOMTreeBuilder has an empty "appendDoctypeToDocument" method derived from TreeBuilder.
So it is impossible to add DOCTYPE without reflection or recompiling htmlparser.

Any thoughts? Haven't somebody ever wanted to do this?