net.sf.saxon.dom4j
Class DocumentWrapper
- DocumentInfo, Item, NodeInfo, Source, Item, NodeInfo, PullEvent, SiblingCountingNode, ValueRepresentation, VirtualNode
public class DocumentWrapper
The root node of an XPath tree. (Or equivalently, the tree itself).
This class should have been named Root; it is used not only for the root of a document,
but also for the root of a result tree fragment, which is not constrained to contain a
single top-level element.
atomize , compareOrder , copy , generateId , getAttributeValue , getBaseURI , getConfiguration , getDeclaredNamespaces , getDisplayName , getDocumentNumber , getDocumentRoot , getFingerprint , getLineNumber , getLocalPart , getNameCode , getNamePool , getNodeKind , getParent , getPrefix , getRoot , getSiblingPosition , getStringValue , getStringValueCS , getSystemId , getTypeAnnotation , getTypedValue , getURI , getUnderlyingNode , hasChildNodes , isSameNode , isSameNodeInfo , iterateAxis , iterateAxis , makeWrapper , makeWrapper , outputNamespaceNodes , setSystemId |
baseURI
protected String baseURI
documentNumber
protected int documentNumber
DocumentWrapper
public DocumentWrapper(Document doc,
String baseURI,
Configuration config)
Create a Saxon wrapper for a dom4j document
doc
- The dom4j documentbaseURI
- The base URI for all the nodes in the documentconfig
- The Saxon configuration
getUnparsedEntity
public String[] getUnparsedEntity(String name)
Get the unparsed entity with a given name
- getUnparsedEntity in interface DocumentInfo
name
- the name of the entity
- null: dom4j does not provide access to unparsed entities
selectID
public NodeInfo selectID(String id)
Get the element with a given ID, if any
- selectID in interface DocumentInfo
id
- the required ID value
- null: dom4j does not provide any information about attribute types.
setConfiguration
public void setConfiguration(Configuration config)
Set the configuration (containing the name pool used for all names in this document). Calling
this method allocates a unique number to the document (unique within the Configuration); this
will form the basis for testing node identity
config
- the configuration
wrap
public NodeInfo wrap(Object node)
Wrap a node in the dom4j document.
node
- The node to be wrapped. This must be a node in the same document
(the system does not check for this).
- the wrapping NodeInfo object