Search in sources :

Example 6 with StaticNameResolver

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

the class Engine method parseExpression.

public XPath2Expression parseExpression(String expression, StaticContext context) {
    XPath xPath = new JFlexCupParser().parse(expression);
    xPath.setStaticContext(context);
    StaticNameResolver name_check = new StaticNameResolver(context);
    name_check.check(xPath);
    xPath.setAxes(name_check.getAxes());
    xPath.setFreeVariables(name_check.getFreeVariables());
    xPath.setResolvedFunctions(name_check.getResolvedFunctions());
    xPath.setRootUsed(name_check.isRootUsed());
    return xPath;
}
Also used : XPath(org.eclipse.wst.xml.xpath2.processor.ast.XPath)

Aggregations

XPath (org.eclipse.wst.xml.xpath2.processor.ast.XPath)6 JFlexCupParser (org.eclipse.wst.xml.xpath2.processor.JFlexCupParser)5 StaticChecker (org.eclipse.wst.xml.xpath2.processor.StaticChecker)5 StaticNameResolver (org.eclipse.wst.xml.xpath2.processor.StaticNameResolver)5 XPathParser (org.eclipse.wst.xml.xpath2.processor.XPathParser)5 DefaultDynamicContext (org.eclipse.wst.xml.xpath2.processor.DefaultDynamicContext)1 DefaultEvaluator (org.eclipse.wst.xml.xpath2.processor.DefaultEvaluator)1 Engine (org.eclipse.wst.xml.xpath2.processor.Engine)1 Evaluator (org.eclipse.wst.xml.xpath2.processor.Evaluator)1 ResultSequence (org.eclipse.wst.xml.xpath2.processor.ResultSequence)1 FnFunctionLibrary (org.eclipse.wst.xml.xpath2.processor.function.FnFunctionLibrary)1 DefaultStaticContext (org.eclipse.wst.xml.xpath2.processor.internal.DefaultStaticContext)1 XSDecimal (org.eclipse.wst.xml.xpath2.processor.internal.types.XSDecimal)1