((AbstractDocument) doc).setStrictErrorChecking(false);
conf = ((AbstractDocument) doc).getDomConfig();
conf.setParameter("error-handler", h);
e = doc.getDocumentElement();
e.appendChild(doc.createComment("before -- after"));
e.appendChild(doc.createComment("ends in a dash -"));
e.setAttribute("*", "blah");
e.appendChild(doc.createProcessingInstruction("abc", "def?>"));
((AbstractDocument) doc).normalizeDocument();
if (!(h.get("wf-invalid-character-in-node-name") == 1
&& h.get("wf-invalid-character") == 3)) {