use of com.sun.org.apache.xml.internal.utils.PrefixResolver in project jdk8u_jdk by JetBrains.
the class XalanXPathAPI method createXPath.
private XPath createXPath(String str, PrefixResolver prefixResolver) throws TransformerException {
XPath xpath = null;
Class<?>[] classes = new Class<?>[] { String.class, SourceLocator.class, PrefixResolver.class, int.class, ErrorListener.class, FunctionTable.class };
Object[] objects = new Object[] { str, null, prefixResolver, Integer.valueOf(XPath.SELECT), null, funcTable };
try {
Constructor<?> constructor = XPath.class.getConstructor(classes);
xpath = (XPath) constructor.newInstance(objects);
} catch (Exception ex) {
if (log.isLoggable(java.util.logging.Level.FINE)) {
log.log(java.util.logging.Level.FINE, ex.getMessage(), ex);
}
}
if (xpath == null) {
xpath = new XPath(str, null, prefixResolver, XPath.SELECT, null);
}
return xpath;
}
Aggregations