private TreeBuilder treeBuilder;
private Map<Class, DocumentFragment> adviceByClass = new HashMap<Class, DocumentFragment>();
public static Map<Class, DocumentFragment> parseSyntaxDescriptions() throws IOException, SAXException {
HtmlParser parser = new HtmlParser(XmlViolationPolicy.ALTER_INFOSET);
Html5AttributeDatatypeBuilder handler = new Html5AttributeDatatypeBuilder();
parser.setContentHandler(handler);
InputSource in = new InputSource(
Html5AttributeDatatypeBuilder.class.getClassLoader().getResourceAsStream(
"nu/validator/localentities/files/wiki_whatwg_org_wiki_MicrosyntaxDescriptions"));
parser.parse(in);
return handler.getAdvice();
}