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")
omegahat/Sxslt documentation built on Jan. 17, 2024, 6:44 p.m.