Package net.sf.saxon.expr.accum
Class AccumulatorRegistry
java.lang.Object
net.sf.saxon.expr.accum.AccumulatorRegistry
- Direct Known Subclasses:
AccumulatorRegistryEE
Static registry for accumulators (XSLT 3.0) defined within a single package. Generally accessed
via the PackageData object for the package.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Register an accumulatorGet the accumulator with a given nameGet all the registered accumulatorsgetStreamingAccumulatorValue
(NodeInfo node, Accumulator accumulator, AccumulatorFn.Phase phase) Get the run-time value of a streamed accumulatorgetUsedAccumulators
(String useAccumulatorsAtt, StyleElement styleElement) Process the use-accumulators attribute of instructions such as xsl:stream, xsl:mode, etc
-
Field Details
-
accumulatorsByName
-
-
Constructor Details
-
AccumulatorRegistry
public AccumulatorRegistry()
-
-
Method Details
-
getUsedAccumulators
Process the use-accumulators attribute of instructions such as xsl:stream, xsl:mode, etc- Parameters:
useAccumulatorsAtt
- the value of the use-accumulators attributestyleElement
- the element on which the use-accumulators attribute appears- Returns:
- the list of accumulators referenced
-
addAccumulator
Register an accumulator- Parameters:
acc
- the accumulator to be registered
-
getAccumulator
Get the accumulator with a given name- Parameters:
name
- the name of the accumulator- Returns:
- the accumulator with this name
-
getAllAccumulators
Get all the registered accumulators- Returns:
- a collection of accumulators
-
getStreamingAccumulatorValue
public Sequence getStreamingAccumulatorValue(NodeInfo node, Accumulator accumulator, AccumulatorFn.Phase phase) throws XPathException Get the run-time value of a streamed accumulator- Parameters:
node
- the context node, which must be a streamed nodeaccumulator
- the accumulator whose value is requiredphase
- pre-descent or post-descent- Returns:
- the value of the accumulator, or null if the context node is not streamed
- Throws:
XPathException
- if a dynamic error occurs
-