org.apache.cocoon.transformation
Class CIncludeTransformer
java.lang.Object
|
+--org.apache.avalon.framework.logger.AbstractLoggable
|
+--org.apache.cocoon.xml.AbstractXMLProducer
|
+--org.apache.cocoon.xml.AbstractXMLPipe
|
+--org.apache.cocoon.transformation.AbstractTransformer
|
+--org.apache.cocoon.transformation.CIncludeTransformer
- All Implemented Interfaces:
- org.apache.avalon.framework.component.Component, org.apache.avalon.framework.component.Composable, org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler, org.apache.avalon.framework.logger.Loggable, org.apache.avalon.excalibur.pool.Poolable, org.apache.avalon.excalibur.pool.Recyclable, SitemapModelComponent, Transformer, XMLConsumer, XMLPipe, XMLProducer
- public class CIncludeTransformer
- extends AbstractTransformer
- implements org.apache.avalon.framework.component.Composable
This transformer triggers for the element include
in the
namespace "http://apache.org/cocoon/include/1.0".
The src
attribute contains the url which points to
an xml resource which is include instead of the element.
With the attributes element
, ns
and
prefix
it is possible to specify an element
which surrounds the included content.
- Version:
- CVS $Id: CIncludeTransformer.java,v 1.6 2002/02/22 07:03:56 cziegeler Exp $
- Author:
- Carsten Ziegeler
Fields inherited from interface org.apache.cocoon.transformation.Transformer |
ROLE |
Method Summary |
void |
compose(org.apache.avalon.framework.component.ComponentManager manager)
Composable Interface |
void |
endElement(java.lang.String uri,
java.lang.String name,
java.lang.String raw)
Receive notification of the end of an element. |
protected void |
processCIncludeElement(java.lang.String src,
java.lang.String element,
java.lang.String ns,
java.lang.String prefix)
|
void |
recycle()
Recycle the component |
void |
setup(SourceResolver resolver,
java.util.Map objectModel,
java.lang.String source,
org.apache.avalon.framework.parameters.Parameters parameters)
Setup the component. |
void |
startElement(java.lang.String uri,
java.lang.String name,
java.lang.String raw,
org.xml.sax.Attributes attr)
Receive notification of the beginning of an element. |
Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe |
characters, comment, endCDATA, endDocument, endDTD, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startEntity, startPrefixMapping |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLoggable |
getLogger, setLogger, setupLogger, setupLogger, setupLogger |
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, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startPrefixMapping |
Methods inherited from interface org.xml.sax.ext.LexicalHandler |
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity |
CINCLUDE_NAMESPACE_URI
public static final java.lang.String CINCLUDE_NAMESPACE_URI
CINCLUDE_INCLUDE_ELEMENT
public static final java.lang.String CINCLUDE_INCLUDE_ELEMENT
CINCLUDE_INCLUDE_ELEMENT_SRC_ATTRIBUTE
public static final java.lang.String CINCLUDE_INCLUDE_ELEMENT_SRC_ATTRIBUTE
CINCLUDE_INCLUDE_ELEMENT_ELEMENT_ATTRIBUTE
public static final java.lang.String CINCLUDE_INCLUDE_ELEMENT_ELEMENT_ATTRIBUTE
CINCLUDE_INCLUDE_ELEMENT_NS_ATTRIBUTE
public static final java.lang.String CINCLUDE_INCLUDE_ELEMENT_NS_ATTRIBUTE
CINCLUDE_INCLUDE_ELEMENT_PREFIX_ATTRIBUTE
public static final java.lang.String CINCLUDE_INCLUDE_ELEMENT_PREFIX_ATTRIBUTE
sourceResolver
protected SourceResolver sourceResolver
- The
SourceResolver
manager
protected org.apache.avalon.framework.component.ComponentManager manager
- The current
ComponentManager
.
CIncludeTransformer
public CIncludeTransformer()
setup
public void setup(SourceResolver resolver,
java.util.Map objectModel,
java.lang.String source,
org.apache.avalon.framework.parameters.Parameters parameters)
throws ProcessingException,
org.xml.sax.SAXException,
java.io.IOException
- Setup the component.
compose
public final void compose(org.apache.avalon.framework.component.ComponentManager manager)
- Composable Interface
- Specified by:
compose
in interface org.apache.avalon.framework.component.Composable
recycle
public void recycle()
- Recycle the component
- Overrides:
recycle
in class AbstractXMLProducer
startElement
public void startElement(java.lang.String uri,
java.lang.String name,
java.lang.String raw,
org.xml.sax.Attributes attr)
throws org.xml.sax.SAXException
- Description copied from class:
AbstractXMLPipe
- Receive notification of the beginning of an element.
- Overrides:
startElement
in class AbstractXMLPipe
- Following copied from class:
org.apache.cocoon.xml.AbstractXMLPipe
- Parameters:
uri
- The Namespace URI, or the empty string if the element has no
Namespace URI or if Namespace
processing is not being performed.loc
- The local name (without prefix), or the empty string if
Namespace processing is not being performed.raw
- The raw XML 1.0 name (with prefix), or the empty string if
raw names are not available.a
- The attributes attached to the element. If there are no
attributes, it shall be an empty Attributes object.
endElement
public void endElement(java.lang.String uri,
java.lang.String name,
java.lang.String raw)
throws org.xml.sax.SAXException
- Description copied from class:
AbstractXMLPipe
- Receive notification of the end of an element.
- Overrides:
endElement
in class AbstractXMLPipe
- Following copied from class:
org.apache.cocoon.xml.AbstractXMLPipe
- Parameters:
uri
- The Namespace URI, or the empty string if the element has no
Namespace URI or if Namespace
processing is not being performed.loc
- The local name (without prefix), or the empty string if
Namespace processing is not being performed.raw
- The raw XML 1.0 name (with prefix), or the empty string if
raw names are not available.
processCIncludeElement
protected void processCIncludeElement(java.lang.String src,
java.lang.String element,
java.lang.String ns,
java.lang.String prefix)
throws org.xml.sax.SAXException
Copyright � 1999-2002 Apache Software Foundation. All Rights Reserved.