]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
sets the context url properly (with baseDir)
authorKeiron Liddle <keiron@apache.org>
Fri, 22 Jun 2001 13:30:58 +0000 (13:30 +0000)
committerKeiron Liddle <keiron@apache.org>
Fri, 22 Jun 2001 13:30:58 +0000 (13:30 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@194312 13f79535-47bb-0310-9956-ffa450edef68

src/org/apache/fop/svg/SVGElement.java

index 4c2dd58c7fbae728be1f67d068dac3c14fe8f39f..ad31bcdc45562fbf4bb4c0af4fc9ea9a59012edf 100644 (file)
@@ -13,6 +13,7 @@ import org.apache.fop.layout.Area;
 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.w3c.dom.DOMImplementation;
 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 @@ public class SVGElement extends Svg {
         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) {
         }