SAXONICA |
The XPath API now offers schema-aware processing. By default, if Saxon-SA is on the classpath, the XPathFactory loaded
to handle source documents using the Saxon object model will be schema-aware. Source documents loaded using the XPath evaluator
from this factory will automatically be validated (failing if there is no available schema). A schema can be imported into
the static
context using the importSchema
method of the XPathEvaluator
. A sample application showing how this works
in practice is provided: see XPathExampleSA.java
in the samples/java
directory.
The sample data file books.xml
and its schema have been revised for the benefit of this sample application.
The Saxon implementations of the JAXP SchemaFactory
, Validator
, and ValidatorHandler
interfaces now all support the methods getProperty
and setProperty
to set configuration
options. The property names and values that can be set are the same as those provided on the TransformerFactory
interface (where the methods are called getAttribute
and setAttribute
). These classes
also now contain a getConfiguration()
method providing direct access to the underlying
Configuration
object.