net.sf.saxon.functions

Class Collection

Implemented Interfaces:
EvaluableItem, InstructionInfoProvider, SequenceIterable, Serializable, SourceLocator

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

Field Summary

Fields inherited from class net.sf.saxon.functions.SystemFunction

operation

Fields inherited from class net.sf.saxon.expr.FunctionCall

argument

Fields inherited from class net.sf.saxon.expr.Expression

EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD, locationId, staticProperties

Method Summary

PathMap.PathMapNodeSet
addToPathMap(PathMap pathMap, PathMap.PathMapNodeSet pathMapNodeSet)
Add a representation of this expression to a PathMap.
void
checkArguments(ExpressionVisitor visitor)
static SequenceIterator
getResolverResults(SequenceIterator iter, String baseURI, XPathContext context, SourceLocator locator)
String
getStaticBaseURI()
SequenceIterator
iterate(XPathContext context)
Iterate over the contents of the collection
Expression
preEvaluate(ExpressionVisitor visitor)
preEvaluate: this method suppresses compile-time evaluation by doing nothing

Methods inherited from class net.sf.saxon.functions.SystemFunction

addContextDocumentArgument, addDocToPathMap, checkArguments, computeCardinality, computeSpecialProperties, copy, getDetails, getErrorCodeForTypeErrors, getItemType, getRequiredType, makeSystemFunction, optimize, setDetails, useContextItemAsDefault

Methods inherited from class net.sf.saxon.expr.FunctionCall

addExternalFunctionCallToPathMap, checkArgumentCount, checkArguments, equals, explain, getArguments, getDisplayName, getFunctionName, getNumberOfArguments, hashCode, iterateSubExpressions, optimize, preEvaluate, promote, replaceSubExpression, setArguments, setFunctionName, simplify, simplifyArguments, toString, typeCheck

Methods inherited from class net.sf.saxon.expr.Expression

addToPathMap, adoptChildExpression, checkPermittedContents, computeCardinality, computeDependencies, computeSpecialProperties, computeStaticProperties, copy, display, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, explain, explain, findParentOf, getCardinality, getColumnNumber, getConstructType, getContainer, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getInstructionInfo, getIntrinsicDependencies, getItemType, getLineNumber, getLocationId, getLocationProvider, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasLoopingSubexpression, implementsStaticTypeCheck, iterate, iterateEvents, iterateSubExpressions, markTailFunctionCalls, optimize, process, promote, replaceSubExpression, resetLocalStaticProperties, setContainer, setFiltered, setFlattened, setLocationId, simplify, staticTypeCheck, suppressValidation, toString, typeCheck, typeError

Method Details

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.
Overrides:
addToPathMap in interface Expression
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)
            throws XPathException
Overrides:
checkArguments in interface SystemFunction

getResolverResults

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

getStaticBaseURI

public String getStaticBaseURI()

iterate

public SequenceIterator iterate(XPathContext context)
            throws XPathException
Iterate over the contents of the collection
Specified by:
iterate in interface SequenceIterable
Overrides:
iterate in interface Expression
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
Overrides:
preEvaluate in interface FunctionCall
Parameters:
visitor - an expression visitor