Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## net.sf.saxon.om
Class DocumentPool

    java.lang.Object
      net.sf.saxon.om.DocumentPool

public final class DocumentPool
extends java.lang.Object

An object representing the collection of documents handled during a single transformation.

From Saxon 7.2, the function of allocating document numbers is performed by the NamePool, 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.

Constructor Summary
`DocumentPool()`

Method Summary
`void` | `add(DocumentInfo doc, java.lang.String name)` Add a document to the pool
`DocumentInfo` | `discard(DocumentInfo doc)` Release a document from the document pool.
`DocumentInfo` | `find(java.lang.String name)` Get the document with a given name

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DocumentPool

    public DocumentPool()

Method Detail

### add

    public void add(DocumentInfo doc,
                    java.lang.String name)

  Add a document to the pool

  Parameters:
    `doc` - The DocumentInfo for the document in question
    `name` - The name of the document.

### find

    public DocumentInfo find(java.lang.String name)

  Get the document with a given name

  Returns:
    the DocumentInfo with the given name if it exists, or null if it is not found.

### discard

    public DocumentInfo discard(DocumentInfo doc)

  Release a document from the document pool. This means that if the same document is loaded again later, the source will need to be re-parsed, and nodes will get new identities.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD