use of org.eclipse.wst.xml.xpath2.processor.internal.ast.XPathNode in project webtools.sourceediting by eclipse.
the class Normalizer method make_logic_expr.
private BinExpr make_logic_expr(BinExpr e) {
Collection normalized = normalize_bin_args(e);
XPathNode[] nor_arr = new XPathNode[2];
int j = 0;
for (Iterator i = normalized.iterator(); i.hasNext(); ) {
nor_arr[j] = (XPathNode) i.next();
j++;
}
Collection args = new ArrayList();
args.add(nor_arr[0]);
e.set_left(make_function(new QName("fn", "boolean", FnFunctionLibrary.XPATH_FUNCTIONS_NS), args));
args.clear();
args.add(nor_arr[1]);
e.set_right(make_function(new QName("fn", "boolean", FnFunctionLibrary.XPATH_FUNCTIONS_NS), args));
return e;
}
use of org.eclipse.wst.xml.xpath2.processor.internal.ast.XPathNode in project webtools.sourceediting by eclipse.
the class Normalizer method normalize_bin_args.
private Collection normalize_bin_args(BinExpr e) {
Collection args = new ArrayList();
XPathNode left = (XPathNode) e.left().accept(this);
XPathNode right = (XPathNode) e.right().accept(this);
args.add(left);
args.add(right);
return args;
}
Aggregations