Problem with <use> element of SVG files
In SVG 1.0/1.1, the <use> element uses the xlink:href
attribute to refer to objects; In SVG 2.0, the attribute was changed to href
. Illustrator supports the former, but not the latter, content will be lost when opening such a file.
Below is a simple test case (saved as a .svg
file). There are three circles in it, the second one is referenced via xlink:href
and the third one is referenced via href
, opening the file in Illustrator will only see the first two.
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="50" height="100">
<circle cx="25" cy="20" id="circle" r="10"/>
<use xlink:href="#circle" transform="translate(0 30)"/>
<use href="#circle" transform="translate(0 60)"/>
</svg>
Tested in Illustrator 27.0 Windows