Description Usage Arguments Author(s) References See Also
An XPathNodeSet
object is a container passed from XML/XSL to
R and is a reference to a C-level data structure that contains a
collection/set of nodes. It is like a list in that it contains zero
or more elements, and so we have R-level methods that allow it to be
used like a list within R code. These include operations to access
an individual element by position, calculate the length and apply a
function to each element of the set.
The function XPathNodeSet
object is used to create an XPathNodeSet
object from within R. This is useful if we want the result of an R
function called from XSL to return a collection of nodes for further
processing in the XSL transformer or to be included in the output
document.
Since an XPathNodeSet
is like a list, we provide a
a method for [[
to extract individual elements.
1 2 3 4 5 |
... |
individual XMLInternalNode elements.
This can be obtained from other XSL calls operations
or by explictly creating internal nodes using
functions in the In the |
els |
the list of XMLInternalNode objects that are to be put into the XPathNodeSet object. This is for programmatic use when we already have a list XMLInternalNode objects, as opposed to the ... mechanism which is for interactive use when we have individual elements. |
x |
the |
i, j |
the index/indices of the element to be returned. |
duplicate |
a logical value indicating whether the nodes being inserted into the XPathNodeSet container should be cloned/copied (in entirety, i.e. recursively). |
references |
a logical value that controls whether
we return the values of the XPath elements in the node set
or references to the C-level objects. |
Duncan Temple Lang
http://www.omegahat.org/Sxslt, http://www.omegahat.org/SXalan, http://www.w3.org/Style/XSL
[.XMLAttributes
[.XMLChildren
node.xsl
, node.xml
and ok.R
in the examples directory.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.