|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the interface of the XSLT processor.
Nested Class Summary | |
static class |
XSLTProcessor.TransformerHandlerAndValidity
|
Field Summary | |
static java.lang.String |
ROLE
The role implemented by an XSLTProcessor . |
Method Summary | |
javax.xml.transform.sax.TransformerHandler |
getTransformerHandler(Source stylesheet)
Same as getTransformerHandler(Source,XMLFilter) , with
filter set to null . |
javax.xml.transform.sax.TransformerHandler |
getTransformerHandler(Source stylesheet,
org.xml.sax.XMLFilter filter)
Return a TransformerHandler for a given
stylesheet Source . |
XSLTProcessor.TransformerHandlerAndValidity |
getTransformerHandlerAndValidity(Source stylesheet)
Same as getTransformerHandlerAndValidity(Source,XMLFilter) , with
filter set to null . |
XSLTProcessor.TransformerHandlerAndValidity |
getTransformerHandlerAndValidity(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(Source source,
Source stylesheet,
Parameters params,
javax.xml.transform.Result result)
Applies an XSLT stylesheet to an XML document. |
Field Detail |
public static final java.lang.String ROLE
XSLTProcessor
.
Method Detail |
public 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.public javax.xml.transform.sax.TransformerHandler getTransformerHandler(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
value
TransformerHandler
value
XSLTProcessorException
- if an error occurspublic XSLTProcessor.TransformerHandlerAndValidity getTransformerHandlerAndValidity(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
value
TransformerHandlerAndValidity
value
XSLTProcessorException
- if an error occurspublic javax.xml.transform.sax.TransformerHandler getTransformerHandler(Source stylesheet) throws XSLTProcessorException
getTransformerHandler(Source,XMLFilter)
, with
filter
set to null
.
stylesheet
- a Source
value
TransformerHandler
value
XSLTProcessorException
- if an error occurspublic XSLTProcessor.TransformerHandlerAndValidity getTransformerHandlerAndValidity(Source stylesheet) throws XSLTProcessorException
getTransformerHandlerAndValidity(Source,XMLFilter)
, with
filter
set to null
.
stylesheet
- a Source
value
XSLTProcessor.TransformerHandlerAndValidity
value
XSLTProcessorException
- if an error occurspublic void transform(Source source, Source stylesheet, 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
value
XSLTProcessorException
- if an error occurs
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |