com.saxonica.config
Class EnterpriseXPathFactory

java.lang.Object
  extended by javax.xml.xpath.XPathFactory
      extended by net.sf.saxon.xpath.XPathFactoryImpl
          extended by com.saxonica.config.EnterpriseXPathFactory

public class EnterpriseXPathFactory
extends XPathFactoryImpl

An implementation of the JAXP XPath Factory that creates an enterprise configuration. This implementation is used when Saxon-EE is present, and when the object model selected is the Saxon native object model.


Field Summary
 
Fields inherited from class javax.xml.xpath.XPathFactory
DEFAULT_OBJECT_MODEL_URI, DEFAULT_PROPERTY_NAME
 
Constructor Summary
EnterpriseXPathFactory()
          Default constructor: this creates a Configuration as well as creating the enterprise XPathFactory.
EnterpriseXPathFactory(EnterpriseConfiguration config)
          Constructor using a user-supplied Configuration.
 
Method Summary
 void addSchema(Source schemaSource)
          Load a schema, which will be available for use by all subsequent operations using this TransformerFactory.
 
Methods inherited from class net.sf.saxon.xpath.XPathFactoryImpl
getConfiguration, getFeature, isObjectModelSupported, newXPath, setConfiguration, setFeature, setXPathFunctionResolver, setXPathVariableResolver
 
Methods inherited from class javax.xml.xpath.XPathFactory
newInstance, newInstance, newInstance
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EnterpriseXPathFactory

public EnterpriseXPathFactory()
Default constructor: this creates a Configuration as well as creating the enterprise XPathFactory. Any documents accessed using this XPathFactory must be built using this same Configuration. The Configuration has validation mode set to Lax, so validation of input documents will be attempted, provided that a suitable schema is available.


EnterpriseXPathFactory

public EnterpriseXPathFactory(EnterpriseConfiguration config)
Constructor using a user-supplied Configuration. This constructor is useful if the document to be queried already exists, as it allows the configuration associated with the document to be used with this XPathFactory.

Parameters:
config - the configuration to be used. This must be an EnterpriseConfiguration.
Throws:
ClassCastException - if the supplied configuration is not schema-aware.
Method Detail

addSchema

public void addSchema(Source schemaSource)
               throws TransformerException
Load a schema, which will be available for use by all subsequent operations using this TransformerFactory.

Parameters:
schemaSource - the JAXP Source object identifying the schema document to be loaded
Throws:
TransformerException - if the schema cannot be read or parsed or if it is invalid


Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.