diff options
author | Jeremias Maerki <jeremias@apache.org> | 2005-08-31 20:34:14 +0000 |
---|---|---|
committer | Jeremias Maerki <jeremias@apache.org> | 2005-08-31 20:34:14 +0000 |
commit | ae8d626ff8fe46403b28387e30e45196e55feb6b (patch) | |
tree | d25e25fa602b6c02306c994aa942890428bd0756 | |
parent | e194fdd5cfe3f1bc823d93c57420db87eb7efed0 (diff) | |
download | xmlgraphics-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.java | 4 |
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); |