org.apache.xalan.xsltc.trax
Class SAX2DOM

java.lang.Object
  extended by org.apache.xalan.xsltc.trax.SAX2DOM
All Implemented Interfaces:
Constants, org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler

public class SAX2DOM
extends java.lang.Object
implements org.xml.sax.ContentHandler, org.xml.sax.ext.LexicalHandler, Constants


Field Summary
private  org.w3c.dom.Document _document
           
private  org.w3c.dom.Node _lastSibling
           
private  java.util.Vector _namespaceDecls
           
private  org.w3c.dom.Node _nextSibling
           
private  java.util.Stack _nodeStk
           
private  org.w3c.dom.Node _root
           
 
Fields inherited from interface org.apache.xalan.xsltc.runtime.Constants
ANY, ATTRIBUTE, COMMENT, ELEMENT, EMPTYSTRING, NAMESPACE_FEATURE, PROCESSING_INSTRUCTION, ROOT, TEXT, XML_PREFIX, XMLNS_PREFIX, XMLNS_STRING, XMLNS_URI, XSLT_URI
 
Constructor Summary
SAX2DOM()
           
SAX2DOM(org.w3c.dom.Node root)
           
SAX2DOM(org.w3c.dom.Node root, org.w3c.dom.Node nextSibling)
           
 
Method Summary
 void characters(char[] ch, int start, int length)
           
 void comment(char[] ch, int start, int length)
          Lexical Handler method to create comment node in DOM tree.
 void endCDATA()
           
 void endDocument()
           
 void endDTD()
           
 void endElement(java.lang.String namespace, java.lang.String localName, java.lang.String qName)
           
 void endEntity(java.lang.String name)
           
 void endPrefixMapping(java.lang.String prefix)
           
 org.w3c.dom.Node getDOM()
           
 void ignorableWhitespace(char[] ch, int start, int length)
          This class is only used internally so this method should never be called.
 void processingInstruction(java.lang.String target, java.lang.String data)
          adds processing instruction node to DOM.
 void setDocumentLocator(org.xml.sax.Locator locator)
          This class is only used internally so this method should never be called.
 void skippedEntity(java.lang.String name)
          This class is only used internally so this method should never be called.
 void startCDATA()
           
 void startDocument()
           
 void startDTD(java.lang.String name, java.lang.String publicId, java.lang.String systemId)
           
 void startElement(java.lang.String namespace, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attrs)
           
 void startEntity(java.lang.String name)
           
 void startPrefixMapping(java.lang.String prefix, java.lang.String uri)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

_root

private org.w3c.dom.Node _root

_document

private org.w3c.dom.Document _document

_nextSibling

private org.w3c.dom.Node _nextSibling

_nodeStk

private java.util.Stack _nodeStk

_namespaceDecls

private java.util.Vector _namespaceDecls

_lastSibling

private org.w3c.dom.Node _lastSibling
Constructor Detail

SAX2DOM

public SAX2DOM()
        throws javax.xml.parsers.ParserConfigurationException
Throws:
javax.xml.parsers.ParserConfigurationException

SAX2DOM

public SAX2DOM(org.w3c.dom.Node root,
               org.w3c.dom.Node nextSibling)
        throws javax.xml.parsers.ParserConfigurationException
Throws:
javax.xml.parsers.ParserConfigurationException

SAX2DOM

public SAX2DOM(org.w3c.dom.Node root)
        throws javax.xml.parsers.ParserConfigurationException
Throws:
javax.xml.parsers.ParserConfigurationException
Method Detail

getDOM

public org.w3c.dom.Node getDOM()

characters

public void characters(char[] ch,
                       int start,
                       int length)
Specified by:
characters in interface org.xml.sax.ContentHandler

startDocument

public void startDocument()
Specified by:
startDocument in interface org.xml.sax.ContentHandler

endDocument

public void endDocument()
Specified by:
endDocument in interface org.xml.sax.ContentHandler

startElement

public void startElement(java.lang.String namespace,
                         java.lang.String localName,
                         java.lang.String qName,
                         org.xml.sax.Attributes attrs)
Specified by:
startElement in interface org.xml.sax.ContentHandler

endElement

public void endElement(java.lang.String namespace,
                       java.lang.String localName,
                       java.lang.String qName)
Specified by:
endElement in interface org.xml.sax.ContentHandler

startPrefixMapping

public void startPrefixMapping(java.lang.String prefix,
                               java.lang.String uri)
Specified by:
startPrefixMapping in interface org.xml.sax.ContentHandler

endPrefixMapping

public void endPrefixMapping(java.lang.String prefix)
Specified by:
endPrefixMapping in interface org.xml.sax.ContentHandler

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
This class is only used internally so this method should never be called.

Specified by:
ignorableWhitespace in interface org.xml.sax.ContentHandler

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
adds processing instruction node to DOM.

Specified by:
processingInstruction in interface org.xml.sax.ContentHandler

setDocumentLocator

public void setDocumentLocator(org.xml.sax.Locator locator)
This class is only used internally so this method should never be called.

Specified by:
setDocumentLocator in interface org.xml.sax.ContentHandler

skippedEntity

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

Specified by:
skippedEntity in interface org.xml.sax.ContentHandler

comment

public void comment(char[] ch,
                    int start,
                    int length)
Lexical Handler method to create comment node in DOM tree.

Specified by:
comment in interface org.xml.sax.ext.LexicalHandler

startCDATA

public void startCDATA()
Specified by:
startCDATA in interface org.xml.sax.ext.LexicalHandler

endCDATA

public void endCDATA()
Specified by:
endCDATA in interface org.xml.sax.ext.LexicalHandler

startEntity

public void startEntity(java.lang.String name)
Specified by:
startEntity in interface org.xml.sax.ext.LexicalHandler

endDTD

public void endDTD()
Specified by:
endDTD in interface org.xml.sax.ext.LexicalHandler

endEntity

public void endEntity(java.lang.String name)
Specified by:
endEntity in interface org.xml.sax.ext.LexicalHandler

startDTD

public void startDTD(java.lang.String name,
                     java.lang.String publicId,
                     java.lang.String systemId)
              throws org.xml.sax.SAXException
Specified by:
startDTD in interface org.xml.sax.ext.LexicalHandler
Throws:
org.xml.sax.SAXException