public interface TreeInfo
extends javax.xml.transform.Source
Java object identity for TreeInfo objects equates to XPath node identity for the root nodes of the relevant trees: that is, two root nodes are "the same node" if and only if their TreeInfo objects are the same Java object. However, when sorting into document order, the order of trees is based on their "document number", a unique number allocated by the document number allocator for the Configuration.
Modifier and Type | Method and Description |
---|---|
Configuration |
getConfiguration()
Get the Configuration to which this document belongs
|
long |
getDocumentNumber()
Get the document number, which identifies this tree uniquely within a Configuration
|
NodeInfo |
getRootNode()
Get the NodeInfo object representing the document node at the root of the tree
|
java.lang.String[] |
getUnparsedEntity(java.lang.String name)
Get the unparsed entity with a given name
|
java.util.Iterator<java.lang.String> |
getUnparsedEntityNames()
Get the list of unparsed entities defined in this document
|
java.lang.Object |
getUserData(java.lang.String key)
Get user data held in the document node.
|
boolean |
isTyped()
Ask whether the document contains any nodes whose type annotation is anything other than
UNTYPED or UNTYPED_ATOMIC
|
NodeInfo |
selectID(java.lang.String id,
boolean getParent)
Get the element with a given ID, if any
|
void |
setUserData(java.lang.String key,
java.lang.Object value)
Set user data on the document node.
|
NodeInfo getRootNode()
Configuration getConfiguration()
long getDocumentNumber()
boolean isTyped()
NodeInfo selectID(java.lang.String id, boolean getParent)
id
- the required ID valuegetParent
- true if running the element-with-id() function rather than the id()
function; the difference is that in the case of an element of type xs:ID, the parent of
the element should be returned, not the element itself.java.util.Iterator<java.lang.String> getUnparsedEntityNames()
java.lang.String[] getUnparsedEntity(java.lang.String name)
name
- the name of the entityvoid setUserData(java.lang.String key, java.lang.Object value)
getUserData(java.lang.String)
key
- A string giving the name of the property to be set. Clients are responsible
for choosing a key that is likely to be unique. Must not be null. Keys used internally
by Saxon are prefixed "saxon:".
The key saxon:document-uri
may be used to set the document-uri
property of the document node. If this is set to a non-empty string, the result
of the document-uri() function on the document node will be that string, as an
instance of xs:anyURI. If it is set to a zero-length string, the result of
document-uri() will be the empty sequence, ().
value
- The value to be set for the property. May be null, which effectively
removes the existing value for the property.java.lang.Object getUserData(java.lang.String key)
setUserData(java.lang.String, java.lang.Object)
key
- A string giving the name of the property to be retrieved.Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.