avalon-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dona...@apache.org
Subject cvs commit: jakarta-avalon-excalibur/xmlutil/src/java/org/apache/avalon/excalibur/xml/xslt XSLTProcessorImpl.java
Date Wed, 10 Jul 2002 09:27:51 GMT
donaldp     2002/07/10 02:27:50

  Modified:    xmlutil/src/java/org/apache/avalon/excalibur/xml/xslt
                        XSLTProcessorImpl.java
  Log:
  Assume XMLizer is thread-safe
  
  Revision  Changes    Path
  1.11      +5 -10     jakarta-avalon-excalibur/xmlutil/src/java/org/apache/avalon/excalibur/xml/xslt/XSLTProcessorImpl.java
  
  Index: XSLTProcessorImpl.java
  ===================================================================
  RCS file: /home/cvs/jakarta-avalon-excalibur/xmlutil/src/java/org/apache/avalon/excalibur/xml/xslt/XSLTProcessorImpl.java,v
  retrieving revision 1.10
  retrieving revision 1.11
  diff -u -r1.10 -r1.11
  --- XSLTProcessorImpl.java	10 Jul 2002 08:53:17 -0000	1.10
  +++ XSLTProcessorImpl.java	10 Jul 2002 09:27:50 -0000	1.11
  @@ -97,6 +97,8 @@
       /** Map of pairs of System ID's / validities of the included stylesheets */
       private Map m_includesMap = new HashMap();
   
  +    private XMLizer m_xmlizer;
  +
       /**
        * Compose. Try to get the store
        */
  @@ -104,6 +106,7 @@
           throws ComponentException
       {
           m_manager = manager;
  +        m_xmlizer = (XMLizer)manager.lookup( XMLizer.ROLE );
           m_errorHandler = new TraxErrorHandler( getLogger() );
           m_resolver = (SourceResolver)manager.lookup( SourceResolver.ROLE );
       }
  @@ -293,18 +296,10 @@
           }
           else
           {
  -            final XMLizer xmlizer = (XMLizer)m_manager.lookup( XMLizer.ROLE );
  -            try
  -            {
                   final InputStream inputStream = source.getInputStream();
                   final String mimeType = source.getMimeType();
                   final String systemId = source.getSystemId();
  -                xmlizer.toSAX( inputStream, mimeType, systemId, handler );
  -            }
  -            finally
  -            {
  -                m_manager.release( xmlizer );
  -            }
  +                m_xmlizer.toSAX( inputStream, mimeType, systemId, handler );
           }
       }
   
  
  
  

--
To unsubscribe, e-mail:   <mailto:avalon-cvs-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:avalon-cvs-help@jakarta.apache.org>


Mime
View raw message