public XPathVariableResolver getXPathVariableResolver() { return getXPath().getXPathVariableResolver(); }
@Override final protected Object invokeProjection(final String resolvedXpath, final Object proxy, final Object[] args) throws Throwable { final XPath xPath = projector.config().createXPath(DOMHelper.getOwnerDocumentFor(node)); if (!lastInvocationContext.isStillValid(resolvedXpath)) { final DuplexExpression duplexExpression = new DuplexXPathParser(projector.config().getUserDefinedNamespaceMapping()).compile(resolvedXpath); String strippedXPath = duplexExpression.getExpressionAsStringWithoutFormatPatterns(); MethodParamVariableResolver resolver = null; if (duplexExpression.isUsingVariables()) { XPathVariableResolver peviousResolver = xPath.getXPathVariableResolver(); resolver = new MethodParamVariableResolver(method, args, duplexExpression, projector.config().getStringRenderer(), peviousResolver); xPath.setXPathVariableResolver(resolver); } final XPathExpression xPathExpression = xPath.compile(strippedXPath); final Class<?> targetComponentType = findTargetComponentType(method); lastInvocationContext = new InvocationContext(resolvedXpath, xPath, xPathExpression, duplexExpression, resolver, targetComponentType, projector); } lastInvocationContext.updateMethodArgs(args); return invokeXpathProjection(lastInvocationContext, proxy, args); }
@Override final protected Object invokeProjection(final String resolvedXpath, final Object proxy, final Object[] args) throws Throwable { final XPath xPath = projector.config().createXPath(DOMHelper.getOwnerDocumentFor(node)); if (!lastInvocationContext.isStillValid(resolvedXpath)) { final DuplexExpression duplexExpression = new DuplexXPathParser(projector.config().getUserDefinedNamespaceMapping()).compile(resolvedXpath); String strippedXPath = duplexExpression.getExpressionAsStringWithoutFormatPatterns(); MethodParamVariableResolver resolver = null; if (duplexExpression.isUsingVariables()) { XPathVariableResolver peviousResolver = xPath.getXPathVariableResolver(); resolver = new MethodParamVariableResolver(method, args, duplexExpression, projector.config().getStringRenderer(), peviousResolver); xPath.setXPathVariableResolver(resolver); } final XPathExpression xPathExpression = xPath.compile(strippedXPath); final Class<?> targetComponentType = findTargetComponentType(method); lastInvocationContext = new InvocationContext(resolvedXpath, xPath, xPathExpression, duplexExpression, resolver, targetComponentType, projector); } lastInvocationContext.updateMethodArgs(args); return invokeXpathProjection(lastInvocationContext, proxy, args); }