Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.xalan.xsltc.dom
Class NodeCounter

    java.lang.Object
      org.apache.xalan.xsltc.dom.NodeCounter

All Implemented Interfaces:
  Axis, Axis

Direct Known Subclasses:
  AnyNodeCounter, MultipleNodeCounter, SingleNodeCounter

public abstract class NodeCounter
extends java.lang.Object
implements Axis

Author:
  Jacek Ambroziak, Santiago Pericas-Geertsen, Morten Jorgensen

Field Summary
`DOM` | `_document`
`DTMAxisIterator` | `_iterator`
`Translet` | `_translet`
`static int` | `END`

Fields inherited from interface org.apache.xalan.xsltc.dom.Axis
`isReverse`

Fields inherited from interface org.apache.xml.dtm.Axis
`ALL, ALLFROMNODE, ANCESTOR, ANCESTORORSELF, ATTRIBUTE, CHILD, DESCENDANT, DESCENDANTORSELF, DESCENDANTSFROMROOT, DESCENDANTSORSELFFROMROOT, FILTEREDLIST, FOLLOWING, FOLLOWINGSIBLING, names, NAMESPACE, NAMESPACEDECLS, PARENT, PRECEDING, PRECEDINGANDANCESTOR, PRECEDINGSIBLING, ROOT, SELF`

Method Summary
`abstract java.lang.String` | `getCounter()` Returns the position of `node` according to the level and the from and count patterns.
`java.lang.String` | `getCounter(java.lang.String format, java.lang.String lang, java.lang.String letterValue, java.lang.String groupSep, java.lang.String groupSize)` Returns the position of `node` according to the level and the from and count patterns.
`boolean` | `matchesCount(int node)` Returns true if `node` matches the count pattern.
`boolean` | `matchesFrom(int node)` Returns true if `node` matches the from pattern.
`NodeCounter` | `setDefaultFormatting()` Sets formatting fields to their default values.
`abstract NodeCounter` | `setStartNode(int node)` Set the start node for this counter.
`NodeCounter` | `setValue(int value)` If the user specified a value attribute, use this instead of counting nodes.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### END

    public static final int END

See Also:
  Constant Field Values

### _document

    public final DOM _document

### _iterator

    public final DTMAxisIterator _iterator

### _translet

    public final Translet _translet

Method Detail

### setStartNode

    public abstract NodeCounter setStartNode(int node)

  Set the start node for this counter. The same `NodeCounter` object can be used multiple times by resetting the starting node.

### setValue

    public NodeCounter setValue(int value)

  If the user specified a value attribute, use this instead of counting nodes.

### setDefaultFormatting

    public NodeCounter setDefaultFormatting()

  Sets formatting fields to their default values.

### getCounter

    public abstract java.lang.String getCounter()

  Returns the position of `node` according to the level and the from and count patterns.

### getCounter

    public java.lang.String getCounter(java.lang.String format,
                                       java.lang.String lang,
                                       java.lang.String letterValue,
                                       java.lang.String groupSep,
                                       java.lang.String groupSize)

  Returns the position of `node` according to the level and the from and count patterns. This position is converted into a string based on the arguments passed.

### matchesCount

    public boolean matchesCount(int node)

  Returns true if `node` matches the count pattern. By default a node matches the count patterns if it is of the same type as the starting node.

### matchesFrom

    public boolean matchesFrom(int node)

  Returns true if `node` matches the from pattern. By default, no node matches the from pattern.

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004 Apache XML Project. All Rights Reserved.