SxsltInitializationFunction: Set an R function to be called each time the R extension...

Description Usage Arguments Value Author(s) References See Also

Description

This function allows the R user to specify an R function that is called each time the XSLT extension module for R is initialized. This happens each time the extension is referenced within an XSL style sheet that is being applied to an XML document. This provides an opportunity for R to perform some additional computations. Typically, the function registers any R functions that should be made available to the extension as extension functions. However, other computations can be performed.

When the package is loaded, a default function (Sxslt:::defaultXSLTInitialization) is set as the initialization function. That handles registering functions queued with the addXSLTFunctions function also in this package.

Usage

1

Arguments

func

an R function which will be called each time the XSLT extension module is initialized. This function will be called with two arguments: a character vector of length 1 (i.e. a string) which identifies the URI of the extension, and an reference to the XSLT parser context. This is an opaque data type that can be used in calls to registerXSLFunction as the context argument.

Value

This returns the previously registered R function that was used for handling the initialization of the extension module. This allows one to save the value and restore it after applying a stylesheet to a particular document or set of documents.

Author(s)

Duncan Temple Lang <[email protected]>

References

http://www.omegahat.org/Sxslt http://www.xmlsoft.org/XSLT

registration.R in the examples/ directory.

See Also

registerXSLFunction addXSLTFunctions


sckott/sxslt documentation built on May 26, 2017, 3:49 a.m.