public String getNamespace(String nsPrefix) throws SAXPathException { return getNamespace(nsPrefix, namespaces); }
public void buildPredicatesEvaluator(Properties namespaces) throws SAXPathException, NotFoundException, CannotCompileException, IllegalAccessException, InstantiationException { AssertArgument.isNotNull(namespaces, "namespaces"); if(predicatesEvaluator != null) { return; } if(step != null) { PredicatesEvaluatorBuilder builder = new PredicatesEvaluatorBuilder(step, attributeStep, this, namespaces); try { predicatesEvaluator = builder.build(); } catch (SAXPathException e) { throw new SAXPathException("Error processing XPath selector expression '" + xpathExpression + "'.", e); } // And update the QNames again now that we have the namespaces... targetElement = toQName(step, builder); if(attributeStep != null) { targetAttribute = toQName(attributeStep, builder); } } else { predicatesEvaluator = PassThruEvaluator.INSTANCE; } }
public XPathExpressionEvaluator build() throws SAXPathException { PredicatesEvaluator evaluator = new PredicatesEvaluator(); if (!(step instanceof NameStep)) { throw new SAXPathException("Unsupported step '" + step.getText() + "'."); } addEvaluators(step, evaluator); // Add the evaluators for the attribute step... if(attributeStep != null) { addEvaluators(attributeStep, evaluator); } return evaluator; }
public void buildPredicatesEvaluator(Properties namespaces) throws SAXPathException, NotFoundException, CannotCompileException, IllegalAccessException, InstantiationException { AssertArgument.isNotNull(namespaces, "namespaces"); if(predicatesEvaluator != null) { return; } if(step != null) { PredicatesEvaluatorBuilder builder = new PredicatesEvaluatorBuilder(step, attributeStep, this, namespaces); try { predicatesEvaluator = builder.build(); } catch (SAXPathException e) { throw new SAXPathException("Error processing XPath selector expression '" + xpathExpression + "'.", e); } // And update the QNames again now that we have the namespaces... targetElement = toQName(step, builder); if(attributeStep != null) { targetAttribute = toQName(attributeStep, builder); } } else { predicatesEvaluator = PassThruEvaluator.INSTANCE; } }
public XPathExpressionEvaluator build() throws SAXPathException, NotFoundException, CannotCompileException, InstantiationException, IllegalAccessException { PredicatesEvaluator evaluator = new PredicatesEvaluator(); if (!(step instanceof NameStep)) { throw new SAXPathException("Unsupported step '" + step.getText() + "'."); } addEvaluators(step, evaluator); // Add the evaluators for the attribute step... if(attributeStep != null) { addEvaluators(attributeStep, evaluator); } return evaluator; }
public void buildPredicatesEvaluator(Properties namespaces) throws SAXPathException, NotFoundException, CannotCompileException, IllegalAccessException, InstantiationException { AssertArgument.isNotNull(namespaces, "namespaces"); if(predicatesEvaluator != null) { return; } if(step != null) { PredicatesEvaluatorBuilder builder = new PredicatesEvaluatorBuilder(step, attributeStep, this, namespaces); try { predicatesEvaluator = builder.build(); } catch (SAXPathException e) { throw new SAXPathException("Error processing XPath selector expression '" + xpathExpression + "'.", e); } // And update the QNames again now that we have the namespaces... targetElement = toQName(step, builder); if(attributeStep != null) { targetAttribute = toQName(attributeStep, builder); } } else { predicatesEvaluator = PassThruEvaluator.INSTANCE; } }
public String getNamespace(String nsPrefix) throws SAXPathException { return getNamespace(nsPrefix, namespaces); }
public XPathExpressionEvaluator build() throws SAXPathException { PredicatesEvaluator evaluator = new PredicatesEvaluator(); if (!(step instanceof NameStep)) { throw new SAXPathException("Unsupported step '" + step.getText() + "'."); } addEvaluators(step, evaluator); // Add the evaluators for the attribute step... if(attributeStep != null) { addEvaluators(attributeStep, evaluator); } return evaluator; }
public void buildPredicatesEvaluator(Properties namespaces) throws SAXPathException, NotFoundException, CannotCompileException, IllegalAccessException, InstantiationException { AssertArgument.isNotNull(namespaces, "namespaces"); if(predicatesEvaluator != null) { return; } if(step != null) { PredicatesEvaluatorBuilder builder = new PredicatesEvaluatorBuilder(step, attributeStep, this, namespaces); try { predicatesEvaluator = builder.build(); } catch (SAXPathException e) { throw new SAXPathException("Error processing XPath selector expression '" + xpathExpression + "'.", e); } // And update the QNames again now that we have the namespaces... targetElement = toQName(step, builder); if(attributeStep != null) { targetAttribute = toQName(attributeStep, builder); } } else { predicatesEvaluator = PassThruEvaluator.INSTANCE; } }
public String getNamespace(String nsPrefix) throws SAXPathException { return getNamespace(nsPrefix, namespaces); }
public XPathExpressionEvaluator build() throws SAXPathException { PredicatesEvaluator evaluator = new PredicatesEvaluator(); if (!(step instanceof NameStep)) { throw new SAXPathException("Unsupported step '" + step.getText() + "'."); } addEvaluators(step, evaluator); // Add the evaluators for the attribute step... if(attributeStep != null) { addEvaluators(attributeStep, evaluator); } return evaluator; }
public String getNamespace(String nsPrefix) throws SAXPathException { return getNamespace(nsPrefix, namespaces); }
private QName toQName(Step step, PredicatesEvaluatorBuilder evaluatorCompiler) throws SAXPathException { String nsPrefix = ((NameStep) step).getPrefix(); String localPart = ((NameStep) step).getLocalName(); if(nsPrefix != null && !nsPrefix.trim().equals("")) { if(evaluatorCompiler != null) { return new QName(evaluatorCompiler.getNamespace(nsPrefix), localPart, nsPrefix); } else { // Will need to update the namespace later... when we have the // namespace prefix-to-uri mappings... return new QName(null, localPart, nsPrefix); } } else { return new QName(localPart); } }
private QName toQName(Step step, PredicatesEvaluatorBuilder evaluatorCompiler) throws SAXPathException { String nsPrefix = ((NameStep) step).getPrefix(); String localPart = ((NameStep) step).getLocalName(); if(nsPrefix != null && !nsPrefix.trim().equals("")) { if(evaluatorCompiler != null) { return new QName(evaluatorCompiler.getNamespace(nsPrefix), localPart, nsPrefix); } else { // Will need to update the namespace later... when we have the // namespace prefix-to-uri mappings... return new QName(null, localPart, nsPrefix); } } else { return new QName(localPart); } }
private QName toQName(Step step, PredicatesEvaluatorBuilder evaluatorCompiler) throws SAXPathException { String nsPrefix = ((NameStep) step).getPrefix(); String localPart = ((NameStep) step).getLocalName(); if(nsPrefix != null && !nsPrefix.trim().equals("")) { if(evaluatorCompiler != null) { return new QName(evaluatorCompiler.getNamespace(nsPrefix), localPart, nsPrefix); } else { // Will need to update the namespace later... when we have the // namespace prefix-to-uri mappings... return new QName(null, localPart, nsPrefix); } } else { return new QName(localPart); } }
private QName toQName(Step step, PredicatesEvaluatorBuilder evaluatorCompiler) throws SAXPathException { String nsPrefix = ((NameStep) step).getPrefix(); String localPart = ((NameStep) step).getLocalName(); if(nsPrefix != null && !nsPrefix.trim().equals("")) { if(evaluatorCompiler != null) { return new QName(evaluatorCompiler.getNamespace(nsPrefix), localPart, nsPrefix); } else { // Will need to update the namespace later... when we have the // namespace prefix-to-uri mappings... return new QName(null, localPart, nsPrefix); } } else { return new QName(localPart); } }
return new AttributeValue(PredicatesEvaluatorBuilder.getNamespace(nsPrefix, namespaces), localPart, decoder); } else { return new AttributeValue(null, localPart, decoder);
return new AttributeValue(PredicatesEvaluatorBuilder.getNamespace(nsPrefix, namespaces), localPart, decoder); } else { return new AttributeValue(null, localPart, decoder);
return new AttributeValue(PredicatesEvaluatorBuilder.getNamespace(nsPrefix, namespaces), localPart, decoder); } else { return new AttributeValue(null, localPart, decoder);
return new AttributeValue(PredicatesEvaluatorBuilder.getNamespace(nsPrefix, namespaces), localPart, decoder); } else { return new AttributeValue(null, localPart, decoder);