aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2005-08-31 20:34:14 +0000
committerJeremias Maerki <jeremias@apache.org>2005-08-31 20:34:14 +0000
commitae8d626ff8fe46403b28387e30e45196e55feb6b (patch)
treed25e25fa602b6c02306c994aa942890428bd0756
parente194fdd5cfe3f1bc823d93c57420db87eb7efed0 (diff)
downloadxmlgraphics-fop-ae8d626ff8fe46403b28387e30e45196e55feb6b.tar.gz
xmlgraphics-fop-ae8d626ff8fe46403b28387e30e45196e55feb6b.zip
Set not only the base URL for the SVG Document but also the URI. Otherwise, relatively referenced documents or images inside an SVG defined in a fo:instream-foreign-object don't get resolved. This fixes certain problems with examples/fo/svg/external.fo.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@265578 13f79535-47bb-0310-9956-ffa450edef68
-rw-r--r--src/java/org/apache/fop/fo/extensions/svg/SVGElement.java4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/java/org/apache/fop/fo/extensions/svg/SVGElement.java b/src/java/org/apache/fop/fo/extensions/svg/SVGElement.java
index 19fc06a3a..1a5f08e68 100644
--- a/src/java/org/apache/fop/fo/extensions/svg/SVGElement.java
+++ b/src/java/org/apache/fop/fo/extensions/svg/SVGElement.java
@@ -84,7 +84,9 @@ public class SVGElement extends SVGObj {
? new java.io.File("").toURL().toExternalForm()
: getUserAgent().getBaseURL());
if (baseURL != null) {
- ((SVGOMDocument)doc).setURLObject(baseURL);
+ SVGOMDocument svgdoc = (SVGOMDocument)doc;
+ svgdoc.setURLObject(baseURL);
+ svgdoc.setDocumentURI(baseURL.toString());
}
} catch (Exception e) {
getLogger().error("Could not set base URL for svg", e);