Class ForMemberClause
java.lang.Object
net.sf.saxon.expr.flwor.Clause
net.sf.saxon.expr.flwor.ForClause
net.sf.saxon.expr.flwor.ForMemberClause
A "for member" clause in a FLWOR expression (XQuery 4.0: iterates over members of an array)
-
Nested Class Summary
Nested classes/interfaces inherited from class Clause
Clause.ClauseName -
Field Summary
Fields inherited from class ForClause
allowsEmpty, positionVariable, rangeVariable, sequenceOp -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanaddPredicate(FLWORExpression flwor, ExpressionVisitor visitor, ContextItemStaticInfo contextItemType, Expression condition) Convert where clause to a predicate.voidaddToPathMap(PathMap pathMap, PathMap.PathMapNodeSet pathMapNodeSet) Collect information about the navigation paths followed by this clause, for document projection purposescopy(FLWORExpression flwor, RebindingMap rebindings) Create a copy of this clauseGet a keyword identifying what kind of clause this isgetPullStream(TuplePull base, XPathContext context) Get a tuple stream that implements the functionality of this clause, taking its input from another tuple stream which this clause modifiesgetPushStream(TuplePush destination, Outputter output, XPathContext context) Get a push-mode tuple stream that implements the functionality of this clause, supplying its output to another tuple streamvoidrefineVariableType(ExpressionVisitor visitor, List<VariableReference> references, Expression returnExpr) Supply improved type information to the expressions that contain references to the variables declared in this clausevoidtypeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) Type-check the expressionMethods inherited from class ForClause
explain, gatherVariableReferences, getPositionVariable, getRangeVariable, getRangeVariables, getSequence, initSequence, isAllowingEmpty, processOperands, setAllowingEmpty, setPositionVariable, setRangeVariable, setSequence, toShortString, toStringMethods inherited from class Clause
containsNonInlineableVariableReference, getConfiguration, getLocation, getPackageData, getTraceInfo, isRepeated, optimize, setLocation, setPackageData, setRepeated
-
Constructor Details
-
ForMemberClause
public ForMemberClause()
-
-
Method Details
-
getClauseKey
Description copied from class:ClauseGet a keyword identifying what kind of clause this is- Overrides:
getClauseKeyin classForClause- Returns:
- the kind of clause
-
copy
Description copied from class:ClauseCreate a copy of this clause -
typeCheck
public void typeCheck(ExpressionVisitor visitor, ContextItemStaticInfo contextInfo) throws XPathException Type-check the expression- Overrides:
typeCheckin classForClause- Parameters:
visitor- the ExpressionVisitor, providing access to static context informationcontextInfo- static information about the dynamic context- Throws:
XPathException- if any error is detected
-
getPullStream
Get a tuple stream that implements the functionality of this clause, taking its input from another tuple stream which this clause modifies- Overrides:
getPullStreamin classForClause- Parameters:
base- the input tuple streamcontext- the XPath dynamic context- Returns:
- the output tuple stream
-
getPushStream
Get a push-mode tuple stream that implements the functionality of this clause, supplying its output to another tuple stream- Overrides:
getPushStreamin classForClause- Parameters:
destination- the output tuple streamoutput- the destination for the resultcontext- the dynamic evaluation context- Returns:
- the push tuple stream that implements the functionality of this clause of the FLWOR expression
-
addPredicate
public boolean addPredicate(FLWORExpression flwor, ExpressionVisitor visitor, ContextItemStaticInfo contextItemType, Expression condition) throws XPathException Convert where clause to a predicate.- Overrides:
addPredicatein classForClause- Parameters:
flwor- the FLWOR expression (sans the relevant part of the where clause)visitor- the expression visitorcontextItemType- the item type of the context itemcondition- the predicate to be added. This will always be a single term (never a composite condition using "and"), as the where clause is split into separate terms before calling this method- Returns:
- true if the expression has been changed, that is, if the where clause has been converted
- Throws:
XPathException- if an error is encountered
-
refineVariableType
public void refineVariableType(ExpressionVisitor visitor, List<VariableReference> references, Expression returnExpr) Description copied from class:ClauseSupply improved type information to the expressions that contain references to the variables declared in this clause- Overrides:
refineVariableTypein classForClause- Parameters:
visitor- the expression visitorreferences- the list of variable referencesreturnExpr- the expression in the return clause
-
addToPathMap
Description copied from class:ClauseCollect information about the navigation paths followed by this clause, for document projection purposes- Overrides:
addToPathMapin classForClause- Parameters:
pathMap- the path map in which the data is to be collectedpathMapNodeSet- the path map node set representing the paths to the context item
-