org.apache.cocoon.transformation
Class XIncludeTransformer
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.XIncludeTransformer
- All Implemented Interfaces:
- CacheableProcessingComponent, ContentHandler, LexicalHandler, LogEnabled, Poolable, Recyclable, Serviceable, SitemapModelComponent, Transformer, XMLConsumer, XMLConsumer, XMLPipe, XMLProducer
- public class XIncludeTransformer
- extends AbstractTransformer
- implements Serviceable, CacheableProcessingComponent
- Version:
- SVN $Id: XIncludeTransformer.java 289891 2005-09-18 05:37:11Z antonio $
- Author:
- Donald Ball (wrote the original version)
- Cocoon.sitemap.component.documentation:
- Implementation of an XInclude transformer.
- Cocoon.sitemap.component.logger:
- sitemap.transformer.xinclude
- Cocoon.sitemap.component.name:
- xinclude
- Cocoon.sitemap.component.pooling.max:
- 16
Implementation of an XInclude transformer. It supports xml:base attributes,
XPointer fragment identifiers (see the xpointer package to see what exactly is
supported), fallback elements, and does xinclude processing on the included content
and on the content of fallback elements (with loop inclusion detection).
| Fields inherited from interface org.apache.cocoon.transformation.Transformer |
ROLE |
| Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe |
characters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping |
| 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, startElement, startPrefixMapping |
resolver
protected SourceResolver resolver
manager
protected ServiceManager manager
XMLBASE_ATTRIBUTE
public static final String XMLBASE_ATTRIBUTE
- See Also:
- Constant Field Values
XINCLUDE_NAMESPACE_URI
public static final String XINCLUDE_NAMESPACE_URI
- See Also:
- Constant Field Values
XINCLUDE_INCLUDE_ELEMENT
public static final String XINCLUDE_INCLUDE_ELEMENT
- See Also:
- Constant Field Values
XINCLUDE_FALLBACK_ELEMENT
public static final String XINCLUDE_FALLBACK_ELEMENT
- See Also:
- Constant Field Values
XINCLUDE_INCLUDE_ELEMENT_HREF_ATTRIBUTE
public static final String XINCLUDE_INCLUDE_ELEMENT_HREF_ATTRIBUTE
- See Also:
- Constant Field Values
XINCLUDE_INCLUDE_ELEMENT_PARSE_ATTRIBUTE
public static final String XINCLUDE_INCLUDE_ELEMENT_PARSE_ATTRIBUTE
- See Also:
- Constant Field Values
XIncludeTransformer
public XIncludeTransformer()
setup
public void setup(SourceResolver resolver,
Map objectModel,
String source,
Parameters parameters)
throws ProcessingException,
SAXException,
IOException
- Description copied from interface:
SitemapModelComponent
- The Sitemap will call the setup() method to prepare the component for
use. This is where you start the process of getting your information
ready to generate your results. See
ObjectModelHelper for help with the objectModel.
- Specified by:
setup in interface SitemapModelComponent
- Parameters:
resolver - The SourceResolver to find resources within your context.objectModel - A java.util.Map that contains the request and session information.source - The value of the "src" attribute in the sitemap.parameters - The sitemap parameters passed into your component.
- Throws:
ProcessingException - if there is any other unexpected problem.
IOException - if there is a problem reading files.
SAXException - if there is a problem reading a SAX stream.
setConsumer
public void setConsumer(XMLConsumer consumer)
- Description copied from interface:
XMLProducer
- Set the
XMLConsumer that will receive XML data.
- Specified by:
setConsumer in interface XMLProducer- Overrides:
setConsumer in class AbstractXMLProducer
setContentHandler
public void setContentHandler(ContentHandler handler)
- Description copied from class:
AbstractXMLProducer
- Set the
ContentHandler that will receive XML data.
Subclasses may retrieve this ContentHandler instance
accessing the protected super.contentHandler field.
- Overrides:
setContentHandler in class AbstractXMLProducer
setLexicalHandler
public void setLexicalHandler(LexicalHandler handler)
- Description copied from class:
AbstractXMLProducer
- Set the
LexicalHandler that will receive XML data.
Subclasses may retrieve this LexicalHandler instance
accessing the protected super.lexicalHandler field.
- Overrides:
setLexicalHandler in class AbstractXMLProducer
service
public void service(ServiceManager manager)
- Specified by:
service in interface Serviceable
getKey
public Serializable getKey()
- Key to be used for caching
- Specified by:
getKey in interface CacheableProcessingComponent
- Returns:
- The generated key or
null if the component
is currently not cacheable.
getValidity
public SourceValidity getValidity()
- Get the validity for this transform
- Specified by:
getValidity in interface CacheableProcessingComponent
- Returns:
- The generated validity object or
null if the
component is currently not cacheable.
recycle
public void recycle()
- Description copied from class:
AbstractXMLProducer
- Recycle the producer by removing references, and resetting handlers to
null (empty) implementations.
- Specified by:
recycle in interface Recyclable- Overrides:
recycle in class AbstractXMLProducer
Copyright ? 1999-2005 The Apache Software Foundation. All Rights Reserved.