use of org.eclipse.wst.xml.xpath2.processor.internal.ast.AnyKindTest in project webtools.sourceediting by eclipse.
the class Normalizer method make_descendant_or_self.
private XPathExpr make_descendant_or_self() {
Step desc_self_node = new ForwardStep(ForwardStep.DESCENDANT_OR_SELF, new AnyKindTest());
StepExpr se = new AxisStep(desc_self_node, new ArrayList());
return new XPathExpr(0, se);
}
use of org.eclipse.wst.xml.xpath2.processor.internal.ast.AnyKindTest in project webtools.sourceediting by eclipse.
the class Normalizer method make_root_self_node.
private XPathExpr make_root_self_node() {
// self::node()
Step self_node = new ForwardStep(ForwardStep.SELF, new AnyKindTest());
StepExpr self_node_expr = new AxisStep(self_node, new ArrayList());
XPathExpr self_node_xpath = new XPathExpr(0, self_node_expr);
// fn:root(self::node())
Collection args = new ArrayList();
args.add(self_node_xpath);
XPathExpr xpe = make_function(new QName("fn", "root", FnFunctionLibrary.XPATH_FUNCTIONS_NS), args);
return xpe;
}
use of org.eclipse.wst.xml.xpath2.processor.internal.ast.AnyKindTest in project webtools.sourceediting by eclipse.
the class Normalizer method visit.
/**
* @param e
* is the reverse step.
* @return e
*/
public Object visit(ReverseStep e) {
if (e.axis() == ReverseStep.DOTDOT) {
NodeTest nt = new AnyKindTest();
Step s = new ReverseStep(ReverseStep.PARENT, nt);
return s;
}
NodeTest nt = e.node_test();
if (nt != null)
nt.accept(this);
return e;
}
Aggregations