Search in sources :

Example 31 with NodeTest

use of org.eclipse.wst.xml.xpath2.processor.internal.ast.NodeTest 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;
}
Also used : ReverseStep(org.eclipse.wst.xml.xpath2.processor.internal.ast.ReverseStep) AxisStep(org.eclipse.wst.xml.xpath2.processor.internal.ast.AxisStep) ForwardStep(org.eclipse.wst.xml.xpath2.processor.internal.ast.ForwardStep) ReverseStep(org.eclipse.wst.xml.xpath2.processor.internal.ast.ReverseStep) Step(org.eclipse.wst.xml.xpath2.processor.internal.ast.Step) NodeTest(org.eclipse.wst.xml.xpath2.processor.internal.ast.NodeTest) AnyKindTest(org.eclipse.wst.xml.xpath2.processor.internal.ast.AnyKindTest)

Aggregations

URL (java.net.URL)29 XSModel (org.apache.xerces.xs.XSModel)29 DynamicError (org.eclipse.wst.xml.xpath2.processor.DynamicError)29 ResultSequence (org.eclipse.wst.xml.xpath2.processor.ResultSequence)29 StaticError (org.eclipse.wst.xml.xpath2.processor.StaticError)29 XPathParserException (org.eclipse.wst.xml.xpath2.processor.XPathParserException)29 NodeTest (org.eclipse.wst.xml.xpath2.processor.internal.ast.NodeTest)2 ReverseAxis (org.eclipse.wst.xml.xpath2.processor.internal.ReverseAxis)1 AnyKindTest (org.eclipse.wst.xml.xpath2.processor.internal.ast.AnyKindTest)1 AxisStep (org.eclipse.wst.xml.xpath2.processor.internal.ast.AxisStep)1 ForwardStep (org.eclipse.wst.xml.xpath2.processor.internal.ast.ForwardStep)1 ReverseStep (org.eclipse.wst.xml.xpath2.processor.internal.ast.ReverseStep)1 Step (org.eclipse.wst.xml.xpath2.processor.internal.ast.Step)1