throw new SAXPathException( "Class [" + className + "] does not implement the org.jaxen.saxpath.XPathReader interface." ); throw new SAXPathException( e ); throw new SAXPathException( e ); throw new SAXPathException( e );
public static String getNamespace(String nsPrefix, Properties namespaces) throws SAXPathException { String namespace = namespaces.getProperty(nsPrefix); if(namespace == null) { namespace = Namespace.SMOOKS_PREFIX_MAPPINGS.getProperty(nsPrefix); if(namespace == null) { throw new SAXPathException("Unknown namespace prefix '" + nsPrefix + "'. You must define the namespace prefix-to-uri mappings in the Smooks <core:namespaces> configuration section."); } } return namespace; } }
public static String getNamespace(String nsPrefix, Properties namespaces) throws SAXPathException { String namespace = namespaces.getProperty(nsPrefix); if(namespace == null) { namespace = Namespace.SMOOKS_PREFIX_MAPPINGS.getProperty(nsPrefix); if(namespace == null) { throw new SAXPathException("Unknown namespace prefix '" + nsPrefix + "'. You must define the namespace prefix-to-uri mappings in the Smooks <core:namespaces> configuration section."); } } return namespace; } }
public static String getNamespace(String nsPrefix, Properties namespaces) throws SAXPathException { String namespace = namespaces.getProperty(nsPrefix); if(namespace == null) { namespace = Namespace.SMOOKS_PREFIX_MAPPINGS.getProperty(nsPrefix); if(namespace == null) { throw new SAXPathException("Unknown namespace prefix '" + nsPrefix + "'. You must define the namespace prefix-to-uri mappings in the Smooks <core:namespaces> configuration section."); } } return namespace; } }
public static String getNamespace(String nsPrefix, Properties namespaces) throws SAXPathException { String namespace = namespaces.getProperty(nsPrefix); if(namespace == null) { namespace = Namespace.SMOOKS_PREFIX_MAPPINGS.getProperty(nsPrefix); if(namespace == null) { throw new SAXPathException("Unknown namespace prefix '" + nsPrefix + "'. You must define the namespace prefix-to-uri mappings in the Smooks <core:namespaces> configuration section."); } } return namespace; } }
public static String getNamespace(String nsPrefix, Properties namespaces) throws SAXPathException { String namespace = namespaces.getProperty(nsPrefix); if(namespace == null) { namespace = Namespace.SMOOKS_PREFIX_MAPPINGS.getProperty(nsPrefix); if(namespace == null) { throw new SAXPathException("Unknown namespace prefix '" + nsPrefix + "'. You must define the namespace prefix-to-uri mappings in the Smooks <core:namespaces> configuration section."); } } return namespace; } }
/** * Set the namespaces on the specified set of selector steps. * @param steps The selector steps. * @param namespaces The set of selector steps to be updated. * @return The set of selector steps (as passed in the 'steps' argument). * @throws org.jaxen.saxpath.SAXPathException Error setting namespaces */ public static SelectorStep[] setNamespaces(SelectorStep[] steps, Properties namespaces) throws SAXPathException { AssertArgument.isNotNull(steps, "steps"); AssertArgument.isNotNull(namespaces, "namespaces"); for(int i = 0; i < steps.length; i++) { SelectorStep step = steps[i]; try { step.buildPredicatesEvaluator(namespaces); } catch (SAXPathException e) { throw e; } catch (Exception e) { throw new SAXPathException("Error compiling PredicatesEvaluator.", e); } // if(i < steps.length - 1 && step.accessesText()) { throw new SAXPathException("Unsupported XPath selector expression '" + step.getXPathExpression() + "'. XPath 'text()' tokens are only supported in the last step."); } } return steps; }
/** * Set the namespaces on the specified set of selector steps. * @param steps The selector steps. * @param namespaces The set of selector steps to be updated. * @return The set of selector steps (as passed in the 'steps' argument). * @throws org.jaxen.saxpath.SAXPathException Error setting namespaces */ public static SelectorStep[] setNamespaces(SelectorStep[] steps, Properties namespaces) throws SAXPathException { AssertArgument.isNotNull(steps, "steps"); AssertArgument.isNotNull(namespaces, "namespaces"); for(int i = 0; i < steps.length; i++) { SelectorStep step = steps[i]; try { step.buildPredicatesEvaluator(namespaces); } catch (SAXPathException e) { throw e; } catch (Exception e) { throw new SAXPathException("Error compiling PredicatesEvaluator.", e); } // if(i < steps.length - 1 && step.accessesText()) { throw new SAXPathException("Unsupported XPath selector expression '" + step.getXPathExpression() + "'. XPath 'text()' tokens are only supported in the last step."); } } return steps; }
/** * Set the namespaces on the specified set of selector steps. * @param steps The selector steps. * @param namespaces The set of selector steps to be updated. * @return The set of selector steps (as passed in the 'steps' argument). * @throws org.jaxen.saxpath.SAXPathException Error setting namespaces */ public static SelectorStep[] setNamespaces(SelectorStep[] steps, Properties namespaces) throws SAXPathException { AssertArgument.isNotNull(steps, "steps"); AssertArgument.isNotNull(namespaces, "namespaces"); for(int i = 0; i < steps.length; i++) { SelectorStep step = steps[i]; try { step.buildPredicatesEvaluator(namespaces); } catch (SAXPathException e) { throw e; } catch (Exception e) { throw new SAXPathException("Error compiling PredicatesEvaluator.", e); } // if(i < steps.length - 1 && step.accessesText()) { throw new SAXPathException("Unsupported XPath selector expression '" + step.getXPathExpression() + "'. XPath 'text()' tokens are only supported in the last step."); } } return steps; }
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 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 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 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 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 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 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 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 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; } }
throw new SAXPathException("Unsupported XPath value token '" + expr.getText() + "'.");