org.apache.xalan.xsltc.dom

Class NodeCounter

public abstract class NodeCounter extends Object

Author: Jacek Ambroziak Santiago Pericas-Geertsen Morten Jorgensen

Field Summary
static intEND
DOM_document
DTMAxisIterator_iterator
Translet_translet
Method Summary
abstract StringgetCounter()
Returns the position of node according to the level and the from and count patterns.
StringgetCounter(String format, String lang, String letterValue, String groupSep, String groupSize)
Returns the position of node according to the level and the from and count patterns.
booleanmatchesCount(int node)
Returns true if node matches the count pattern.
booleanmatchesFrom(int node)
Returns true if node matches the from pattern.
NodeCountersetDefaultFormatting()
Sets formatting fields to their default values.
abstract NodeCountersetStartNode(int node)
Set the start node for this counter.
NodeCountersetValue(double value)
If the user specified a value attribute, use this instead of counting nodes.

Field Detail

END

public static final int END

_document

public final DOM _document

_iterator

public final DTMAxisIterator _iterator

_translet

public final Translet _translet

Method Detail

getCounter

public abstract String getCounter()
Returns the position of node according to the level and the from and count patterns.

getCounter

public String getCounter(String format, String lang, String letterValue, String groupSep, 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.

setDefaultFormatting

public NodeCounter setDefaultFormatting()
Sets formatting fields to their default values.

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(double value)
If the user specified a value attribute, use this instead of counting nodes.
Copyright © 2005 Apache XML Project. All Rights Reserved.