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 Thu, 07 Nov 2002 04:40:52 GMT
donaldp     2002/11/06 20:40:52

  Modified:    xmlutil/src/java/org/apache/avalon/excalibur/xml/xslt
                        XSLTProcessorImpl.java
  Log:
  Move initialization to initialize() phase.
  
  Start marking out metadata in javadocs so that metaclass can extract it via something like;
  
  //Retrieve the MetaClass for a particular class in a
  // particular classloader
  MetaClass meta =
    ClassManager.loadClass( "org.apache.ant.tasks.ZipTask", classLoader );
  
      //Get the first (and only) class attribute named "ant.task"
  Attribute attr = meta.getClassAttribute( "ant.task" );
  
  //Get the name parameter of attribute
  String value = attr.getParameter( "name" );
  
  //Should print out "value = zip"
  System.out.println( "value = " + value );
  
  Revision  Changes    Path
  1.18      +13 -2     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.17
  retrieving revision 1.18
  diff -u -r1.17 -r1.18
  --- XSLTProcessorImpl.java	2 Oct 2002 01:52:25 -0000	1.17
  +++ XSLTProcessorImpl.java	7 Nov 2002 04:40:52 -0000	1.18
  @@ -26,6 +26,7 @@
   import javax.xml.transform.stream.StreamSource;
   import org.apache.avalon.excalibur.xml.XMLizable;
   import org.apache.avalon.framework.activity.Disposable;
  +import org.apache.avalon.framework.activity.Initializable;
   import org.apache.avalon.framework.component.ComponentException;
   import org.apache.avalon.framework.logger.AbstractLogEnabled;
   import org.apache.avalon.framework.parameters.ParameterException;
  @@ -71,6 +72,7 @@
       extends AbstractLogEnabled
       implements XSLTProcessor,
       Serviceable,
  +    Initializable,
       Disposable,
       Parameterizable,
       URIResolver
  @@ -100,18 +102,27 @@
   
       /**
        * Compose. Try to get the store
  +     *
  +     * @avalon.service interface="XMLizer"
  +     * @avalon.service interface="SourceResolver"
  +     * @avalon.service interface="Store/TransientStore" optional="true"
        */
       public void service( final ServiceManager manager )
           throws ServiceException
       {
           m_xmlizer = (XMLizer)manager.lookup( XMLizer.ROLE );
  -        m_errorHandler = new TraxErrorHandler( getLogger() );
           m_resolver = (SourceResolver)manager.lookup( SourceResolver.ROLE );
   
           if( manager.hasService( Store.TRANSIENT_STORE ) )
           {
               m_store = (Store)manager.lookup( Store.TRANSIENT_STORE );
           }
  +    }
  +
  +    public void initialize()
  +        throws Exception
  +    {
  +        m_errorHandler = new TraxErrorHandler( getLogger() );
       }
   
       public void dispose()
  
  
  

--
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