protected XPathFactory newFactory()
        throws XPathFactoryConfigurationException
    {
        // First try to force the default JRE impl
        try
        {
            return XPathFactory.newInstance(
                XPathFactory.DEFAULT_OBJECT_MODEL_URI,
                "com.sun.org.apache.xpath.internal.jaxp.XPathFactoryImpl",
                null);
        }
        catch(XPathFactoryConfigurationException ignore) {}
        
        // If that failed use auto-discovery
        return XPathFactory.newInstance();
    }