Class ElementPositionCounter
- java.lang.Object
-
- org.smooks.engine.resource.config.xpath.ElementPositionCounter
-
- All Implemented Interfaces:
ContentHandler,BeforeVisitor,SaxNgVisitor,Visitor
@Priority(2147483647) public class ElementPositionCounter extends Object implements BeforeVisitor
Element position counter. Used for position based XPath predicates.- Author:
- tom.fennelly@jboss.com
-
-
Constructor Summary
Constructors Constructor Description ElementPositionCounter()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description intgetCount(Element element, ExecutionContext executionContext)protected IntegergetElementPosition(Element element, ExecutionContext executionContext)voidvisitBefore(Element element, ExecutionContext executionContext)Visits the beginning of anElement.
-
-
-
Method Detail
-
visitBefore
public void visitBefore(Element element, ExecutionContext executionContext) throws SmooksException
Description copied from interface:BeforeVisitorVisits the beginning of anElement.- Specified by:
visitBeforein interfaceBeforeVisitor- Parameters:
element- theElementrepresenting the beginning of the fragment. TheElement's ancestors are traversable unless the global configuration parametermaintain.element.stackis set to false. TheElement's child nodes are not traversable.executionContext- the currentExecutionContext- Throws:
SmooksException
-
getCount
public int getCount(Element element, ExecutionContext executionContext)
-
getElementPosition
protected Integer getElementPosition(Element element, ExecutionContext executionContext)
-
-