| java.lang.Object net.sf.saxon.xom.NodeWrapper net.sf.saxon.xom.DocumentWrapper
DocumentWrapper | public class DocumentWrapper extends NodeWrapper implements DocumentInfo(Code) | | The root node of an XPath tree. (Or equivalently, the tree itself).
This class is used not only for a document, but also for the root
of a document-less tree fragment.
author: Michael H. Kay author: Wolfgang Hoschek (ported net.sf.saxon.jdom to XOM) |
documentNumber | protected int documentNumber(Code) | | |
DocumentWrapper | public DocumentWrapper(Node root, String baseURI, Configuration config)(Code) | | Create a Saxon wrapper for a XOM root node
Parameters: root - The XOM root node Parameters: baseURI - The base URI for all the nodes in the tree Parameters: config - The configuration which defines the name pool used for allnames in this tree |
getConfiguration | public Configuration getConfiguration()(Code) | | Get the configuration previously set using setConfiguration
|
getDocumentNumber | public int getDocumentNumber()(Code) | | Get the unique document number for this document (the number is unique
for all documents within a NamePool)
the unique number identifying this document within the name pool |
getNamePool | public NamePool getNamePool()(Code) | | Get the name pool used for the names in this document
the name pool in which all the names used in this document areregistered |
getUnparsedEntity | public String[] getUnparsedEntity(String name)(Code) | | Get the unparsed entity with a given name
Parameters: name - the name of the entity null: XOM does not provide access to unparsed entities if the entity exists, return an array of two Strings, the firstholding the system ID of the entity, the second holding thepublic ID if there is one, or null if not. If the entity does notexist, return null. |
selectID | public NodeInfo selectID(String id)(Code) | | Get the element with a given ID, if any
Parameters: id - the required ID value the element with the given ID, or null if there is no such IDpresent (or if the parser has not notified attributes as being oftype ID). |
setConfiguration | public void setConfiguration(Configuration config)(Code) | | Set the configuration, which defines the name pool used for all names in
this document. This is always called after a new document has been
created. The implementation must register the name pool with the
document, so that it can be retrieved using getNamePool(). It must also
call NamePool.allocateDocumentNumber(), and return the relevant document
number when getDocumentNumber() is subsequently called.
Parameters: config - The configuration to be used |
wrap | public NodeInfo wrap(Node node)(Code) | | Wrap a node in the XOM document.
Parameters: node - The node to be wrapped. This must be a node in the samedocument (the system does not check for this). the wrapping NodeInfo object |
|
|