The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Version: 1.5.1
Title: Extensible Style-Sheet Language Transformations
Description: An extension for the 'xml2' package to transform XML documents by applying an 'xslt' style-sheet.
Maintainer: Jeroen Ooms <jeroenooms@gmail.com>
URL: https://ropensci.r-universe.dev/xslt https://docs.ropensci.org/xslt/
BugReports: https://github.com/ropensci/xslt/issues
Depends: xml2 (≥ 1.3.0)
Imports: Rcpp
LinkingTo: Rcpp, xml2
SystemRequirements: libxslt: libxslt1-dev (deb), libxslt-devel (rpm)
License: GPL-2 | GPL-3 [expanded from: GPL (≥ 2)]
RoxygenNote: 6.0.1
Suggests: testthat
NeedsCompilation: yes
Packaged: 2025-02-27 17:23:03 UTC; jeroen
Author: Jeroen Ooms ORCID iD [aut, cre]
Repository: CRAN
Date/Publication: 2025-02-27 23:00:02 UTC

XSLT 1.0 Transformations

Description

Transform an XML document by applying an XSL stylesheet. Usually returns the transformed xml_document, unless the stylesheet has <xsl:output method="text"> in which case we return a text string.

Usage

xml_xslt(doc, stylesheet, params)

xslt_version()

Arguments

doc

xml document as returned by xml2::read_xml

stylesheet

another xml document containing the XSL stylesheet

params

named list or vector with additional XSLT parameters

Details

This implementation supports XSLT 1.0 features plus most of the EXSLT set of processor-portable extensions functions. Unfortunately XSLT 2.0 or 3.0 features are only available in proprietary libraries and currently unsupported. However XSLT 2.0 is not widely adopted anyway because it is unavailable in most browsers.

Examples

doc <- read_xml(system.file("examples/cd_catalog.xml", package = "xslt"))
style <- read_xml(system.file("examples/cd_catalog.xsl", package = "xslt"))
html <- xml_xslt(doc, style)
cat(as.character(html))

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.