log.debug(Messages.getMessage(Messages.MESSAGE_PARSING_INFO,
message.getMessage()));
}
// TODO - configurable output for reeors in page.
if (false) {
Lexer lexer = message.getLexer();
Node element = message.getElement();
if (null == element) {
element = lexer.getLastNode();
} else if ("style".equalsIgnoreCase(element.getElement())
|| "script".equalsIgnoreCase(element.getElement())) {
element = lexer.getLastNode();
}
// Insert comment about error.
if (null != element) {
String messageText = message.getMessage();
byte[] msg = (TIDY_MARK + messageText + TIDY_MARK).getBytes();
Node comment = lexer.newNode(Node.COMMENT_TAG, msg, 0,
msg.length);
// TODO - detect style or script elements - not allow comment in
// it.
element.insertNodeAtEnd(comment);
}