| java.lang.Object de.tisje.java2html.XsltTask
XsltTask | public class XsltTask (Code) | | 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')"/>
author: Jan Tisje version: 1.0 |
Method Summary | |
public static String | getSource() return java source in text form, html codes will be escaped. | public static void | main(String args) use this class like a common comandline tool. | public static void | readFile(String javaFile) read java source from file. | public static void | setOptions(boolean lineNumbers, boolean pre, boolean xhtml) set options from xsl. | public static void | setSource(String javaSource) hand over java source read from main xml file. | public static void | writeFile(String filename) output file to a separate xml file, less problems. | public static void | writeFile(File file) |
getSource | public static String getSource() throws IOException(Code) | | return java source in text form, html codes will be escaped.
|
main | public static void main(String args)(Code) | | use this class like a common comandline tool.
changing of options is not supported, yet
|
setOptions | public static void setOptions(boolean lineNumbers, boolean pre, boolean xhtml)(Code) | | set options from xsl.
Parameters: lineNumbers - if line numbers should be in the output code. Parameters: pre - if output code should be formatted using non-breaking spaces and <br>. Parameters: xhtml - if output should be viewable stand-alone. |
setSource | public static void setSource(String javaSource)(Code) | | hand over java source read from main xml file.
|
writeFile | public static void writeFile(File file) throws IOException(Code) | | output file to a separate xml file
|
|
|