Comment 2 for bug 169094

Revision history for this message
Tom Davidson (tjd-mit) wrote :

Originator: YES

The extension works fine when called from the command line on the original
file. The problem seems to be that when inkscape writes out the temporary
svg file (attached below) to the temp directory, it changes the
sodipodi:docbase tag (to /tmp, in my case). This breaks relative paths in
xlink:href tags since the external files are not also copied over to /tmp.
I can think of a few fixes, but I have no idea what the ramifications of
any of these might be:

-don't change the sodipodi:docbase tag when writing out the temp file
-rewrite relative paths to absolute paths when saving out the temp file
-copy associated linked files to the temp dir (if using anonymized
filenames, this would also require rewriting the hrefs)

Here is the diff between the two svg files posted below:
$ diff /tmp/ink_ext_GOTW0T ~/tmpsvg/embedtest_simple.svg
19,20c19,20
< sodipodi:docname="ink_ext_GOTW0T"
< sodipodi:docbase="/tmp"
---
> sodipodi:docname="embedtest_simple.svg"
> sodipodi:docbase="/home/tjd/tmpsvg"
51,52c51
< <defs
< id="defs5" />
---
> <defs />

I am unable to test this in SVN because inkscape won't compile on fc6
(gtk+1.2...)

Thanks!
Tom

File Added: ink_ext_GOTW0T