Save This Page
Home » cocoon-2.1.11-src » org.apache » cocoon » transformation » [javadoc | source]
org.apache.cocoon.transformation
public class: NekoHTMLTransformer [javadoc | source]
java.lang.Object
   org.apache.avalon.framework.logger.AbstractLogEnabled
      org.apache.cocoon.xml.AbstractXMLProducer
         org.apache.cocoon.xml.AbstractXMLPipe
            org.apache.cocoon.transformation.AbstractTransformer
               org.apache.cocoon.transformation.AbstractSAXTransformer
                  org.apache.cocoon.transformation.NekoHTMLTransformer

All Implemented Interfaces:
    org.apache.avalon.framework.configuration.Configurable, org.apache.avalon.framework.activity.Disposable, org.apache.avalon.framework.service.Serviceable, org.apache.avalon.framework.configuration.Configurable, Transformer, XMLPipe, org.apache.avalon.excalibur.pool.Recyclable, XMLProducer

Converts (escaped) HTML snippets into tidied HTML using the NekoHTML library. This transformer expects a list of elements, passed as comma separated values of the "tags" parameter. It records the text enclosed in such elements and pass it thru Neko to obtain valid XHTML.
Nested Class Summary:
public static class  NekoHTMLTransformer.HtmlSaxParser   
Fields inherited from org.apache.cocoon.transformation.AbstractSAXTransformer:
EMPTY_ATTRIBUTES,  ignoreWhitespaces,  ignoreEmptyCharacters,  ignoreEventsCount,  ignoreHooksCount,  namespaceURI,  defaultNamespaceURI,  stack,  recorderStack,  request,  response,  context,  objectModel,  parameters,  source,  manager,  resolver,  emptyAttributes
Fields inherited from org.apache.cocoon.xml.AbstractXMLProducer:
EMPTY_CONTENT_HANDLER,  xmlConsumer,  contentHandler,  lexicalHandler
Method from org.apache.cocoon.transformation.NekoHTMLTransformer Summary:
configure,   endElement,   setup,   startElement
Methods from org.apache.cocoon.transformation.AbstractSAXTransformer:
addRecorder,   characters,   comment,   configure,   dispose,   endCDATA,   endDTD,   endDocument,   endElement,   endEntity,   endParametersRecording,   endParametersRecording,   endPrefixMapping,   endRecording,   endSAXRecording,   endSerializedXMLRecording,   endTextRecording,   endTransformingElement,   findPrefixMapping,   getMutableAttributes,   ignorableWhitespace,   processingInstruction,   recycle,   removeRecorder,   sendEndElementEvent,   sendEndElementEventNS,   sendEndPrefixMapping,   sendEvents,   sendParametersEvents,   sendStartElementEvent,   sendStartElementEvent,   sendStartElementEventNS,   sendStartElementEventNS,   sendStartPrefixMapping,   sendTextEvent,   service,   setDocumentLocator,   setup,   setupTransforming,   skippedEntity,   startCDATA,   startDTD,   startDocument,   startElement,   startEntity,   startParametersRecording,   startPrefixMapping,   startRecording,   startSAXRecording,   startSerializedXMLRecording,   startTextRecording,   startTransformingElement
Methods from org.apache.cocoon.xml.AbstractXMLPipe:
characters,   comment,   endCDATA,   endDTD,   endDocument,   endElement,   endEntity,   endPrefixMapping,   ignorableWhitespace,   processingInstruction,   setDocumentLocator,   skippedEntity,   startCDATA,   startDTD,   startDocument,   startElement,   startEntity,   startPrefixMapping
Methods from org.apache.cocoon.xml.AbstractXMLProducer:
recycle,   setConsumer,   setContentHandler,   setLexicalHandler
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cocoon.transformation.NekoHTMLTransformer Detail:
 public  void configure(Configuration config) throws ConfigurationException 
    Configure this transformer, possibly passing to it a jtidy configuration file location.
 public  void endElement(String uri,
    String name,
    String raw) throws SAXException 
    React on endElement calls that contain a tag to be tidied and run Neko on it, otherwise passthru.
 public  void setup(SourceResolver resolver,
    Map objectModel,
    String src,
    Parameters par) throws IOException, SAXException, ProcessingException 
    Setup this component, passing the tag names to be tidied.
 public  void startElement(String uri,
    String name,
    String raw,
    Attributes attr) throws SAXException 
    Start buffering text if inside a tag to be normalized, passthru otherwise.