java.lang.Objectde.dfki.lt.sprout.xtdl2xml.toLaTeX
Read XTDL (SProUT rule syntax), TFS-XML, SProUTput-XML or XTDL-XML from stdin (main()) or input String (translate()), detect input type, translate it to LaTeX code using an XSLT stylesheet (fsxml2latex.xsl). Return LaTeX code via stdout (main()) or as String (translate()).
FS2LaTeX docs, DTDs, downloads at http://www.dfki.de/~uschaefer/fs2latex/
(C) 2004 German Research Center for Artificial Intelligence (DFKI GmbH)
Language Technology Lab, Stuhlsatzenhausweg 3, D-66123 Saarbruecken, Germany
Permission is granted to copy and use this stylesheet freely provided
the copyright notice and this permission notice are preserved.
| Field Summary | |
static java.lang.String |
STYLESHEET
STYLESHEET specifies the resource location for
the fsxml2latex stylesheet. |
| Constructor Summary | |
toLaTeX()
|
|
| Method Summary | |
static java.util.Properties |
args2props(java.lang.String[] args)
Translate command line args of the form -name=value to a Properties object. |
static void |
main(java.lang.String[] args)
This is the main method for command line access. |
static void |
props2params(java.util.Properties props,
javax.xml.transform.Transformer t)
Add the parameters encoded as Properties as XSLT parameters to the Transformer. |
static java.lang.String |
readString()
Read input from stdin and return as String. |
static java.lang.String |
transform(java.lang.String xml,
java.util.Properties params)
Transform XML (TFS-XML, XTDL-XML, SProUTput-XML) to LaTeX using the stylesheet specified in STYLESHEET
and return the generated LaTeX code as String. |
static java.lang.String |
translate(java.lang.String input,
java.util.Properties params)
This is the 'API' method to be used from within other Java classes. |
static void |
usage()
Print command line syntax to stderr. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String STYLESHEET
STYLESHEET specifies the resource location for
the fsxml2latex stylesheet.
| Constructor Detail |
public toLaTeX()
| Method Detail |
public static void main(java.lang.String[] args)
args - parameter of the form -name=value are passed to
the fsxml2latex XSLT stylesheet
public static java.lang.String translate(java.lang.String input,
java.util.Properties params)
throws de.dfki.lt.sprout.xtdl2xml.ParseException,
de.dfki.lt.sprout.xtdl2xml.TokenMgrError,
java.lang.NullPointerException,
javax.xml.transform.TransformerConfigurationException,
javax.xml.transform.TransformerException
input - The input String (xtdl syntax or XML)params - Parameters for the stylesheet encoded as Properties
de.dfki.lt.sprout.xtdl2xml.ParseException
de.dfki.lt.sprout.xtdl2xml.TokenMgrError
java.lang.NullPointerException
javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerExceptionpublic static void usage()
public static java.lang.String readString()
throws java.io.IOException
java.io.IOException
public static java.lang.String transform(java.lang.String xml,
java.util.Properties params)
throws java.lang.NullPointerException,
javax.xml.transform.TransformerConfigurationException,
javax.xml.transform.TransformerException
STYLESHEET
and return the generated LaTeX code as String.
xml - XML input as Stringparams - Stylesheet parameters encoded as Properties
java.lang.NullPointerException
javax.xml.transform.TransformerConfigurationException
javax.xml.transform.TransformerExceptionpublic static java.util.Properties args2props(java.lang.String[] args)
args - Input args
public static void props2params(java.util.Properties props,
javax.xml.transform.Transformer t)
props - Input Properties encoding the parameterst - Transformer that gets the parameters