cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Hans Ulrich Niedermann <niederm...@isd.uni-stuttgart.de>
Subject [C2] Small patch to Main.java
Date Fri, 15 Sep 2000 00:26:57 GMT
Hi,

a small patch to org.apache.cocoon.Main (correcting only some
typos). Not really tested, but at least it compiles :-)

Uli

----8<------------------------------------------------------------
Index: src/org/apache/cocoon/Main.java
===================================================================
RCS file: /home/cvspublic/xml-cocoon/src/org/apache/cocoon/Attic/Main.java,v
retrieving revision 1.1.4.3
diff -c -r1.1.4.3 Main.java
*** src/org/apache/cocoon/Main.java	2000/09/03 17:45:45	1.1.4.3
--- src/org/apache/cocoon/Main.java	2000/09/15 00:20:02
***************
*** 215,221 ****
       * this method is the following:
       *
       * <ul>
!      *  <li>the link view of the given URI is called and the resourced linked
       *      to the requested one are obtained.</li>
       *  <li>for each link, this method is recursively called and returns
       *      the file used to save the resource on disk.</li>
--- 215,221 ----
       * this method is the following:
       *
       * <ul>
!      *  <li>the link view of the given URI is called and the resources linked
       *      to the requested one are obtained.</li>
       *  <li>for each link, this method is recursively called and returns
       *      the file used to save the resource on disk.</li>
***************
*** 223,229 ****
       *      view of the resource is called to obtain a link-translated version
       *      of the resource with the given link map</li>
       *  <li>the resource is saved on disk and the URI MIME type is checked for 
!      *      consistenci with the URI and, if the extention is inconsistent
       *      or absent, the file is renamed</li>
       *  <li>then the file name of the translated URI is returned</li>
       * </ul>
--- 223,229 ----
       *      view of the resource is called to obtain a link-translated version
       *      of the resource with the given link map</li>
       *  <li>the resource is saved on disk and the URI MIME type is checked for 
!      *      consistency with the URI and, if the extension is inconsistent
       *      or absent, the file is renamed</li>
       *  <li>then the file name of the translated URI is returned</li>
       * </ul>
***************
*** 244,250 ****
          String type = getPage(uri, translatedLinks, output);
          output.close();
          
!         if (!matchesExtention(uri, type)) {
              outputFile.renameTo(getFile(uri, type));
          }
          
--- 244,250 ----
          String type = getPage(uri, translatedLinks, output);
          output.close();
          
!         if (!matchesExtension(uri, type)) {
              outputFile.renameTo(getFile(uri, type));
          }
          
***************
*** 271,277 ****
          return new File(destDir, uri + File.separator + getExtension(type));
      }
      
!     boolean matchesExtention(String uri, String type) {
          int dotindex = uri.lastIndexOf('.');
          int slashindex = uri.indexOf('/', dotindex);
          if ((dotindex != -1) && (slashindex == -1)) {
--- 271,277 ----
          return new File(destDir, uri + File.separator + getExtension(type));
      }
      
!     boolean matchesExtension(String uri, String type) {
          int dotindex = uri.lastIndexOf('.');
          int slashindex = uri.indexOf('/', dotindex);
          if ((dotindex != -1) && (slashindex == -1)) {
----8<------------------------------------------------------------

Mime
View raw message