javaXMLTransform
function generates a
formatted report from an XML file, or transforms one type of XML into
another type. The functions
xml2htm
,
xml2html
,
xml2pdf
,
xml2ps
,
xml2rtf
, and
xml2xml
are convenience functions that call
javaXMLTransform
with the appropriate type specified.
javaXMLTransform(xmlFileName, outFileName, xslFileName=NULL, type="html", loggingLevel=2) xml2htm(xmlFileName, outFileName, xslFileName=NULL) xml2html(xmlFileName, outFileName, xslFileName=NULL) xml2pdf(xmlFileName, outFileName, xslFileName=NULL, loggingLevel=2) xml2ps(xmlFileName, outFileName, xslFileName=NULL, loggingLevel=2) xml2rtf(xmlFileName, outFileName, xslFileName=NULL, loggingLevel=2) xml2xml(xmlFileName, outFileName, xslFileName=NULL)
xslFileName
is specified, the standard
SplusObjects.xsl file is used for HTML or XML, and
SplusObjects_FO.xsl is used for other types.
These functions use Java tools to perform XML transforms. XSLT is used to generate HTML or XML. XSL:FO is used to generate PDF, Postscript, or RTF.
Currently the HTML and XML transforms use classes in
javax.xml.transform
, the RTF transform uses
classes in
org.jfor
, and
the PDF and PS transforms use classes in
org.apache.fop
. The
javax.xml.transform
classes are standard
JFC classes starting with JDK1.4, the
org.jfor
classes are available from www.jfor.org, and the
org.apache.fop
classes are available from
www.apache.org. This implementation may change in the future
as improved transformation tools become available.
These functions require a Java-enabled Spotfire S+. On Windows, Java can be
enabled by loading the
winjava
library.
On UNIX, Java can be enabled by using
Splus -j
or
Splus -g
to start Spotfire S+.
createXMLFile(fuel.frame, "my_fuel.xml") xml2html("my_fuel.xml", "my_fuel.htm") xml2pdf("my_fuel.xml", "my_fuel.pdf")