You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by gr...@locus.apache.org on 2000/11/09 13:06:04 UTC

cvs commit: xml-cocoon/src/org/apache/cocoon/processor/xinclude XIncludeProcessor.java

greenrd     00/11/09 04:06:03

  Modified:    src/org/apache/cocoon/processor/xinclude
                        XIncludeProcessor.java
  Log:
  fixed xinclude problem with local absolute URLs on some JVMs
  
  Revision  Changes    Path
  1.17      +2 -2      xml-cocoon/src/org/apache/cocoon/processor/xinclude/XIncludeProcessor.java
  
  Index: XIncludeProcessor.java
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/src/org/apache/cocoon/processor/xinclude/XIncludeProcessor.java,v
  retrieving revision 1.16
  retrieving revision 1.17
  diff -u -r1.16 -r1.17
  --- XIncludeProcessor.java	2000/10/04 17:02:59	1.16
  +++ XIncludeProcessor.java	2000/11/09 12:06:03	1.17
  @@ -101,7 +101,7 @@
    * a terrible wasteful of memory.
    *
    * @author <a href="mailto:balld@webslingerZ.com">Donald Ball</a>
  - * @version CVS $Revision: 1.16 $ $Date: 2000/10/04 17:02:59 $ $Author: balld $
  + * @version CVS $Revision: 1.17 $ $Date: 2000/11/09 12:06:03 $ $Author: greenrd $
    */
   public class XIncludeProcessor extends AbstractActor implements Processor, Status {
   
  @@ -295,7 +295,7 @@
   				return ary;
   			} else if (xinclude.href.charAt(0) == '/') {
   				/** local absolute URI, e.g. /foo.xml **/
  -				local = new File(Utils.getRootpath(request,context),xinclude.href);
  +				local = new File(Utils.getRootpath(request,context),xinclude.href.substring(1));
   				system_id = ((File)local).getAbsolutePath();
   				content = new FileReader((File)local);
   			} else if (xinclude.href.indexOf("://") >= 0) {