xsltProcessNode: Process a single XML node within the context of an XSL...

Description Usage Arguments Details Value Author(s) References See Also

View source: R/context.R


At present, this is not available on Windows as the xsltProcessOneNode routine is not accessible from the binary version of the libxslt library.

This allows us to essentially call apply-templates to a single node from within R rather than requiring such a call to be in a template within the XSL style sheet. This gives control to the R programmer to define what happens independently of, or in concert with, the XSL stylesheet and allows us to program a transformation using both languages.


xsltProcessNode(ctx, node)



the XMLXPathParserContext object that is passed to an R function that is called from the XSL transformation. Such an R function must be registered with XSLT as an extension function, typically using addXSLTFunctions and must be an object of (S3) class XSLContextFunction created by a call to xsltContextFunction.


the XML node which is to be processed by the collection of templates


This calls the C routine xsltProcessOneNode in the libxslt library.


NULL. The purpose is for the side effect of modifying the target/output document being created by the XSL transformation.


Duncan Temple Lang


http://www.w3.org/Style/XSL http://www.xmlsoft.org/XSLT

See Also

xsltContextFunction addXSLTFunctions xsltApplyStyleSheet

See applyTemplates.R and the associated XML and XSL files in the examples/ directory.

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