| com.sun.portal.wireless.htmlconversion.TagProcessor
All known Subclasses: com.sun.portal.wireless.htmlconversion.processors.BaseTagProcessor,
TagProcessor | public interface TagProcessor (Code) | | Tag processors handle HTML tags, and manipulate the output AML DOM tree to add
in corresponding AML content. Implementations are required to be threadsafe.
All implementations must be registered in the constructor of the
TagProcessorRegistry class.
author: ashwin.mathew@sun.com |
Method Summary | |
public boolean | canHaveChildren(ParserState state) Indicates whether or not a given tag can have children. | public Element | endTag(String tag, ParserState state) Invoked on a tag processor implementation when an end tag is encountered. | public String | getAmlTag() The name of the AmlTag that an implementation outputs. | public String[] | getSupportedTags() Returns the list of tags that can be handled by an implementation. | public Element | interruptedTag(ParserState state) Invoked on a parent TagProcessor implementation when a child is encountered.
This is required in particular for text elements, since AML, unlike HTML, does
not support inline text with formatting elements around it - instead,
individual AmlText elements need to be created corresponding to every change
in formatting. | public boolean | isMaintainOnState(ParserState state) Indicates whether or not the element created by an implementation
should be maintained as part of the output tag state on the
ParserState object. | public Element | startTag(String tagName, HashMap attributes, ParserState state) Invoked when an open tag is encountered. |
canHaveChildren | public boolean canHaveChildren(ParserState state)(Code) | | Indicates whether or not a given tag can have children.
This will decide whether or not it's pushed to the output
tag context on ParserState.
Parameters: state - true if the tag can have children, false otherwise. |
endTag | public Element endTag(String tag, ParserState state)(Code) | | Invoked on a tag processor implementation when an end tag is encountered.
Parameters: tag - The name of the tag Parameters: state - The parser state object |
getAmlTag | public String getAmlTag()(Code) | | The name of the AmlTag that an implementation outputs.
|
getSupportedTags | public String[] getSupportedTags()(Code) | | Returns the list of tags that can be handled by an implementation.
|
interruptedTag | public Element interruptedTag(ParserState state)(Code) | | Invoked on a parent TagProcessor implementation when a child is encountered.
This is required in particular for text elements, since AML, unlike HTML, does
not support inline text with formatting elements around it - instead,
individual AmlText elements need to be created corresponding to every change
in formatting.
For example, in a free text string where a tag is encountered, a new
AmlText element with the bold attribute set true will have to be created
for the following text, while the preceding text will have to be closed
up in it's own AmlText element.
Behaviour is similar to endTag when
handling text. Non-text tags may not care about this method.
Parameters: state - The parser state object |
isMaintainOnState | public boolean isMaintainOnState(ParserState state)(Code) | | Indicates whether or not the element created by an implementation
should be maintained as part of the output tag state on the
ParserState object.
Parameters: state - true if it should be maintained on ParserState, false otherwise |
startTag | public Element startTag(String tagName, HashMap attributes, ParserState state)(Code) | | Invoked when an open tag is encountered.
Parameters: tagName - The tag name Parameters: attributes - The tag attributes Parameters: state - The parser state object The new output Element created based on this tag |
|
|