org.apache.xalan.xsltc.trax
Class DOM2TO

java.lang.Object
  extended by org.apache.xalan.xsltc.trax.DOM2TO
All Implemented Interfaces:
org.xml.sax.Locator, org.xml.sax.XMLReader

public class DOM2TO
extends java.lang.Object
implements org.xml.sax.XMLReader, org.xml.sax.Locator


Field Summary
private  org.w3c.dom.Node _dom
          A reference to the DOM to be traversed.
private  SerializationHandler _handler
          A reference to the output handler receiving the events.
private static java.lang.String EMPTYSTRING
           
private static java.lang.String XMLNS_PREFIX
           
 
Constructor Summary
DOM2TO(org.w3c.dom.Node root, SerializationHandler handler)
           
 
Method Summary
 int getColumnNumber()
          This class is only used internally so this method should never be called.
 org.xml.sax.ContentHandler getContentHandler()
           
 org.xml.sax.DTDHandler getDTDHandler()
          This class is only used internally so this method should never be called.
 org.xml.sax.EntityResolver getEntityResolver()
          This class is only used internally so this method should never be called.
 org.xml.sax.ErrorHandler getErrorHandler()
          This class is only used internally so this method should never be called.
 boolean getFeature(java.lang.String name)
          This class is only used internally so this method should never be called.
 int getLineNumber()
          This class is only used internally so this method should never be called.
private  java.lang.String getNodeTypeFromCode(short code)
           
 java.lang.Object getProperty(java.lang.String name)
          This class is only used internally so this method should never be called.
 java.lang.String getPublicId()
          This class is only used internally so this method should never be called.
 java.lang.String getSystemId()
          This class is only used internally so this method should never be called.
 void parse()
           
 void parse(org.xml.sax.InputSource unused)
           
private  void parse(org.w3c.dom.Node node)
          Traverse the DOM and generate TO events for a handler.
 void parse(java.lang.String sysId)
          This class is only used internally so this method should never be called.
 void setContentHandler(org.xml.sax.ContentHandler handler)
           
 void setDTDHandler(org.xml.sax.DTDHandler handler)
          This class is only used internally so this method should never be called.
 void setEntityResolver(org.xml.sax.EntityResolver resolver)
          This class is only used internally so this method should never be called.
 void setErrorHandler(org.xml.sax.ErrorHandler handler)
          This class is only used internally so this method should never be called.
 void setFeature(java.lang.String name, boolean value)
          This class is only used internally so this method should never be called.
 void setProperty(java.lang.String name, java.lang.Object value)
          This class is only used internally so this method should never be called.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

EMPTYSTRING

private static final java.lang.String EMPTYSTRING
See Also:
Constant Field Values

XMLNS_PREFIX

private static final java.lang.String XMLNS_PREFIX
See Also:
Constant Field Values

_dom

private org.w3c.dom.Node _dom
A reference to the DOM to be traversed.


_handler

private SerializationHandler _handler
A reference to the output handler receiving the events.

Constructor Detail

DOM2TO

public DOM2TO(org.w3c.dom.Node root,
              SerializationHandler handler)
Method Detail

getContentHandler

public org.xml.sax.ContentHandler getContentHandler()
Specified by:
getContentHandler in interface org.xml.sax.XMLReader

setContentHandler

public void setContentHandler(org.xml.sax.ContentHandler handler)
Specified by:
setContentHandler in interface org.xml.sax.XMLReader

parse

public void parse(org.xml.sax.InputSource unused)
           throws java.io.IOException,
                  org.xml.sax.SAXException
Specified by:
parse in interface org.xml.sax.XMLReader
Throws:
java.io.IOException
org.xml.sax.SAXException

parse

public void parse()
           throws java.io.IOException,
                  org.xml.sax.SAXException
Throws:
java.io.IOException
org.xml.sax.SAXException

parse

private void parse(org.w3c.dom.Node node)
            throws java.io.IOException,
                   org.xml.sax.SAXException
Traverse the DOM and generate TO events for a handler. Notice that we need to handle implicit namespace declarations too.

Throws:
java.io.IOException
org.xml.sax.SAXException

getDTDHandler

public org.xml.sax.DTDHandler getDTDHandler()
This class is only used internally so this method should never be called.

Specified by:
getDTDHandler in interface org.xml.sax.XMLReader

getErrorHandler

public org.xml.sax.ErrorHandler getErrorHandler()
This class is only used internally so this method should never be called.

Specified by:
getErrorHandler in interface org.xml.sax.XMLReader

getFeature

public boolean getFeature(java.lang.String name)
                   throws org.xml.sax.SAXNotRecognizedException,
                          org.xml.sax.SAXNotSupportedException
This class is only used internally so this method should never be called.

Specified by:
getFeature in interface org.xml.sax.XMLReader
Throws:
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

setFeature

public void setFeature(java.lang.String name,
                       boolean value)
                throws org.xml.sax.SAXNotRecognizedException,
                       org.xml.sax.SAXNotSupportedException
This class is only used internally so this method should never be called.

Specified by:
setFeature in interface org.xml.sax.XMLReader
Throws:
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

parse

public void parse(java.lang.String sysId)
           throws java.io.IOException,
                  org.xml.sax.SAXException
This class is only used internally so this method should never be called.

Specified by:
parse in interface org.xml.sax.XMLReader
Throws:
java.io.IOException
org.xml.sax.SAXException

setDTDHandler

public void setDTDHandler(org.xml.sax.DTDHandler handler)
                   throws java.lang.NullPointerException
This class is only used internally so this method should never be called.

Specified by:
setDTDHandler in interface org.xml.sax.XMLReader
Throws:
java.lang.NullPointerException

setEntityResolver

public void setEntityResolver(org.xml.sax.EntityResolver resolver)
                       throws java.lang.NullPointerException
This class is only used internally so this method should never be called.

Specified by:
setEntityResolver in interface org.xml.sax.XMLReader
Throws:
java.lang.NullPointerException

getEntityResolver

public org.xml.sax.EntityResolver getEntityResolver()
This class is only used internally so this method should never be called.

Specified by:
getEntityResolver in interface org.xml.sax.XMLReader

setErrorHandler

public void setErrorHandler(org.xml.sax.ErrorHandler handler)
                     throws java.lang.NullPointerException
This class is only used internally so this method should never be called.

Specified by:
setErrorHandler in interface org.xml.sax.XMLReader
Throws:
java.lang.NullPointerException

setProperty

public void setProperty(java.lang.String name,
                        java.lang.Object value)
                 throws org.xml.sax.SAXNotRecognizedException,
                        org.xml.sax.SAXNotSupportedException
This class is only used internally so this method should never be called.

Specified by:
setProperty in interface org.xml.sax.XMLReader
Throws:
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

getProperty

public java.lang.Object getProperty(java.lang.String name)
                             throws org.xml.sax.SAXNotRecognizedException,
                                    org.xml.sax.SAXNotSupportedException
This class is only used internally so this method should never be called.

Specified by:
getProperty in interface org.xml.sax.XMLReader
Throws:
org.xml.sax.SAXNotRecognizedException
org.xml.sax.SAXNotSupportedException

getColumnNumber

public int getColumnNumber()
This class is only used internally so this method should never be called.

Specified by:
getColumnNumber in interface org.xml.sax.Locator

getLineNumber

public int getLineNumber()
This class is only used internally so this method should never be called.

Specified by:
getLineNumber in interface org.xml.sax.Locator

getPublicId

public java.lang.String getPublicId()
This class is only used internally so this method should never be called.

Specified by:
getPublicId in interface org.xml.sax.Locator

getSystemId

public java.lang.String getSystemId()
This class is only used internally so this method should never be called.

Specified by:
getSystemId in interface org.xml.sax.Locator

getNodeTypeFromCode

private java.lang.String getNodeTypeFromCode(short code)