Search in sources :

Example 1 with DescendantOrSelfAxis

use of org.eclipse.wst.xml.xpath2.processor.internal.DescendantOrSelfAxis in project webtools.sourceediting by eclipse.

the class DefaultEvaluator method descendant_or_self_node.

private ResultSequence descendant_or_self_node(ResultSequence rs) {
    ResultBuffer res = new ResultBuffer();
    Axis axis = new DescendantOrSelfAxis();
    // for all nodes, get descendant or self nodes
    for (Iterator i = rs.iterator(); i.hasNext(); ) {
        NodeType item = (NodeType) i.next();
        axis.iterate(item, res, _dc.getLimitNode());
    }
    return res.getSequence();
}
Also used : ResultBuffer(org.eclipse.wst.xml.xpath2.api.ResultBuffer) NodeType(org.eclipse.wst.xml.xpath2.processor.internal.types.NodeType) ListIterator(java.util.ListIterator) Iterator(java.util.Iterator) ParentAxis(org.eclipse.wst.xml.xpath2.processor.internal.ParentAxis) SelfAxis(org.eclipse.wst.xml.xpath2.processor.internal.SelfAxis) ReverseAxis(org.eclipse.wst.xml.xpath2.processor.internal.ReverseAxis) DescendantOrSelfAxis(org.eclipse.wst.xml.xpath2.processor.internal.DescendantOrSelfAxis) ForwardAxis(org.eclipse.wst.xml.xpath2.processor.internal.ForwardAxis) Axis(org.eclipse.wst.xml.xpath2.processor.internal.Axis) DescendantOrSelfAxis(org.eclipse.wst.xml.xpath2.processor.internal.DescendantOrSelfAxis)

Aggregations

Iterator (java.util.Iterator)1 ListIterator (java.util.ListIterator)1 ResultBuffer (org.eclipse.wst.xml.xpath2.api.ResultBuffer)1 Axis (org.eclipse.wst.xml.xpath2.processor.internal.Axis)1 DescendantOrSelfAxis (org.eclipse.wst.xml.xpath2.processor.internal.DescendantOrSelfAxis)1 ForwardAxis (org.eclipse.wst.xml.xpath2.processor.internal.ForwardAxis)1 ParentAxis (org.eclipse.wst.xml.xpath2.processor.internal.ParentAxis)1 ReverseAxis (org.eclipse.wst.xml.xpath2.processor.internal.ReverseAxis)1 SelfAxis (org.eclipse.wst.xml.xpath2.processor.internal.SelfAxis)1 NodeType (org.eclipse.wst.xml.xpath2.processor.internal.types.NodeType)1