org.apache.cocoon.transformation
Class WriteDOMSessionTransformer
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.WriteDOMSessionTransformer
- 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 WriteDOMSessionTransformer
- extends AbstractTransformer
Make a DOM object from SAX events and write it to the session.
Usage in sitemap:
<map:transform type="writeDOMsession">
<map:parameter name="dom-name" value="content"/>
<map:parameter name="dom-root-element" value="companies"/>
</map:transform>
Where:
dom-name is the name for the DOM object in the session
dom-root-element is the trigger that will be the root element of the DOM
- Version:
- CVS $Id: WriteDOMSessionTransformer.java,v 1.9 2002/02/22 07:03:56 cziegeler Exp $
- Author:
- Sven Beauprez
Fields inherited from interface org.apache.cocoon.transformation.Transformer |
ROLE |
Method Summary |
void |
characters(char[] c,
int start,
int len)
Receive notification of character data. |
void |
endCDATA()
Report the end of a CDATA section. |
void |
endElement(java.lang.String uri,
java.lang.String name,
java.lang.String raw)
Receive notification of the end of an element. |
protected void |
launchStoredMappings()
|
void |
recycle()
Recyclable |
void |
setup(SourceResolver resolver,
java.util.Map objectModel,
java.lang.String source,
org.apache.avalon.framework.parameters.Parameters parameters)
BEGIN SitemapComponent methods |
void |
startCDATA()
Report the start of a CDATA section. |
void |
startElement(java.lang.String uri,
java.lang.String name,
java.lang.String raw,
org.xml.sax.Attributes attributes)
Receive notification of the beginning of an element. |
void |
startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
BEGIN SAX ContentHandler handlers |
protected void |
storePrefixMapping(java.lang.String prefix,
java.lang.String uri)
END SAX ContentHandler handlers |
Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe |
comment, endDocument, endDTD, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startDTD, startEntity |
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 |
endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument |
Methods inherited from interface org.xml.sax.ext.LexicalHandler |
comment, endDTD, endEntity, startDTD, startEntity |
DOM_NAME
public static final java.lang.String DOM_NAME
DOM_ROOT_ELEMENT
public static final java.lang.String DOM_ROOT_ELEMENT
WriteDOMSessionTransformer
public WriteDOMSessionTransformer()
recycle
public void recycle()
- Recyclable
- Overrides:
recycle
in class AbstractXMLProducer
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
startPrefixMapping
public void startPrefixMapping(java.lang.String prefix,
java.lang.String uri)
throws org.xml.sax.SAXException
- BEGIN SAX ContentHandler handlers
- Overrides:
startPrefixMapping
in class AbstractXMLPipe
- Following copied from class:
org.apache.cocoon.xml.AbstractXMLPipe
- Parameters:
prefix
- The Namespace prefix being declared.uri
- The Namespace URI the prefix is mapped to.
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
- 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.
characters
public void characters(char[] c,
int start,
int len)
throws org.xml.sax.SAXException
- Description copied from class:
AbstractXMLPipe
- Receive notification of character data.
- Overrides:
characters
in class AbstractXMLPipe
- Following copied from class:
org.apache.cocoon.xml.AbstractXMLPipe
- Parameters:
c
- The characters from the XML document.start
- The start position in the array.len
- The number of characters to read from the array.
startCDATA
public void startCDATA()
throws org.xml.sax.SAXException
- Description copied from class:
AbstractXMLPipe
- Report the start of a CDATA section.
- Overrides:
startCDATA
in class AbstractXMLPipe
endCDATA
public void endCDATA()
throws org.xml.sax.SAXException
- Description copied from class:
AbstractXMLPipe
- Report the end of a CDATA section.
- Overrides:
endCDATA
in class AbstractXMLPipe
storePrefixMapping
protected void storePrefixMapping(java.lang.String prefix,
java.lang.String uri)
- END SAX ContentHandler handlers
launchStoredMappings
protected void launchStoredMappings()
throws org.xml.sax.SAXException
Copyright © 1999-2002 Apache Software Foundation. All Rights Reserved.