use of org.eclipse.wst.xml.xpath2.processor.internal.types.PIType in project webtools.sourceediting by eclipse.
the class DefaultEvaluator method visit.
/**
* visit PI test.
*
* @param e
* is the PI test.
* @return a argument
*/
public Object visit(PITest e) {
ResultSequence arg = (ResultSequence) ((Pair) _param)._two;
String pit_arg = e.arg();
// match any pi
if (pit_arg == null)
return kind_test(arg, PIType.class);
ResultBuffer rb = new ResultBuffer();
for (Iterator i = arg.iterator(); i.hasNext(); ) {
AnyType item = (AnyType) i.next();
// match PI
if (item instanceof PIType) {
PIType pi = (PIType) item;
// match target
if (pit_arg.equals(pi.value().getTarget()))
rb.add(pi);
}
}
arg = rb.getSequence();
((Pair) _param)._two = arg;
return arg;
}
Aggregations