|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
public interface XSLTProcessor
This is the interface of the XSLT processor in Cocoon.
| Field Summary | |
|---|---|
static String |
DEFAULT_FACTORY
The default factory identifier. |
static String |
ROLE
The role implemented by an XSLTProcessor. |
| Method Summary | |
|---|---|
TransformerHandler |
getTransformerHandler(Source stylesheet)
Same as getTransformerHandler(Source,XMLFilter), with
filter set to null and factory
set to null. |
TransformerHandler |
getTransformerHandler(Source stylesheet,
XMLFilter filter)
Return a TransformerHandler for a given
stylesheet Source. |
void |
setSourceResolver(SourceResolver resolver)
Deprecated. The processor can now simply lookup the source resolver. |
void |
setTransformerFactory(String classname)
Set the TransformerFactory for this instance. |
void |
transform(Source source,
Source stylesheet,
Parameters params,
Result result)
Applies an XSLT stylesheet to an XML document. |
| Field Detail |
|---|
static final String ROLE
XSLTProcessor.
static final String DEFAULT_FACTORY
| Method Detail |
|---|
void setSourceResolver(SourceResolver resolver)
SourceResolver for
this instance. The resolver is invoked to return a
Source object, given an HREF.
resolver - a SourceResolver valuevoid setTransformerFactory(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.
TransformerHandler getTransformerHandler(Source stylesheet,
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 Source object and performs a reparsing only if this changes.
stylesheet - a Source valuefilter - a XMLFilter value
TransformerHandler value
ProcessingException - if an error occurs
TransformerHandler getTransformerHandler(Source stylesheet)
throws ProcessingException
getTransformerHandler(Source,XMLFilter), with
filter set to null and factory
set to null.
stylesheet - a Source value
TransformerHandler value
ProcessingException - if an error occursTraxTransformer.setConsumer(org.apache.cocoon.xml.XMLConsumer)
void transform(Source source,
Source stylesheet,
Parameters params,
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 value
ProcessingException - if an error occurs
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||