}
// 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);
}