// and same for explicitly empty element; wrong root
sw = getDTDValidatingWriter(strw, SIMPLE_DTD, nsAware, repairing);
sw.writeDTD("root", "http://foo", "public-id", SIMPLE_DTD);
try {
sw.writeEmptyElement("branch");
fail(modeDesc+" Expected a validation exception when trying to write wrong root element");
} catch (XMLValidationException vex) {
// expected...
}
}