Package com.saxonica.functions.extfn
Class GroupStarting
java.lang.Object
net.sf.saxon.functions.AbstractFunction
net.sf.saxon.functions.SystemFunction
com.saxonica.functions.extfn.GroupStarting
- All Implemented Interfaces:
Callable
,FunctionItem
,GroundedValue
,Item
,Sequence
This class supports the extension function saxon:group-starting. This takes two arguments:
the first is a sequence of items, the second is a function used as a predicate. The function
is applied to each item in the sequence: if the effective boolean value of the result is true,
the item is called a matching item. The result of the function is a sequence of arrays, where
the members of each array are single items, and the flattened sequence of arrays is the same
as the input sequence.
If the input sequence is empty, the result sequence is empty.
In all other cases (a) the first item in the result is an array containing those items from the input that precede the first matching item; this array will be empty if the first item in the input is a matching item; (b) every other item in the result is an non-empty array containing a subsequence of the input in which the first member is a matching item and the remaining members are non-matching items.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncall
(XPathContext context, Sequence[] arguments) Evaluate this function call at run-timeMethods inherited from class net.sf.saxon.functions.SystemFunction
dependsOnContextItem, dynamicCall, equals, export, exportAdditionalArguments, exportAttributes, fixArguments, getArity, getCardinality, getContextNode, getDescription, getDetails, getElaborator, getErrorCodeForTypeErrors, getFunctionItemType, getFunctionName, getIntegerBounds, getNetCost, getOperandRoles, getRequiredType, getResultItemType, getResultItemType, getRetainedStaticContext, getSpecialProperties, getStaticBaseUriString, getStreamerName, getUniStringArg, hashCode, importAttributes, isSequenceVariadic, isTrustedResultType, makeCall, makeFunction, makeFunction40, makeFunctionCall, makeOptimizedFunctionCall, resultIfEmpty, setArity, setDetails, setRetainedStaticContext, supplyTypeInformation, toShortString, toString, typeCheckCaller
Methods inherited from class net.sf.saxon.functions.AbstractFunction
atomize, deepEqual40, deepEquals, effectiveBooleanValue, getAnnotations, getUnicodeStringValue, isArray, isMap, makeNewContext, simplify, typeCheck
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface net.sf.saxon.om.FunctionItem
getGenre
Methods inherited from interface net.sf.saxon.om.GroundedValue
asIterable, concatenate, containsNode, materialize
Methods inherited from interface net.sf.saxon.om.Item
getLength, getStringValue, head, isStreamed, itemAt, iterate, reduce, subsequence
Methods inherited from interface net.sf.saxon.om.Sequence
makeRepeatable
-
Constructor Details
-
GroupStarting
public GroupStarting()
-
-
Method Details
-
call
Evaluate this function call at run-time- Parameters:
context
- The XPath dynamic evaluation contextarguments
- The values of the arguments to the function call.- Returns:
- the results of the function, as a sequence of arrays
- Throws:
XPathException
- if a dynamic error occurs during evaluation of the function. The Saxon run-time code will add information about the error location.
-