0

My simple SVG image (below) seems to work in some applications, but not others.

In a Java/Batik app, for instance, complains that - 'The attribute "d" of the element <path> is invalid.'

Can anyone see what part of the "d" attribute Batik would object to?

<path id="uparrow"
d="M 45% 5%, 
C 48% 3%, 52% 3%, 55%, 5%,
L 95% 45%,
C 100% 52%, 88% 65%, 80% 60%,
L 62% 40%, 
L 62% 92%,
C 61% 100%, 39% 100%, 38% 92%,
L 38% 40%, 
L 20% 60%,
C 12% 65%, 0% 52%, 5% 45%
z"
fill="#ffffff" stroke="#666666" stroke-width="2" />

1 Answers1

0

"%" character is not supported in d attribute of path element by SVG 1.1.
Please try remove all "%"s.

defghi1977
  • 4,075
  • 1
  • 25
  • 26
  • I already tried that, but after removing the "%"s I still get the same error message. Chromium browser displays the image OK, and so does Nautilus file manager and Image Viewer (Ubuntu") – user1981727 Feb 19 '13 at 03:29
  • Removing commas at the end of lines in the path data seems to get rid of the errors (warnings, really, as the SVGs still get displayed, but IMHO unnecessarily disruptive for an interactive app) I had understood that using commas or spaces as separators between path data items was acceptable although redundant, but objecting to placing them at the end of a line seems a little pedantic? – user1981727 Feb 19 '13 at 05:12