getXSLVariables: Get the value of one or more top-level/global XSL parameters

Description Usage Arguments Value Author(s) References See Also

Description

This function allows an R function invoked from an XSL template to query the current value of one or more top-level XSL parameters or global variables that are defined in the XSL style sheet(s). These parameters can be set by the caller and have default values set in the style sheets.

This can only be called during an XSL transformation and by an R function that has access to the XMLXPathParserContext-class associated with the XSL transformation.

Usage

1
2
getXSLVariables(ctxt, vars, uris = names(vars), 
                         nsDefs =  xmlNamespaceDefinitions(as(ctxt, "XMLInternalDocument"), simplify = TRUE))

Arguments

ctxt

an XMLXPathParserContext-class object representing the internal control structure for the XSL transformation in effect.

vars

the names of the variables of interest. These can have a name space prefix qualifying them, e.g r:verbose. The name space has to be resolved either via the nsDefs vector.

uris

a character vector giving the prefixes of the namespaces of the variables being requested.

nsDefs

a character vector giving namespace prefix mappings to the corresponding URIs

Value

A named character vector with the values.

Author(s)

Duncan Temple Lang

References

XSL

See Also

xsltApplyStyleSheet registerXSLFunction XSLTContextFunction


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