|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.sf.saxon.s9api.Processor
public class Processor
The Processor
class serves three purposes: it allows global Saxon configuration options to be set;
it acts as a factory for generating XQuery, XPath, and XSLT compilers; and it owns certain shared
resources such as the Saxon NamePool and compiled schemas. This is the first object that a
Saxon application should create. Once established, a Processor may be used in multiple threads.
It is possible to run more than one Saxon Processor concurrently, but only when running completely independent workloads. Nothing can be shared between Processor instances. Within a query or transformation, all source documents and schemas must be built using the same Processor, which must also be used to compile the query or stylesheet.
Constructor Summary | |
---|---|
Processor(boolean schemaAware)
Create a Processor |
Method Summary | |
---|---|
Object |
getConfigurationProperty(String name)
Get a configuration option |
String |
getSaxonProductVersion()
Get the user-visible Saxon product version, for example "9.0.0.1" |
SchemaManager |
getSchemaManager()
Get the associated SchemaManager. |
Configuration |
getUnderlyingConfiguration()
Get the underlying Configuration object that underpins this Processor. |
String |
getXmlVersion()
Get the version of XML used by this Processor. |
boolean |
isSchemaAware()
Test whether this processor is schema-aware |
DocumentBuilder |
newDocumentBuilder()
Create a DocumentBuilder. |
XPathCompiler |
newXPathCompiler()
Create an XPathCompiler. |
XQueryCompiler |
newXQueryCompiler()
Create an XQueryCompiler. |
XsltCompiler |
newXsltCompiler()
Create an XsltCompiler. |
void |
setConfigurationProperty(String name,
Object value)
Set a configuration option |
void |
setXmlVersion(String version)
Set the version of XML used by this Processor. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Processor(boolean schemaAware)
schemaAware
- indicates whether the Processor is schema-aware or not. To create a schema-aware
processor, the Saxon-SA product is required.Method Detail |
---|
public DocumentBuilder newDocumentBuilder()
public XPathCompiler newXPathCompiler()
public XsltCompiler newXsltCompiler()
UnsupportedOperationException
- if this version of the Saxon product does not support XSLT processingpublic XQueryCompiler newXQueryCompiler()
UnsupportedOperationException
- if this version of the Saxon product does not support XQuery processingpublic SchemaManager getSchemaManager()
public boolean isSchemaAware()
public String getSaxonProductVersion()
public void setXmlVersion(String version)
Note that source documents specifying xml version="1.0" or "1.1" are accepted regardless of this setting.
version
- must be one of the strings "1.0" or "1.1"
IllegalArgumentException
- if any string other than "1.0" or "1.1" is suppliedpublic String getXmlVersion()
public void setConfigurationProperty(String name, Object value)
name
- the name of the option to be set. The names of the options available are listed
as constants in class FeatureKeys
value
- the value of the option to be set. The type of the value depends on the option
that is being set
IllegalArgumentException
- if the property name is not recognizedpublic Object getConfigurationProperty(String name)
name
- the name of the option required. The names of the options available are listed
as constants in class FeatureKeys
IllegalArgumentException
- if the property name is not recognizedpublic Configuration getUnderlyingConfiguration()
Configuration
object that underpins this Processor. This method
provides an escape hatch to internal Saxon implementation objects that offer a finer and lower-level
degree of control than the s9api classes and methods. Some of these classes and methods may change
from release to release.
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |