Project

Profile

Help

Revision cc22a1cb

Added by Michael Kay over 12 years ago

Fix bug 2829831 JAXP XPathFactory doesn't recognize Saxon OM API

View differences:

latest9.1/bj/net/sf/saxon/xpath/XPathFactoryImpl.java
65 65
     * this method will return true in respect of any such model.
66 66
     */
67 67
    public boolean isObjectModelSupported(String model) {
68
        return config.getExternalObjectModel(model) != null;
69
//        return model.equals(NamespaceConstant.OBJECT_MODEL_SAXON) ||
70
//                model.equals(XPathConstants.DOM_OBJECT_MODEL) ||
71
//                model.equals(NamespaceConstant.OBJECT_MODEL_JDOM) ||
72
//                model.equals(NamespaceConstant.OBJECT_MODEL_XOM) ||
73
//                model.equals(NamespaceConstant.OBJECT_MODEL_DOM4J);
68
        boolean debug = System.getProperty("jaxp.debug") != null;
69
        if (debug) {
70
            System.err.println("JAXP: Calling " + getClass().getName() + ".isObjectModelSupported(\"" + model + "\")");
71
            System.err.println("JAXP: -- returning " + silentIsObjectModelSupported(model));
72
        }
73
        return silentIsObjectModelSupported(model);
74
    }
74 75

  
76
    private boolean silentIsObjectModelSupported(String model) {
77
        return model.equals(NamespaceConstant.OBJECT_MODEL_SAXON) || config.getExternalObjectModel(model) != null;
75 78
    }
76 79

  
77 80
    /**

Also available in: Unified diff