Last Modified
2011-09-15 23:28:30 +0000
Requires
  • html5/constants
  • html5/filters/base
  • html5/filters/iso639codes
  • html5/filters/rfc3987
  • html5/filters/rfc2046

Description

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'})