Save This Page
Home » cocoon-2.1.11-src » org.apache » cocoon » xml » [javadoc | source]
org.apache.cocoon.xml
public class: DocumentHandlerWrapper [javadoc | source]
java.lang.Object
   org.apache.avalon.framework.logger.AbstractLogEnabled
      org.apache.cocoon.xml.AbstractXMLConsumer
         org.apache.cocoon.xml.DocumentHandlerWrapper

All Implemented Interfaces:
    XMLConsumer

Direct Known Subclasses:
    XTTransformer

This class is an utility class "wrapping" around a SAX version 1.0 DocumentHandler and forwarding it those events received throug its XMLConsumers interface.
This class fully supports XML namespaces, converting startPrefixMapping(...) and endPrefixMapping(...) calls into appropriate xmlns and xmlns:... element attributes.
Field Summary
protected  Logger log     
protected  DocumentHandler documentHandler    The current DocumentHandler
Constructor:
 public DocumentHandlerWrapper() 
 public DocumentHandlerWrapper(DocumentHandler document) 
    Create a new DocumentHandlerWrapper instance.
Method from org.apache.cocoon.xml.DocumentHandlerWrapper Summary:
characters,   enableLogging,   endDocument,   endElement,   endPrefixMapping,   ignorableWhitespace,   processingInstruction,   recycle,   setDocumentHandler,   setDocumentLocator,   startDocument,   startElement,   startPrefixMapping
Methods from org.apache.cocoon.xml.AbstractXMLConsumer:
characters,   comment,   endCDATA,   endDTD,   endDocument,   endElement,   endEntity,   endPrefixMapping,   ignorableWhitespace,   processingInstruction,   setDocumentLocator,   skippedEntity,   startCDATA,   startDTD,   startDocument,   startElement,   startEntity,   startPrefixMapping
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.cocoon.xml.DocumentHandlerWrapper Detail:
 public  void characters(char[] ch,
    int start,
    int len) throws SAXException 
    Receive notification of character data.
 public  void enableLogging(Logger logger) 
    Provide component with a logger.
 public  void endDocument() throws SAXException 
    Receive notification of the end of a document.
 public  void endElement(String uri,
    String loc,
    String raw) throws SAXException 
    Receive notification of the end of an element.
 public  void endPrefixMapping(String prefix) throws SAXException 
    End the scope of a prefix-URI mapping.
 public  void ignorableWhitespace(char[] ch,
    int start,
    int len) throws SAXException 
    Receive notification of ignorable whitespace in element content.
 public  void processingInstruction(String target,
    String data) throws SAXException 
    Receive notification of a processing instruction.
 public  void recycle() 
    Implementation of the recycle method
 public  void setDocumentHandler(DocumentHandler document) throws IllegalStateException 
    Set the DocumentHandler that will receive XML data.
 public  void setDocumentLocator(Locator locator) 
    Receive an object for locating the origin of SAX document events.
 public  void startDocument() throws SAXException 
    Receive notification of the beginning of a document.
 public  void startElement(String uri,
    String loc,
    String raw,
    Attributes a) throws SAXException 
    Receive notification of the beginning of an element.
 public  void startPrefixMapping(String prefix,
    String uri) throws SAXException 
    Begin the scope of a prefix-URI Namespace mapping.