|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.activemath.xsl.Processor
org.activemath.xsl.JaxpProcessor
org.activemath.xsl.SaxonProcessor
public class SaxonProcessor
Class SaxonProcessor
A class for centrally processing the stylesheet transformations. This class uses the saxon stylesheets processor, including the URI resolving facilities.
These allow imports of stylesheets to be all relative to a single base URI.
| Field Summary |
|---|
| Fields inherited from class org.activemath.xsl.JaxpProcessor |
|---|
importedStylesheets, log, preparedTemplates, timestamps |
| Fields inherited from class org.activemath.xsl.Processor |
|---|
baseURI, hasGeneratedSymbolImports, thisLogCat |
| Constructor Summary | |
|---|---|
SaxonProcessor()
Constructor set baseURI to the Manager's one |
|
SaxonProcessor(String base)
Constructor |
|
| Method Summary | |
|---|---|
protected TransformerFactory |
getTransformerFactory()
get a instance of TransformerFactory |
static void |
main(String[] args)
method for testing parameters: first: URI of the stylesheet to use second:URI of the document to transform [third]:base URI for the Stylesheet (optional) If the third parameter is not set use the Manager's URI |
void |
transform(org.jdom.Document document,
OutputStream outStream,
String stylesheet,
Hashtable params)
transform a JDOM document by the given Stylesheet |
void |
transform(org.jdom.Document document,
Result result,
String stylesheet,
Hashtable params)
transform a JDOM document by the given Stylesheet |
void |
transform(org.jdom.Document document,
Writer writer,
String stylesheet,
Hashtable params)
transform a JDOM document by the given Stylesheet |
org.jdom.Document |
transform2Jdom(org.jdom.Document document,
String stylesheet,
Hashtable params)
transform a jdom document by the given Stylesheet Be aware that the resulting document has to be XML code to output a JDOOM document |
| Methods inherited from class org.activemath.xsl.JaxpProcessor |
|---|
calcImports0, loadTemplate, loadTemplateAsync, transform, transform |
| Methods inherited from class org.activemath.xsl.Processor |
|---|
getBaseURI, setBaseURI, setBaseURI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SaxonProcessor()
throws MalformedURLException
set baseURI to the Manager's one
MalformedURLException - if the Manager's baseURI is not a valid URL
public SaxonProcessor(String base)
throws MalformedURLException
base - the base URI of the stylesheets to use
MalformedURLException - if the baseURI is not a valid URL| Method Detail |
|---|
protected TransformerFactory getTransformerFactory()
TransformerFactory
getTransformerFactory in class JaxpProcessor
public org.jdom.Document transform2Jdom(org.jdom.Document document,
String stylesheet,
Hashtable params)
throws TransformerException
Be aware that the resulting document has to be XML code to output a JDOOM document
transform2Jdom in class JaxpProcessordocument - the jdom document to transformstylesheet - the URI of the stylesheet used for transformationparams - the parameters used during transformation (as Hashtable) - may be null
TransformerException - if the transformation fails
public void transform(org.jdom.Document document,
Result result,
String stylesheet,
Hashtable params)
throws TransformerException
transform in interface Stylesheetstransform in class JaxpProcessordocument - the JDOM document to transformresult - the Result of the transformation (that means: the transformed document)stylesheet - the URI of the stylesheet used for transformationparams - the parameters used during transformation (as Hashtable) - may be null
TransformerException - if the transformation fails
public void transform(org.jdom.Document document,
OutputStream outStream,
String stylesheet,
Hashtable params)
throws TransformerException
transform in interface Stylesheetstransform in class JaxpProcessordocument - the JDOM document to transformoutStream - the resultingOutputStream of the transformationstylesheet - the URI of the stylesheet used for transformationparams - the parameters used during transformation (as Hashtable) - may be null
TransformerException - if the transformation fails
public void transform(org.jdom.Document document,
Writer writer,
String stylesheet,
Hashtable params)
throws TransformerException
transform in interface Stylesheetstransform in class JaxpProcessordocument - the JDOM document to transformoutStream - the resultingWriter of the transformationstylesheet - the URI of the stylesheet used for transformationparams - the parameters used during transformation (as Hashtable) - may be null
TransformerException - if the transformation fails
public static void main(String[] args)
throws Exception
parameters:
Exception
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||