Bug 36455 - [PATCH] Backwards compatibility fix for SVGOMElement.getCascadedXMLBase()
Summary: [PATCH] Backwards compatibility fix for SVGOMElement.getCascadedXMLBase()
Alias: None
Product: Batik - Now in Jira
Classification: Unclassified
Component: SVG DOM (show other bugs)
Version: 1.8
Hardware: All All
: P2 normal
Target Milestone: ---
Assignee: Batik Developer's Mailing list
Keywords: PatchAvailable
Depends on:
Reported: 2005-09-01 10:27 UTC by Jeremias Maerki
Modified: 2005-09-01 05:45 UTC (History)
0 users

Patch to fix the problem (1.77 KB, patch)
2005-09-01 10:28 UTC, Jeremias Maerki
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jeremias Maerki 2005-09-01 10:27:45 UTC
After the SVG1.2/DOM Level 3 upgrade Batik now uses getDocumentURI() to fetch
the base URI of a document. Older applications linked against Batik 1.6 can't
call setDocumentURI(). Therefore, determining the base URI (for resolving
relative URIs) is not always possible. I'll attach my proposed fix to
reestablish backwards compatibility.

The problem can be reproduced by converting examples/fo/svg/external.fo with FOP
Trunk linked against Batik Trunk. FOP Trunk linked against Batik 1.6 works fine.
When the problem is present 4 SVG images externally referenced inside an
fo:instream-foreign-object (SVG namespace) will not display or show the broken
reference image.
Comment 1 Jeremias Maerki 2005-09-01 10:28:58 UTC
Created attachment 16268 [details]
Patch to fix the problem
Comment 2 Cameron McCormack 2005-09-01 13:26:06 UTC
I made a change to SVGOMDocument so that there is only one idea of a document's
URI, irrespective of whether it was set by setDocumentURI or setURLObject.  Give
it a try and let me know if it still doesn't work with FOP.
Comment 3 Jeremias Maerki 2005-09-01 13:45:44 UTC
Your change works fine, too. Thanks!