org.apache.cocoon.transformation
Class ReadDOMSessionTransformer
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.ReadDOMSessionTransformer
- All Implemented Interfaces:
- org.apache.avalon.framework.component.Component, 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 ReadDOMSessionTransformer
- extends AbstractTransformer
With this transformer, an object that is stored in the session, can be inserted
in the SAX stream at a given position, using usual <xsp:expr> rules.
Object can be DOM Node, XMLizable, or any other object supported by <xsp:expr>.
Usage in sitemap:
<map:transform type="read-session">
<map:parameter name="attribute-name" value="companyInfo"/>
<map:parameter name="trigger-element" value="company"/>
<map:parameter name="position" value="after"/>
</map:transform>
Where:
- attribute-name is the name of the object in the session
- trigger-element is the element that we need to insert the SAX events
- postion is the actual place where the stream will be inserted, ie before, after or in
the trigger-element
- Version:
- CVS $Id: ReadDOMSessionTransformer.java,v 1.7.2.1 2002/10/23 04:17:55 vgritsenko Exp $
- Author:
- Sven Beauprez, Vadim Gritsenko
Fields inherited from interface org.apache.cocoon.transformation.Transformer |
ROLE |
Method Summary |
void |
endElement(java.lang.String uri,
java.lang.String name,
java.lang.String raw)
Receive notification of the end of an element. |
void |
setup(SourceResolver resolver,
java.util.Map objectModel,
java.lang.String source,
org.apache.avalon.framework.parameters.Parameters parameters)
BEGIN SitemapComponent methods |
void |
startElement(java.lang.String uri,
java.lang.String name,
java.lang.String raw,
org.xml.sax.Attributes attributes)
BEGIN SAX ContentHandler handlers |
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 |
ATTRIBUTE_NAME
public static final java.lang.String ATTRIBUTE_NAME
TRIGGER_ELEMENT
public static final java.lang.String TRIGGER_ELEMENT
POSITION
public static final java.lang.String POSITION
ReadDOMSessionTransformer
public ReadDOMSessionTransformer()
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
- BEGIN SitemapComponent methods
startElement
public void startElement(java.lang.String uri,
java.lang.String name,
java.lang.String raw,
org.xml.sax.Attributes attributes)
throws org.xml.sax.SAXException
- BEGIN SAX ContentHandler handlers
- 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.
Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.