net.sf.saxon.functions

Class Collection

public class Collection extends SystemFunction

Implement the fn:collection() function. This is responsible for calling the registered CollectionURIResolver. For the effect of the default system-supplied CollectionURIResolver, see StandardCollectionURIResolver
Method Summary
PathMap.PathMapNodeSetaddToPathMap(PathMap pathMap, PathMap.PathMapNodeSet pathMapNodeSet)
Add a representation of this expression to a PathMap.
voidcheckArguments(ExpressionVisitor visitor)
intcomputeSpecialProperties()
static SequenceIteratorgetResolverResults(SequenceIterator iter, String baseURI, XPathContext context, SourceLocator locator)
StringgetStaticBaseURI()
SequenceIteratoriterate(XPathContext context)
Iterate over the contents of the collection
ExpressionpreEvaluate(ExpressionVisitor visitor)
preEvaluate: this method suppresses compile-time evaluation by doing nothing

Method Detail

addToPathMap

public PathMap.PathMapNodeSet addToPathMap(PathMap pathMap, PathMap.PathMapNodeSet pathMapNodeSet)
Add a representation of this expression to a PathMap. The PathMap captures a map of the nodes visited by an expression in a source tree.

Parameters: pathMap the PathMap to which the expression should be added pathMapNodeSet

Returns: the pathMapNode representing the focus established by this expression, in the case where this expression is the first operand of a path expression or filter expression

checkArguments

public void checkArguments(ExpressionVisitor visitor)

computeSpecialProperties

public int computeSpecialProperties()

getResolverResults

public static SequenceIterator getResolverResults(SequenceIterator iter, String baseURI, XPathContext context, SourceLocator locator)

getStaticBaseURI

public String getStaticBaseURI()

iterate

public SequenceIterator iterate(XPathContext context)
Iterate over the contents of the collection

Parameters: context the dynamic context

Returns: an iterator, whose items will always be nodes (typically but not necessarily document nodes)

Throws: XPathException

preEvaluate

public Expression preEvaluate(ExpressionVisitor visitor)
preEvaluate: this method suppresses compile-time evaluation by doing nothing

Parameters: visitor an expression visitor