FileDocCategorySizeDatePackage
AdaptiveResultTreeImpl.javaAPI DocJava SE 5 API34180Fri Aug 26 14:55:38 BST 2005com.sun.org.apache.xalan.internal.xsltc.dom

AdaptiveResultTreeImpl

public class AdaptiveResultTreeImpl extends SimpleResultTreeImpl
AdaptiveResultTreeImpl is a adaptive DOM model for result tree fragments (RTF). It is used in the case where the RTF is likely to be pure text yet it can still be a DOM tree. It is designed for RTFs which have <xsl:call-template> or <xsl:apply-templates> in the contents. Example:
<xsl:variable name = "x">
<xsl:call-template name = "test">
<xsl:with-param name="a" select="."/>
</xsl:call-template>
</xsl:variable>

In this example the result produced by is likely to be a single Text node. But it can also be a DOM tree. This kind of RTF cannot be modelled by SimpleResultTreeImpl.

AdaptiveResultTreeImpl can be considered as a smart switcher between SimpleResultTreeImpl and SAXImpl. It treats the RTF as simple Text and uses the SimpleResultTreeImpl model at the beginning. However, if it receives a call which indicates that this is a DOM tree (e.g. startElement), it will automatically transform itself into a wrapper around a SAXImpl. In this way we can have a light-weight model when the result only contains simple text, while at the same time it still works when the RTF is a DOM tree.

All methods in this class are overridden to delegate the action to the wrapped SAXImpl object if it is non-null, or delegate the action to the SimpleResultTreeImpl if there is no wrapped SAXImpl.

%REVISIT% Can we combine this class with SimpleResultTreeImpl? I think it is possible, but it will make SimpleResultTreeImpl more expensive. I will use two separate classes at this time.

Fields Summary
private static int
_documentURIIndex
private SAXImpl
_dom
private DTMWSFilter
_wsfilter
The following fields are only used for the nested SAXImpl
private int
_initSize
private boolean
_buildIdIndex
private final com.sun.org.apache.xalan.internal.xsltc.runtime.AttributeList
_attributes
private String
_openElementName
Constructors Summary
public AdaptiveResultTreeImpl(XSLTCDTMManager dtmManager, int documentID, DTMWSFilter wsfilter, int initSize, boolean buildIdIndex)

    
    
    // Create a AdaptiveResultTreeImpl
        
                                     
                                   
    
        super(dtmManager, documentID);
        
        _wsfilter = wsfilter;
        _initSize = initSize;
        _buildIdIndex = buildIdIndex;
    
Methods Summary
public voidaddAttribute(java.lang.String name, java.lang.String value)

    
	if (_openElementName != null) {
	    _attributes.add(name, value);
	}
	else {
	    BasisLibrary.runTimeError(BasisLibrary.STRAY_ATTRIBUTE_ERR, name);
	}
    
public voidaddUniqueAttribute(java.lang.String qName, java.lang.String value, int flags)

        addAttribute(qName, value); 
    
public voidappendChild(int newChild, boolean clone, boolean cloneDepth)

        if (_dom != null) {
            _dom.appendChild(newChild, clone, cloneDepth);
        }
        else {
            super.appendChild(newChild, clone, cloneDepth);
        }
    
public voidappendTextChild(java.lang.String str)

        if (_dom != null) {
            _dom.appendTextChild(str);
        }
        else {
            super.appendTextChild(str);
        }
    
public voidcharacters(int node, com.sun.org.apache.xml.internal.serializer.SerializationHandler handler)
Dispatch the character content of a node to an output handler. The escape setting should be taken care of when outputting to a handler.

        if (_dom != null) {
            _dom.characters(node, handler);
        }
        else {
            super.characters(node, handler);
        }        
    
public voidcharacters(java.lang.String str)

        if (_dom != null) {
            characters(str.toCharArray(), 0, str.length());
        }
        else {
            super.characters(str);
        }
    
public voidcharacters(char[] ch, int offset, int length)

        if (_dom != null) {
	    maybeEmitStartElement();
	    _dom.characters(ch, offset, length);
        }
        else {
            super.characters(ch, offset, length);
        }
    
public voidcomment(java.lang.String comment)

    
	if (_dom == null) {
	   prepareNewDOM(); 
	}
	
	maybeEmitStartElement();
        char[] chars = comment.toCharArray();
        _dom.comment(chars, 0, chars.length);
    
public voidcomment(char[] chars, int offset, int length)

    
	if (_dom == null) {
	   prepareNewDOM(); 
	}
	
	maybeEmitStartElement();
        _dom.comment(chars, offset, length);
    
public voidcopy(int node, com.sun.org.apache.xml.internal.serializer.SerializationHandler handler)

        if (_dom != null) {
            _dom.copy(node, handler);
        }
        else {
            super.copy(node, handler);
        }
    
public voidcopy(com.sun.org.apache.xml.internal.dtm.DTMAxisIterator nodes, com.sun.org.apache.xml.internal.serializer.SerializationHandler handler)

        if (_dom != null) {
            _dom.copy(nodes, handler);
        }
        else {
            super.copy(nodes, handler);
        }
    
public voiddispatchCharactersEvents(int nodeHandle, org.xml.sax.ContentHandler ch, boolean normalize)

        if (_dom != null) {
            _dom.dispatchCharactersEvents(nodeHandle,  ch, normalize);
        }
        else {
            super.dispatchCharactersEvents(nodeHandle, ch, normalize);
        }
    
public voiddispatchToEvents(int nodeHandle, org.xml.sax.ContentHandler ch)

        if (_dom != null) {
            _dom.dispatchToEvents(nodeHandle,  ch);
        }
        else {
            super.dispatchToEvents(nodeHandle, ch);
        }
    
public voiddocumentRegistration()

        if (_dom != null) {
            _dom.documentRegistration();
        }
        else {
            super.documentRegistration();
        }
    
public voiddocumentRelease()

        if (_dom != null) {
            _dom.documentRelease();
        }
        else {
            super.documentRelease();
        }
    
public voidendDocument()

        if (_dom != null) {
            _dom.endDocument();
        }
        else {
            super.endDocument();
        }
    
public voidendElement(java.lang.String elementName)

    
	maybeEmitStartElement();
	_dom.endElement(null, null, elementName);
    
public voidendElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)

        endElement(qName);
    
public intgetAttributeNode(int gType, int element)

        if (_dom != null) {
            return _dom.getAttributeNode(gType, element);
        }
        else {
            return super.getAttributeNode(gType, element);
        }
    
public intgetAttributeNode(int elementHandle, java.lang.String namespaceURI, java.lang.String name)

        if (_dom != null) {
            return _dom.getAttributeNode(elementHandle, namespaceURI, name);
        }
        else {
            return super.getAttributeNode(elementHandle, namespaceURI, name);
        }
    
public com.sun.org.apache.xml.internal.dtm.DTMAxisIteratorgetAxisIterator(int axis)

        if (_dom != null) {
            return _dom.getAxisIterator(axis);
        }
        else {
            return super.getAxisIterator(axis);
        }
    
public com.sun.org.apache.xml.internal.dtm.DTMAxisTraversergetAxisTraverser(int axis)

        if (_dom != null) {
            return _dom.getAxisTraverser(axis);
        }
        else {
            return super.getAxisTraverser(axis);
        }
    
public com.sun.org.apache.xml.internal.dtm.DTMAxisIteratorgetChildren(int node)

        if (_dom != null) {
            return _dom.getChildren(node);
        }
        else {
            return super.getChildren(node);
        }
    
public org.xml.sax.ContentHandlergetContentHandler()

        if (_dom != null) {
            return _dom.getContentHandler();
        }
        else {
            return super.getContentHandler();
        }
    
public org.xml.sax.DTDHandlergetDTDHandler()

        if (_dom != null) {
            return _dom.getDTDHandler();
        }
        else {
            return super.getDTDHandler();
        }
    
public org.xml.sax.ext.DeclHandlergetDeclHandler()

        if (_dom != null) {
            return _dom.getDeclHandler();
        }
        else {
            return super.getDeclHandler();
        }
    
public intgetDocument()

        if (_dom != null) {
            return _dom.getDocument();
        }
        else {
            return super.getDocument();
        }
    
public booleangetDocumentAllDeclarationsProcessed()

        if (_dom != null) {
            return _dom.getDocumentAllDeclarationsProcessed();
        }
        else {
            return super.getDocumentAllDeclarationsProcessed();
        }
    
public java.lang.StringgetDocumentBaseURI()

        if (_dom != null) {
            return _dom.getDocumentBaseURI();
        }
        else {
            return super.getDocumentBaseURI();
        }
    
public java.lang.StringgetDocumentEncoding(int nodeHandle)

        if (_dom != null) {
            return _dom.getDocumentEncoding(nodeHandle);
        }
        else {
            return super.getDocumentEncoding(nodeHandle);
        }
    
public intgetDocumentRoot(int nodeHandle)

        if (_dom != null) {
            return _dom.getDocumentRoot(nodeHandle);
        }
        else {
            return super.getDocumentRoot(nodeHandle);
        }
    
public java.lang.StringgetDocumentStandalone(int nodeHandle)

        if (_dom != null) {
            return _dom.getDocumentStandalone(nodeHandle);
        }
        else {
            return super.getDocumentStandalone(nodeHandle);
        }
    
public java.lang.StringgetDocumentSystemIdentifier(int nodeHandle)

        if (_dom != null) {
            return _dom.getDocumentSystemIdentifier(nodeHandle);
        }
        else {
            return super.getDocumentSystemIdentifier(nodeHandle);
        }
    
public java.lang.StringgetDocumentTypeDeclarationPublicIdentifier()

        if (_dom != null) {
            return _dom.getDocumentTypeDeclarationPublicIdentifier();
        }
        else {
            return super.getDocumentTypeDeclarationPublicIdentifier();
        }
    
public java.lang.StringgetDocumentTypeDeclarationSystemIdentifier()

        if (_dom != null) {
            return _dom.getDocumentTypeDeclarationSystemIdentifier();
        }
        else {
            return super.getDocumentTypeDeclarationSystemIdentifier();
        }
    
public java.lang.StringgetDocumentURI(int node)

        if (_dom != null) {
            return _dom.getDocumentURI(node);
        }
        else {
            return "adaptive_rtf" + _documentURIIndex++;
        }        
    
public java.lang.StringgetDocumentVersion(int documentHandle)

        if (_dom != null) {
            return _dom.getDocumentVersion(documentHandle);
        }
        else {
            return super.getDocumentVersion(documentHandle);
        }
    
public intgetElementById(java.lang.String elementId)

        if (_dom != null) {
            return _dom.getElementById(elementId);
        }
        else {
            return super.getElementById(elementId);
        }
    
public com.sun.org.apache.xalan.internal.xsltc.runtime.HashtablegetElementsWithIDs()

        if (_dom != null) {
            return _dom.getElementsWithIDs();
        }
        else {
            return super.getElementsWithIDs();
        }        
    
public org.xml.sax.EntityResolvergetEntityResolver()

        if (_dom != null) {
            return _dom.getEntityResolver();
        }
        else {
            return super.getEntityResolver();
        }
    
public org.xml.sax.ErrorHandlergetErrorHandler()

        if (_dom != null) {
            return _dom.getErrorHandler();
        }
        else {
            return super.getErrorHandler();
        }
    
public intgetExpandedTypeID(int nodeHandle)

        if (_dom != null) {
            return _dom.getExpandedTypeID(nodeHandle);
        }
        else {
            return super.getExpandedTypeID(nodeHandle);
        }
    
public intgetExpandedTypeID(java.lang.String namespace, java.lang.String localName, int type)

        if (_dom != null) {
            return _dom.getExpandedTypeID(namespace, localName, type);
        }
        else {
            return super.getExpandedTypeID(namespace, localName, type);
        }
    
public intgetFirstAttribute(int nodeHandle)

        if (_dom != null) {
            return _dom.getFirstAttribute(nodeHandle);
        }
        else {
            return super.getFirstAttribute(nodeHandle);
        }
    
public intgetFirstChild(int nodeHandle)

        if (_dom != null) {
            return _dom.getFirstChild(nodeHandle);
        }
        else {
            return super.getFirstChild(nodeHandle);
        }
    
public intgetFirstNamespaceNode(int nodeHandle, boolean inScope)

        if (_dom != null) {
            return _dom.getFirstNamespaceNode(nodeHandle, inScope);
        }
        else {
            return super.getFirstNamespaceNode(nodeHandle, inScope);
        }
    
public com.sun.org.apache.xml.internal.dtm.DTMAxisIteratorgetIterator()

        if (_dom != null) {
            return _dom.getIterator();
        }
        else {
            return super.getIterator();
        }
    
public java.lang.StringgetLanguage(int node)

        if (_dom != null) {
            return _dom.getLanguage(node);
        }
        else {
            return super.getLanguage(node);
        }        
    
public intgetLastChild(int nodeHandle)

        if (_dom != null) {
            return _dom.getLastChild(nodeHandle);
        }
        else {
            return super.getLastChild(nodeHandle);
        }
    
public shortgetLevel(int nodeHandle)

        if (_dom != null) {
            return _dom.getLevel(nodeHandle);
        }
        else {
            return super.getLevel(nodeHandle);
        }
    
public org.xml.sax.ext.LexicalHandlergetLexicalHandler()

        if (_dom != null) {
            return _dom.getLexicalHandler();
        }
        else {
            return super.getLexicalHandler();
        }
    
public java.lang.StringgetLocalName(int nodeHandle)

        if (_dom != null) {
            return _dom.getLocalName(nodeHandle);
        }
        else {
            return super.getLocalName(nodeHandle);
        }
    
public java.lang.StringgetLocalNameFromExpandedNameID(int ExpandedNameID)

        if (_dom != null) {
            return _dom.getLocalNameFromExpandedNameID(ExpandedNameID);
        }
        else {
            return super.getLocalNameFromExpandedNameID(ExpandedNameID);
        }
    
public intgetNSType(int node)

        if (_dom != null) {
            return _dom.getNSType(node);
        }
        else {
            return super.getNSType(node);
        }        
    
public com.sun.org.apache.xml.internal.dtm.DTMAxisIteratorgetNamespaceAxisIterator(int axis, int ns)

        if (_dom != null) {
            return _dom.getNamespaceAxisIterator(axis, ns);
        }
        else {
            return super.getNamespaceAxisIterator(axis, ns);
        }
    
public java.lang.StringgetNamespaceFromExpandedNameID(int ExpandedNameID)

        if (_dom != null) {
            return _dom.getNamespaceFromExpandedNameID(ExpandedNameID);
        }
        else {
            return super.getNamespaceFromExpandedNameID(ExpandedNameID);
        }
    
public java.lang.StringgetNamespaceName(int node)

        if (_dom != null) {
            return _dom.getNamespaceName(node);
        }
        else {
            return super.getNamespaceName(node);
        }
    
public intgetNamespaceType(int node)

        if (_dom != null) {
            return _dom.getNamespaceType(node);
        }
        else {
            return super.getNamespaceType(node);
        }
    
public java.lang.StringgetNamespaceURI(int nodeHandle)

        if (_dom != null) {
            return _dom.getNamespaceURI(nodeHandle);
        }
        else {
            return super.getNamespaceURI(nodeHandle);
        }
    
public com.sun.org.apache.xalan.internal.xsltc.DOMgetNestedDOM()

        return _dom;
    
public intgetNextAttribute(int nodeHandle)

        if (_dom != null) {
            return _dom.getNextAttribute(nodeHandle);
        }
        else {
            return super.getNextAttribute(nodeHandle);
        }
    
public intgetNextNamespaceNode(int baseHandle, int namespaceHandle, boolean inScope)

        if (_dom != null) {
            return _dom.getNextNamespaceNode(baseHandle, namespaceHandle, inScope);
        }
        else {
            return super.getNextNamespaceNode(baseHandle, namespaceHandle, inScope);
        }
    
public intgetNextSibling(int nodeHandle)

        if (_dom != null) {
            return _dom.getNextSibling(nodeHandle);
        }
        else {
            return super.getNextSibling(nodeHandle);
        }
     
public org.w3c.dom.NodegetNode(int nodeHandle)

        if (_dom != null) {
            return _dom.getNode(nodeHandle);
        }
        else {
            return super.getNode(nodeHandle);
        }
    
public final intgetNodeHandle(int nodeId)
Return the node handle from a node identity.

        if (_dom != null) {
            return _dom.getNodeHandle(nodeId);
        }
        else {
            return super.getNodeHandle(nodeId);
        }        
    
public final intgetNodeIdent(int nodehandle)
Return the node identity from a node handle.

        if (_dom != null) {
            return _dom.getNodeIdent(nodehandle);
        }
        else {
            return super.getNodeIdent(nodehandle);
        }        
    
public java.lang.StringgetNodeName(int node)

        if (_dom != null) {
            return _dom.getNodeName(node);
        }
        else {
            return super.getNodeName(node);
        }
    
public java.lang.StringgetNodeNameX(int node)

        if (_dom != null) {
            return _dom.getNodeNameX(node);
        }
        else {
            return super.getNodeNameX(node);
        }
    
public shortgetNodeType(int nodeHandle)

        if (_dom != null) {
            return _dom.getNodeType(nodeHandle);
        }
        else {
            return super.getNodeType(nodeHandle);
        }
    
public java.lang.StringgetNodeValue(int nodeHandle)

        if (_dom != null) {
            return _dom.getNodeValue(nodeHandle);
        }
        else {
            return super.getNodeValue(nodeHandle);
        }
    
public com.sun.org.apache.xml.internal.dtm.DTMAxisIteratorgetNodeValueIterator(com.sun.org.apache.xml.internal.dtm.DTMAxisIterator iter, int returnType, java.lang.String value, boolean op)

        if (_dom != null) {
            return _dom.getNodeValueIterator(iter, returnType, value, op);
        }
        else {
            return super.getNodeValueIterator(iter, returnType, value, op);
        }
    
public com.sun.org.apache.xml.internal.dtm.DTMAxisIteratorgetNthDescendant(int node, int n, boolean includeself)

        if (_dom != null) {
            return _dom.getNthDescendant(node, n, includeself);
        }
        else {
            return super.getNthDescendant(node, n, includeself);
        }
    
public com.sun.org.apache.xml.internal.serializer.SerializationHandlergetOutputDomBuilder()

        return this;
    
public intgetOwnerDocument(int nodeHandle)

        if (_dom != null) {
            return _dom.getOwnerDocument(nodeHandle);
        }
        else {
            return super.getOwnerDocument(nodeHandle);
        }
    
public intgetParent(int nodeHandle)

        if (_dom != null) {
            return _dom.getParent(nodeHandle);
        }
        else {
            return super.getParent(nodeHandle);
        }
    
public java.lang.StringgetPrefix(int nodeHandle)

        if (_dom != null) {
            return _dom.getPrefix(nodeHandle);
        }
        else {
            return super.getPrefix(nodeHandle);
        }
    
public intgetPreviousSibling(int nodeHandle)

        if (_dom != null) {
            return _dom.getPreviousSibling(nodeHandle);
        }
        else {
            return super.getPreviousSibling(nodeHandle);
        }
     
public com.sun.org.apache.xalan.internal.xsltc.DOMgetResultTreeFrag(int initialSize, int rtfType)

        if (_dom != null) {
            return _dom.getResultTreeFrag(initialSize, rtfType);
        }
        else {
            return super.getResultTreeFrag(initialSize, rtfType);
        }        
    
public intgetSize()

        if (_dom != null) {
            return _dom.getSize();
        }
        else {
            return super.getSize();
        }        
    
public javax.xml.transform.SourceLocatorgetSourceLocatorFor(int node)

        if (_dom != null) {
            return _dom.getSourceLocatorFor(node);
        }
        else {
            return super.getSourceLocatorFor(node);
        }
    
public java.lang.StringgetStringValue()

        if (_dom != null) {
            return _dom.getStringValue();
        }
        else {
            return super.getStringValue();
        }
    
public com.sun.org.apache.xml.internal.utils.XMLStringgetStringValue(int nodeHandle)

        if (_dom != null) {
            return _dom.getStringValue(nodeHandle);
        }
        else {
            return super.getStringValue(nodeHandle);
        }
    
public char[]getStringValueChunk(int nodeHandle, int chunkIndex, int[] startAndLen)

        if (_dom != null) {
            return _dom.getStringValueChunk(nodeHandle, chunkIndex, startAndLen);
        }
        else {
            return super.getStringValueChunk(nodeHandle, chunkIndex, startAndLen);
        }
    
public intgetStringValueChunkCount(int nodeHandle)

        if (_dom != null) {
            return _dom.getStringValueChunkCount(nodeHandle);
        }
        else {
            return super.getStringValueChunkCount(nodeHandle);
        }
    
public java.lang.StringgetStringValueX(int nodeHandle)

        if (_dom != null) {
            return _dom.getStringValueX(nodeHandle);
        }
        else {
            return super.getStringValueX(nodeHandle);
        }
    
public com.sun.org.apache.xml.internal.dtm.DTMAxisIteratorgetTypedAxisIterator(int axis, int type)

        if (_dom != null) {
            return _dom.getTypedAxisIterator(axis, type);
        }
        else {
            return super.getTypedAxisIterator(axis, type);
        }        
    
public com.sun.org.apache.xml.internal.dtm.DTMAxisIteratorgetTypedChildren(int type)

        if (_dom != null) {
            return _dom.getTypedChildren(type);
        }
        else {
            return super.getTypedChildren(type);
        }
    
public java.lang.StringgetUnparsedEntityURI(java.lang.String name)

        if (_dom != null) {
            return _dom.getUnparsedEntityURI(name);
        }
        else {
            return super.getUnparsedEntityURI(name);
        }        
    
public booleanhasChildNodes(int nodeHandle)

        if (_dom != null) {
            return _dom.hasChildNodes(nodeHandle);
        }
        else {
            return super.hasChildNodes(nodeHandle);
        }
    
public booleanisAttribute(int node)

        if (_dom != null) {
            return _dom.isAttribute(node);
        }
        else {
            return super.isAttribute(node);
        }        
    
public booleanisAttributeSpecified(int attributeHandle)

        if (_dom != null) {
            return _dom.isAttributeSpecified(attributeHandle);
        }
        else {
            return super.isAttributeSpecified(attributeHandle);
        }
    
public booleanisCharacterElementContentWhitespace(int nodeHandle)

        if (_dom != null) {
            return _dom.isCharacterElementContentWhitespace(nodeHandle);
        }
        else {
            return super.isCharacterElementContentWhitespace(nodeHandle);
        }
    
public booleanisDocumentAllDeclarationsProcessed(int documentHandle)

        if (_dom != null) {
            return _dom.isDocumentAllDeclarationsProcessed(documentHandle);
        }
        else {
            return super.isDocumentAllDeclarationsProcessed(documentHandle);
        }
    
public booleanisElement(int node)

        if (_dom != null) {
            return _dom.isElement(node);
        }
        else {
            return super.isElement(node);
        }        
    
public booleanisNodeAfter(int firstNodeHandle, int secondNodeHandle)

        if (_dom != null) {
            return _dom.isNodeAfter(firstNodeHandle, secondNodeHandle);
        }
        else {
            return super.isNodeAfter(firstNodeHandle, secondNodeHandle);
        }
    
public booleanisSupported(java.lang.String feature, java.lang.String version)

        if (_dom != null) {
            return _dom.isSupported(feature, version);
        }
        else {
            return super.isSupported(feature, version);
        }
    
public booleanlessThan(int node1, int node2)

        if (_dom != null) {
            return _dom.lessThan(node1, node2);
        }
        else {
            return super.lessThan(node1, node2);
        }
    
public java.lang.StringlookupNamespace(int node, java.lang.String prefix)

        if (_dom != null) {
            return _dom.lookupNamespace(node, prefix);
        }
        else {
            return super.lookupNamespace(node, prefix);
        }        
    
public org.w3c.dom.NodemakeNode(int index)

        if (_dom != null) {
            return _dom.makeNode(index);
        }
        else {
            return super.makeNode(index);
        }        
    
public org.w3c.dom.NodemakeNode(com.sun.org.apache.xml.internal.dtm.DTMAxisIterator iter)

        if (_dom != null) {
            return _dom.makeNode(iter);
        }
        else {
            return super.makeNode(iter);
        }        
    
public org.w3c.dom.NodeListmakeNodeList(int index)

        if (_dom != null) {
            return _dom.makeNodeList(index);
        }
        else {
            return super.makeNodeList(index);
        }        
    
public org.w3c.dom.NodeListmakeNodeList(com.sun.org.apache.xml.internal.dtm.DTMAxisIterator iter)

        if (_dom != null) {
            return _dom.makeNodeList(iter);
        }
        else {
            return super.makeNodeList(iter);
        }        
    
private voidmaybeEmitStartElement()
The code in some of the following interfaces are copied from SAXAdapter.

	if (_openElementName != null) {

	   int index;
	   if ((index =_openElementName.indexOf(":")) < 0)
	       _dom.startElement(null, _openElementName, _openElementName, _attributes);
	   else {
           	String uri =_dom.getNamespaceURI(_openElementName.substring(0,index));
		_dom.startElement(uri, _openElementName.substring(index+1), _openElementName, _attributes);
           }


	    _openElementName = null;
	}
    
public voidnamespaceAfterStartElement(java.lang.String prefix, java.lang.String uri)

    
	if (_dom == null) {
	   prepareNewDOM(); 
	}
	
	_dom.startPrefixMapping(prefix, uri);
    
public booleanneedsTwoThreads()

        if (_dom != null) {
            return _dom.needsTwoThreads();
        }
        else {
            return super.needsTwoThreads();
        }
    
public com.sun.org.apache.xml.internal.dtm.DTMAxisIteratororderNodes(com.sun.org.apache.xml.internal.dtm.DTMAxisIterator source, int node)

        if (_dom != null) {
            return _dom.orderNodes(source, node);
        }
        else {
            return super.orderNodes(source, node);
        }
    
private voidprepareNewDOM()

        _dom = (SAXImpl)_dtmManager.getDTM(null, true, _wsfilter,
                                  true, false, false,
                                  _initSize, _buildIdIndex);
        _dom.startDocument();
        // Flush pending Text nodes to SAXImpl
        for (int i = 0; i < _size; i++) {
            String str = _textArray[i];
            _dom.characters(str.toCharArray(), 0, str.length());
        }
        _size = 0;
    
public voidprocessingInstruction(java.lang.String target, java.lang.String data)

    
	if (_dom == null) {
	   prepareNewDOM(); 
	}
	
	maybeEmitStartElement();
	_dom.processingInstruction(target, data);
    
public voidsetDocumentBaseURI(java.lang.String baseURI)

        if (_dom != null) {
            _dom.setDocumentBaseURI(baseURI);
        }
        else {
            super.setDocumentBaseURI(baseURI);
        }
    
public booleansetEscaping(boolean escape)

        if (_dom != null) {
            return _dom.setEscaping(escape);
        }
        else {
            return super.setEscaping(escape);
        }
    
public voidsetFeature(java.lang.String featureId, boolean state)
Implementation of the DTM interfaces

        if (_dom != null) {
            _dom.setFeature(featureId, state);
        }
    
public voidsetFilter(com.sun.org.apache.xalan.internal.xsltc.StripFilter filter)

        if (_dom != null) {
            _dom.setFilter(filter);
        }
        else {
            super.setFilter(filter);
        }        
    
public voidsetProperty(java.lang.String property, java.lang.Object value)

        if (_dom != null) {
            _dom.setProperty(property, value);
        }
    
public voidsetupMapping(java.lang.String[] names, java.lang.String[] uris, int[] types, java.lang.String[] namespaces)

        if (_dom != null) {
            _dom.setupMapping(names, uris, types, namespaces);
        }
        else {
            super.setupMapping(names, uris, types, namespaces);
        }        
    
public java.lang.StringshallowCopy(int node, com.sun.org.apache.xml.internal.serializer.SerializationHandler handler)

        if (_dom != null) {
            return _dom.shallowCopy(node, handler);
        }
        else {
            return super.shallowCopy(node, handler);
        }
    
public voidstartDocument()

    
    
public voidstartElement(java.lang.String elementName)

        if (_dom == null) {
            prepareNewDOM();
        }
        	   	    
	maybeEmitStartElement();
	_openElementName = elementName;
	_attributes.clear();
    
public voidstartElement(java.lang.String uri, java.lang.String localName, java.lang.String qName)

        startElement(qName);
    
public voidstartElement(java.lang.String uri, java.lang.String localName, java.lang.String qName, org.xml.sax.Attributes attributes)

        startElement(qName);
    
public booleansupportsPreStripping()

        if (_dom != null) {
            return _dom.supportsPreStripping();
        }
        else {
            return super.supportsPreStripping();
        }