net.sf.saxon.functions
Class Collection

java.lang.Object
  extended by net.sf.saxon.expr.Expression
      extended by net.sf.saxon.expr.FunctionCall
          extended by net.sf.saxon.functions.SystemFunction
              extended by net.sf.saxon.functions.Collection
All Implemented Interfaces:
Serializable, SourceLocator, EvaluableItem, SequenceIterable, InstructionInfoProvider

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

See Also:
Serialized Form

Field Summary
 
Fields inherited from class net.sf.saxon.expr.Expression
EVALUATE_METHOD, ITERATE_METHOD, PROCESS_METHOD
 
Constructor Summary
Collection()
           
 
Method Summary
 PathMap.PathMapNodeSet addToPathMap(PathMap pathMap, PathMap.PathMapNodeSet pathMapNodeSet)
          Add a representation of this expression to a PathMap.
 void checkArguments(ExpressionVisitor visitor)
          Method called during static type checking
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
addDocToPathMap, computeCardinality, computeSpecialProperties, copy, getDetails, getErrorCodeForTypeErrors, getItemType, makeSystemFunction, optimize, setDetails
 
Methods inherited from class net.sf.saxon.expr.FunctionCall
addExternalFunctionCallToPathMap, equals, explain, getArguments, getDisplayName, getFunctionName, getNumberOfArguments, hashCode, iterateSubExpressions, promote, replaceSubExpression, setArguments, setFunctionName, simplify, toString, typeCheck
 
Methods inherited from class net.sf.saxon.expr.Expression
adoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, display, doPromotion, effectiveBooleanValue, evaluateAsString, evaluateItem, explain, findParentOf, getCardinality, getColumnNumber, getContainer, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getInstructionInfo, getIntrinsicDependencies, getLineNumber, getLocationId, getLocationProvider, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasLoopingSubexpression, implementsStaticTypeCheck, iterateEvents, markTailFunctionCalls, process, setContainer, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Collection

public Collection()
Method Detail

getStaticBaseURI

public String getStaticBaseURI()

checkArguments

public void checkArguments(ExpressionVisitor visitor)
                    throws XPathException
Description copied from class: SystemFunction
Method called during static type checking

Overrides:
checkArguments in class SystemFunction
Parameters:
visitor - the expression visitor
Throws:
XPathException

preEvaluate

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

Overrides:
preEvaluate in class FunctionCall
Parameters:
visitor - an expression visitor
Returns:
the result of the early evaluation, or the original expression, or potentially a simplified expression

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 class 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

iterate

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

Specified by:
iterate in interface SequenceIterable
Overrides:
iterate in class Expression
Parameters:
context - the dynamic context
Returns:
an iterator, whose items will always be nodes (typically but not necessarily document nodes)
Throws:
XPathException

getResolverResults

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


Copyright (C) Michael H. Kay. All rights reserved.