A SimpleResultTreeImpl has only two nodes, i.e. the ROOT node and its Text child. All DOM interfaces are overridden with this in mind. For example, the getStringValue() interface returns the value of the Text node. This class receives the character data from the characters() interface.
This class implements DOM and SerializationHandler. It also implements the DTM interface for support in MultiDOM. The nested iterators (SimpleIterator and SingletonIterator) are used to support the nodeset() extension function.
Modifier and Type | Class and Description |
---|---|
public class | SimpleResultTreeImpl.
The SimpleIterator is designed to support the nodeset() extension function. |
public class | SimpleResultTreeImpl.
The SingletonIterator is used for the self axis. |
Modifier and Type | Field and Description |
---|---|
private int | |
private static int | |
private BitArray | |
protected XSLTCDTMManager | |
private boolean | |
protected int | |
private String | |
protected String[] | |
private static final DTMAxisIterator | |
private static final String | |
public static final int | |
public static final int | |
public static final int |
Access | Constructor and Description |
---|---|
public |
Modifier and Type | Method and Description |
---|---|
public void | appendChild(int
Must be a valid new node handle. newChild, boolean true if the child should be cloned into the document. clone, boolean if the clone argument is true, specifies that the
clone should include all it's children. cloneDepth)Implements com. Append a child to "the end of the document". |
public void | appendTextChild(String
Non-null reference to a string. str)Implements com. Append a text node child that will be constructed from a string, to the end of the document. |
public void | characters(final int node, SerializationHandler handler)
Implements com. Dispatch the character content of a node to an output handler. |
public void | characters(String
the character data str)Overrides com. Implements com. This method is used to notify of a character event, but passing the data as a character String rather than the standard character array. |
public void | characters(char[]
the characters from the XML document ch, int the start position in the array offset, int the number of characters to read from the array length)Overrides com. Implements org. Receive notification of character data. |
public void | copy(final int node, SerializationHandler handler)
Implements com.
|
public void | copy(DTMAxisIterator nodes, SerializationHandler handler)
Implements com.
|
public void | dispatchCharactersEvents(int
The node ID. nodeHandle, ContentHandler A non-null reference to a ContentHandler. ch, boolean true if the content should be normalized according to
the rules for the XPath
normalize-space
function. normalize)Implements com. Directly call the characters method on the passed ContentHandler for the string-value of the given node (see http://www.w3.org/TR/xpath#data-model for the definition of a node's string-value). |
public void | dispatchToEvents(int
The node ID. nodeHandle, ContentHandler A non-null reference to a ContentHandler. ch)Implements com. Directly create SAX parser events representing the XML content of a DTM subtree. |
public void | documentRegistration()
Implements com. As the DTM is registered with the DTMManager, this method will be called. |
public void | documentRelease()
Implements com. As documents are released from the DTMManager, the DTM implementation will be notified of the event. |
public void | endDocument()
Overrides com. Implements org. Receive notification of the end of a document. |
public int | getAttributeNode(final int gType, final int element)
Implements com.
|
public int | getAttributeNode(int
Handle of the node upon which to look up this attribute. elementHandle, String The namespace URI of the attribute to
retrieve, or null. namespaceURI, String The local name of the attribute to
retrieve. name)Implements com. Retrieves an attribute node by local name and namespace URI %TBD% Note that we currently have no way to support the DOM's old getAttribute() call, which accesses only the qname. |
public DTMAxisIterator | getAxisIterator(final int
One of Axes.ANCESTORORSELF, etc. axis)Implements com. This is a shortcut to the iterators that implement XPath axes. |
public DTMAxisTraverser | getAxisTraverser(final int
One of Axes.ANCESTORORSELF, etc. axis)Implements com. This returns a stateless "traverser", that can navigate over an XPath axis, though not in document order. |
public DTMAxisIterator | |
public ContentHandler | getContentHandler()
Implements com. Return this DTM's content handler, if it has one. |
public DeclHandler | getDeclHandler()
Implements com. Return this DTM's DeclHandler, if it has one. |
public int | getDocument()
Implements com. Given a DTM which contains only a single document, find the Node Handle of the Document node. |
public boolean | getDocumentAllDeclarationsProcessed()
Implements com. Return an indication of whether the processor has read the complete DTD. |
public String | getDocumentBaseURI()
Implements com. Return the base URI of the document entity. |
public String | getDocumentEncoding(int
The node id, which can be any valid node handle. nodeHandle)Implements com. Return the name of the character encoding scheme in which the document entity is expressed. |
public int | getDocumentRoot(int
the id of the node. nodeHandle)Implements com. Given a node handle, find the owning document node. |
public String | getDocumentStandalone(int
The node id, which can be any valid node handle. nodeHandle)Implements com. Return an indication of the standalone status of the document, either "yes" or "no". |
public String | getDocumentSystemIdentifier(int
The node id, which can be any valid node handle. nodeHandle)Implements com. Return the system identifier of the document entity. |
public String | getDocumentTypeDeclarationPublicIdentifier()
Implements com. Return the public identifier of the external subset, normalized as described in 4.2.2 External Entities [XML]. |
public String | getDocumentTypeDeclarationSystemIdentifier()
Implements com. A document type declaration information item has the following properties: 1. |
public String | |
public String | getDocumentVersion(int
the document handle documentHandle)Implements com. Return a string representing the XML version of the document. |
public DTDHandler | getDTDHandler()
Implements com. Return this DTM's DTDHandler, if it has one. |
public DTMManagerDefault | |
public int | getElementById(String
The unique elementId)id value for an element.Implements com. Returns the |
public Map | |
public EntityResolver | getEntityResolver()
Implements com. Return this DTM's EntityResolver, if it has one. |
public ErrorHandler | getErrorHandler()
Implements com. Return this DTM's ErrorHandler, if it has one. |
public int | getExpandedTypeID(final int
The handle to the node in question. nodeHandle)Implements com. Given a node handle, return an ID that represents the node's expanded name. |
public int | getExpandedTypeID(String namespace, String localName, int type)
Implements com. Given an expanded name, return an ID. If the expanded-name does not exist in the internal tables, the entry will be created, and the ID will be returned. |
public int | getFirstAttribute(int
int Handle of the node. nodeHandle)Implements com. Given a node handle, get the index of the node's first attribute. |
public int | getFirstChild(int
int Handle of the node. nodeHandle)Implements com. Given a node handle, get the handle of the node's first child. |
public int | getFirstNamespaceNode(int
handle to node, which should probably be an element
node, but need not be. nodeHandle, boolean true if all namespaces in scope should be
returned, false if only the node's own
namespace declarations should be returned. inScope)Implements com. Given a node handle, get the index of the node's first namespace node. |
public DTMAxisIterator | getIterator()
Implements com. returns singleton iterator containg the document root |
public String | |
public int | getLastChild(int
int Handle of the node. nodeHandle)Implements com. Given a node handle, get the handle of the node's last child. |
public short | getLevel(int
The node id. nodeHandle)Implements com. Get the depth level of this node in the tree (equals 1 for a parentless node). |
public LexicalHandler | getLexicalHandler()
Implements com. Return this DTM's lexical handler, if it has one. |
public String | getLocalName(int
the id of the node. nodeHandle)Implements com. Given a node handle, return its DOM-style localname. |
public String | getLocalNameFromExpandedNameID(int
an ID that represents an expanded-name. ExpandedNameID)Implements com. Given an expanded-name ID, return the local name part. |
public DTMAxisIterator | getNamespaceAxisIterator(final int axis, final int ns)
Implements com.
|
public String | getNamespaceFromExpandedNameID(int
an ID that represents an expanded-name. ExpandedNameID)Implements com. Given an expanded-name ID, return the namespace URI part. |
public String | getNamespaceName(final int node)
Implements com.
|
public int | getNamespaceType(final int node)
Implements com.
|
public String | getNamespaceURI(int
the id of the node. nodeHandle)Implements com. Given a node handle, return its DOM-style namespace URI (As defined in Namespaces, this is the declared URI which this node's prefix -- or default in lieu thereof -- was mapped to.) |
public int | getNextAttribute(int
int Handle of the node. nodeHandle)Implements com. Given a node handle, advance to the next attribute. |
public int | getNextNamespaceNode(int
handle to original node from where the first child
was relative to (needed to return nodes in document order). baseHandle, int handle to node which must be of type
NAMESPACE_NODE.
NEEDSDOC @param inScope namespaceHandle, boolean inScope)Implements com. Given a namespace handle, advance to the next namespace in the same scope (local or local-plus-inherited, as selected by getFirstNamespaceNode) |
public int | getNextSibling(int
int Handle of the node. nodeHandle)Implements com. Given a node handle, advance to its next sibling. |
public Node | getNode(int
The node ID. nodeHandle)Implements com. Return an DOM node for the given node. |
public int | getNodeHandle(final int nodeId)
Implements com. Return the node handle from a node identity. |
public int | getNodeIdent(final int nodehandle)
Implements com. Return the node identity from a node handle. |
public String | getNodeName(final int
the id of the node. node)Implements com. Given a node handle, return its DOM-style node name. |
public String | getNodeNameX(final int
the id of the node. node)Implements com. Given a node handle, return the XPath node name. |
public short | getNodeType(int
The node id. nodeHandle)Implements com. Given a node handle, return its DOM-style node type. |
public String | getNodeValue(int
The node id. nodeHandle)Implements com. Given a node handle, return its node value. |
public DTMAxisIterator | getNodeValueIterator(DTMAxisIterator iter, int returnType, String value, boolean op)
Implements com.
|
public int | |
public DTMAxisIterator | getNthDescendant(int node, int n, boolean includeself)
Implements com.
|
public SerializationHandler | |
public int | getOwnerDocument(int
the id of the node. nodeHandle)Implements com. Given a node handle, find the owning document node. |
public int | getParent(final int
the id of the node. nodeHandle)Implements com. Given a node handle, find its parent node. |
public String | getPrefix(int
the id of the node. nodeHandle)Implements com. Given a namespace handle, return the prefix that the namespace decl is mapping. |
public int | getPreviousSibling(int
the id of the node. nodeHandle)Implements com. Given a node handle, find its preceeding sibling. |
public DOM | getResultTreeFrag(int initialSize, int rtfType)
Implements com.
|
public DOM | getResultTreeFrag(int initialSize, int rtfType, boolean addToManager)
Implements com.
|
public int | |
public SourceLocator | getSourceLocatorFor(int
an node)int valueImplements com. Get the location of a node in the source document. |
public String | |
public XMLString | getStringValue(int
The node ID. nodeHandle)Implements com. Get the string-value of a node as a String object (see http://www.w3.org/TR/xpath#data-model for the definition of a node's string-value). |
public char[] | getStringValueChunk(int
The node ID. nodeHandle, int Which chunk to get. chunkIndex, int[] A two-integer array which, upon return, WILL
BE FILLED with values representing the chunk's start position
within the returned character buffer and the length of the chunk. startAndLen)Implements com. Get a character array chunk in the string-value of a node. |
public int | getStringValueChunkCount(int
The node ID. nodeHandle)Implements com. Get number of character array chunks in the string-value of a node. |
public String | getStringValueX(final int nodeHandle)
Implements com.
|
public DTMAxisIterator | getTypedAxisIterator(final int axis, final int
An extended type ID. type)Implements com. Get an iterator that can navigate over an XPath Axis, predicated by the extended type ID. |
public DTMAxisIterator | getTypedChildren(final int type)
Implements com.
|
public String | getUnparsedEntityURI(String
A string containing the Entity Name of the unparsed
entity. name)Implements com. The getUnparsedEntityURI function returns the URI of the unparsed entity with the specified name in the same document as the context node (see [3.3 Unparsed Entities]). |
public boolean | hasChildNodes(int
int Handle of the node. nodeHandle)Implements com. Given a node handle, test if it has child nodes. |
public boolean | |
public boolean | isAttributeSpecified(int
The attribute handle attributeHandle)Implements com. 5. |
public boolean | isCharacterElementContentWhitespace(int
the node ID. nodeHandle)Implements com. 2. |
public boolean | isDocumentAllDeclarationsProcessed(int
A node handle that must identify a document. documentHandle)Implements com. 10. |
public boolean | |
public boolean | isNodeAfter(int
DOM Node to perform position comparison on. firstNodeHandle, int DOM Node to perform position comparison on. secondNodeHandle)Implements com. Figure out whether nodeHandle2 should be considered as being later in the document than nodeHandle1, in Document Order as defined by the XPath model. |
public boolean | isSupported(String
The name of the feature to test. feature, String This is the version number of the feature to test.
If the version is not
specified, supporting any version of the feature will cause the
method to return version)true .Implements com. Tests whether DTM DOM implementation implements a specific feature and that feature is supported by this node. |
public boolean | lessThan(final int node1, final int node2)
Implements com.
|
public String | lookupNamespace(int node, String prefix)
Implements com.
|
public Node | |
public Node | |
public NodeList | |
public NodeList | |
public void | migrateTo(DTMManager
the DTMManager manager)Implements com. Migrate a DTM built with an old DTMManager to a new DTMManager. |
public boolean | |
public DTMAxisIterator | orderNodes(DTMAxisIterator source, int node)
Implements com.
|
public void | |
public void | setDocumentBaseURI(String
the document base URI String object or null if unknown. baseURI)Implements com. Set the base URI of the document entity. |
public boolean | setEscaping(boolean
true if escaping is to be set on. escape)Overrides com. Implements com. Turns special character escaping on/off. |
public void | setFeature(String
A feature URL. featureId, boolean true if this feature should be on, false otherwise. state)Implements com. The DTM interfaces are not used in this class. |
public void | |
public void | setProperty(String
a property, Object String valuean value)Object valueImplements com. Set a run time property for this DTM instance. |
public void | setupMapping(String[] names, String[] uris, int[] types, String[] namespaces)
Implements com.
|
public String | shallowCopy(final int node, SerializationHandler handler)
Implements com.
|
public void | startDocument()
Overrides com. Implements org. We only need to override the endDocument, characters, and setEscaping interfaces. |
public boolean | supportsPreStripping()
Implements com. Return true if the xsl:strip-space or xsl:preserve-space was processed during construction of the document contained in this DTM. |