Index: jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/finder/impl/SelectorModule.java =================================================================== --- jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/finder/impl/SelectorModule.java (revision 100692) +++ jboss-sunxacml/src/main/java/org/jboss/security/xacml/sunxacml/finder/impl/SelectorModule.java (working copy) @@ -45,7 +45,10 @@ import java.util.ArrayList; -import org.apache.xpath.XPathAPI; +import javax.xml.xpath.XPath; +import javax.xml.xpath.XPathConstants; +import javax.xml.xpath.XPathFactory; + import org.jboss.security.xacml.sunxacml.EvaluationCtx; import org.jboss.security.xacml.sunxacml.ParsingException; import org.jboss.security.xacml.sunxacml.PolicyMetaData; @@ -190,8 +193,8 @@ // now do the query, pre-pending the root path to the context path NodeList matches = null; try { - // NOTE: see comments in XALAN docs about why this is slow - matches = XPathAPI.selectNodeList(root, rootPath + path, nsNode); + XPath xpath = XPathFactory.newInstance().newXPath(); + matches = (NodeList)xpath.evaluate(rootPath + path, root, XPathConstants.NODESET); } catch (Exception e) { // in the case of any exception, we need to return an error return createProcessingError("error in XPath: " + e.getMessage());