Save This Page
Home » cocoon-2.1.11-src » org.apache » cocoon » portal » transformation » [javadoc | source]
org.apache.cocoon.portal.transformation
public class: HTMLEventLinkTransformer [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.portal.transformation.AbstractCopletTransformer
                     org.apache.cocoon.portal.transformation.HTMLEventLinkTransformer

All Implemented Interfaces:
    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

This transformer transforms html actions into events. The transformer listens for the element a and form. Links that only contain an anchor are ignored. In addition if a link has the attribute "external" with the value "true", the link is also ignored. TODO: Support target attribute
Field Summary
protected  String attributeName    The temporary attribute used to store the uri 
protected  String jxPath    The jxpath for the attribute 
Fields inherited from org.apache.cocoon.portal.transformation.AbstractCopletTransformer:
COPLET_ID_PARAM,  portalService
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.portal.transformation.HTMLEventLinkTransformer Summary:
createAnchorEvent,   createFormEvent,   endElement,   getLink,   isRemoteAnchor,   setup,   startElement
Methods from org.apache.cocoon.portal.transformation.AbstractCopletTransformer:
dispose,   getCopletInstanceData,   getCopletInstanceData,   getPortalService,   service
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.portal.transformation.HTMLEventLinkTransformer Detail:
 protected  void createAnchorEvent(Attributes attributes) throws SAXException 
 protected  void createFormEvent(Attributes attributes) throws SAXException 
 public  void endElement(String uri,
    String name,
    String raw) throws SAXException 
 protected String getLink(String base,
    String link) 
 protected boolean isRemoteAnchor(Attributes attributes) 
    Determine if the element is an url and if the url points to some remote source.
 public  void setup(SourceResolver resolver,
    Map objectModel,
    String src,
    Parameters par) throws IOException, SAXException, ProcessingException 
 public  void startElement(String uri,
    String name,
    String raw,
    Attributes attr) throws SAXException