uk.ac.bham.gloss
Class Transform
java.lang.Object
uk.ac.bham.gloss.Transform
public class Transform
- extends java.lang.Object
Applies an XSLT transform to a file, using GLOSS's own resolver
and error handler to generate the messages. NOTE this transformer
does not support xinclude.
Copyright Richard Kaye 2007-8 for GLOSS, http://gloss.bham.ac.uk
Usage permitted according to the GPL. No waranty.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Transform
public Transform()
main
public static void main(java.lang.String[] args)
- main: called from the console. This reads the args,
makes a parametercontainer, and a logger and calls
transform(...), catching any exceptions.
transform
public static void transform(ParameterContainer params,
Logger logger)
throws org.xml.sax.SAXException,
java.io.IOException,
javax.xml.parsers.ParserConfigurationException,
javax.xml.transform.TransformerConfigurationException,
javax.xml.transform.TransformerException
- The main command. This is a "normal" implementation of XSLT
in java, except that the output file name is automatically generated
from the input if the stylesheet has the name "EXTA2EXTB.xsl".
The params parameter contains values as on the command line:
for each switch "-switch value" there is a parameter "switch" with
value "value" in params. Boolean switches (such as -[no]tracefiles)
should have parameter (in this case "tracefiles") with value "true"
or "false".
The xsl input file corresponds to parameter "xsl".
The main input file corresponds to parameter "input".
The main output file corresponds to parameter "output" and this
should be set to the empty string, "", for this to be calculated
automatically.
Default values will be added to the params object by these methods.
- Throws:
org.xml.sax.SAXException
java.io.IOException
javax.xml.parsers.ParserConfigurationException
javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerException