public class AccumulatorRegistryPE extends Object implements IAccumulatorRegistry
| Modifier and Type | Field and Description |
|---|---|
protected Map<StructuredQName,Accumulator> |
accumulatorsByName |
| Constructor and Description |
|---|
AccumulatorRegistryPE() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAccumulator(Accumulator acc)
Register an accumulator
|
Accumulator |
getAccumulator(StructuredQName name)
Get the accumulator with a given name
|
Iterable<Accumulator> |
getAllAccumulators()
Get all the registered accumulators
|
Sequence |
getStreamingAccumulatorValue(NodeInfo node,
Accumulator accumulator,
AccumulatorFn.Phase phase)
Get the run-time value of a streamed accumulator
|
List<Accumulator> |
getUsedAccumulators(String useAccumulatorsAtt,
StyleElement styleElement)
Process the use-accumulators attribute of instructions such as xsl:stream, xsl:global-context-item, etc
|
protected Map<StructuredQName,Accumulator> accumulatorsByName
public List<Accumulator> getUsedAccumulators(String useAccumulatorsAtt, StyleElement styleElement) throws XPathException
useAccumulatorsAtt - the value of the use-accumulators attributeXPathException - if the attribute is invalidpublic void addAccumulator(Accumulator acc)
acc - the accumulator to be registeredpublic Accumulator getAccumulator(StructuredQName name)
name - the name of the accumulatorpublic Iterable<Accumulator> getAllAccumulators()
getAllAccumulators in interface IAccumulatorRegistrypublic Sequence getStreamingAccumulatorValue(NodeInfo node, Accumulator accumulator, AccumulatorFn.Phase phase) throws XPathException
node - the context node, which must be a streamed nodeaccumulator - the accumulator whose value is requiredphase - pre-descent or post-descentXPathExceptionCopyright (c) 2004-2014 Saxonica Limited. All rights reserved.