cziegeler    02/04/22 05:48:37

  Modified:    src/documentation sitemap.xmap
               src/documentation/xdocs/developing book.xml
               src/java/org/apache/cocoon/util NetUtils.java
  Log:
  Fixing bug 5772
  PR:5772
  
  Revision  Changes    Path
  1.4       +5 -0      xml-cocoon2/src/documentation/sitemap.xmap
  
  Index: sitemap.xmap
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/documentation/sitemap.xmap,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- sitemap.xmap      15 Jan 2002 19:12:36 -0000      1.3
  +++ sitemap.xmap      22 Apr 2002 12:48:36 -0000      1.4
  @@ -133,6 +133,11 @@
        <map:serialize/>
      </map:match>
   
  +   <map:match pattern="**.pdf">
  +     <map:generate src="book.xml"/>
  +     <map:serialize type="xml"/>
  +   </map:match>
  +
      <map:match pattern="*.html">
       <map:aggregate element="site">
        <map:part src="cocoon:/book-{1}.xml"/>
  
  
  
  1.6       +2 -2      xml-cocoon2/src/documentation/xdocs/developing/book.xml
  
  Index: book.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/documentation/xdocs/developing/book.xml,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- book.xml  27 Feb 2002 04:08:01 -0000      1.5
  +++ book.xml  22 Apr 2002 12:48:36 -0000      1.6
  @@ -21,8 +21,8 @@
   
     <menu label="sunShine">
       <menu-item label="Session Contexts" href="sunshine-contexts.html"/>
  -    <menu-item label="sunRise" href="sunrise.html"/>
  -    <menu-item label="sunSpot" href="sunspot.html"/>
  +    <menu-item label="Authentication" href="sunrise.html"/>
  +    <menu-item label="Portal" href="sunspot.html"/>
     </menu>
   
     <menu label="Java">
  
  
  
  1.9       +3 -5      xml-cocoon2/src/java/org/apache/cocoon/util/NetUtils.java
  
  Index: NetUtils.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon2/src/java/org/apache/cocoon/util/NetUtils.java,v
  retrieving revision 1.8
  retrieving revision 1.9
  diff -u -r1.8 -r1.9
  --- NetUtils.java     19 Apr 2002 11:02:58 -0000      1.8
  +++ NetUtils.java     22 Apr 2002 12:48:37 -0000      1.9
  @@ -67,7 +67,7 @@
    * utility methods
    *
    * @author <a href="mailto:[EMAIL PROTECTED]";>Stefano Mazzocchi</a>
  - * @version CVS $Id: NetUtils.java,v 1.8 2002/04/19 11:02:58 cziegeler Exp $
  + * @version CVS $Id: NetUtils.java,v 1.9 2002/04/22 12:48:37 cziegeler Exp $
    */
   
   public class NetUtils {
  @@ -276,14 +276,12 @@
        */
       public static String relativize(String path, String absoluteResource) {
           if (("".equals(path)) || (path == null)) return absoluteResource;
  -        int length = path.length() - 1;
  -        boolean slashPresent = path.charAt(length) == '/';
  +        if (path.charAt(path.length() - 1) != '/') path += "/";
           if (absoluteResource.startsWith(path)) {
               // resource is direct descentant
  -            return absoluteResource.substring(length + (slashPresent ? 1 : 2));
  +            return absoluteResource.substring(path.length());
           } else {
               // resource is not direct descendant
  -            if (!slashPresent) path += "/";
               int index = StringUtils.matchStrings(path, absoluteResource);
               if (index > 0 && path.charAt(index-1) != '/') {
                   index = path.substring(0, index).lastIndexOf('/');
  
  
  

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