Editing the Document Template
The goal of the dynamic documentation approach is to facilitate
including output from statistical software within regular, text
documents. To do this, the author of the document must specify
where the output is to appear, and indicate how the statistical
software is to generate the output.
One can use the usual XML/HTML/SGML editors to create the non-dynamic
elements of the document (e.g. the text, static images, etc.). We use
tools such as the Netscape composer and psgml mode for emacs.
FrameMaker can generate SGML. Microsoft Word can generate XML
representations of documents.
We are creating a tool which allows one to interactively merge
R commands and/or the output into an XML document.
Tools such as Merlot allow one to edit
an XML document by looking at both the text
and the tree of XML nodes.
This type of interface is shown in the following figure.
The second aspect of editing involves inserting suitable XML
representations of the R commands to be used to generate output and
also the output of R results. The two SXMLObjects package
allows one to generate these XML representations of R expressions and
arbitrary output objects so that they can be inserted directly into
other XML documents.
Drag and Drop
The idea is that one will be able to add nodes
from the R session input and output lists directly to the
document being created.
One will drag and drop a node from either pane in the lower
display into the document tree in the upper pane.
The SXMLObjects
package for R (and S-Plus) provides facilities for writing XML
representations of R objects. Additionally, it provides XSL style
files for rendering them in HTML.
The SXalan package from
the Omegahat project allows the transformation of XML documents using
XSL to invoke R functions and evaluate R expressions.
It extends the Apache XSL transformer, Xalan,
Duncan Temple Lang
<duncan@research.bell-labs.com>
Last modified: Sun Apr 8 16:41:46 EDT 2001