|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.cocoon.sax.util.TransformationUtils
public final class TransformationUtils
This class contains utility methods to transform an XML string by using XSLT. It hides all the details of the Java TRaX API by using SAX pipeline components that are linked to each other. This means that the SAX events stream through the pipeline and are serialized at the end. NOTE: Exception handling needs to be discussed and will probably change.
Method Summary | |
---|---|
static void |
transform(String xmlString,
Map<String,Object> xsltParameters,
Properties outputProperties,
OutputStream outputStream,
URL... xsltUrls)
Transform an XML string and write the result into an OutputStream . |
static String |
transform(String xmlString,
Map<String,Object> xsltParameters,
Properties outputProperties,
URL... xsltUrls)
Transform an XML string by using XSLT. |
static String |
transform(String xmlString,
Map<String,Object> xsltParameters,
URL... xsltUrls)
Transform an XML string by using XSLT. |
static void |
transform(String xmlString,
OutputStream outputStream,
Map<String,Object> xsltParameters,
URL... xsltURLs)
Transform an XML string by using XSLT and write the result into an OutputStream . |
static void |
transform(String xmlString,
OutputStream outputStream,
Properties outputProperties,
URL... xsltURLs)
Transform an XML string by using XSLT and write the result into an OutputStream . |
static void |
transform(String xmlString,
OutputStream outputStream,
URL... xsltURLs)
Transform an XML string by using XSLT and write the result into an OutputStream . |
static String |
transform(String xmlString,
Properties outputProperties,
URL... xsltUrls)
Transform an XML string by using XSLT. |
static String |
transform(String xmlString,
URL... xsltUrls)
Transform an XML string by using XSLT. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static String transform(String xmlString, URL... xsltUrls) throws Exception
xmlString
- The String to be transformed.xsltUrls
- The URL
s of all XSLT stylesheets that are used in the order they are
passed to transform the passed XML string.
String
.
Exception
public static String transform(String xmlString, Map<String,Object> xsltParameters, URL... xsltUrls) throws Exception
xmlString
- The String to be transformed.xsltParameters
- Parameters that are available in all XSLT stylesheets.xsltUrls
- The URL
s of all XSLT stylesheets that are used in the order they are
passed to transform the passed XML string.
String
.
Exception
public static String transform(String xmlString, Properties outputProperties, URL... xsltUrls) throws Exception
xmlString
- The String to be transformed.outputProperties
- XML output properties. See "http://www.w3.org/TR/xslt#output".xsltUrls
- The URL
s of all XSLT stylesheets that are used in the order they are
passed to transform the passed XML string.
String
.
Exception
public static String transform(String xmlString, Map<String,Object> xsltParameters, Properties outputProperties, URL... xsltUrls) throws Exception
xmlString
- The String to be transformed.xsltParameters
- Parameters that are available in all XSLT stylesheets.outputProperties
- XML output properties. See "http://www.w3.org/TR/xslt#output".xsltUrls
- The URL
s of all XSLT stylesheets that are used in the order they are
passed to transform the passed XML string.
String
.
Exception
public static void transform(String xmlString, OutputStream outputStream, URL... xsltURLs) throws Exception
OutputStream
.
xmlString
- The String to be transformed.outputStream
- The result is written into this OutputStream
.xsltURLs
- The URL
s of all XSLT stylesheets that are used in the order they are
passed to transform the passed XML string.
Exception
public static void transform(String xmlString, OutputStream outputStream, Map<String,Object> xsltParameters, URL... xsltURLs) throws Exception
OutputStream
.
This method also allows passing parameters to the stylesheets.
xmlString
- The String to be transformed.outputStream
- The result is written into this OutputStream
.xsltParameters
- Parameters that are available in all XSLT stylesheets.xsltURLs
- The URL
s of all XSLT stylesheets that are used in the order they are
passed to transform the passed XML string.
Exception
public static void transform(String xmlString, OutputStream outputStream, Properties outputProperties, URL... xsltURLs) throws Exception
OutputStream
.
This method allows defining the output properties.
xmlString
- The String to be transformed.outputStream
- The result is written into this OutputStream
.outputProperties
- XML output properties. See "http://www.w3.org/TR/xslt#output".xsltURLs
- The URL
s of all XSLT stylesheets that are used in the order they are
passed to transform the passed XML string.
Exception
public static void transform(String xmlString, Map<String,Object> xsltParameters, Properties outputProperties, OutputStream outputStream, URL... xsltUrls) throws Exception
OutputStream
.
xmlString
- The String to be transformed.xsltParameters
- Parameters that are available in all XSLT stylesheets.outputProperties
- XML output properties. See "http://www.w3.org/TR/xslt#output".outputStream
- The result is written into this OutputStream
.xsltUrls
- The URL
s of all XSLT stylesheets that are used in the order they are
passed to transform the passed XML string.
Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |