org.apache.cocoon.transformation
Class XIncludeTransformer

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.XIncludeTransformer
All Implemented Interfaces:
org.apache.cocoon.caching.CacheableProcessingComponent, ContentHandler, LexicalHandler, Poolable, Recyclable, Serviceable, 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 XIncludeTransformer
extends org.apache.cocoon.transformation.AbstractTransformer
implements Serviceable, org.apache.cocoon.caching.CacheableProcessingComponent

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).

Version:
$Id: XIncludeTransformer.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
protected  ServiceManager manager
           
protected  org.apache.cocoon.environment.SourceResolver resolver
           
protected  org.apache.cocoon.components.source.impl.MultiSourceValidity validity
          The SourceValidity instance associated with this request.
static String XINCLUDE_FALLBACK_ELEMENT
           
static String XINCLUDE_INCLUDE_ELEMENT
           
static String XINCLUDE_INCLUDE_ELEMENT_HREF_ATTRIBUTE
           
static String XINCLUDE_INCLUDE_ELEMENT_PARSE_ATTRIBUTE
           
static String XINCLUDE_INCLUDE_ELEMENT_XPOINTER_ATTRIBUTE
           
static String XINCLUDE_NAMESPACE_URI
           
static String XMLBASE_ATTRIBUTE
           
 
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
XIncludeTransformer()
           
 
Method Summary
 Serializable getKey()
          Key to be used for caching
 SourceValidity getValidity()
          Get the validity for this transform
 void recycle()
           
 void service(ServiceManager manager)
           
 void setConsumer(org.apache.cocoon.xml.XMLConsumer consumer)
           
 void setContentHandler(ContentHandler handler)
           
 void setLexicalHandler(LexicalHandler handler)
           
 void setup(org.apache.cocoon.environment.SourceResolver resolver, Map objectModel, String source, Parameters parameters)
           
 
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 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, startElement, startPrefixMapping
 
Methods inherited from interface org.xml.sax.ext.LexicalHandler
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity
 

Field Detail

resolver

protected org.apache.cocoon.environment.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_XPOINTER_ATTRIBUTE

public static final String XINCLUDE_INCLUDE_ELEMENT_XPOINTER_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

validity

protected org.apache.cocoon.components.source.impl.MultiSourceValidity validity
The SourceValidity instance associated with this request.

Constructor Detail

XIncludeTransformer

public XIncludeTransformer()
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
Specified by:
setup in interface org.apache.cocoon.sitemap.SitemapModelComponent
Throws:
org.apache.cocoon.ProcessingException
SAXException
IOException

setConsumer

public void setConsumer(org.apache.cocoon.xml.XMLConsumer consumer)
Specified by:
setConsumer in interface org.apache.cocoon.xml.XMLProducer

setContentHandler

public void setContentHandler(ContentHandler handler)

setLexicalHandler

public void setLexicalHandler(LexicalHandler handler)

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 org.apache.cocoon.caching.CacheableProcessingComponent

getValidity

public SourceValidity getValidity()
Get the validity for this transform

Specified by:
getValidity in interface org.apache.cocoon.caching.CacheableProcessingComponent

recycle

public void recycle()
Specified by:
recycle in interface Recyclable


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