public interface TreeInfo extends 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
|
String[] |
getUnparsedEntity(String name)
Get the unparsed entity with a given name
|
Iterator<String> |
getUnparsedEntityNames()
Get the list of unparsed entities defined in this document
|
Object |
getUserData(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(String id,
boolean getParent)
Get the element with a given ID, if any
|
void |
setUserData(String key,
Object value)
Set user data on the document node.
|
getSystemId, setSystemId
NodeInfo getRootNode()
Configuration getConfiguration()
long getDocumentNumber()
boolean isTyped()
NodeInfo selectID(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.Iterator<String> getUnparsedEntityNames()
String[] getUnparsedEntity(String name)
name
- the name of the entityvoid setUserData(String key, 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:".value
- The value to be set for the property. May be null, which effectively
removes the existing value for the property.Object getUserData(String key)
setUserData(java.lang.String, java.lang.Object)
key
- A string giving the name of the property to be retrieved.Copyright (c) 2004-2014 Saxonica Limited. All rights reserved.