crossley    01/11/25 15:24:44

  Modified:    src/org/apache/cocoon/components/resolver Tag:
                        cocoon_20_branch ResolverImpl.java
  Log:
  Log the resolution of entities.
  Changed getRealPath() to getResource() to sync with 2.1
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.2.2.6   +8 -3      
xml-cocoon2/src/org/apache/cocoon/components/resolver/ResolverImpl.java
  
  Index: ResolverImpl.java
  ===================================================================
  RCS file: 
/home/cvs/xml-cocoon2/src/org/apache/cocoon/components/resolver/ResolverImpl.java,v
  retrieving revision 1.2.2.5
  retrieving revision 1.2.2.6
  diff -u -r1.2.2.5 -r1.2.2.6
  --- ResolverImpl.java 2001/11/02 13:33:06     1.2.2.5
  +++ ResolverImpl.java 2001/11/25 23:24:44     1.2.2.6
  @@ -44,7 +44,7 @@
    * </resolver>
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Davanum Srinivas</a>
  - * @version CVS $Revision: 1.2.2.5 $ $Date: 2001/11/02 13:33:06 $
  + * @version CVS $Revision: 1.2.2.6 $ $Date: 2001/11/25 23:24:44 $
    */
   public class ResolverImpl extends AbstractLoggable
           implements Resolver, Contextualizable, Composable, Configurable, 
ThreadSafe, Disposable {
  @@ -94,7 +94,7 @@
           String catalogFile = params.getParameter("catalog",
             "/resources/entities/catalog");
           try {
  -            String catalogURL = this.context.getRealPath(catalogFile);
  +            String catalogURL = 
this.context.getResource(catalogFile).toExternalForm();
               getLogger().debug("System Catalog URL is " + catalogURL);
               catalogResolver.getCatalog().parseCatalog(catalogURL);
           } catch (Exception e) {
  @@ -160,7 +160,12 @@
       public InputSource resolveEntity(String publicId,
                                        String systemId)
               throws SAXException, IOException {
  -        return catalogResolver.resolveEntity(publicId, systemId);
  +      InputSource altInputSource = catalogResolver.resolveEntity(publicId,systemId);
  +      if (altInputSource != null) {
  +        getLogger().debug("Resolved catalog entity: " + publicId + " "
  +          + altInputSource.getSystemId());
  +      }
  +      return altInputSource;
       }
   
       /**
  
  
  

----------------------------------------------------------------------
In case of troubles, e-mail:     [EMAIL PROTECTED]
To unsubscribe, e-mail:          [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to