findXSLMacros: Find macro-like XSL templates

Description Usage Arguments Value Author(s) References Examples

View source: R/xslTools.R

Description

This is a heuristic function that attempts to find XSL templates that correspond to macro or text substitution operations. The idea is that we use XML elements such as <js> or <R> in our XML documents and then have these mapped to literals in HTML or LaTeX.

Usage

1

Arguments

doc

this can be either the name of an XML document, a directory or a parsed XML document. If this is a directory, we process all the files that end in "xsl" in that directory.

Value

A list of the templates that appear to correspond to literal text expansion.

Author(s)

Duncan Temple Lang

References

XSL

Examples

1
2
3
4
5
6
7
f = system.file("XSL", "OmegahatXSL", "latex", package = "XDynDocs")
if(f != "") {
  o = findXSLMacros(f)
  o
  names(o)
  table(sapply(o, XML::docName))
}

omegahat/XDocTools documentation built on May 24, 2019, 1:57 p.m.