Class XPathFactoryImpl


  • public class XPathFactoryImpl
    extends javax.xml.xpath.XPathFactory
    Saxon implementation of the JAXP 1.3 XPathFactory
    • Field Summary

      • Fields inherited from class javax.xml.xpath.XPathFactory

        DEFAULT_OBJECT_MODEL_URI, DEFAULT_PROPERTY_NAME
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      Configuration getConfiguration()
      Get the Configuration object
      boolean getFeature​(java.lang.String feature)
      Get a feature of this XPath implementation.
      boolean isObjectModelSupported​(java.lang.String model)
      Test whether a given object model is supported.
      protected Configuration makeConfiguration()  
      javax.xml.xpath.XPath newXPath()
      Create an XPath evaluator
      void setFeature​(java.lang.String feature, boolean b)
      Set a feature of this XPath implementation.
      void setXPathFunctionResolver​(javax.xml.xpath.XPathFunctionResolver xPathFunctionResolver)
      Set a resolver for XPath functions.
      void setXPathVariableResolver​(javax.xml.xpath.XPathVariableResolver xPathVariableResolver)
      Set a resolver for XPath variables.
      • Methods inherited from class javax.xml.xpath.XPathFactory

        newDefaultInstance, newInstance, newInstance, newInstance
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • XPathFactoryImpl

        public XPathFactoryImpl()
    • Method Detail

      • makeConfiguration

        protected Configuration makeConfiguration()
      • getConfiguration

        public Configuration getConfiguration()
        Get the Configuration object
      • setFeature

        public void setFeature​(java.lang.String feature,
                               boolean b)
                        throws javax.xml.xpath.XPathFactoryConfigurationException
        Set a feature of this XPath implementation. The only features currently recognized are:
        • XMLConstants.FEATURE_SECURE_PROCESSING
        • FeatureKeys.SCHEMA_VALIDATION: requests schema validation of source documents. The property is rejected if the configuration is not schema-aware.
        Specified by:
        setFeature in class javax.xml.xpath.XPathFactory
        Parameters:
        feature - a URI identifying the feature
        b - true to set the feature on, false to set it off
        Throws:
        javax.xml.xpath.XPathFactoryConfigurationException - if the feature name is not recognized
      • getFeature

        public boolean getFeature​(java.lang.String feature)
                           throws javax.xml.xpath.XPathFactoryConfigurationException
        Get a feature of this XPath implementation. The only features currently recognized are:
        Specified by:
        getFeature in class javax.xml.xpath.XPathFactory
        Parameters:
        feature - a URI identifying the feature
        Returns:
        true if the feature is on, false if it is off
        Throws:
        javax.xml.xpath.XPathFactoryConfigurationException - if the feature name is not recognized
      • setXPathVariableResolver

        public void setXPathVariableResolver​(javax.xml.xpath.XPathVariableResolver xPathVariableResolver)
        Set a resolver for XPath variables. This will be used to obtain the value of any variable referenced in an XPath expression. The variable resolver must be allocated before the expression is compiled, but it will only be called when the expression is evaluated.
        Specified by:
        setXPathVariableResolver in class javax.xml.xpath.XPathFactory
        Parameters:
        xPathVariableResolver - The object used to resolve references to variables.
      • setXPathFunctionResolver

        public void setXPathFunctionResolver​(javax.xml.xpath.XPathFunctionResolver xPathFunctionResolver)
        Set a resolver for XPath functions. This will be used to obtain an implementation of any external function referenced in an XPath expression. This is not required for system functions, Saxon extension functions, constructor functions named after types, or extension functions bound using a namespace that maps to a Java class.
        Specified by:
        setXPathFunctionResolver in class javax.xml.xpath.XPathFactory
        Parameters:
        xPathFunctionResolver - The object used to resolve references to external functions.
      • newXPath

        public javax.xml.xpath.XPath newXPath()
        Create an XPath evaluator
        Specified by:
        newXPath in class javax.xml.xpath.XPathFactory
        Returns:
        an XPath object, which can be used to compile and execute XPath expressions.