01: /*
02: * HtmlScriptTagProcessor.java
03: *
04: * Created on March 9, 2005, 3:46 PM
05: */
06:
07: package com.sun.portal.wireless.htmlconversion.processors;
08:
09: import com.sun.portal.wireless.htmlconversion.ParserState;
10:
11: import java.util.HashMap;
12:
13: import org.w3c.dom.Element;
14:
15: /**
16: * Tag processor for HTML tags that need to be ignored.
17: * We need to ensure that any ignored tag bodies do not
18: * get included as AmlText.
19: *
20: * @author ashwin.mathew@sun.com
21: */
22: public class HtmlIgnoreTagProcessor extends BaseTagProcessor {
23:
24: private static final String[] supportedTags = { "script", "style" };
25:
26: public String[] getSupportedTags() {
27: return supportedTags;
28: }
29:
30: public String getAmlTag() {
31: return null;
32: }
33:
34: public boolean isMaintainOnState(ParserState state) {
35: return false;
36: }
37:
38: public boolean canHaveChildren(ParserState state) {
39: return false;
40: }
41:
42: public Element endTag(String tag, ParserState state) {
43: return null;
44: }
45:
46: public Element startTag(String tagName, HashMap attributes,
47: ParserState state) {
48: state.setBypassTagProcessing(tagName);
49:
50: return null;
51: }
52:
53: }
|