net.sf.saxon.om
public final class DocumentPool extends Object implements Serializable
The function of allocating document numbers is performed by the DocumentNumberAllocator in the Configuration, not by the DocumentPool. This has a number of effects: in particular it allows operations involving multiple documents (such as generateId() and document()) to occur in a free-standing XPath environment.
Method Summary | |
---|---|
void | add(DocumentInfo doc, String uri)
Add a document to the pool |
DocumentInfo | discard(DocumentInfo doc)
Release a document from the document pool. |
DocumentInfo | find(String uri)
Get the document with a given document-uri |
String | getDocumentURI(NodeInfo doc)
Get the URI for a given document node, if it is present in the pool. |
boolean | isMarkedUnavailable(String uri)
Ask whether a document URI is in the set of URIs known to be unavailable, because doc-available()
has been previously called and has returned false |
void | markUnavailable(String uri)
Add a document URI to the set of URIs known to be unavailable (because doc-available() has returned
false |
Parameters: doc The DocumentInfo for the document in question uri The document-uri property of the document.
Parameters: doc the document to be discarded from the pool
Returns: the document supplied in the doc parameter
Parameters: uri The document-uri property of the document.
Returns: the DocumentInfo with the given document-uri property if it exists, or null if it is not found.
Parameters: doc The document node
Returns: The uri of the document node, if present in the pool, or the systemId of the document node otherwise
Parameters: uri the URI of the unavailable document