Path: | lib/feed_tools/vendor/html5/lib/html5/filters/validator.rb |
Last Update: | Tue Mar 25 21:42:12 +0000 2008 |
HTML 5 conformance checker
Warning: this module is experimental, incomplete, and subject to removal at any time.
Usage: >>> from html5lib.html5parser import HTMLParser >>> from html5lib.filters.validator import HTMLConformanceChecker >>> p = HTMLParser(tokenizer=HTMLConformanceChecker) >>> p.parse(’<!doctype html>\n<html foo=bar></html>’) <<class ‘html5lib.treebuilders.simpletree.Document’> nil> >>> p.errors [((2, 14), ‘unknown-attribute’, {‘attributeName’ => u‘foo’, ‘tagName’ => u‘html’})]