State: In progress!!
%REVIEW% I _think_ the SAX convention is that "no namespace" is expressed as "" rather than as null (which is the DOM's convention). What should DTM expect? What should it do with the other?Origin: the implemention is a composite logic based on the DTM of XalanJ1 and DocImpl, DocumentImpl, ElementImpl, TextImpl, etc. of XalanJ2
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| private final boolean | |
| protected static final int | |
| protected static final byte | |
| private boolean | |
| private static final String[] | fixednames
fixednames |
| pack-priv int[] | |
| private FastStringBuffer | |
| private int | |
| protected int | |
| pack-priv int | |
| pack-priv int | |
| protected String | m_documentBaseURI
The document base URI. |
| private ExpandedNameTable | |
| private IncrementalSAXSource | m_incrSAXSource
If we're building the model incrementally on demand, we need to be able to tell the source when to send us more data. |
| pack-priv boolean | |
| private DTMStringPool | |
| private DTMStringPool | |
| private DTMStringPool | |
| private XMLStringFactory | |
| protected static final int | |
| pack-priv ChunkedIntArray | |
| pack-priv int | |
| private boolean |
| Access | Constructor and Description |
|---|---|
| public | DTMDocumentImpl(DTMManager mgr, int
the ID number assigned to this document.
It will be shifted up into the high bits and returned as part of
all node ID numbers, so those IDs indicate which document they
came from as well as a location within the document. It is the
DTMManager's responsibility to assign a unique number to each
document. documentNumber, DTMWSFilter whiteSpaceFilter, XMLStringFactory xstringfactory)Construct a DTM. |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv void | appendAttribute(int
int Index within the namespaceURI string pool namespaceIndex, int int Index within the local name string pool localNameIndex, int int Index within the prefix string pool prefixIndex, boolean boolean True if this attribute was declared as an ID
(for use in supporting getElementByID). isID, int int Starting offset of node's content in m_char. m_char_current_start, int int Length of node's content in m_char. contentLength)Append an Attribute child at the current insertion point. |
| 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 child list of the current node. |
| pack-priv void | appendComment(int
int Starting offset of node's content in m_char. m_char_current_start, int int Length of node's content in m_char. contentLength)Append a comment child at the current insertion point. |
| pack-priv void | |
| pack-priv void | |
| private final int | Returns: int As in ChunkedIntArray.appendint As in ChunkedIntArray.append w0, int int As in ChunkedIntArray.append w1, int int As in ChunkedIntArray.append w2, int int As in ChunkedIntArray.append w3)Wrapper for ChunkedIntArray.append, to automatically update the previous sibling's "next" reference (if necessary) and periodically wake a reader who may have encountered incomplete data and entered a wait state. |
| pack-priv void | appendNSDeclaration(int prefixIndex, int namespaceIndex, boolean isID)
Append a Namespace Declaration child at the current insertion point. |
| pack-priv void | |
| pack-priv void | appendStartElement(int namespaceIndex, int
Index within the local name string pool localNameIndex, int prefixIndex)Append an Element child at the current insertion point. |
| 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. |
| pack-priv void | appendTextChild(int
int Starting offset of node's content in m_char. m_char_current_start, int int Length of node's content in m_char. contentLength)Append a text child at the current insertion point. |
| public void | characters(char[] ch, int start, int length)
Implements org. Receive notification of character data. |
| public void | comment(char[] ch, int start, int length)
Implements org. Report an XML comment anywhere in the document. |
| public void | dispatchCharactersEvents(int
The node ID. nodeHandle, ContentHandler A non-null reference to a ContentHandler. ch, boolean 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 from a subtree. |
| public void | documentRegistration()
Implements com. A dummy routine to satisify the abstract interface. |
| public void | documentRelease()
Implements com. A dummy routine to satisify the abstract interface. |
| public void | |
| public void | endDocument()
Implements org. Receive notification of the end of a document. |
| public void | |
| public void | endElement(String namespaceURI, String localName, String qName)
Implements org. Receive notification of the end of an element. |
| public void | endEntity(String name)
Implements org. Report the end of an entity. |
| public void | endPrefixMapping(String prefix)
Implements org. End the scope of a prefix-URI mapping. |
| public int | Returns: The attribute node handle with the specified name (nodeName) or DTM.NULL if there is no such
attribute.int Handle of the node upon which to look up this attribute. nodeHandle, 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 by qualified name and namespace URI. |
| public DTMAxisIterator | Returns: A DTMAxisIterator, or null if the given axis isn't supported.One of Axes.ANCESTORORSELF, etc. axis)Implements com. This is a shortcut to the iterators that implement the supported XPath axes (only namespace::) is not supported. |
| public DTMAxisTraverser | Returns: A DTMAxisIterator, or null if the given axis isn't supported.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. |
| pack-priv FastStringBuffer | Returns: FastStringBuffer reference to an instance of bufferGet a reference pointer to the content-text repository |
| public ContentHandler | Returns: null if this model doesn't respond to SAX events, "this" if the DTM object has a built-in SAX ContentHandler, the IncrementalSAXSource if we're bound to one and should receive the SAX stream via it for incremental build purposes...Implements com. getContentHandler returns "our SAX builder" -- the thing that someone else should send SAX events to in order to extend this DTM model. |
| public DeclHandler | Returns: null if this model doesn't respond to SAX Decl events.Implements com. Return this DTM's DeclHandler. |
| public int | Returns: int Node handle of document, which should always be valid.Implements com. Given a node handle, find the owning document node. |
| public boolean | Returns: true if all declarations were processed {};
false otherwise.Implements com. Return an indication of whether the processor has read the complete DTD. |
| public String | Returns: the document base URI String object or null if unknown.Implements com. Return the base URI of the document entity. |
| public String | Returns: the document encoding String object.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 | |
| public int | Returns: int Node handle of owning document, or NULL if the nodeHandle is a document.the id of the node. nodeHandle)Implements com. Given a node handle, find the owning document node. |
| public String | Returns: the document standalone String object, either "yes", "no", or null.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 | Returns: the system identifier String object or null if unknown.The node id, which can be any valid node handle. nodeHandle)Implements com. Return the system identifier of the document entity. |
| public String | Returns: the public identifier String object, or null if there is none.Implements com. Return the public identifier of the external subset, normalized as described in 4.2.2 External Entities [XML]. |
| public String | Returns: the system identifier String object, or null if there is none.Implements com. A document type declaration information item has the following properties: 1. |
| public String | Returns: the document version String objectthe document handle documentHandle)Implements com. Return a string representing the XML version of the document. |
| public DTDHandler | Returns: null if this model doesn't respond to SAX dtd events.Implements com. Return this DTM's DTDHandler. |
| public int | Returns: The handle of the matching element.The unique elementId)id value for an element.Implements com. Returns the |
| public EntityResolver | Returns: null if this model doesn't respond to SAX entity ref events.Implements com. Return this DTM's EntityResolver. |
| public ErrorHandler | Returns: null if this model doesn't respond to SAX error events.Implements com. Return this DTM's ErrorHandler. |
| public int | Returns: the expanded-name id of the node.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 | Returns: the expanded-name id of the node.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 | Returns: Handle of first attribute, or DTM.NULL to indicate none exists.int Handle of the Element node. nodeHandle)Implements com. Given a node handle, get the index of the node's first attribute. |
| public int | Returns: int DTM node-number of first child, or DTM.NULL to indicate none exists.int Handle of the node. nodeHandle)Implements com. Given a node handle, get the handle of the node's first child. |
| public int | Returns: handle of first namespace, or DTM.NULL to indicate none exists.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 namespace declarations should be
returned. inScope)Implements com. Given a node handle, get the index of the node's first child. |
| public int | Returns: int Node-number of last child, or DTM.NULL to indicate none exists.int Handle of the node. nodeHandle)Implements com. Given a node handle, advance to its last child. |
| public short | Returns: the number of ancestors, plus oneThe node id. nodeHandle)Implements com. Get the depth level of this node in the tree (equals 1 for a parentless node). |
| public LexicalHandler | Returns: null if this model doesn't respond to lexical SAX events, "this" if the DTM object has a built-in SAX ContentHandler, the IncrementalSAXSource if we're bound to one and should receive the SAX stream via it for incremental build purposes...Implements com. Return this DTM's lexical handler. |
| public String | Returns: String Local name of this node.the id of the node. nodeHandle)Implements com. Given a node handle, return its DOM-style localname. |
| public String | Returns: String Local name of this node.an ID that represents an expanded-name. ExpandedNameID)Implements com. Given an expanded-name ID, return the local name part. |
| public DTMStringPool | Returns: DTMStringPool reference to an instance of table.Get a reference pointer to the element name symbol table. |
| public String | Returns: String URI value of this node's namespace, or null if no namespace was resolved.an ID that represents an expanded-name. ExpandedNameID)Implements com. Given an expanded-name ID, return the namespace URI part. |
| public String | Returns: String URI value of this node's namespace, or null if no namespace was resolved.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 | Returns: int DTM node-number of the resolved attr, or DTM.NULL to indicate none exists.int Handle of the node. nodeHandle)Implements com. Given a node handle, advance to the next attribute. |
| public int | Returns: handle of next descendant, or DTM.NULL to indicate none exists.int Handle of the node. nodeHandle)Given a node handle, advance to its next descendant. |
| public int | Returns: handle of next sibling, or DTM.NULL to indicate none exists.the start of the axis that is being traversed. axisContextHandle, int nodeHandle)Given a node handle, advance to the next node on the following axis. |
| public int | Returns: handle of next namespace, or DTM.NULL to indicate none exists.handle to node which must be of type NAMESPACE_NODE. namespaceHandle, boolean inScope)Implements com. Given a namespace handle, advance to the next namespace. |
| public int | Returns: int Node-number of preceding sibling, or DTM.NULL to indicate none exists.the start of the axis that is being traversed. axisContextHandle, int the id of the node. nodeHandle)Given a node handle, advance to the next node on the preceding axis. |
| public int | Returns: int Node-number of next sibling, or DTM.NULL to indicate none exists.int Handle of the node. nodeHandle)Implements com. Given a node handle, advance to its next sibling. |
| public Node | Returns: A node representation of the DTM node.The node ID. nodeHandle)Implements com. Return an DOM node for the given node. |
| public String | Returns: String Name of this node, which may be an empty string. %REVIEW% Document when empty string is possible...the id of the node. nodeHandle)Implements com. Given a node handle, return its DOM-style node name. |
| public String | Returns: String Name of this node.the id of the node. nodeHandle)Implements com. Given a node handle, return the XPath node name. |
| public short | Returns: int Node type, as per the DOM's Node._NODE constants.The node id. nodeHandle)Implements com. Given a node handle, return its DOM-style node type. |
| public String | Returns: String Value of this node, or null if not meaningful for this node type.The node id. nodeHandle)Implements com. Given a node handle, return its node value. |
| public DTMStringPool | Returns: DTMStringPool reference to an instance of table.Get a reference pointer to the namespace URI symbol table. |
| public int | Returns: int Node handle of owning document, or NULL if the nodeHandle is a document.the id of the node. nodeHandle)Implements com. Given a node handle, find the owning document node. |
| public int | Returns: int Node-number of parent, or DTM.NULL to indicate none exists.the id of the node. nodeHandle)Implements com. Given a node handle, find its parent node. |
| public String | Returns: String prefix of this node's name, or "" if no explicit namespace prefix was given.the id of the node. nodeHandle)Implements com. Given a namespace handle, return the prefix that the namespace decl is mapping. |
| public DTMStringPool | Returns: DTMStringPool reference to an instance of table.Get a reference pointer to the prefix name symbol table. |
| public int | Returns: int Node-number of the previous sib, or DTM.NULL to indicate none exists.the id of the node. nodeHandle)Implements com. Given a node handle, find its preceeding sibling. |
| public SourceLocator | Returns: nullan node)int valueImplements com. Source information is not handled yet, so return
|
| public XMLString | Returns: A string object that represents the string-value of the given node.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[] | Returns: The character array reference where the chunk occurs.The node ID. nodeHandle, int Which chunk to get. chunkIndex, int[] An array of 2 where the start position and length of
the chunk will be returned. startAndLen)Implements com. Get a character array chunk in the string-value of a node. |
| public int | Returns: number of character array chunks in the string-value of a node.The node ID. nodeHandle)Implements com. Get number of character array chunks in the string-value of a node. |
| public DTMAxisIterator | Returns: A DTMAxisIterator, or null if the given axis isn't supported.An extended type ID. type)Implements com. Get an iterator that can navigate over an XPath Axis, predicated by the extended type ID. |
| public String | Returns: String containing the URI of the Unparsed Entity, or an empty string if no such entity exists.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 | Returns: int true if the given node has child nodes.int Handle of the node. nodeHandle)Implements com. Given a node handle, test if it has child nodes. |
| public void | ignorableWhitespace(char[] ch, int start, int length)
Implements org. Receive notification of ignorable whitespace in element content. |
| pack-priv final void | initDocument(int
the handle for the DTM document. documentNumber)Reset a dtm document to its initial (empty) state. |
| public boolean | Returns: true if the attribute was specified;
false if it was defaulted.the attribute handle attributeHandle)Implements com. 5. |
| public boolean | Returns: true if the character data is whitespace;
false otherwise.the node ID. nodeHandle)Implements com. 2. |
| public boolean | Returns: true if all declarations were processed;
false otherwise.A node handle that must identify a document. documentHandle)Implements com. 10. |
| public boolean | Returns: false if node2 comes before node1, otherwise return true. You can think of this as(node1.documentOrderPosition <= node2.documentOrderPosition).DOM Node to perform position comparison on. nodeHandle1, int DOM Node to perform position comparison on . nodeHandle2)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 | Returns: Returnstrue if the specified feature is
supported on this node, false otherwise.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 void | migrateTo(DTMManager
the DTMManager manager)Implements com. Migrate a DTM built with an old DTMManager to a new DTMManager. |
| public boolean | needsTwoThreads()
Implements com. Returns: true iff we're building this model incrementally (eg we're partnered with a IncrementalSAXSource) and thus require that the transformation and the parse run simultaneously. |
| private void | |
| public void | processingInstruction(String target, String data)
Implements org. Receive notification of a processing instruction. |
| pack-priv void | setContentBuffer(FastStringBuffer
FastStringBuffer reference to an instance of
buffer buffer)Set a reference pointer to the content-text repository |
| 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 void | setDocumentLocator(Locator locator)
Implements org. Receive an object for locating the origin of SAX document events. |
| public void | setFeature(String
A feature URL. featureId, boolean true if this feature should be on, false otherwise. state)Implements com. Set an implementation dependent feature. |
| public void | setIncrementalSAXSource(IncrementalSAXSource
The IncrementalSAXSource that we want to recieve events from
on demand. source)Bind a IncrementalSAXSource to this DTM. |
| public void | setLocalNameTable(DTMStringPool
DTMStringPool reference to an instance of table. poolRef)Set a reference pointer to the element name symbol table. |
| public void | setNsNameTable(DTMStringPool
DTMStringPool reference to an instance of table. poolRef)Set a reference pointer to the namespace URI symbol table. |
| public void | setPrefixNameTable(DTMStringPool
DTMStringPool reference to an instance of table. poolRef)Set a reference pointer to the prefix name symbol table. |
| public void | setProperty(String
a property, Object String valuean value)Object valueImplements com. For the moment all the run time properties are ignored by this class. |
| public void | skippedEntity(String name)
Implements org. Receive notification of a skipped entity. |
| public void | startCDATA()
Implements org. Report the start of a CDATA section. |
| public void | startDocument()
Implements org. Receive notification of the beginning of a document. |
| public void | startDTD(String name, String publicId, String systemId)
Implements org. Report the start of DTD declarations, if any. |
| public void | startElement(String namespaceURI, String localName, String qName, Attributes atts)
Implements org. Receive notification of the beginning of an element. |
| public void | startEntity(String name)
Implements org. Report the beginning of some internal and external XML entities. |
| public void | startPrefixMapping(String prefix, String uri)
Implements org. Begin the scope of a prefix-URI Namespace mapping. |
| public boolean | supportsPreStripping()
Implements com. Return true if the xsl:strip-space or xsl:preserve-space was processed during construction of the DTM document. |