cziegeler    2003/03/13 07:13:26

  Modified:    src/documentation/xdocs/installing updating.xml
               src/documentation/xdocs/userdocs/concepts catalog.xml
               src/java/org/apache/cocoon/components/resolver
                        DefaultResolver.java
  Log:
  Fixing URL bug in resolver and updating docs
  
  Revision  Changes    Path
  1.3       +1 -1      cocoon-2.1/src/documentation/xdocs/installing/updating.xml
  
  Index: updating.xml
  ===================================================================
  RCS file: /home/cvs/cocoon-2.1/src/documentation/xdocs/installing/updating.xml,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- updating.xml      13 Mar 2003 07:40:05 -0000      1.2
  +++ updating.xml      13 Mar 2003 15:13:10 -0000      1.3
  @@ -63,7 +63,7 @@
       <p>The resolver used for resolving XML entities has also been moved to 
Excalibur.
        In the cocoon.xconf the hint name has therefore changed from <em>resolver</em> 
to
        <em>entity-resolver</em>. The configuration has not changed, so if you want to
  -     manually update swap the hint names.</p>
  +     manually update swap the hint names and the implementation.</p>
       <p>From within your source code you should not lookup the
         <em>org.apache.cocoon.components.resolver.Resolver.ROLE</em> anymore; use
         <em>org.apache.excalibur.xml.EntityResolver.ROLE</em> instead.
  
  
  
  1.2       +4 -4      cocoon-2.1/src/documentation/xdocs/userdocs/concepts/catalog.xml
  
  Index: catalog.xml
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/documentation/xdocs/userdocs/concepts/catalog.xml,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- catalog.xml       9 Mar 2003 00:08:17 -0000       1.1
  +++ catalog.xml       13 Mar 2003 15:13:10 -0000      1.2
  @@ -316,7 +316,7 @@
    <section>
     <para>This sample application demonstrates the use of catalogs for
      entity resolution. &note; see the Apache Cocoon documentation
  -   <link href="/cocoon/documents/catalog.html">Entity resolution with
  +   <link href="/cocoon/docs/catalog.html">Entity resolution with
      catalogs</link> for the full background and explanation, and the XML
      source of this document (test.xml).
     </para>
  @@ -534,14 +534,14 @@
     <p>
      The XML Commons Apache project has <code>org.apache.xml.resolver</code>
      which provides a <strong>CatalogResolver</strong>. This is incorporated
  -   into Cocoon via <code>org.apache.cocoon.components.resolver</code> 
  +   into Cocoon via <code>org.apache.excalibur.xml.EntityResolver</code> 
     </p>
   
     <p>
      <link href="#default">Default configuration</link> is achieved via
  -   <code>org.apache.cocoon.components.resolver.ResolverImpl.java</code> 
  +   <code>org.apache.cocoon.components.resolver.DefaultResolver.java</code> 
      which initialises the catalog resolver and loads a default system catalog.
  -   The <code>ResolverImpl.java</code> enables <link href="#config">local
  +   The <code>DefaultResolver.java</code> enables <link href="#config">local
      configuration</link> by applying properties from the
      <code>CatalogManager.properties</code> file and then further configuration
      from <code>cocoon.xconf</code> parameters.
  
  
  
  1.3       +7 -2      
cocoon-2.1/src/java/org/apache/cocoon/components/resolver/DefaultResolver.java
  
  Index: DefaultResolver.java
  ===================================================================
  RCS file: 
/home/cvs/cocoon-2.1/src/java/org/apache/cocoon/components/resolver/DefaultResolver.java,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- DefaultResolver.java      12 Mar 2003 10:15:44 -0000      1.2
  +++ DefaultResolver.java      13 Mar 2003 15:13:14 -0000      1.3
  @@ -77,7 +77,12 @@
       protected void parseCatalog(String file) {
           // relative uri
           if (file.indexOf(":/") == -1) {
  -            file = "context://" + file;
  +            StringBuffer bu = new StringBuffer("context:/");
  +            if (!file.startsWith("/")) {
  +                bu.append('/');
  +            }
  +            bu.append( file );
  +            file = bu.toString();
           }
           super.parseCatalog( file );
       }
  
  
  

Reply via email to