Description Usage Arguments Value Author(s) See Also Examples
This function allows the R programmer
to declare a new XSLT extension namespace.
One can either register functions for this extension
in this call or via subsequent direct
calls to registerXSLTFunctions
.
1 | registerXSLTExtension(ns, ..., .funcs = list())
|
ns |
the namespace's URI. This can also be given
in the form |
... |
name = function pairs of functions that are to be registered for this XSL extension and made available each time an XSL processor is activated. |
.funcs |
this is an alternative form of specifying the collection of name = function pairs which is more convenient when these functions are already in list form. The ... approach is useful for "interactive" use, i.e. when the functions are known when the command is written. |
TRUE
! It is the side-effect of creating
a registry for this namespace that it is of interest.
Duncan Temple Lang
1 2 3 4 5 6 7 8 9 10 11 12 13 | library(XML) # for xmlValue
e = new.env()
omgEval = function(node) {
eval(parse(text = xmlValue(node)), e)
}
environment(omgEval) = e
registerXSLTExtension(c("omg" = "http://www.omegahat.org"),
eval = omgEval)
# now any XSL file can call omg:eval() by
# declaring the namespace http://www.omegahat.org
# and adding it to the extension-element-prefixes
#
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.