public class CurrentGroupCall extends Expression implements Callable
EFFECTIVE_BOOLEAN_VALUE, EVALUATE_METHOD, ITEM_FEED_METHOD, ITERATE_METHOD, MAX_SEQUENCE_LENGTH, MAX_STRING_LENGTH, PROCESS_METHOD, staticProperties, UNBOUNDED_LOWER, UNBOUNDED_UPPER, UPDATE_METHOD, WATCH_METHOD
Constructor and Description |
---|
CurrentGroupCall() |
Modifier and Type | Method and Description |
---|---|
Sequence |
call(XPathContext context,
Sequence[] arguments)
Call the Callable (used from generated bytecode).
|
protected int |
computeCardinality()
Compute the static cardinality of this expression
|
int |
computeSpecialProperties()
Determine the special properties of this expression.
|
Expression |
copy(RebindingMap rebindings)
Copy an expression.
|
void |
export(ExpressionPresenter out)
Diagnostic print of expression structure.
|
ForEachGroup |
getControllingInstruction()
Get the innermost containing xsl:for-each-group instruction, if there is one
|
int |
getImplementationMethod()
An implementation of Expression must provide at least one of the methods evaluateItem(), iterate(), or process().
|
int |
getIntrinsicDependencies()
Determine the dependencies
|
ItemType |
getItemType()
Determine the item type of the value returned by the function
|
CurrentGroupAdjunct |
getStreamingAdjunct()
Get a class that supports streamed evaluation of this expression
|
boolean |
isInLoop()
Determine whether the current-group() function is executed repeatedly within a single iteration
of the containing xsl:for-each-group
|
SequenceIterator |
iterate(XPathContext c)
Return an iteration over the result sequence
|
void |
setControllingInstruction(ForEachGroup instruction,
ItemType itemType,
boolean isInLoop)
Set the containing xsl:for-each-group instruction, if there is one
|
String |
toShortString()
Produce a short string identifying the expression for use in error messages
|
String |
toString()
The toString() method for an expression attempts to give a representation of the expression
in an XPath-like form.
|
addToPathMap, adoptChildExpression, checkedOperands, checkForUpdatingSubexpressions, checkPermittedContents, clearStreamabilityData, computeDependencies, computeStaticProperties, doPromotion, dynamicError, effectiveBooleanValue, evaluateAsString, evaluateItem, evaluatePendingUpdates, explain, getCardinality, getConfiguration, getConstructType, getCost, getDependencies, getEvaluationMethod, getExpressionCompiler, getExpressionName, getHostLanguage, getIntegerBounds, getInterpretedExpression, getLocation, getNetCost, getObjectName, getPackageData, getParentExpression, getPosture, getPostureAndSweepIfKnown, getProperties, getProperty, getRetainedStaticContext, getSlotsUsed, getSpecialProperties, getStaticBaseURI, getStaticBaseURIString, getStreamability, getSweep, getSystemId, hasVariableBinding, identityHashCode, implementsStaticTypeCheck, isCallOn, isCallOnSystemFunction, isIdentical, isSubtreeExpression, isUpdatingExpression, isVacuousExpression, iterateEvents, makeStreamingAdjunct, markTailFunctionCalls, operandList, operands, operandSparseList, optimize, optimizeChildren, optimizeForType, process, promote, promoteChildren, resetLocalStaticProperties, restoreParentPointers, setEvaluationMethod, setFiltered, setFlattened, setLocation, setParentExpression, setPostureAndSweep, setRetainedStaticContext, setRetainedStaticContextLocally, setStaticProperty, simplify, simplifyChildren, staticTypeCheck, suppressValidation, toPattern, toStreamingPattern, typeCheck, typeCheckChildren, typeError, unordered
public void setControllingInstruction(ForEachGroup instruction, ItemType itemType, boolean isInLoop)
instruction
- the (innermost) containing xsl:for-each-group instructionitemType
- the statically inferred item type of the grouping populationisInLoop
- true if the current-group() expression is evaluated more than once during
evaluation of the body of the for-each-group instructionpublic ForEachGroup getControllingInstruction()
public boolean isInLoop()
public ItemType getItemType()
getItemType
in class Expression
public int getIntrinsicDependencies()
getIntrinsicDependencies
in class Expression
protected int computeCardinality()
computeCardinality
in class Expression
StaticProperty.ALLOWS_ZERO_OR_ONE
,
StaticProperty.EXACTLY_ONE
, StaticProperty.ALLOWS_ONE_OR_MORE
,
StaticProperty.ALLOWS_ZERO_OR_MORE
public int getImplementationMethod()
getImplementationMethod
in class Expression
Expression.ITERATE_METHOD
or Expression.EVALUATE_METHOD
or
Expression.PROCESS_METHOD
public void export(ExpressionPresenter out) throws XPathException
export
in class Expression
out
- the expression presenter used to display the structureXPathException
- if the export fails, for example if an expression is found that won't work
in the target environment.public int computeSpecialProperties()
computeSpecialProperties
in class Expression
StaticProperty.NON_CREATIVE
(unless the variable is assignable using saxon:assign)public Expression copy(RebindingMap rebindings)
Expression
copy
in class Expression
rebindings
- if a local variable is encountered whose binding is present in this
map, then the binding will be replaced with a new binding.public SequenceIterator iterate(XPathContext c) throws XPathException
iterate
in class Expression
c
- supplies the context for evaluationXPathException
- if any dynamic error occurs evaluating the
expressionpublic Sequence call(XPathContext context, Sequence[] arguments) throws XPathException
call
in interface Callable
context
- the dynamic evaluation contextarguments
- the values of the arguments, supplied as Sequences.
Generally it is advisable, if calling iterate() to process a supplied sequence, to
call it only once; if the value is required more than once, it should first be converted
to a GroundedValue
by calling the utility method
SequenceTool.toGroundedValue().
If the expected value is a single item, the item should be obtained by calling
Sequence.head(): it cannot be assumed that the item will be passed as an instance of
Item
or AtomicValue
.
It is the caller's responsibility to perform any type conversions required to convert arguments to the type expected by the callee. An exception is where this Callable is explicitly an argument-converting wrapper around the original Callable.
XPathException
- if a dynamic error occurs during the evaluation of the expressionpublic String toString()
The toString() method for an expression attempts to give a representation of the expression in an XPath-like form.
For subclasses of Expression that represent XPath expressions, the result should always be a string that parses as an XPath 3.0 expression. The expression produced should be equivalent to the original making certain assumptions about the static context. In general the expansion will make no assumptions about namespace bindings, except that (a) the prefix "xs" is used to refer to the XML Schema namespace, and (b) the default funcion namespace is assumed to be the "fn" namespace.
In the case of XSLT instructions and XQuery expressions, the toString() method gives an abstracted view of the syntax that is not designed in general to be parseable.
toString
in class Expression
public String toShortString()
toShortString
in class Expression
public CurrentGroupAdjunct getStreamingAdjunct()
getStreamingAdjunct
in class Expression
Copyright (c) 2004-2017 Saxonica Limited. All rights reserved.