|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.day.cq.rewriter.xml.XSLTProcessorImpl
public class XSLTProcessorImpl
Adaptation of Excalibur's XSLTProcessor implementation for OSGi.
| Nested Class Summary | |
|---|---|
static class |
XSLTProcessorImpl.MyTransformerHandlerAndValidity
Subclass to allow for instanciation, as for some unknown reason the constructor is protected.... |
static class |
XSLTProcessorImpl.TransformerHandlerAndValidity
|
| Field Summary | |
|---|---|
protected boolean |
checkIncludes
Check included stylesheets |
protected SAXTransformerFactory |
factory
The trax TransformerFactory this component uses |
protected Map<String,List<Object[]>> |
includesMap
Map of pairs of System ID's / validities of the included stylesheets |
protected boolean |
incrementalProcessing
Is incremental processing turned on? (default for Xalan: no) |
protected SourceResolver |
resolver
The source resolver |
protected JaxpSAXParser |
saxParser
|
| Constructor Summary | |
|---|---|
XSLTProcessorImpl(SourceResolver resolver)
|
|
| Method Summary | |
|---|---|
TransformerHandler |
getTransformerHandler(Source stylesheet)
Return a TransformerHandler for a given
stylesheet Source. |
Source |
resolve(String href,
String base)
Called by the processor when it encounters an xsl:include, xsl:import, or document() function. |
void |
setCheckIncludes(boolean checkIncludes)
|
void |
setIncrementalProcessing(boolean incrementalProcessing)
|
void |
transform(Source source,
Source stylesheet,
Map<String,Object> params,
Result result)
Applies an XSLT stylesheet to an XML document. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected SAXTransformerFactory factory
protected boolean incrementalProcessing
protected SourceResolver resolver
protected boolean checkIncludes
protected Map<String,List<Object[]>> includesMap
protected JaxpSAXParser saxParser
| Constructor Detail |
|---|
public XSLTProcessorImpl(SourceResolver resolver)
| Method Detail |
|---|
public void setIncrementalProcessing(boolean incrementalProcessing)
public void setCheckIncludes(boolean checkIncludes)
public TransformerHandler getTransformerHandler(Source stylesheet)
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.
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 value
< * @return a TransformerHandler value
XSLTProcessorException - if an error occurs
public void transform(Source source,
Source stylesheet,
Map<String,Object> params,
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 Mapresult - a Result value
XSLTProcessorException - if an error occurs
public Source resolve(String href,
String base)
throws TransformerException
resolve in interface URIResolverhref - An href attribute, which may be relative or absolute.base - The base URI in effect when the href attribute was
encountered.
TransformerException - if an error occurs when trying to resolve the URI.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||