Class Accumulator

  • All Implemented Interfaces:
    javax.xml.transform.SourceLocator, ExpressionOwner, Location, org.xml.sax.Locator

    public class Accumulator
    extends Actor
    Represents a single accumulator declared in an XSLT 3.0 stylesheet
    • Constructor Detail

      • Accumulator

        public Accumulator()
    • Method Detail

      • getSymbolicName

        public SymbolicName getSymbolicName()
        Get the symbolic name of the component
        Specified by:
        getSymbolicName in class Actor
        Returns:
        the symbolic name
      • isDeclaredStreamable

        public boolean isDeclaredStreamable()
        Ask whether the accumulator is declared streamable
        Returns:
        true if it is declared with streamable="yes"
      • setDeclaredStreamable

        public void setDeclaredStreamable​(boolean streamable)
        Say whether the accumulator is declared streamable
        Parameters:
        streamable - true if it is declared with streamable="yes"
      • getAccumulatorName

        public StructuredQName getAccumulatorName()
        Get the name of the accumulator
        Returns:
        the accumulator name
      • setAccumulatorName

        public void setAccumulatorName​(StructuredQName firstName)
        Set the name of the pre-descent function
        Parameters:
        firstName - the function name (always present)
      • getImportPrecedence

        public int getImportPrecedence()
        Get the import precedence
        Returns:
        the import precedence of the accumulator
      • setImportPrecedence

        public void setImportPrecedence​(int importPrecedence)
        Set the import precedence
        Parameters:
        importPrecedence - the import precedence of the accumulator
      • setUniversallyApplicable

        public void setUniversallyApplicable​(boolean universal)
        Say whether this accumulator is universally appicable to all documents
        Parameters:
        universal - true if this accumulator is universally applicable
      • isUniversallyApplicable

        public boolean isUniversallyApplicable()
        Ask whether this accumulator is universally appicable to all documents
        Returns:
        true if this accumulator is universally applicable
      • isTracing

        public boolean isTracing()
        Ask whether diagnostic tracing is enabled for this accumulator
        Returns:
        true if diagnostic tracing is enabled
      • setTracing

        public void setTracing​(boolean tracing)
        Say whether diagnostic tracing is to be enabled for this accumulator
        Parameters:
        tracing - true if diagnostic tracing is to be enabled
      • getSlotManagerForInitialValueExpression

        public SlotManager getSlotManagerForInitialValueExpression()
        Get the slotManager to be used for evaluating the initial-value expression
        Returns:
        the slotManager for the initial-value expression (defining any local variables declared and used within this expression)
      • setSlotManagerForInitialValueExpression

        public void setSlotManagerForInitialValueExpression​(SlotManager slotManagerForInitialValueExpression)
        Set the slotManager to be used for evaluating the initial-value expression
        Parameters:
        slotManagerForInitialValueExpression - the slotManager for the initial-value expression (defining any local variables declared and used within this expression)
      • getPreDescentRules

        public SimpleMode getPreDescentRules()
        Get the set of rules for phase="start", held in the form of a Mode object
        Returns:
        the Mode object containing all the rules that apply to phase="start"
      • setPreDescentRules

        public void setPreDescentRules​(SimpleMode preDescentRules)
        Set the set of rules for phase="start", held in the form of a Mode object
        Parameters:
        preDescentRules - the Mode object containing all the rules that apply to phase="start"
      • getPostDescentRules

        public SimpleMode getPostDescentRules()
        Get the set of rules for phase="end", held in the form of a Mode object
        Returns:
        the Mode object containing all the rules that apply to phase="end"
      • setPostDescentRules

        public void setPostDescentRules​(SimpleMode postDescentRules)
        Set the set of rules for phase="end", held in the form of a Mode object
        Parameters:
        postDescentRules - the Mode object containing all the rules that apply to phase="end"
      • getInitialValueExpression

        public Expression getInitialValueExpression()
        Get the expression that computes the initial value of the accumulator
        Returns:
        the initial value expression
      • setInitialValueExpression

        public void setInitialValueExpression​(Expression initialValueExpression)
        Set the expression that computes the initial value of the accumulator
        Parameters:
        initialValueExpression - the initial value expression
      • addChildExpression

        public void addChildExpression​(Expression expression)
        Add an expression to the list of expressions used by this accumulator
        Parameters:
        expression - the expression to be added to the list
      • getType

        public SequenceType getType()
        Get the declared type of the accumulator. The initial value and all intermediate values must conform to this type
        Returns:
        the declared type of the accumulator
      • setType

        public void setType​(SequenceType type)
        Set the declared type of the accumulator. The initial value and all intermediate values must conform to this type
        Parameters:
        type - the declared type of the accumulator
      • isCompatible

        public boolean isCompatible​(Accumulator other)
        Determine whether this accumulator is compatible with one that it overrides
        Parameters:
        other - the accumlator that this one overrides
        Returns:
        true if they are compatible, as defined in the XSLT 3.0 specification
      • getObjectName

        public StructuredQName getObjectName()
        Get a name identifying the object of the expression, for example a function name, template name, variable name, key name, element name, etc. This is used only where the name is known statically.
        Returns:
        the QName of the object declared or manipulated by this instruction or expression
      • export

        public void export​(ExpressionPresenter presenter)
                    throws XPathException
        Export expression structure. The abstract expression tree is written to the supplied outputstream.
        Specified by:
        export in class Actor
        Parameters:
        presenter - the expression presenter used to generate the XML representation of the structure
        Throws:
        XPathException
      • export

        public void export​(ExpressionPresenter out,
                           java.util.Map<Component,​java.lang.Integer> componentIdMap)
                    throws XPathException
        Export expression structure. The abstract expression tree is written to the supplied outputstream.
        Parameters:
        out - the expression presenter used to display the structure
        Throws:
        XPathException