Eric Wilhelm wrote:
Inkscapers,
Should inkscape refuse to load a file that includes an <image element which references the svg file itself?
I don't see anything in the svg spec about how you're supposed to exit their (accidentally enabled?) recursion and inkscape 0.43 runs to 1.3GB of ram very quickly (I'm not brave enough today to see if it goes all the way to the OS barrier, but I don't see any signs that it wouldn't.)
I would attach the file, but I don't want to get accused of sending virii :-) If you have the ram and stomach for it, just slap this into the middle of a skeleton file named image_recursive.svg and enjoy.
<image y="103.00504" x="48.357143" id="image1355" height="355.85715" width="345.17828" xlink:href="image_recursive.svg" />
--Eric
Apparently, an svg image can reference images, including svg and even itself. It is allowed here: http://www.w3.org/TR/SVG11/coords.html#EstablishingANewViewport
So I think that maybe to avoid recursion you should catch an occurrence of an SVG ref-ing itself without either a non-identity transform or a viewbox.
I think that an Escher-like image of a man holding a picture of a man holding a picture of a man, etc... would be valid. Tough to render, but valid.
bob