org.apache.cocoon.transformation
Class WriteDOMSessionTransformer

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.WriteDOMSessionTransformer
All Implemented Interfaces:
ContentHandler, LexicalHandler, Poolable, Recyclable, 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 WriteDOMSessionTransformer
extends org.apache.cocoon.transformation.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:
$Id: WriteDOMSessionTransformer.html 1304280 2012-03-23 11:18:01Z ilgrosso $

Field Summary
static String DOM_NAME
           
static String DOM_ROOT_ELEMENT
           
 
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
WriteDOMSessionTransformer()
           
 
Method Summary
 void characters(char[] c, int start, int len)
           
 void endCDATA()
           
 void endElement(String uri, String name, String raw)
           
protected  void launchStoredMappings()
           
 void recycle()
          Recyclable
 void setup(org.apache.cocoon.environment.SourceResolver resolver, Map objectModel, String source, Parameters parameters)
           
 void startCDATA()
           
 void startElement(String uri, String name, String raw, Attributes attributes)
           
 void startPrefixMapping(String prefix, String uri)
           
protected  void storePrefixMapping(String prefix, String uri)
           
 
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.cocoon.xml.AbstractXMLProducer
setConsumer, setContentHandler, setLexicalHandler
 
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
endDocument, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument
 
Methods inherited from interface org.xml.sax.ext.LexicalHandler
comment, endDTD, endEntity, startDTD, startEntity
 
Methods inherited from interface org.apache.cocoon.xml.XMLProducer
setConsumer
 

Field Detail

DOM_NAME

public static final String DOM_NAME
See Also:
Constant Field Values

DOM_ROOT_ELEMENT

public static final String DOM_ROOT_ELEMENT
See Also:
Constant Field Values
Constructor Detail

WriteDOMSessionTransformer

public WriteDOMSessionTransformer()
Method Detail

recycle

public void recycle()
Recyclable


setup

public void setup(org.apache.cocoon.environment.SourceResolver resolver,
                  Map objectModel,
                  String source,
                  Parameters parameters)
           throws org.apache.cocoon.ProcessingException,
                  SAXException,
                  IOException
Throws:
org.apache.cocoon.ProcessingException
SAXException
IOException

startPrefixMapping

public void startPrefixMapping(String prefix,
                               String uri)
                        throws SAXException
Throws:
SAXException

startElement

public void startElement(String uri,
                         String name,
                         String raw,
                         Attributes attributes)
                  throws SAXException
Throws:
SAXException

endElement

public void endElement(String uri,
                       String name,
                       String raw)
                throws SAXException
Throws:
SAXException

characters

public void characters(char[] c,
                       int start,
                       int len)
                throws SAXException
Throws:
SAXException

startCDATA

public void startCDATA()
                throws SAXException
Throws:
SAXException

endCDATA

public void endCDATA()
              throws SAXException
Throws:
SAXException

storePrefixMapping

protected void storePrefixMapping(String prefix,
                                  String uri)

launchStoredMappings

protected void launchStoredMappings()
                             throws SAXException
Throws:
SAXException


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