Gradient ids change between 0.43 and SVN in my files
Hello,
I've got a serious problem regarding gradients with last days' Inkscape SVN. Something changed that screws up the gradients ids of files I created with previous SVN builds.
To make things clearer:
If I create today an object with gradient fill with, say, Inkscape 0.43 stable and open it in Inkscape SVN, the gradient is correctly displayed.
If on the other hand I open the files I created and worked on earlier with Inkscape 0.43 in Inkscape SVN, *all* the gradients are mis-attributed and do not display. They are present in the gradients drop down menu, but their ids no longer correspond to what is specified in <defs>. If I vacuum the defs, the gradients are deleted since they are not used by any object.
Here's a link to a file that contains 24 objects, almost all of them with gradients:
http://users.skynet.be/jflemaire/files/gradients_issue.svg
(Incidentally, this file displays correctly in Konqueror.)
I hope someone with more knowledge of SVG/Inkscape will be able to help, because I dread the moment I'll have to reassign all gradients to each objects manually!
Cheers, JFL
Jean-François Lemaire wrote:
I hope someone with more knowledge of SVG/Inkscape will be able to help, because I dread the moment I'll have to reassign all gradients to each objects manually!
I believe you have fallen prey to the evil duck prions, also known as viral namespaces. We stumbled upon a bug recently that had allowed namespaces in SVG to degenerate. If someone edited an svg by hand and accedently made a typo in a namespace uri, for example adding a space, and then distributed this file, when anyone opened the file in inkscape the space would enter into their preferences file and then from there be copied into every svg they save. This was a serious problem and has been fixed at the expense of older documents that exhibit the degenerate namespaces. You will need to fix the namespace URIs in the SVGs for them to be displayed properly. For those of us who speak python, the correct URIs can be found in inkscape/share/extensions/inkex.py
#a dictionary of all of the xmlns prefixes in a standard inkscape doc NSS = { u'sodipodi' :u'http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd', u'cc' :u'http://web.resource.org/cc/', u'svg' :u'http://www.w3.org/2000/svg', u'dc' :u'http://purl.org/dc/elements/1.1/', u'rdf' :u'http://www.w3.org/1999/02/22-rdf-syntax-ns#', u'inkscape' :u'http://www.inkscape.org/namespaces/inkscape', u'xlink' :u'http://www.w3.org/1999/xlink' }
Aaron Spike
I believe you have fallen prey to the evil duck prions, also known as viral namespaces.
That sick duck has been trouble from the word go. I stil find him around the place. wrecking my things, late with the rent. Apologies to everyone who opened one of my SVG files and now curses when they open old files.
Thanks for clearing this up :-)
On Saturday 20 May 2006 14:49, Aaron Spike wrote:
Jean-François Lemaire wrote:
I hope someone with more knowledge of SVG/Inkscape will be able to help, because I dread the moment I'll have to reassign all gradients to each objects manually!
I believe you have fallen prey to the evil duck prions, also known as viral namespaces. We stumbled upon a bug recently that had allowed namespaces in SVG to degenerate. If someone edited an svg by hand and accedently made a typo in a namespace uri, for example adding a space, and then distributed this file, when anyone opened the file in inkscape the space would enter into their preferences file and then from there be copied into every svg they save. This was a serious problem and has been fixed at the expense of older documents that exhibit the degenerate namespaces. You will need to fix the namespace URIs in the SVGs for them to be displayed properly. For those of us who speak python, the correct URIs can be found in inkscape/share/extensions/inkex.py
Thanks Aaron, this clears things a bit, but not completely, I'm afraid.
So it appears I had no xlink: defined but this crap instead:
xmlns:ns="&ns_xlink;"
So if I understand right, I must have this at the top of my SVGs:
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:cc="http://web.resource.org/cc/" xmlns:svg="http://www.w3.org/2000/svg" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" xmlns:xlink="http://www.w3.org/1999/xlink"
And indeed, this fixes the gradients issue I had!
To be completely thorough, I deleted my .inkscape folder and started Inkscape, saved the default document and checked the file in a text editor. Here is what I got:
xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:cc="http://web.resource.org/cc/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
No =xlink:. How come?
Cheers, JFL
On 5/20/06, Jean-François Lemaire <jflemaire@...621...> wrote:
No =xlink:. How come?
Namespace declarations are saved only if they are used. Since your empty document has nothing like gradients or clones, it does not need XLink.
participants (5)
-
Aaron Spike
-
Andy Fitzsimon
-
bulia byak
-
Jean-François Lemaire
-
Khiraly