From b4a8335c90fd833ea584cdb7180886706923e222 Mon Sep 17 00:00:00 2001 From: Keiron Liddle Date: Fri, 22 Jun 2001 13:30:58 +0000 Subject: [PATCH] sets the context url properly (with baseDir) 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 | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/org/apache/fop/svg/SVGElement.java b/src/org/apache/fop/svg/SVGElement.java index 4c2dd58c7..ad31bcdc4 100644 --- a/src/org/apache/fop/svg/SVGElement.java +++ b/src/org/apache/fop/svg/SVGElement.java @@ -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) { } -- 2.39.5