Package javax.xml.xpath

Examples of javax.xml.xpath.XPathExpressionException


            return xmlNodeSet;
          default:
            return thread_context.getRuntime().newString(xobj.str());
          }
        } catch(TransformerException ex) {
          throw new XPathExpressionException(expr);
        }
    }
View Full Code Here


      String value =
          curValue.getAttributes().getNamedItem("value").getNodeValue();

      try {
        if (mapping.containsKey(name)) {
          throw new XPathExpressionException("The parameter " + name
              + " is defined multiple times!");
        }
        Object convertedValue = checkParameterValue(name, value, parameters);
        if (convertedValue == null) {
          throw new XPathExpressionException("The parameter " + name
              + " is not defined!");
        }
        mapping.put(name, convertedValue);
      } catch (Exception e) {
        throw new XPathExpressionException("The value of the parameter " + name
            + " does not match the parameter type!" + e);
      }
    }

    // add default values of missing primitive parameters
    for (IParameter parameter : parameters) {
      if (parameter.isRequired() && parameter.getPluginType().isEmpty()
          && !mapping.containsKey(parameter.getName())) {
        if (parameter.getDefaultValue().isEmpty()) {
          throw new XPathExpressionException(
              "Parameter "
                  + parameter.getName()
                  + " is not specified within the configuration and has no default value!");
        }
        mapping.put(parameter.getName(), parameter.getDefaultValue());
View Full Code Here

TOP

Related Classes of javax.xml.xpath.XPathExpressionException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.