com.saxonica.extra
Class ForEachGroupFunction
java.lang.Object
  
net.sf.saxon.expr.Expression
      
net.sf.saxon.expr.FunctionCall
          
net.sf.saxon.functions.SystemFunction
              
com.saxonica.extra.ForEachGroupFunction
- All Implemented Interfaces: 
 - Serializable, SourceLocator, Container, EvaluableItem, SequenceIterable, InstructionInfoProvider
 
public class ForEachGroupFunction
- extends SystemFunction
 
This class implements the extension function saxon:for-each-group(). This is a higher order
 function that provides grouping capability. Its effect is similar to the XSLT 2.0 for-each-group
 instruction, but it works also in XQuery. The first argument is the population to be grouped;
 the second argument is a function that calculates the grouping key; the third argument is the action
 to be performed on each group: it gets the members of the group as its argument.
- See Also:
 - Serialized Form
 
 
 
 
 
| Methods inherited from class net.sf.saxon.functions.SystemFunction | 
checkArguments, computeCardinality, computeSpecialProperties, display, getDetails, getErrorCodeForTypeErrors, getItemType, main, makeSystemFunction, optimize, setDetails | 
 
| Methods inherited from class net.sf.saxon.expr.FunctionCall | 
getArguments, getDisplayName, getFunctionNameCode, getNumberOfArguments, iterateSubExpressions, preEvaluate, promote, replaceSubExpression, setArguments, setFunctionNameCode, simplify, typeCheck | 
 
| Methods inherited from class net.sf.saxon.expr.Expression | 
adoptChildExpression, checkPermittedContents, computeDependencies, computeStaticProperties, doPromotion, effectiveBooleanValue, evaluateAsString, evaluateItem, getCardinality, getColumnNumber, getContainingProcedure, getDependencies, getExecutable, getHostLanguage, getImplementationMethod, getInstructionInfo, getIntrinsicDependencies, getLineNumber, getLocationId, getLocationProvider, getParentExpression, getPublicId, getSlotsUsed, getSpecialProperties, getSystemId, hasBadParentPointer, markTailFunctionCalls, process, resetStaticProperties, setLocationId, setParentExpression, setParentExpression, suppressValidation | 
 
 
ForEachGroupFunction
public ForEachGroupFunction()
iterate
public SequenceIterator iterate(XPathContext context)
                         throws XPathException
- Return an Iterator to iterate over the values of a sequence. The value of every
 expression can be regarded as a sequence, so this method is supported for all
 expressions.
- Specified by:
 iterate in interface SequenceIterable- Overrides:
 iterate in class Expression
 
- Parameters:
 context - supplies the context for evaluation
- Returns:
 - a SequenceIterator that can be used to iterate over the result
     of the expression
 - Throws:
 XPathException - if any dynamic error occurs evaluating the
     expression
 
 
Copyright (C) Michael H. Kay. All rights reserved.