toc.XSL: Get a table of contents of templates in an XSL document (and...

Description Usage Arguments Value Author(s) See Also Examples

Description

This is a utility function that retrieves the specification of the node names and expressions that templates match in an XSL templates. This is useful for understanding what node names are "active". This can help in documenting and understanding the entire set of nodes.

This function can recursively process sub-XSL documents which are import'ed or include'd via XSL.

Usage

1
toc.XSL(doc, base = if (is.character(doc)) doc else docName(doc), recursive = TRUE, ignore = character())

Arguments

doc

the XSL document, either a file name, URL or a parsed document

base

the base document, which defaults to doc.

recursive

a logical value indicating whether to process xsl:import or xsl:include.

ignore

a character vector. This can be a vector of URLs or file names to not process

Value

A character vector giving the individual parts of the different templates, e.g c("r:code", "r:expr") from the template <xsl:template match="r:code|r:expr"> All of the different templates are merged together.

Author(s)

Duncan Temple Lang

See Also

xmlParse getNodeSet

Examples

1
2
3
4
5
6
7
8
library(XML)
  xsl = catalogResolve("http://www.omegahat.org/XDynDocs/XSL/html.xsl")
 
  tmpls = toc.XSL(xsl, recursive = FALSE)

  tmpls = toc.XSL(xsl)

  tmpls = toc.XSL(xsl, ignore = "http://docbook")

sckott/sxslt documentation built on May 26, 2017, 3:49 a.m.