| com.opensymphony.module.sitemesh.html.tokenizer.TokenHandler
All known Subclasses: com.opensymphony.module.sitemesh.html.tokenizer.MockTokenHandler,
TokenHandler | public interface TokenHandler (Code) | | Handler passed to
TagTokenizer that will receive callbacks as 'tags' and 'text' are encountered.
author: Joe Walnes See Also: TagTokenizer |
Method Summary | |
boolean | shouldProcessTag(String name) Before attempting to parse a tag, the tokenizer will ask the handler whether the tag should be processed - avoiding
additional tag parsing makes the tokenizer quicker. | void | tag(Tag tag) Called when tokenizer encounters an HTML tag (open, close or empty). | void | text(Text text) Called when tokenizer encounters anything other than a well-formed HTML tag. | void | warning(String message, int line, int column) Called when tokenizer encounters something it cannot correctly parse. |
tag | void tag(Tag tag)(Code) | | Called when tokenizer encounters an HTML tag (open, close or empty).
The Tag instance passed in should not be kept beyond the scope of this method as the tokenizer will attempt
to reuse it.
|
text | void text(Text text)(Code) | | Called when tokenizer encounters anything other than a well-formed HTML tag.
The Text object is used instead of a String to allow the String to be lazy-loaded.
The Text instance passed in should not be kept beyond the scope of this method as the tokenizer will attempt
to reuse it.
|
warning | void warning(String message, int line, int column)(Code) | | Called when tokenizer encounters something it cannot correctly parse. Typically the parsing will continue and the
unparseable will be treated as a plain text block, however this callback provides indication of this.
Parameters: message - Error message Parameters: line - Line number in input that error occured Parameters: column - Column number in input that error occured |
|
|