Saxon.Api

 

 

Saxon.Api - the Saxon Application Programming Interface for .NET

This namespace contains Saxon's application programming interfaces for using XSLT, XQuery, XPath and XSD on .NET.

The top-level object is the Processor; this allows creation of factory classes for using each of the different processing languages.

The classes are all found in each of the assemblies: saxon9ee-api.dll, saxon9pe-api.dll, and saxon9he-api.dll.

Further background information about this API is available at http://www.saxonica.com/html/documentation/dotnet/dotnetapi.html

 

Interface Summary

Name Description
ExtensionFunction

This is an interface for simple external/extension functions. Users can implement this interface and register the implementation with the Processor; the function will then be available for calling from all queries, stylesheets, and XPath expressions compiled under this Processor.

IInvalidityHandler

Interface for reporting validation errors found during validation of an instance document against a schema.

IMessageListener

An IMessageListener can be nominated to handle output produced by the xsl:message instruction in an XSLT stylesheet.

IMessageListener2

An IMessageListener can be nominated to handle output produced by the xsl:message instruction in an XSLT stylesheet.

IQueryResolver

Interface defining a user-supplied class used to retrieve XQuery library modules listed in an import module declaration in the query prolog.

IResultDocumentHandler

An IResultDocumentHandler can be nominated to handle output produced by the xsl:result-document instruction in an XSLT stylesheet.

IXdmEnumerable

This class represents an enumeration of the values in an XPath sequence. It implements the IEnumerable interface, and the objects returned are always instances of XdmItem.

IXdmEnumerator

This class represents an enumeration of the values in an XPath sequence. It implements the IEnumerator interface, and the objects returned are always instances of XdmItem.

IXmlLocation

An IXmlLocation represents the location of a node within an XML document. It is in two parts: the base URI (or system ID) of the external entity (which will usually be the XML document entity itself), and the line number of a node relative to the base URI of the containing external entity.

Predicate

Interface defining the predicate function, to be implementated by the caller

SchemaResolver

The SchemaResolver is a user-supplied class used for resolving references to schema documents. It applies to references from one schema document to another appearing in xs:import, xs:include, and xs:redefine; to references from an instance document to a schema in xsi:schemaLocation and xsi:noNamespaceSchemaLocation, to xsl:import-schema in XSLT, and to the import schema declaration in XQuery.

XmlDestination

An abstract destination for the results of a query or transformation

 

Class Summary

Name Description
DocumentBuilder

The DocumentBuilder class enables XDM documents to be built from various sources. The class is always instantiated using the NewDocumentBuilder method on the Processor object.

DomDestination

A DomDestination represents an XmlDocument that is constructed to hold the output of a query or transformation.

DynamicContext

The class DynamicContext provides information about the dynamic context of an expression

DynamicError

The DynamicError class contains information about a dynamic error detected during execution of a stylesheet, query, or XPath expression.

EmptyEnumerator

An implementation of IXdmEnumerator that iterates over an empty sequence.

ExtensionFunctionCall

An instance of this class will be created by the compiler for each function call to this extension function that is found in the source code. The class is always instantiated by calling the method MakeFunctionCall() of the corresponding ExtensionFunctionDefinition. The implementation may therefore retain information about the static context of the call. Once compiled, however, the instance object must be immutable.

ExtensionFunctionDefinition

Abstract superclass for user-written extension functions. An extension function may be implemented as a subclass of this class, with appropriate implementations of the defined methods.

More precisely, a subclass of ExtensionFunctionDefinition identifies a family of extension functions with the same (namespace-qualified) name but potentially having different arity (number of arguments).

Feature

Feature defines a set of constants, representing the details of Saxon configuration options which can be supplied to the Saxon method Processor.SetProperty(), and to other interfaces.

FeatureKeys

FeatureKeys defines a set of constants, representing the names of Saxon configuration options which can be supplied to the Saxon implementations of the JAXP interfaces TransformerFactory, SchemaFactory, Validator, and ValidationHandler, and to other interfaces such as the s9api net.sf.saxon.s9api.Processor

InvalidityHandlerWrapper

This class InvalidityHandlerWrapper extends the standard error handler for errors found during validation of an instance document against a schema, used if a user specifies the -report option on validate. Its effect is to output the validation errors found into the filename specified, in an XML format. This is a wrapper class to wrap a .NET InvalidityHandler class for interfacing within Java.

NamespaceConstant

Holds a set of constants representing known namespaces.

NullDestination

A NullDestination is an XmlDestination that discards all its output.

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.

QName

The QName class represents an instance of xs:QName, as defined in the XPath 2.0 data model. Internally, it has three components, a namespace URI, a local name, and a prefix. The prefix is intended to be used only when converting the value back to a string.

RawDestination

A RawDestination is an Destination that accepts a sequence output by a stylesheet or query and returns it directly as an XdmValue, without constructing an XML tree, and without serialization. It corresponds to the serialization option build-tree="no".

SchemaManager

A SchemaManager is responsible for compiling schemas and maintaining a cache of compiled schemas that can be used for validating instance documents.

SchemaValidator

A SchemaValidator is an object that is used for validating instance documents against a schema. The schema consists of the collection of schema components that are available within the schema cache maintained by the SchemaManager, together with any additional schema components located during the course of validation by means of an xsl:schemaLocation or xsi:noNamespaceSchemaLocation attribute within the instance document.

Serializer

A Serializer takes a tree representation of XML and turns it into lexical XML markup.

StandardLogger

The default Logger used by Saxon on the .NET platform. All messages are written by default to System.err. The logger can be configured by setting a different output destination, and by setting a minimum threshold for the severity of messages to be output.

StaticContext

The class StaticContext provides information about the static context of an expression

StaticError

The StaticError class contains information about a static error detected during compilation of a stylesheet, query, or XPath expression.

TextWriterDestination

A TextWriterDestination is an implementation of XmlDestination that wraps an instance of XmlWriter.

ValidationFailure

This exception indicates a failure when validating an instance against a type defined in a schema. This class holds the same information as a ValidationException, except that it is not an exception, and does not carry system overheads such as a stack trace.It is used because operations such as "castable", and validation of values in a union, cause validation failures on a success path and it is costly to throw, or even to create, exception objects on a success path.

WhitespacePolicy

WhitespacePolicy is a class defining the possible policies for handling whitespace text nodes in a source document.

XdmAnyArrayType

Singleton class representing the item type array(*), which matches any array.

XdmAnyFunctionType

Singleton class representing the item type function(*), which matches any function item.

XdmAnyItemType

Singleton class representing the item type item(), which matches any item.

XdmAnyMapType

Singleton class representing the item type map(*), which matches any map.

XdmAnyNodeType

Singleton class representing the item type node(), which matches any node.

XdmArray

The class XdmArray represents an array item in an XDM 3.1 sequence: this is a new kind of item in the XDM data model. An array is a list of zero or more members, each of which is an arbitrary XDM value. An array is also a function: it maps a positive integer to the array member found at that position in the array.

XdmAtomicType

An instance of class XdmAtomicType represents a specific atomic type, for example xs:double, xs:integer, or xs:anyAtomicType. This may be either a built-in atomic type or a type defined in a user-written schema.

XdmAtomicValue

The class XdmAtomicValue represents an item in an XDM sequence that is an atomic value. The value may belong to any of the 19 primitive types defined in XML Schema, or to a type derived from these primitive types, or to the XDM-specific type xs:untypedAtomic

XdmDestination

An XdmDestination is an XmlDestination in which an XdmNode is constructed to hold the output of a query or transformation: that is, a tree using Saxon's implementation of the XDM data model.

XdmDestination.TreeProtector

TreeProtector is a filter that ensures that the events reaching the Builder constitute a single tree rooted at an element or document node (because anything else will crash the builder)

XdmEmptySequence

The class XdmEmptySequence represents an empty sequence in the XDM Data Model.

XdmExternalObjectValue

The class XdmExternalObjectValue represents an XDM item that wraps an external .NET object. As such, it is outside the scope of the W3C XDM specification (but permitted as an extension).

XdmFunctionItem

The class XdmFunctionItem represents an item in an XDM sequence that holds a function.

XdmItem

The class XdmItem represents an item in a sequence, as defined by the XDM data model. An item may be an atomic value, a node, a function (including maps and arrays), or an external object.

XdmItemType

Abstract class representing an item type. This may be the generic item type item(), an atomic type, the generic node type node(), a specific node kind such as element() or text(), or the generic function type function().

XdmMap

The class XdmMap represents a map item in an XPath 3.1 sequence: this is a new kind of item in the XDM data model. A map is a list of zero or more entries, each of which is a pair comprising a key (which is an atomic value) and a value (which is an arbitrary value).

XdmNode

The class XdmNode represents a Node in the XDM Data Model. A Node is an XdmItem, and is therefore an XdmValue in its own right, and may also participate as one item within a sequence value.

XdmNodeKind

Instances of XdmNodeKind represent the item types denoted in XPath as document-node(), element(), attribute(), text(), and so on. These are all represented by singular named instances.

XdmSequenceType

An instance of class XdmSequenceType represents a sequence type, that is, the combination of an item type and an occurrence indicator.

XdmValue

A value in the XDM data model. A value is a sequence of zero or more items, each item being an atomic value, a node, or a function item.

XPathCompiler

An XPathCompiler object allows XPath queries to be compiled. The compiler holds information that represents the static context for the expression.

XPathExecutable

An XPathExecutable represents the compiled form of an XPath expression. To evaluate the expression, it must first be loaded to form an XPathSelector.

XPathSelector

An XPathSelector represents a compiled and loaded XPath expression ready for execution. The XPathSelector holds details of the dynamic evaluation context for the XPath expression.

XQueryCompiler

The XQueryCompiler object allows XQuery queries to be compiled.

XQueryEvaluator

An XQueryEvaluator represents a compiled and loaded query ready for execution. The XQueryEvaluator holds details of the dynamic evaluation context for the query.

XQueryExecutable

An XQueryExecutable represents the compiled form of a query. To execute the query, it must first be loaded to form an XQueryEvaluator.

Xslt30Transformer

An Xslt30Transformer represents a compiled and loaded stylesheet ready for execution. The Xslt30Transformer holds details of the dynamic evaluation context for the stylesheet.

XsltCompiler

An XsltCompiler object allows XSLT 3.0 stylesheets to be compiled. The compiler holds information that represents the static context for the compilation.

XsltExecutable

An XsltExecutable represents the compiled form of a stylesheet. To execute the stylesheet, it must first be loaded to form an XsltTransformer or Xslt30Transformer.

XsltExecutable.ParameterDetails

Information about a global parameter to a stylesheet.

XsltPackage

An XsltPackage object represents the result of compiling an XSLT 3.0 package, as represented by an XML document containing an xsl:package element.

XsltTransformer

An XsltTransformer represents a compiled and loaded stylesheet ready for execution. The XsltTransformer holds details of the dynamic evaluation context for the stylesheet.

 

Enum Summary

Name Description
RecoveryPolicy

RecoveryPolicy is an enumeration of the different actions that can be taken when a "recoverable error" occurs.

SchemaValidationMode

Enumeration identifying the various Schema validation modes

TreeModel

Enumeration identifying the different tree model implementations

XdmAxis

Enumeration identifying the thirteen XPath axes

 

Exception Summary

Name Description