|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.components.xslt.TraxProcessor
public class TraxProcessor
Adaptation of Excalibur's XSLTProcessor implementation to allow for better error reporting.
| Nested Class Summary | |
|---|---|
static class |
TraxProcessor.MyTransformerHandlerAndValidity
Subclass to allow for instanciation, as for some unknown reason the constructor is protected.... |
| Nested classes/interfaces inherited from interface org.apache.excalibur.xml.xslt.XSLTProcessor |
|---|
XSLTProcessor.TransformerHandlerAndValidity |
| Field Summary | |
|---|---|
protected boolean |
m_checkIncludes
Check included stylesheets |
protected SAXTransformerFactory |
m_defaultFactory
The default TransformerFactory used by this component |
protected SAXTransformerFactory |
m_factory
The trax TransformerFactory this component uses |
protected Map |
m_includesMap
Map of pairs of System ID's / validities of the included stylesheets |
protected boolean |
m_incrementalProcessing
Is incremental processing turned on? |
protected ServiceManager |
m_manager
The ServiceManager |
protected SourceResolver |
m_resolver
Resolver used to resolve XSLT document() calls, imports and includes |
protected Store |
m_store
The store service instance |
protected String |
m_transformerFactory
The configured transformer factory to use |
protected boolean |
m_useStore
Is the store turned on? |
protected XMLizer |
m_xmlizer
|
| Fields inherited from interface org.apache.excalibur.xml.xslt.XSLTProcessor |
|---|
ROLE |
| Constructor Summary | |
|---|---|
TraxProcessor()
|
|
| Method Summary | |
|---|---|
void |
dispose()
Disposable |
protected InputSource |
getInputSource(Source source)
Return a new InputSource object that uses the
InputStream and the system ID of the Source
object. |
TransformerHandler |
getTransformerHandler(Source stylesheet)
|
TransformerHandler |
getTransformerHandler(Source stylesheet,
XMLFilter filter)
|
XSLTProcessor.TransformerHandlerAndValidity |
getTransformerHandlerAndValidity(Source stylesheet)
|
XSLTProcessor.TransformerHandlerAndValidity |
getTransformerHandlerAndValidity(Source stylesheet,
XMLFilter filter)
|
void |
initialize()
Initialize |
void |
parameterize(Parameters params)
Configure the component |
void |
recycle()
Recycle the component |
Source |
resolve(String href,
String base)
Called by the processor when it encounters an xsl:include, xsl:import, or document() function. |
void |
service(ServiceManager manager)
Compose. |
void |
setTransformerFactory(String classname)
Set the transformer factory used by this component |
protected void |
sourceToSAX(Source source,
ContentHandler handler)
|
void |
transform(Source source,
Source stylesheet,
Parameters params,
Result result)
|
| Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
|---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected Store m_store
protected String m_transformerFactory
protected SAXTransformerFactory m_factory
protected SAXTransformerFactory m_defaultFactory
protected boolean m_useStore
protected boolean m_incrementalProcessing
protected SourceResolver m_resolver
protected boolean m_checkIncludes
protected Map m_includesMap
protected XMLizer m_xmlizer
protected ServiceManager m_manager
| Constructor Detail |
|---|
public TraxProcessor()
| Method Detail |
|---|
public void service(ServiceManager manager)
throws ServiceException
service in interface ServiceableServiceException
public void initialize()
throws Exception
initialize in interface InitializableExceptionpublic void dispose()
dispose in interface Disposable
public void parameterize(Parameters params)
throws ParameterException
parameterize in interface ParameterizableParameterExceptionpublic void setTransformerFactory(String classname)
setTransformerFactory in interface XSLTProcessor
public TransformerHandler getTransformerHandler(Source stylesheet)
throws XSLTProcessorException
getTransformerHandler in interface XSLTProcessorXSLTProcessorExceptionXSLTProcessor.getTransformerHandler(org.apache.excalibur.source.Source)
public TransformerHandler getTransformerHandler(Source stylesheet,
XMLFilter filter)
throws XSLTProcessorException
getTransformerHandler in interface XSLTProcessorXSLTProcessorExceptionXSLTProcessor.getTransformerHandler(org.apache.excalibur.source.Source,
org.xml.sax.XMLFilter)
public XSLTProcessor.TransformerHandlerAndValidity getTransformerHandlerAndValidity(Source stylesheet)
throws XSLTProcessorException
getTransformerHandlerAndValidity in interface XSLTProcessorXSLTProcessorException
public XSLTProcessor.TransformerHandlerAndValidity getTransformerHandlerAndValidity(Source stylesheet,
XMLFilter filter)
throws XSLTProcessorException
getTransformerHandlerAndValidity in interface XSLTProcessorXSLTProcessorException
protected void sourceToSAX(Source source,
ContentHandler handler)
throws SAXException,
IOException,
SourceException
SAXException
IOException
SourceException
public void transform(Source source,
Source stylesheet,
Parameters params,
Result result)
throws XSLTProcessorException
transform in interface XSLTProcessorXSLTProcessorException
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.
protected InputSource getInputSource(Source source)
throws IOException,
SourceException
InputSource object that uses the
InputStream and the system ID of the Source
object.
IOException - if I/O error occured.
SourceExceptionpublic void recycle()
recycle in interface Recyclable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||