inst/examples/stop.R

orig = xsltApplyStyleSheet("sqrt.xml", "sqrt.xsl")

sqrt =
function(ctxt, x) {
  xslWarning("About to stop the XSL processing prematurely", context = ctxt)
  .Call("R_xslStop", ctxt)
  base::sqrt(x)
}

class(sqrt) = "XSLTContextFunction"

doc = xsltApplyStyleSheet("sqrt.xml", "sqrt.xsl")
sckott/sxslt documentation built on May 29, 2019, 4:06 p.m.