|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.xml.transform.TransformerFactory
javax.xml.transform.sax.SAXTransformerFactory
com.caucho.xsl.AbstractStylesheetFactory
com.caucho.xsl.Xsl
public class Xsl
Public facade for creating stylesheets. The Xsl factory
creates standard XSL stylesheets. A Stylesheet object represents
a compiled stylesheet. You'll need to create a Transformer to
actually perform any transformations.
import java.io.*;
import javax.xml.transform.*;
import javax.xml.transform.stream.*;
import org.xml.sax.*;
import com.caucho.xsl.*;
...
TransformerFactory factory = new Xsl();
StreamSource xslSource = new StreamSource("mystyle.xsl");
Transformer transformer = factory.newTransformer(xslSource);
StreamSource xmlSource = new StreamSource("test.xml");
StreamResult htmlResult = new StreamResult("test.html");
transformer.transform(xmlSource, htmlResult);
| Field Summary |
|---|
| Fields inherited from class javax.xml.transform.sax.SAXTransformerFactory |
|---|
FEATURE, FEATURE_XMLFILTER |
| Constructor Summary | |
|---|---|
Xsl()
|
|
| Method Summary | |
|---|---|
static void |
main(java.lang.String[] args)
|
protected org.w3c.dom.Document |
parseXSL(ReadStream rs)
Parses the XSL into a DOM document. |
| Methods inherited from class javax.xml.transform.TransformerFactory |
|---|
newInstance, newInstance |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Xsl()
| Method Detail |
|---|
protected org.w3c.dom.Document parseXSL(ReadStream rs)
throws javax.xml.transform.TransformerConfigurationException
parseXSL in class AbstractStylesheetFactoryrs - the input stream.
javax.xml.transform.TransformerConfigurationExceptionpublic static void main(java.lang.String[] args)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||