Saxon.Api

Class DocumentBuilder

Class DomDestination

Class DynamicContext

Class DynamicError

Class EmptyEnumerator

Class ExtensionFunctionCall

Class ExtensionFunctionDefinition

Class NullDestination

Class ParameterDetails

Class Processor

Class QName

Class SchemaManager

Class SchemaValidator

Class Serializer

Class StandardLogger

Class StaticContext

Class StaticError

Class TextWriterDestination

Class TreeProtector

Class XPathCompiler

Class XPathExecutable

Class XPathSelector

Class XQueryCompiler

Class XQueryEvaluator

Class XQueryExecutable

Class XdmAnyFunctionType

Class XdmAnyItemType

Class XdmAnyNodeType

Class XdmAtomicType

Class XdmAtomicValue

Class XdmDestination

Class XdmEmptySequence

Class XdmFunctionItem

Class XdmItem

Class XdmItemType

Class XdmNode

Class XdmNodeKind

Class XdmSequenceType

Class XdmValue

Class XmlDestination

Class Xslt30Transformer

Class XsltCompiler

Class XsltExecutable

Class XsltPackage

Class XsltTransformer

Enum RecoveryPolicy

Enum SchemaValidationMode

Enum TreeModel

Enum WhitespacePolicy

Enum XdmAxis

Interface IMessageListener

Interface IQueryResolver

Interface IResultDocumentHandler

Interface IXdmEnumerator

Interface IXmlLocation

Interface SchemaResolver

 

Saxon.Api
Class Xslt30Transformer


public class Xslt30Transformer
implements object

Property Summary
 XdmItem GlobalContextItem

Supply the context item to be used when evaluating global variables and parameters. The item to be used as the context item within the initializers of global variables and parameters. This argument can be null if no context item is to be supplied.

 Controller GetUnderlyingController

Get the underlying Controller used to implement this XsltTransformer. This provides access to lower-level methods not otherwise available in the s9api interface. Note that classes and methods obtained by this route cannot be guaranteed stable from release to release.

 SchemaValidationMode SchemaValidationMode

The SchemaValidationMode to be used in this transformation, especially for documents loaded using the doc(), document(), or collection() functions.

 String BaseOutputURI
 XmlResolver InputXmlResolver

The XmlResolver to be used at run-time to resolve and dereference URIs supplied to the doc() and document() functions.

 IMessageListener MessageListener Listener for messages output using <xsl:message>.

The caller may supply a message listener before calling Run; the processor will then invoke the listener once for each message generated during the transformation. Each message will be output as an object of type XdmNode representing a document node.

If no message listener is supplied by the caller, message information will be written to the standard error stream.

 StandardLogger TraceFunctionDestination Destination for output of messages using <trace()>.

If no message listener is supplied by the caller, message information will be written to the standard error stream.

 QName InitialMode

initial mode for the transformation. This is used if the stylesheet is subsequently invoked by any of the applyTemplates methods.

 
Method Summary
 void SetStylesheetParameters(System.Collections.Generic.Dictionary{Saxon.Api.QName , Saxon.Api.XdmValue} parameters)

Supply the values of global stylesheet variables and parameters.

 void SetInitialTemplateParameters(System.Collections.Generic.Dictionary{Saxon.Api.QName parameters, Saxon.Api.XdmValue} tunnel, bool )
 void ApplyTemplates(System.IO.Stream input, XmlDestination destination)

Invoke the stylesheet by applying templates to a supplied Source document, sending the results (wrapped in a document node) to a given Destination. The invocation uses any initial mode set using {@link #setInitialMode(QName)}, and any template parameters set using {@link #setInitialTemplateParameters(java.util.Map, boolean)}.

 XdmValue ApplyTemplates(System.IO.Stream input, System.Uri baseUri)

Invoke the stylesheet by applying templates to a supplied Source document, returning the raw results as an {@link XdmValue}. The invocation uses any initial mode set using {@link #setInitialMode(QName)}, and any template parameters set using {@link #setInitialTemplateParameters(java.util.Map, boolean)}.

 void ApplyTemplates(XdmValue selection, XmlDestination destination)

Invoke the stylesheet by applying templates to a supplied input sequence, sending the results (wrapped in a document node) to a given Destination. The invocation uses any initial mode set using {@link #setInitialMode(QName)}, and any template parameters set using {@link #setInitialTemplateParameters(java.util.Map, boolean)}.

 XdmValue ApplyTemplates(XdmValue selection)

Invoke the stylesheet by applying templates to a supplied input sequence, returning the raw results. as an {@link XdmValue}. The invocation uses any initial mode set using {@link #setInitialMode(QName)}, and any template parameters set using {@link #setInitialTemplateParameters(java.util.Map, boolean)}.

 void CallTemplate(QName templateName, XmlDestination destination)

Invoke a transformation by calling a named template. The results of calling the template are wrapped in a document node, which is then sent to the specified destination. If {@link #setInitialTemplateParameters(java.util.Map, boolean)} has been called, then the parameters supplied are made available to the called template (no error occurs if parameters are supplied that are not used).

 XdmValue CallTemplate()
 XdmValue CallFunction(QName function, Saxon.Api.XdmValue[] argument)

Call a public user-defined function in the stylesheet.

 void CallFunction()
 
Property Detail

GlobalContextItem

public XdmItem GlobalContextItem {get; set; }

Supply the context item to be used when evaluating global variables and parameters. The item to be used as the context item within the initializers of global variables and parameters. This argument can be null if no context item is to be supplied.


GetUnderlyingController

public Controller GetUnderlyingController {get; }

Get the underlying Controller used to implement this XsltTransformer. This provides access to lower-level methods not otherwise available in the s9api interface. Note that classes and methods obtained by this route cannot be guaranteed stable from release to release.

returns
The underlying {@link Controller}

SchemaValidationMode

public SchemaValidationMode SchemaValidationMode {get; set; }

The SchemaValidationMode to be used in this transformation, especially for documents loaded using the doc(), document(), or collection() functions.


BaseOutputURI

public String BaseOutputURI {get; set; }

InputXmlResolver

public XmlResolver InputXmlResolver {get; set; }

The XmlResolver to be used at run-time to resolve and dereference URIs supplied to the doc() and document() functions.


MessageListener

public IMessageListener MessageListener {get; set; }
Listener for messages output using <xsl:message>.

The caller may supply a message listener before calling Run; the processor will then invoke the listener once for each message generated during the transformation. Each message will be output as an object of type XdmNode representing a document node.

If no message listener is supplied by the caller, message information will be written to the standard error stream.

Each message is presented as an XML document node. Calling ToString() on the message object will usually generate an acceptable representation of the message.

When the <xsl:message> instruction specifies terminate="yes", the message is first notified using this interface, and then an exception is thrown which terminates the transformation.


TraceFunctionDestination

public StandardLogger TraceFunctionDestination {get; set; }
Destination for output of messages using <trace()>.

If no message listener is supplied by the caller, message information will be written to the standard error stream.

The supplied destination is ignored if a TraceListener is in use.

Since 9.6. Changed in 9.6 to use a StandardLogger


InitialMode

public QName InitialMode {set; }

initial mode for the transformation. This is used if the stylesheet is subsequently invoked by any of the applyTemplates methods.

The value may be the name of the initial mode, or null to indicate the default (unnamed) mode


Method Detail

SetStylesheetParameters

public void SetStylesheetParameters(System.Collections.Generic.Dictionary{Saxon.Api.QName ,
                               Saxon.Api.XdmValue} parameters)

Supply the values of global stylesheet variables and parameters.

Parameters:
-
parameters a map whose keys are QNames identifying global stylesheet parameters, and whose corresponding values are the values to be assigned to those parameters. If necessary the supplied values are converted to the declared type of the parameter. The contents of the supplied map are copied by this method, so subsequent changes to the map have no effect.
parameters -
Parameters. A Dictionary whose keys are QNames identifying global stylesheet parameters, and whose corresponding values are the values to be assigned to those parameters. If necessary the supplied values are converted to the declared type of the parameter. The contents of the supplied map are copied by this method, so subsequent changes to the map have no effect.

SetInitialTemplateParameters

public void SetInitialTemplateParameters(System.Collections.Generic.Dictionary{Saxon.Api.QName parameters,
                                    Saxon.Api.XdmValue} tunnel,
                                    bool )
Parameters:
parameters -
The parameters to be used for the initial template
tunnel -
true if these values are to be used for setting tunnel parameters; false if they are to be used for non-tunnel parameters

ApplyTemplates

public void ApplyTemplates(System.IO.Stream input,
                      XmlDestination destination)

Invoke the stylesheet by applying templates to a supplied Source document, sending the results (wrapped in a document node) to a given Destination. The invocation uses any initial mode set using {@link #setInitialMode(QName)}, and any template parameters set using {@link #setInitialTemplateParameters(java.util.Map, boolean)}.

Parameters:
input -
Input. The source document.To apply more than one transformation to the same source document, the source document tree can be pre-built using a {@link DocumentBuilder}.
destination -
Destination. the destination of the result document produced by wrapping the result of the apply-templates call in a document node. If the destination is a {@link Serializer}, then the serialization parameters set in the serializer are combined with those defined in the stylesheet (the parameters set in the serializer take precedence).

ApplyTemplates

public XdmValue ApplyTemplates(System.IO.Stream input,
                      System.Uri baseUri)

Invoke the stylesheet by applying templates to a supplied Source document, returning the raw results as an {@link XdmValue}. The invocation uses any initial mode set using {@link #setInitialMode(QName)}, and any template parameters set using {@link #setInitialTemplateParameters(java.util.Map, boolean)}.

Parameters:
input -
Input. The source document
baseUri -
Base URI.
returns
XdmValue. The raw result of processing the supplied Source using the selected template rule, without wrapping the returned sequence in a document node

ApplyTemplates

public void ApplyTemplates(XdmValue selection,
                      XmlDestination destination)

Invoke the stylesheet by applying templates to a supplied input sequence, sending the results (wrapped in a document node) to a given Destination. The invocation uses any initial mode set using {@link #setInitialMode(QName)}, and any template parameters set using {@link #setInitialTemplateParameters(java.util.Map, boolean)}.

Parameters:
selection -
Selection. the initial value to which templates are to be applied (equivalent to the select attribute of xsl:apply-templates)
destination -
Destination. The destination of the result document produced by wrapping the result of the apply-templates call in a document node. If the destination is a {@link Serializer}, then the serialization parameters set in the serializer are combined with those defined in the stylesheet (the parameters set in the serializer take precedence).

ApplyTemplates

public XdmValue ApplyTemplates(XdmValue selection)

Invoke the stylesheet by applying templates to a supplied input sequence, returning the raw results. as an {@link XdmValue}. The invocation uses any initial mode set using {@link #setInitialMode(QName)}, and any template parameters set using {@link #setInitialTemplateParameters(java.util.Map, boolean)}.

Parameters:
selection -
Selection. selection the initial value to which templates are to be applied (equivalent to the select attribute of xsl:apply-templates)
returns
Xdmvalue. he raw result of applying templates to the supplied selection value, without wrapping in a document node or serializing the result. If there is more that one item in the selection, the result is the concatenation of the results of applying templates to each item in turn.

CallTemplate

public void CallTemplate(QName templateName,
                    XmlDestination destination)

Invoke a transformation by calling a named template. The results of calling the template are wrapped in a document node, which is then sent to the specified destination. If {@link #setInitialTemplateParameters(java.util.Map, boolean)} has been called, then the parameters supplied are made available to the called template (no error occurs if parameters are supplied that are not used).

Parameters:
templateName -
The name of the initial template. This must match the name of a public named template in the stylesheet. If the value is null, the QName xsl:initial-template is used.
destination -
The destination of the result document produced by wrapping the result of the apply-templates call in a document node. If the destination is a {@link Serializer}, then the serialization parameters set in the serializer are combined with those defined in the stylesheet (the parameters set in the serializer take precedence).

CallTemplate

public XdmValue CallTemplate()

CallFunction

public XdmValue CallFunction(QName function,
                    Saxon.Api.XdmValue[] argument)

Call a public user-defined function in the stylesheet.

Parameters:
function -
The name of the function to be called
argument -
The values of the arguments to be supplied to the function. These will be converted if necessary to the type as defined in the function signature, using the function conversion rules.
returns
the result of calling the function. This is the raw result, without wrapping in a document node and without serialization.

CallFunction

public void CallFunction()