keiron      01/06/22 06:31:03

  Modified:    src/org/apache/fop/svg SVGElement.java
  Log:
  sets the context url properly (with baseDir)
  
  Revision  Changes    Path
  1.6       +5 -2      xml-fop/src/org/apache/fop/svg/SVGElement.java
  
  Index: SVGElement.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/org/apache/fop/svg/SVGElement.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- SVGElement.java   2001/06/21 14:58:22     1.5
  +++ SVGElement.java   2001/06/22 13:30:58     1.6
  @@ -1,4 +1,4 @@
  -/* $Id: SVGElement.java,v 1.5 2001/06/21 14:58:22 keiron Exp $
  +/* $Id: SVGElement.java,v 1.6 2001/06/22 13:30:58 keiron Exp $
    * Copyright (C) 2001 The Apache Software Foundation. All rights reserved.
    * For details on use and redistribution please refer to the
    * LICENSE file included with these sources.
  @@ -13,6 +13,7 @@
   import org.apache.fop.layout.FontState;
   import org.apache.fop.apps.FOPException;
   import org.apache.fop.layout.inline.*;
  +import org.apache.fop.configuration.Configuration;
   
   import org.apache.batik.dom.svg.*;
   import org.w3c.dom.*;
  @@ -23,6 +24,7 @@
   import org.apache.batik.dom.svg.SVGDOMImplementation;
   
   import java.io.File;
  +import java.net.URL;
   
   /**
    * class representing svg:svg pseudo flow object.
  @@ -99,7 +101,8 @@
           Element svgRoot = doc.getDocumentElement();
   
           try {
  -            ((SVGOMDocument)doc).setURLObject(new File(".").toURL());
  +            String baseDir = Configuration.getStringValue("baseDir");
  +            ((SVGOMDocument)doc).setURLObject(new URL(baseDir));
           } catch (Exception e) {
           }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to