package org.apache.cocoon.xml;

import org.xml.sax.Attributes;
import org.xml.sax.ContentHandler;
import org.xml.sax.Locator;
import org.xml.sax.SAXException;
import org.xml.sax.ext.LexicalHandler;

public class DOMObjectOutputWrapper implements ContentHandler {
  private ContentHandler handler = null;

  public DOMObjectOutputWrapper(ContentHandler handler){
    this.handler = handler;
  }
    
  public void setDocumentLocator(Locator locator){
  }

  public void startDocument()
    throws SAXException {
  }

  public void endDocument()
    throws SAXException
  {
  }

  public void startPrefixMapping(String prefix, String uri)
    throws SAXException
  {
    this.handler.startPrefixMapping(prefix, uri);
  }

  public void endPrefixMapping(String prefix)
    throws SAXException
  {
    this.handler.endPrefixMapping(prefix);
  }

  public void startElement(String uri, String loc, String raw, Attributes a)
    throws SAXException
  {
    
    /* here will be able to do backend mapping
       like for e.g. beans
    */
    this.handler.startElement(uri, loc, raw, a);
  }

  public void endElement(String uri, String loc, String raw)
    throws SAXException
  {
    /* here will be able to do backend mapping
       like for e.g. beans
    */
    this.handler.endElement(uri, loc, raw);
  }

  public void characters(char ch[], int start, int len)
    throws SAXException
  {
    this.handler.characters(ch, start, len);
  }

  public void ignorableWhitespace(char ch[], int start, int len)
    throws SAXException
  {
    this.handler.ignorableWhitespace(ch, start, len);
  }

  public void processingInstruction(String target, String data)
    throws SAXException
  {
    this.handler.processingInstruction(target, data);
  }

  public void skippedEntity(String name)
    throws SAXException
  {
     this.handler.skippedEntity(name);
  }

/*
  public void startDTD(String name, String publicId, String systemId)
    throws SAXException
  {
    this.handler.startDTD(name, publicId, systemId);
  }

  public void endDTD()
    throws SAXException
  {
    this.handler.endDTD();
  }

public void startEntity(String name)
    throws SAXException
  {
    this.handler.startEntity(name);
  }

  public void endEntity(String name)
    throws SAXException
  {
    this.handler.endEntity(name);
  }

  public void startCDATA()
    throws SAXException
  {
    this.handler.startCDATA();
  }

  public void endCDATA()
    throws SAXException
  {
    this.handler.endCDATA();
  }

  public void comment(char ch[], int start, int len)
    throws SAXException
  {
    this.handler.comment(ch, start, len);
  }
*/
}