org.eclipse.actf.model.dom.html.errorhandler
Class HTMLErrorHandler

java.lang.Object
  extended by org.eclipse.actf.model.dom.html.errorhandler.HTMLErrorHandler
All Implemented Interfaces:
IErrorHandler, IParserError

public class HTMLErrorHandler
extends Object
implements IErrorHandler


Field Summary
 
Fields inherited from interface org.eclipse.actf.model.dom.html.IParserError
ATTR_VALUE, BEFORE_ATTRNAME, DOCTYPE_MISSED, FLOATING_ENDTAG, ILLEGAL_ATTRIBUTE, ILLEGAL_CHILD, ILLEGAL_DOCTYPE, ILLEGAL_TOP_ELEMENT, MISC_ERR, STARTTAG_SYNTAX_ERR, SUDDEN_ENDTAG, TAG_NAME, UNKNOWN_ELEMENT
 
Constructor Summary
HTMLErrorHandler()
           
 
Method Summary
 boolean handleError(int code, IParser parser, Node errorNode)
          Searches proper a parent node of node.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLErrorHandler

public HTMLErrorHandler()
Method Detail

handleError

public boolean handleError(int code,
                           IParser parser,
                           Node errorNode)
                    throws ParseException,
                           IOException,
                           SAXException
Searches proper a parent node of node. Behavior is described as follows.
  1. If node is LINK, STYLE BASE, ISINDEX or META element, add it to last HEAD element.
  2. If context and node are equal nodes, Changes Context to its parent and append node to context.

Specified by:
handleError in interface IErrorHandler
Parameters:
code - error type
parser - caller of this handler. This parser's state is easily changed by the methods below. errorNode a node that causes the error.
errorNode - illegal child node.
Returns:
true if found. Otherwise false.
Throws:
ParseException
IOException
SAXException
See Also:
IParser.getContext(), IParser.setContext(org.w3c.dom.Element)