public interface XSLTProcessor
| Modifier and Type | Interface and Description |
|---|---|
static class |
XSLTProcessor.TransformerHandlerAndValidity |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
ROLE
The role implemented by an
XSLTProcessor. |
| Modifier and Type | Method and Description |
|---|---|
javax.xml.transform.sax.TransformerHandler |
getTransformerHandler(org.apache.excalibur.source.Source stylesheet)
|
javax.xml.transform.sax.TransformerHandler |
getTransformerHandler(org.apache.excalibur.source.Source stylesheet,
org.xml.sax.XMLFilter filter)
Return a
TransformerHandler for a given
stylesheet Source. |
XSLTProcessor.TransformerHandlerAndValidity |
getTransformerHandlerAndValidity(org.apache.excalibur.source.Source stylesheet)
|
XSLTProcessor.TransformerHandlerAndValidity |
getTransformerHandlerAndValidity(org.apache.excalibur.source.Source stylesheet,
org.xml.sax.XMLFilter filter)
Return a
TransformerHandler and
SourceValidity for a given stylesheet
Source. |
void |
setTransformerFactory(java.lang.String classname)
Set the TransformerFactory for this instance.
|
void |
transform(org.apache.excalibur.source.Source source,
org.apache.excalibur.source.Source stylesheet,
org.apache.avalon.framework.parameters.Parameters params,
javax.xml.transform.Result result)
Applies an XSLT stylesheet to an XML document.
|
void setTransformerFactory(java.lang.String classname)
factory is invoked to return a
TransformerHandler to perform the transformation.classname - the name of the class implementing
TransformerFactory value. If an error is found
or the indicated class doesn't implement the required interface
the original factory of the component is maintained.javax.xml.transform.sax.TransformerHandler getTransformerHandler(org.apache.excalibur.source.Source stylesheet,
org.xml.sax.XMLFilter filter)
throws XSLTProcessorException
Return a TransformerHandler for a given
stylesheet Source. This can be used in a pipeline to
handle the transformation of a stream of SAX events. See org.apache.cocoon.transformation.TraxTransformer#setConsumer for
an example of how to use this method.
The additional filter argument, if it's not
null, is inserted in the chain SAX events as an XML
filter during the parsing or the source document.
This method caches the Templates object with meta information (modification time and list of included stylesheets) and performs a reparsing only if this changes.
stylesheet - a Source valuefilter - a XMLFilter valueTransformerHandler valueXSLTProcessorException - if an error occursXSLTProcessor.TransformerHandlerAndValidity getTransformerHandlerAndValidity(org.apache.excalibur.source.Source stylesheet, org.xml.sax.XMLFilter filter) throws XSLTProcessorException
Return a TransformerHandler and
SourceValidity for a given stylesheet
Source. This can be used in a pipeline to
handle the transformation of a stream of SAX events. See org.apache.cocoon.transformation.TraxTransformer#setConsumer for
an example of how to use this method.
The additional filter argument, if it's not
null, is inserted in the chain SAX events as an XML
filter during the parsing or the source document.
This method caches the Templates object with meta information (modification time and list of included stylesheets) and performs a reparsing only if this changes.
stylesheet - a Source valuefilter - a XMLFilter valueTransformerHandlerAndValidity valueXSLTProcessorException - if an error occursjavax.xml.transform.sax.TransformerHandler getTransformerHandler(org.apache.excalibur.source.Source stylesheet)
throws XSLTProcessorException
stylesheet - a Source valueTransformerHandler valueXSLTProcessorException - if an error occursXSLTProcessor.TransformerHandlerAndValidity getTransformerHandlerAndValidity(org.apache.excalibur.source.Source stylesheet) throws XSLTProcessorException
stylesheet - a Source valueXSLTProcessor.TransformerHandlerAndValidity valueXSLTProcessorException - if an error occursvoid transform(org.apache.excalibur.source.Source source,
org.apache.excalibur.source.Source stylesheet,
org.apache.avalon.framework.parameters.Parameters params,
javax.xml.transform.Result result)
throws XSLTProcessorException
Source
objects. The result of the transformation is placed in
Result, which should be properly initialized before
invoking this method. Any additional parameters passed in
params will become arguments to the stylesheet.source - a Source valuestylesheet - a Source valueparams - a Parameters valueresult - a Result valueXSLTProcessorException - if an error occurs