public class AccumulatorData extends java.lang.Object implements IAccumulatorData
Constructor and Description |
---|
AccumulatorData(Accumulator acc) |
Modifier and Type | Method and Description |
---|---|
void |
buildIndex(NodeInfo doc,
XPathContext context)
Build a data structure containing the values of the accumulator for each node in a document.
|
Accumulator |
getAccumulator()
Get the associated accumulator
|
Sequence |
getValue(NodeInfo node,
boolean postDescent)
Get the value of the accumulator for a given node
|
public AccumulatorData(Accumulator acc)
public Accumulator getAccumulator()
getAccumulator
in interface IAccumulatorData
public void buildIndex(NodeInfo doc, XPathContext context) throws XPathException
doc
- the root of the tree for which the accumulator is to be evaluatedcontext
- the dynamic evaluation contextXPathException
- if a dynamic error occurs while evaluating the accumulatorpublic Sequence getValue(NodeInfo node, boolean postDescent)
getValue
in interface IAccumulatorData
node
- the node in questionpostDescent
- false if the pre-descent value of the accumulator is required;
false if the post-descent value is wanted.Copyright (c) 2004-2018 Saxonica Limited. All rights reserved.