org.apache.jetspeed.rewriter.html.neko
Class CallbackElementRemover

java.lang.Object
  extended by org.cyberneko.html.filters.DefaultFilter
      extended by org.cyberneko.html.filters.ElementRemover
          extended by org.apache.jetspeed.rewriter.html.neko.CallbackElementRemover
All Implemented Interfaces:
org.apache.xerces.xni.parser.XMLComponent, org.apache.xerces.xni.parser.XMLDocumentFilter, org.apache.xerces.xni.parser.XMLDocumentSource, org.apache.xerces.xni.XMLDocumentHandler, org.cyberneko.html.HTMLComponent

public class CallbackElementRemover
extends org.cyberneko.html.filters.ElementRemover

CallbackElementRemover

Extended version of the NekoHTML ElementRemover which provides tag stripping/removal based on Rewriter settings.

Version:
$Id: CallbackElementRemover.java 517719 2007-03-13 15:05:48Z ate $
Author:
Scott T. Weaver

Field Summary
private  Rewriter rewriter
           
 
Fields inherited from class org.cyberneko.html.filters.ElementRemover
fAcceptedElements, fElementDepth, fRemovalElementDepth, fRemovedElements, NULL
 
Fields inherited from class org.cyberneko.html.filters.DefaultFilter
fDocumentHandler, fDocumentSource
 
Constructor Summary
CallbackElementRemover(Rewriter rewriter)
          Construct with reference to the rewriter context to consult for rewriting advice
 
Method Summary
 void comment(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs)
           comment
 void emptyElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attrs, org.apache.xerces.xni.Augmentations arg2)
           emptyElement
protected  String[] getAttributeNames(org.apache.xerces.xni.XMLAttributes attrs)
           
protected  void processTag(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attrs)
           processTag
 void startElement(org.apache.xerces.xni.QName element, org.apache.xerces.xni.XMLAttributes attrs, org.apache.xerces.xni.Augmentations arg2)
           startElement
 
Methods inherited from class org.cyberneko.html.filters.ElementRemover
acceptElement, characters, elementAccepted, elementRemoved, endCDATA, endElement, endGeneralEntity, endPrefixMapping, handleOpenTag, ignorableWhitespace, processingInstruction, removeElement, startCDATA, startDocument, startDocument, startGeneralEntity, startPrefixMapping, textDecl
 
Methods inherited from class org.cyberneko.html.filters.DefaultFilter
doctypeDecl, endDocument, getDocumentHandler, getDocumentSource, getFeatureDefault, getPropertyDefault, getRecognizedFeatures, getRecognizedProperties, merge, reset, setDocumentHandler, setDocumentSource, setFeature, setProperty, xmlDecl
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

rewriter

private Rewriter rewriter
Constructor Detail

CallbackElementRemover

public CallbackElementRemover(Rewriter rewriter)
Construct with reference to the rewriter context to consult for rewriting advice

Method Detail

comment

public void comment(org.apache.xerces.xni.XMLString text,
                    org.apache.xerces.xni.Augmentations augs)
             throws org.apache.xerces.xni.XNIException

comment

Specified by:
comment in interface org.apache.xerces.xni.XMLDocumentHandler
Overrides:
comment in class org.cyberneko.html.filters.ElementRemover
Parameters:
text -
augs -
Throws:
org.apache.xerces.xni.XNIException
See Also:
XMLDocumentHandler.comment(org.apache.xerces.xni.XMLString text, org.apache.xerces.xni.Augmentations augs)

emptyElement

public void emptyElement(org.apache.xerces.xni.QName element,
                         org.apache.xerces.xni.XMLAttributes attrs,
                         org.apache.xerces.xni.Augmentations arg2)
                  throws org.apache.xerces.xni.XNIException

emptyElement

Specified by:
emptyElement in interface org.apache.xerces.xni.XMLDocumentHandler
Overrides:
emptyElement in class org.cyberneko.html.filters.ElementRemover
Parameters:
element -
arg1 -
arg2 -
Throws:
org.apache.xerces.xni.XNIException
See Also:
XMLDocumentHandler.emptyElement(org.apache.xerces.xni.QName, org.apache.xerces.xni.XMLAttributes, org.apache.xerces.xni.Augmentations)

startElement

public void startElement(org.apache.xerces.xni.QName element,
                         org.apache.xerces.xni.XMLAttributes attrs,
                         org.apache.xerces.xni.Augmentations arg2)
                  throws org.apache.xerces.xni.XNIException

startElement

Specified by:
startElement in interface org.apache.xerces.xni.XMLDocumentHandler
Overrides:
startElement in class org.cyberneko.html.filters.ElementRemover
Parameters:
element -
arg1 -
arg2 -
Throws:
org.apache.xerces.xni.XNIException
See Also:
XMLDocumentHandler.startElement(org.apache.xerces.xni.QName, org.apache.xerces.xni.XMLAttributes, org.apache.xerces.xni.Augmentations)

processTag

protected void processTag(org.apache.xerces.xni.QName element,
                          org.apache.xerces.xni.XMLAttributes attrs)

processTag

Parameters:
tag -

getAttributeNames

protected String[] getAttributeNames(org.apache.xerces.xni.XMLAttributes attrs)


Copyright © 1999-2007 Apache Software Foundation. All Rights Reserved.