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

Description

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.

Usage

1
xsltProcessNode(ctx, node)

Arguments

ctx

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.

node

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

Details

This calls the C routine xsltProcessOneNode in the libxslt library.

Value

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

Author(s)

Duncan Temple Lang

References

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.