Class DocumentBuilder
Class DomDestination
Class DynamicContext
Class DynamicError
Class EmptyEnumerator
Class ExtensionFunctionCall
Class InvalidityHandlerWrapper
Class NamespaceConstant
Class NullDestination
Class Processor
Class QName
Class SchemaManager
Class SchemaValidator
Class Serializer
Class StandardLogger
Class StaticContext
Class StaticError
Class TextWriterDestination
Class WhitespacePolicy
Class XPathCompiler
Class XPathExecutable
Class XPathSelector
Class XQueryCompiler
Class XQueryEvaluator
Class XQueryExecutable
Class XdmAnyFunctionType
Class XdmAnyItemType
Class XdmAnyNodeType
Class XdmArray
Class XdmAtomicType
Class XdmAtomicValue
Class XdmDestination
- Class TreeProtector
Class XdmEmptySequence
Class XdmExternalObjectValue
Class XdmFunctionItem
Class XdmItem
Class XdmItemType
Class XdmMap
Class XdmNode
Class XdmNodeKind
Class XdmSequenceType
Class XdmValue
Class XmlDestination
Class Xslt30Transformer
Class XsltCompiler
Class XsltExecutable
- Class ParameterDetails
Class XsltPackage
Class XsltTransformer
Enum RecoveryPolicy
Enum SchemaValidationMode
Enum TreeModel
Enum XdmAxis
Interface IInvalidityHandler
Interface IMessageListener
Interface IQueryResolver
Interface IResultDocumentHandler
Interface IXdmEnumerator
Interface IXmlLocation
Interface SchemaResolver
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.
Constructor Summary | |
---|---|
Processor() Create a new Processor. This Processor will have capabilities that depend on the version of the software that has been loaded, and on the features that have been licensed. |
|
Processor(bool licensedEdition) Create a Processor. |
|
Processor(bool licensedEdition, bool loadLocally) Create a Processor. |
|
Processor(System.IO.Stream configurationFile) Create a Processor, based on configuration information supplied in a configuration file. |
Property Summary | |
---|---|
string |
ProductTitle Get the full name of the Saxon product version implemented by this Processor |
string |
ProductVersion Get the Saxon product version number (for example, "9.2.0.2") |
string |
Edition Get the Saxon product edition (for example, "EE" for Enterprise Edition) |
SchemaManager |
SchemaManager Gets the SchemaManager for the Processor. Returns null if the Processor is not schema-aware. |
XmlResolver |
XmlResolver An XmlResolver, which will be used while compiling and running queries, XPath expressions, and stylesheets, if no other XmlResolver is nominated |
TextWriter |
ErrorWriter A TextWriter used to get and set the errors from the standard output Writer |
decimal |
XmlVersion
The XML version used in this |
net.sf.saxon.Configuration |
Implementation The underlying Configuration object in the Saxon implementation |
net.sf.saxon.s9api.Processor |
JProcessor |
Method Summary | |
---|---|
DocumentBuilder |
NewDocumentBuilder()
Create a new |
XQueryCompiler |
NewXQueryCompiler() Create a new XQueryCompiler, which may be used to compile XQuery queries. |
XsltCompiler |
NewXsltCompiler() Create a new XsltCompiler, which may be used to compile XSLT stylesheets. |
XPathCompiler |
NewXPathCompiler() Create a new XPathCompiler, which may be used to compile XPath expressions. |
Serializer |
NewSerializer() Create a Serializer |
Serializer |
NewSerializer(System.IO.TextWriter textWriter) Create a Serializer initialized to write to a given Writer. Closing the writer after use is the responsibility of the caller. |
Serializer |
NewSerializer(System.IO.Stream stream) Create a Serializer initialized to write to a given OutputStream. Closing the output stream after use is the responsibility of the caller. |
void |
DeclareCollation(System.Uri uri, System.Globalization.CompareInfo compareInfo, System.Globalization.CompareOptions options)
Create a collation based on a given |
void |
RegisterCollection(System.Uri collectionUri, System.Collections.IEnumerable contents)
Register a named collection. A collection is identified by a URI (the collection URI),
and its content is represented by an |
void |
RegisterExtensionFunction(ExtensionFunctionDefinition function) Register an extension function with the Processor |
void |
WriteXdmValue(XdmValue sequence, XmlDestination destination) Copy an XdmValue to an XmlDestination |
void |
SetProperty(string name, string value) Set a configuration property |
String |
GetProperty(string name) Get the value of a configuration property |
Constructor Detail |
---|
public Processor()
Create a new Processor. This Processor will have capabilities that depend on the version of the software that has been loaded, and on the features that have been licensed.
public Processor(bool licensedEdition)
Create a Processor.
Parameters:licensedEdition
-
public Processor(bool licensedEdition, bool loadLocally)
Create a Processor.
Parameters:licensedEdition
-
loadLocally
-
public Processor(System.IO.Stream configurationFile)
Create a Processor, based on configuration information supplied in a configuration file.
Not fully supported in this release: for experimental use only.
Parameters:configurationFile
-
Property Detail |
---|
public string ProductTitle {get; }
Get the full name of the Saxon product version implemented by this Processor
public string ProductVersion {get; }
Get the Saxon product version number (for example, "9.2.0.2")
public string Edition {get; }
Get the Saxon product edition (for example, "EE" for Enterprise Edition)
public SchemaManager SchemaManager {get; }
Gets the SchemaManager for the Processor. Returns null if the Processor is not schema-aware.
public XmlResolver XmlResolver {get; set; }
An XmlResolver, which will be used while compiling and running queries, XPath expressions, and stylesheets, if no other XmlResolver is nominated
By default an XmlUrlResolver
is used. This means that the responsibility
for resolving and dereferencing URIs rests with the .NET platform, not with the
GNU Classpath.
When Saxon invokes a user-written XmlResolver
, the GetEntity
method
may return any of: a System.IO.Stream
; a System.IO.TextReader
; or a
java.xml.transform.Source
.
public TextWriter ErrorWriter {get; set; }
A TextWriter used to get and set the errors from the standard output Writer
By default the Console.Error
is used on the .NET platform.
A user can supply their own TextWriter to redirect error messages from the standard output.
public decimal XmlVersion {get; set; }
The XML version used in this Processor
(for example, this determines what characters
are permitted in a name)
The value must be 1.0 or 1.1, as a decimal
. The default version is currently 1.0, but may
change in the future.
public net.sf.saxon.Configuration Implementation {get; }
The underlying Configuration object in the Saxon implementation
This property provides access to internal methods in the Saxon engine that are not specifically exposed in the .NET API. In general these methods should be considered to be less stable than the classes in the Saxon.Api namespace.
The internal methods follow Java naming conventions rather than .NET conventions.
Information about the returned object (and the objects it provides access to) is included in the Saxon JavaDoc docmentation, available online.
public net.sf.saxon.s9api.Processor JProcessor {get; }
Method Detail |
---|
Create a new XQueryCompiler, which may be used to compile XQuery queries.
The returned XQueryCompiler retains a live link to the Processor, and may be affected by subsequent changes to the Processor.
Create a new XsltCompiler, which may be used to compile XSLT stylesheets.
The returned XsltCompiler retains a live link to the Processor, and may be affected by subsequent changes to the Processor.
Create a new XPathCompiler, which may be used to compile XPath expressions.
The returned XPathCompiler retains a live link to the Processor, and may be affected by subsequent changes to the Processor.
Create a Serializer
Create a Serializer initialized to write to a given Writer. Closing the writer after use is the responsibility of the caller.
Parameters:textWriter
-
Create a Serializer initialized to write to a given OutputStream. Closing the output stream after use is the responsibility of the caller.
Parameters:stream
-
Create a collation based on a given CompareInfo
and CompareOptions
uri
-
compareInfo
-
CompareInfo
, which determines the language-specific
collation rules to be used
options
-
Register a named collection. A collection is identified by a URI (the collection URI),
and its content is represented by an IEnumerable
that enumerates the contents
of the collection. The values delivered by this enumeration are Uri values, which
can be mapped to nodes using the registered XmlResolver
.
Collections should be stable: that is, two calls to retrieve the same collection URI should return the same sequence of document URIs. This requirement is imposed by the W3C specifications, but in the case of a user-defined collection it is not enforced by the Saxon product.
A collection may be replaced by specifying the URI of an existing collection.
Collections registered with a processor are available to all queries and stylesheets running under the control of that processor. Collections should not normally be registered while queries and transformations are in progress.
Parameters:collectionUri
-
collection()
function. The default collection is registered
by supplying null as the value of this argument (this is the collection returned
when the XPath collection()
function is called with no arguments).
contents
-
Register an extension function with the Processor
Parameters:function
-
Copy an XdmValue to an XmlDestination
This method can be used to copy any kind of XdmValue
to any kind
of XdmDestination
. The supplied XdmValue
is first converted
to an XML document according to the rules of the XSLT/XQuery serialization
specification (for example, if the XdmValue
is a sequence of atomic
values, they will be turned in a text node in which the values are converted
to strings and separated by single spaces). The resulting document is then
written to the supplied XmlDestination
.
sequence
-
destination
-
Set a configuration property
This method provides the ability to set named properties of the configuration.
The property names are set as strings, whose values can be found in the Java
class net.sf.saxon.FeatureKeys
. The property values are always strings.
Properties whose values are other types are not available via this interface:
however all properties have an effective equivalent whose value is a string.
Note that on/off properties are set using the strings "true" and "false".
Method added in Saxon 9.1
Parameters:name
-
value
-
Get the value of a configuration property
This method provides the ability to get named properties of the configuration.
The property names are supplied as strings, whose values can be found in the Java
class net.sf.saxon.FeatureKeys
. The property values are always returned as strings.
Properties whose values are other types are returned by converting the value to a
string.
Note that on/off properties are returned using the strings "true" and "false".
Method added in Saxon 9.1
Parameters:name
-
Create a new
DocumentBuilder
, which may be used to build XDM documents from a variety of sources.DocumentBuilder