com.saxonica.xslt3.instruct

## Class AccumulatorData

- java.lang.Object
- - com.saxonica.xslt3.instruct.AccumulatorData

-     public class AccumulatorData
      extends Object

  Holds the values of an accumulator function for one non-streamed document

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `AccumulatorData(Accumulator acc)`

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `buildIndex(DocumentInfo doc, XPathContext context)` Build a data structure containing the values of the accumulator for each node in a document.
    `Sequence` | `getValue(NodeInfo node, boolean postDescent)` Get the value of the accumulator for a given node

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### AccumulatorData

          public AccumulatorData(Accumulator acc)

  - ### Method Detail

    - #### buildIndex

          public void buildIndex(DocumentInfo doc,
                        XPathContext context)
                          throws XPathException

      Build a data structure containing the values of the accumulator for each node in a document. The data structure holds the value for all nodes where the value changes; the value for other nodes is obtained by interpolation
      Parameters:
        `doc` - the document for which the accumulator is to be evaluated
        `context` - the dynamic evaluation context
      Throws:
        `XPathException` - if a dynamic error occurs while evaluating the accumulator

    - #### getValue

          public Sequence getValue(NodeInfo node,
                          boolean postDescent)

      Get the value of the accumulator for a given node
      Parameters:
        `node` - the node in question
        `postDescent` - false if the pre-descent value of the accumulator is required; false if the post-descent value is wanted.
      Returns:
        the value of the accumulator for this node

Copyright (c) 2004-2013 Saxonica Limited. All rights reserved.