org.jdom2.contrib.xpath.xalan.XalanXPathFactory Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jdom Show documentation
Show all versions of jdom Show documentation
A complete, Java-based solution for accessing, manipulating,
and outputting XML data
The newest version!
package org.jdom2.contrib.xpath.xalan;
import java.util.Map;
import org.jdom2.Namespace;
import org.jdom2.filter.Filter;
import org.jdom2.xpath.XPathExpression;
/**
* An XPathFactory that wraps the JDOM content in a thin DOM layer, and then
* uses that to seed the Xalan API for XPath processing.
* @author Rolf Lear
*
*/
public class XalanXPathFactory extends org.jdom2.xpath.XPathFactory {
@Override
public XPathExpression compile(String expression, Filter filter,
Map variables, Namespace... namespaces) {
// Java XPath factories are not thread safe... use a thread-local.
return new XalanXPathExpression(
expression, filter, variables, namespaces);
}
}