com.ibm.xml.xapi
Interface XCollectionResolver
public interface XCollectionResolver
Implement this class to resolve the URI provided on a call to
fn:collection
to a sequence of nodes.
If no collection resolver is registered with the XDynamicContext
then calls to fn:collection
will result in a recoverable error
and the empty sequence is used for the collection.
- See Also:
XDynamicContext.setCollectionResolver(XCollectionResolver)
getCollection
XSequenceCursor getCollection(String uri,
String base)
- Get the collection for the given URI and base. If the URI is the empty
string then the default collection should be returned.
Utilities on
XItemFactory
can be used to create
an XSequenceCursor
from other types such as DOM NodeList
or an array of XItemView
. Note that the resulting
sequence must be a sequence of nodes. If the URI cannot be resolved
then the implementation may throw an uncaught exception. Empty sequences are
represented by null
so a return value of null
will be treated as an empty sequence.
- Parameters:
uri
- The URI provided on the fn:collection
call.base
- The base URI from the static context.
- Returns:
- The sequence of nodes as an
XSequenceCursor
- See Also:
XItemFactory
,
XFactory.getItemFactory()