BEA Systems, Inc.

WebLogic Server 6.1 API Reference

weblogic.apache.xalan.stree
Class StreeDOMBuilder

java.lang.Object
  |
  +--weblogic.apache.xml.utils.DOMBuilder
        |
        +--weblogic.apache.xalan.stree.StreeDOMBuilder

public class StreeDOMBuilder
extends DOMBuilder

This class takes SAX events (in addition to some extra events that SAX doesn't handle yet) and adds the result to a document or document fragment.

This class is based on an implementation from the Apache XML Project. In future releases the XML parser, XSLT processor, and associated classes will likely be updated to be based on a later version of the Apache implementations. Since Apache does not guarantee backwards compatibility between versions of their software, we cannot guarantee backwards compatibility of any of the classes contained in the weblogic.apache package or sub-packages.


Field Summary
protected  DocumentImpl m_docImpl
          Source document node
 
Fields inherited from class weblogic.apache.xml.utils.DOMBuilder
m_currentNode, m_doc, m_docFrag, m_elemStack, m_inCData
 
Constructor Summary
StreeDOMBuilder(org.w3c.dom.Document doc)
          StreeDOMBuilder instance constructor...
StreeDOMBuilder(org.w3c.dom.Document doc, org.w3c.dom.DocumentFragment docFrag)
          StreeDOMBuilder instance constructor...
StreeDOMBuilder(org.w3c.dom.Document doc, org.w3c.dom.Node node)
          StreeDOMBuilder instance constructor...
 
Method Summary
 void characters(char[] ch, int start, int length)
          Receive notification of character data.
 void charactersRaw(char[] ch, int start, int length)
          If available, when the disable-output-escaping attribute is used, output raw text without escaping.
 void comment(char[] ch, int start, int length)
          Report an XML comment anywhere in the document.
 void endDocument()
          Receive notification of the end of a document.
 void endElement(java.lang.String ns, java.lang.String localName, java.lang.String name)
          Receive notification of the end of an element.
 void ignorableWhitespace(char[] ch, int start, int length)
          Receive notification of ignorable whitespace in element content.
 void processingInstruction(java.lang.String target, java.lang.String data)
          Receive notification of ignorable whitespace in element content.
 void setIDAttribute(java.lang.String id, org.w3c.dom.Element elem)
          Set an ID string to node association in the ID table.
 void setPreviousIsText(boolean isText)
          Set the state of the source tree to indicate whether the last event was a characters event.
 void startElement(java.lang.String ns, java.lang.String localName, java.lang.String name, org.xml.sax.Attributes atts)
          Receive notification of the beginning of an element.
 
Methods inherited from class weblogic.apache.xml.utils.DOMBuilder
append, cdata, endCDATA, endDTD, endEntity, endPrefixMapping, entityReference, getCurrentNode, getRootNode, getWriter, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startEntity, startPrefixMapping
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_docImpl

protected DocumentImpl m_docImpl
Source document node
Constructor Detail

StreeDOMBuilder

public StreeDOMBuilder(org.w3c.dom.Document doc,
                       org.w3c.dom.Node node)
StreeDOMBuilder instance constructor... it will add the DOM nodes to the document fragment.

Parameters:
doc - Root node of DOM being created
node - Node currently being processed

StreeDOMBuilder

public StreeDOMBuilder(org.w3c.dom.Document doc,
                       org.w3c.dom.DocumentFragment docFrag)
StreeDOMBuilder instance constructor... it will add the DOM nodes to the document fragment.

Parameters:
doc - Root node of DOM being created
docFrag - Document fragment node of DOM being created

StreeDOMBuilder

public StreeDOMBuilder(org.w3c.dom.Document doc)
StreeDOMBuilder instance constructor... it will add the DOM nodes to the document.

Parameters:
doc - Root node of DOM being created
Method Detail

setIDAttribute

public void setIDAttribute(java.lang.String id,
                           org.w3c.dom.Element elem)
Set an ID string to node association in the ID table.

Parameters:
id - The ID string.
elem - The associated ID.
Overrides:
setIDAttribute in class DOMBuilder

startElement

public void startElement(java.lang.String ns,
                         java.lang.String localName,
                         java.lang.String name,
                         org.xml.sax.Attributes atts)
                  throws org.xml.sax.SAXException
Receive notification of the beginning of an element.

Parameters:
ns - namespace URL of the element
localName - local part of qualified name of the element
name - The element type name.
atts - The attributes attached to the element, if any.
Throws:
org.xml.sax.SAXException -  
Overrides:
startElement in class DOMBuilder
See Also:
DOMBuilder.startElement(String, String, String, Attributes)

endElement

public void endElement(java.lang.String ns,
                       java.lang.String localName,
                       java.lang.String name)
                throws org.xml.sax.SAXException
Receive notification of the end of an element.

Parameters:
ns - namespace URL of the element
localName - local part of qualified name of the element
name - The element type name
Throws:
org.xml.sax.SAXException -  
Overrides:
endElement in class DOMBuilder

characters

public void characters(char[] ch,
                       int start,
                       int length)
                throws org.xml.sax.SAXException
Receive notification of character data.

Parameters:
ch - The characters from the XML document.
start - The start position in the array.
length - The number of characters to read from the array.
Throws:
org.xml.sax.SAXException -  
org.xml.sax.SAXException -  
Overrides:
characters in class DOMBuilder

ignorableWhitespace

public void ignorableWhitespace(char[] ch,
                                int start,
                                int length)
                         throws org.xml.sax.SAXException
Receive notification of ignorable whitespace in element content.

Parameters:
ch - The characters from the XML document.
start - The start position in the array.
length - The number of characters to read from the array.
Throws:
org.xml.sax.SAXException -  
org.xml.sax.SAXException -  
Overrides:
ignorableWhitespace in class DOMBuilder

charactersRaw

public void charactersRaw(char[] ch,
                          int start,
                          int length)
                   throws org.xml.sax.SAXException
If available, when the disable-output-escaping attribute is used, output raw text without escaping. A PI will be inserted in front of the node with the name "lotusxsl-next-is-raw" and a value of "formatter-to-dom".

Parameters:
ch - The characters from the XML document.
start - The start position in the array.
length - The number of characters to read from the array.
Throws:
org.xml.sax.SAXException -  
org.xml.sax.SAXException -  
Overrides:
charactersRaw in class DOMBuilder

comment

public void comment(char[] ch,
                    int start,
                    int length)
             throws org.xml.sax.SAXException
Report an XML comment anywhere in the document.

Parameters:
ch - An array holding the characters in the comment.
start - The starting position in the array.
length - The number of characters to use from the array.
Throws:
org.xml.sax.SAXException -  
org.xml.sax.SAXException -  
Overrides:
comment in class DOMBuilder

processingInstruction

public void processingInstruction(java.lang.String target,
                                  java.lang.String data)
                           throws org.xml.sax.SAXException
Receive notification of ignorable whitespace in element content.

Parameters:
ch - The characters from the XML document.
start - The start position in the array.
length - The number of characters to read from the array.
Overrides:
processingInstruction in class DOMBuilder
See Also:
characters(char[], int, int)

setPreviousIsText

public void setPreviousIsText(boolean isText)
                       throws org.xml.sax.SAXException
Set the state of the source tree to indicate whether the last event was a characters event.

Parameters:
isText - True if last event was a characters event
Throws:
org.xml.sax.SAXException -  

endDocument

public void endDocument()
                 throws org.xml.sax.SAXException
Receive notification of the end of a document.

The SAX parser will invoke this method only once, and it will be the last method invoked during the parse. The parser shall not invoke this method until it has either abandoned parsing (because of an unrecoverable error) or reached the end of input.

Overrides:
endDocument in class DOMBuilder

Documentation is available at
http://download.oracle.com/docs/cd/E13222_01/wls/docs61

WebLogic classes and methods that do not appear in this reference are not public and are not supported.