|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
This is the interface of the XSLT processor in Cocoon.
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 . |
CacheValidity |
getTransformerValidity(Source stylesheet)
Return a CacheValidity for a given
stylesheet Source . |
void |
setSourceResolver(SourceResolver resolver)
Set the SourceResolver for
this instance. |
void |
transform(Source source,
Source stylesheet,
org.apache.avalon.framework.parameters.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 setSourceResolver(SourceResolver resolver)
SourceResolver
for
this instance. The resolver
is invoked to return a
Source
object, given an HREF.resolver
- a SourceResolver
valuepublic CacheValidity getTransformerValidity(Source stylesheet)
Return a CacheValidity
for a given
stylesheet Source
. This can be used in a pipeline to
handle caching of a transformation results.
This method accesses cache of the Templates objects to obtain list of included stylesheets, which is built when stylesheet is created.
stylesheet
- a Source
valueCacheValidity
valuepublic javax.xml.transform.sax.TransformerHandler getTransformerHandler(Source stylesheet, org.xml.sax.XMLFilter filter) throws ProcessingException
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 TraxTransformer.setConsumer(org.apache.cocoon.xml.XMLConsumer)
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
valueProcessingException
- if an error occurspublic javax.xml.transform.sax.TransformerHandler getTransformerHandler(Source stylesheet) throws ProcessingException
getTransformerHandler(Source,XMLFilter)
, with
filter
set to null
.stylesheet
- a Source
valueTransformerHandler
valueProcessingException
- if an error occursTraxTransformer.setConsumer(org.apache.cocoon.xml.XMLConsumer)
public void transform(Source source, Source stylesheet, org.apache.avalon.framework.parameters.Parameters params, javax.xml.transform.Result result) throws ProcessingException
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
valueProcessingException
- if an error occurs
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |