// no child element matchs this one
if (com.sun.msv.driver.textui.Debug.debug)
System.out.println("-- no children accepted: error recovery");
// let acceptor recover from this error.
StringRef ref = new StringRef();
next = current.createChildAcceptor(sti, ref);
ValidityViolation vv =
onError(
ref,
localizeMessage(ERR_UNEXPECTED_STARTTAG, new Object[] { qName }),
new ErrorInfo.BadTagName(sti));
if (next == null) {
if (com.sun.msv.driver.textui.Debug.debug)
System.out.println("-- unable to recover");
throw new ValidationUnrecoverableException(vv);
}
}
onNextAcceptorReady(sti, next);
// feed attributes
final int len = atts.getLength();
for (int i = 0; i < len; i++)
feedAttribute(next, atts.getURI(i), atts.getLocalName(i), atts.getQName(i), atts.getValue(i));
// call the endAttributes
if (!next.onEndAttributes(sti, null)) {
// error.
if (com.sun.msv.driver.textui.Debug.debug)
System.out.println("-- required attributes missing: error recovery");
// let the acceptor recover from the error.
StringRef ref = new StringRef();
next.onEndAttributes(sti, ref);
onError(
ref,
localizeMessage(ERR_MISSING_ATTRIBUTE, new Object[] { qName }),
new ErrorInfo.MissingAttribute(sti));