Package net.sf.saxon.functions
Class Collection
- java.lang.Object
-
- net.sf.saxon.expr.Expression
-
- net.sf.saxon.expr.FunctionCall
-
- net.sf.saxon.functions.SystemFunction
-
- net.sf.saxon.functions.Collection
-
- All Implemented Interfaces:
java.io.Serializable
,javax.xml.transform.SourceLocator
,LocationProvider
,SaxonLocator
,EvaluableItem
,SequenceIterable
,InstructionInfo
,org.xml.sax.Locator
public class Collection extends SystemFunction
Implement the fn:collection() function. This is responsible for calling the registeredCollectionURIResolver
. For the effect of the default system-supplied CollectionURIResolver, seeStandardCollectionURIResolver
- See Also:
- Serialized Form
-
-
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, locationId, PROCESS_METHOD, staticProperties
-
-
Constructor Summary
Constructors Constructor Description Collection()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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 checkingstatic SequenceIterator
getResolverResults(SequenceIterator iter, java.lang.String baseURI, XPathContext context, javax.xml.transform.SourceLocator locator)
java.lang.String
getStaticBaseURI()
SequenceIterator
iterate(XPathContext context)
Iterate over the contents of the collectionExpression
preEvaluate(ExpressionVisitor visitor)
preEvaluate: this method suppresses compile-time evaluation by doing nothing-
Methods inherited from class net.sf.saxon.functions.SystemFunction
addContextDocumentArgument, addDocToPathMap, computeCardinality, computeSpecialProperties, copy, getDetails, getErrorCodeForTypeErrors, getItemType, getRequiredType, makeSystemFunction, optimize, setDetails, useContextItemAsDefault
-
Methods inherited from class net.sf.saxon.expr.FunctionCall
addExternalFunctionCallToPathMap, checkArgumentCount, equals, explain, getArguments, getDisplayName, getFunctionName, getNumberOfArguments, hashCode, iterateSubExpressions, promote, replaceSubExpression, setArguments, setFunctionName, simplify, simplifyArguments, toString, typeCheck
-
Methods inherited from class net.sf.saxon.expr.Expression
adoptChildExpression, checkForUpdatingSubexpressions, checkPermittedContents, computeDependencies, computeStaticProperties, display, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, findParentOf, getCardinality, getColumnNumber, getColumnNumber, getConstructType, getContainer, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getIntrinsicDependencies, getLineNumber, getLineNumber, getLocationId, getLocationProvider, getObjectName, getProperties, getProperty, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, getSystemId, hasLoopingSubexpression, implementsStaticTypeCheck, isUpdatingExpression, iterateEvents, markTailFunctionCalls, process, resetLocalStaticProperties, setContainer, setFiltered, setFlattened, setLocationId, staticTypeCheck, suppressValidation, typeError
-
-
-
-
Method Detail
-
getStaticBaseURI
public java.lang.String getStaticBaseURI()
-
checkArguments
public void checkArguments(ExpressionVisitor visitor) throws XPathException
Description copied from class:SystemFunction
Method called during static type checking- Overrides:
checkArguments
in classSystemFunction
- 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 classFunctionCall
- 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 classExpression
- Parameters:
pathMap
- the PathMap to which the expression should be addedpathMapNodeSet
-- 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 interfaceSequenceIterable
- Overrides:
iterate
in classExpression
- 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, java.lang.String baseURI, XPathContext context, javax.xml.transform.SourceLocator locator)
-
-