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 int
getCount(Element element, ExecutionContext executionContext)
protected Integer
getElementPosition(Element element, ExecutionContext executionContext)
void
visitBefore(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:BeforeVisitor
Visits the beginning of anElement
.- Specified by:
visitBefore
in interfaceBeforeVisitor
- Parameters:
element
- theElement
representing the beginning of the fragment. TheElement
's ancestors are traversable unless the global configuration parametermaintain.element.stack
is 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)
-
-