Comment 5 for bug 386069

Revision history for this message
jazzynico (jazzynico) wrote :

The same image in 0.46 is coded like that:
    <image
       sodipodi:absref="/export/Inkscape/BugTest/EmbedTest.png"
       xlink:href="EmbedTest.png" />

When I open the SVG created with 0.46 in the dev. version, I have no problem embedding it. The opposite is false...

I think the issue is related to the way Inkscape handle absolute paths in xlink:href attribute. The embedimage.py extension (lines 64-68) looks weird:

 if (href != None):
                if (os.path.isabs(href)):
                    path=os.path.realpath(href)
                else:
                    path=os.path.realpath(href)

1. href is handled as if it were a path (isn't it an URI?);
2. realpath is called when href is absolute or relative;
3. absolute path is always considered relative (isabs is always false), probably a consequence of 1.

I take a look at the Python doc and xlink specs.