org.apache.cocoon.transformation
Class AugmentTransformer

java.lang.Object
  extended byorg.apache.cocoon.util.AbstractLogEnabled
      extended byorg.apache.cocoon.xml.AbstractXMLProducer
          extended byorg.apache.cocoon.xml.AbstractXMLPipe
              extended byorg.apache.cocoon.transformation.AbstractTransformer
                  extended byorg.apache.cocoon.transformation.AugmentTransformer
All Implemented Interfaces:
ContentHandler, LexicalHandler, Poolable, Recyclable, org.apache.cocoon.sitemap.SitemapModelComponent, org.apache.cocoon.transformation.Transformer, XMLConsumer, org.apache.cocoon.xml.XMLConsumer, org.apache.cocoon.xml.XMLPipe, org.apache.cocoon.xml.XMLProducer

public class AugmentTransformer
extends org.apache.cocoon.transformation.AbstractTransformer

Augments all href attributes with the full path to the request. You can optionally specify the mount parameter.

The set of attributes to augment can be specified in the attributes parameter (defaults to href if attributes is not present). Any blank character, comma or colon is considered as a separator to delimit attributes.

Since:
October 10, 2001
Version:
$Id: AugmentTransformer.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
static String AUGMENTED_ATTRIBUTES
           
protected  Set augmentedAttributes
           
protected  String baseURI
           
protected  Map objectModel
           
protected  org.apache.cocoon.environment.Request request
           
 
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer
 
Fields inherited from interface org.apache.cocoon.transformation.Transformer
ROLE
 
Constructor Summary
AugmentTransformer()
           
 
Method Summary
 void recycle()
          Recyclable
 void setup(org.apache.cocoon.environment.SourceResolver resolver, Map objectModel, String source, Parameters parameters)
           
 void startElement(String uri, String name, String qname, Attributes attrs)
           
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe
characters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startEntity, startPrefixMapping
 
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandler
 
Methods inherited from class org.apache.cocoon.util.AbstractLogEnabled
getLogger, setLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.xml.sax.ContentHandler
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping
 
Methods inherited from interface org.xml.sax.ext.LexicalHandler
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity
 
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
 

Field Detail

objectModel

protected Map objectModel

request

protected org.apache.cocoon.environment.Request request

baseURI

protected String baseURI

augmentedAttributes

protected Set augmentedAttributes

AUGMENTED_ATTRIBUTES

public static final String AUGMENTED_ATTRIBUTES
See Also:
Constant Field Values
Constructor Detail

AugmentTransformer

public AugmentTransformer()
Method Detail

setup

public void setup(org.apache.cocoon.environment.SourceResolver resolver,
                  Map objectModel,
                  String source,
                  Parameters parameters)
           throws org.apache.cocoon.ProcessingException,
                  SAXException,
                  IOException
Throws:
org.apache.cocoon.ProcessingException
SAXException
IOException

startElement

public void startElement(String uri,
                         String name,
                         String qname,
                         Attributes attrs)
                  throws SAXException
Throws:
SAXException

recycle

public void recycle()
Recyclable



Copyright 1999-2008 The Apache Software Foundation. All Rights Reserved.