I had a problem getting _any_ of the SVG files from OpenClipart.org to display and thought I had stumbled on to a huge problem. Much later I realised that problem only effects Adobe SVG Viewer version 1.0 and updating to Adobe SVG Viewer version 3 made the problem seem to go away.
After a lot of trial and error I was able to get the documents to display by removing the non-essential parameters from the opening <svg> tag
Sample from OpenClipart.org Balloon_01.svg:
<svg id="svg548" sodipodi:version="0.32" width="400pt" height="400pt" sodipodi:docbase="/home/nicu/svg_gal/happy/" sodipodi:docname="/home/nicu/svg_gal/happy/baloon1_01.svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:xlink="http://www.w3.org/1999/xlink">
After even more trial and error I was able to narrow it down to just this line, the removal of which allows the file to display correctly: xmlns="http://www.w3.org/2000/svg"
it can also be fixed by changing it to xmlns:svg="http://www.w3.org/2000/svg"
Which looks to me more likely to be strictly valid and correct and I hope is the actual fix. Could someone please tell me if it is correct so because having gone to all the trouble of figuring out exactly what the problem was I'd like to finally submit a patch of my own to Inkscape (and then get back to poking holes in the Standard SVG).
Sincerely
Alan Horkan http://advogato.org/person/AlanHorkan/
Alan Horkan wrote:
<svg id="svg548" sodipodi:version="0.32" width="400pt" height="400pt" sodipodi:docbase="/home/nicu/svg_gal/happy/" sodipodi:docname="/home/nicu/svg_gal/happy/baloon1_01.svg" xmlns="http://www.w3.org/2000/svg" xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" xmlns:xlink="http://www.w3.org/1999/xlink">
After even more trial and error I was able to narrow it down to just this line, the removal of which allows the file to display correctly: xmlns="http://www.w3.org/2000/svg"
it can also be fixed by changing it to xmlns:svg="http://www.w3.org/2000/svg"
Which looks to me more likely to be strictly valid and correct and I hope is the actual fix. Could someone please tell me if it is correct so because having gone to all the trouble of figuring out exactly what the problem was I'd like to finally submit a patch of my own to Inkscape (and then get back to poking holes in the Standard SVG).
Actually, by declaring xmlns:svg="http://www.w3.org/2000/svg" you are specifying the namespace for elements of the form 'svg:*' . xmlns="http://www.w3.org/2000/svg" specifies the default namespace for unprefixed elements such as the <svg> <g> <circle> etc. that are actually in the svg documents. If the file containes no uses of 'svg:', then your change is equivalent to the removal of the declaration, which is why it is having the same effect.
I don't know what the problem with Adobe svg viewer 1.0 is, but I will note that according to http://www.adobe.com/svg/viewer/install/old.html that viewer was released in Jun 2000, whereas the W3C didn't standardise the spec for SVG 1.0 as a recommendation until Sept 2001.
Yours,
John
After even more trial and error I was able to narrow it down to just this line, the removal of which allows the file to display correctly: xmlns="http://www.w3.org/2000/svg"
it can also be fixed by changing it to xmlns:svg="http://www.w3.org/2000/svg"
Which looks to me more likely to be strictly valid and correct and I hope is the actual fix. Could someone please tell me if it is correct so
Hmmm.. not quite. I think it's a bug in their viewer.
That first statement says "if no tag names have a ':' in the middle, default them as belonging to the namespace {http://www.w3.org/2000/svg%7D"
The second says "if tags names have a ':' in the middle, and the first part is 'svg', then and only then take those elements' as belonging to the namespace {http://www.w3.org/2000/svg%7D"
So... given that none of the tags in there start with "<svg:", that second statement pretty much is equivalent to deleting the xmlns attribute. The way present in the files just sets the default namespace. It's quite bad that it presents a problem, since among other things, that namespace is what the 1.1 SVG spec uses (like in section 23.1).
For info on default namespace, see 5.2 Namespace Defaulting of "Namespaces in XML" http://www.w3.org/TR/REC-xml-names/
On Thu, 15 Jul 2004 jon@...18... wrote:
Date: Thu, 15 Jul 2004 16:11:17 -0700 (PDT) From: jon@...18... To: Alan Horkan <horkana@...44...> Cc: Inkscape Developer Mailing List inkscape-devel@lists.sourceforge.net Subject: Re: [Inkscape-devel] Adobe SVG Viewer 1.0 problems
After even more trial and error I was able to narrow it down to just this line, the removal of which allows the file to display correctly: xmlns="http://www.w3.org/2000/svg"
it can also be fixed by changing it to xmlns:svg="http://www.w3.org/2000/svg"
Which looks to me more likely to be strictly valid and correct and I hope is the actual fix. Could someone please tell me if it is correct so
Hmmm.. not quite. I think it's a bug in their viewer.
That first statement says "if no tag names have a ':' in the middle, default them as belonging to the namespace {http://www.w3.org/2000/svg%7D"
svg:svg right I should have realised that.
It still sucks though and I cannot be the only one to accidentally install it. I'm pretty sure it got on when I installed an older version of Acrobat Reader with some other software off a CD and overwrote the copy of SVG Reader 3.0 that I already have.
Jasc WebDraw ship a copy of Adobe SVG Viewer 3.0 with thier software, so I guess I need to document the issue somewhere and put some sort of press pack together (journalists love when you write their articles for them) making sure distributors understand the necessity of including an up to date SVG Viewer.
Perhaps as OpenClipart.org progresses and needs even more consistant SVG the Standard SVG exporter will be improved to be even more clean, minimal and homogenous (and therefore robust). I guess if someone develops a TinySVG/MobileSVG exporter I'll get just that.
I'm disappointed the time I spent on this is not going to be useful but thanks all for the prompt and helpful answers.
Sincerely
Alan Horkan
participants (3)
-
unknown@example.com
-
Alan Horkan
-
John Pybus