|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.tisje.java2html.XsltTask
public class XsltTask
This class is an interface between XSL and Java2Html.
Before invoking, a namespace def must be added to the xsl:stylesheet
tag:
xmlns:j2h="de.tisje.java2html.XsltTask"
After that, it may be used this way:
<xsl:value-of select="j2h:setSource(.)"/> <xsl:value-of select="j2h:writeFile('temp.xml')"/> <xsl:copy-of select="document('temp.xml')"/>
Constructor Summary | |
---|---|
XsltTask()
|
Method Summary | |
---|---|
static java.lang.String |
getSource()
return java source in text form, html codes will be escaped. |
static void |
main(java.lang.String[] args)
use this class like a common comandline tool. |
static void |
readFile(java.lang.String javaFile)
read java source from file. |
static void |
setOptions(boolean lineNumbers,
boolean pre,
boolean xhtml)
set options from xsl. |
static void |
setSource(java.lang.String javaSource)
hand over java source read from main xml file. |
static void |
writeFile(java.io.File file)
output file to a separate xml file |
static void |
writeFile(java.lang.String filename)
Deprecated. As of Mar 11, 2004 (Markus Gebhard), replaced by writeFile(File) |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public XsltTask()
Method Detail |
---|
public static void setOptions(boolean lineNumbers, boolean pre, boolean xhtml)
lineNumbers
- if line numbers should be in the output code.pre
- if output code should be formatted using non-breaking spaces and <br>.xhtml
- if output should be viewable stand-alone.public static void setSource(java.lang.String javaSource)
public static void readFile(java.lang.String javaFile) throws java.io.IOException
java.io.IOException
public static java.lang.String getSource() throws java.io.IOException
java.io.IOException
public static void writeFile(java.lang.String filename) throws java.io.IOException
writeFile(File)
java.io.IOException
public static void writeFile(java.io.File file) throws java.io.IOException
java.io.IOException
public static void main(java.lang.String[] args)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |