cziegeler 02/05/02 04:12:55
Modified: xmlbundle/src/java/org/apache/avalon/excalibur/xml/xslt
XSLTProcessorImpl.java
Log:
Store is only looked up if required
Revision Changes Path
1.5 +14 -4
jakarta-avalon-excalibur/xmlbundle/src/java/org/apache/avalon/excalibur/xml/xslt/XSLTProcessorImpl.java
Index: XSLTProcessorImpl.java
===================================================================
RCS file:
/home/cvs/jakarta-avalon-excalibur/xmlbundle/src/java/org/apache/avalon/excalibur/xml/xslt/XSLTProcessorImpl.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- XSLTProcessorImpl.java 2 May 2002 10:56:40 -0000 1.4
+++ XSLTProcessorImpl.java 2 May 2002 11:12:55 -0000 1.5
@@ -59,7 +59,7 @@
*
* @author <a href="mailto:[EMAIL PROTECTED]">Ovidiu Predescu</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Peter Royal</a>
- * @version CVS $Id: XSLTProcessorImpl.java,v 1.4 2002/05/02 10:56:40
cziegeler Exp $
+ * @version CVS $Id: XSLTProcessorImpl.java,v 1.5 2002/05/02 11:12:55
cziegeler Exp $
* @version 1.0
* @since July 11, 2001
*/
@@ -101,7 +101,6 @@
throws ComponentException
{
this.manager = manager;
- this.store = (Store)manager.lookup(Store.TRANSIENT_STORE);
this.errorHandler = new TraxErrorHandler( this.getLogger() );
this.resolver = (SourceResolver)this.manager.lookup(
SourceResolver.ROLE );
}
@@ -128,9 +127,20 @@
public void parameterize( Parameters params )
throws ParameterException
{
- this.useStore = params.getParameterAsBoolean( "use-store", true );
- this.incrementalProcessing = params.getParameterAsBoolean(
"incremental-processing", false );
+ this.useStore = params.getParameterAsBoolean( "use-store",
this.useStore );
+ this.incrementalProcessing = params.getParameterAsBoolean(
"incremental-processing", this.incrementalProcessing );
this.factory =
getTransformerFactory(params.getParameter("transformer-factory", null));
+ if ( this.useStore ) {
+ try
+ {
+ this.store = (Store)manager.lookup(Store.TRANSIENT_STORE);
+ }
+ catch (ComponentException ce)
+ {
+ throw new ParameterException("XSLTProcessor: use-store is
set to true, "
+ +"but the lookup of the Store failed.", ce);
+ }
+ }
}
/**
--
To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>