ScratchyHead
08-04-2005, 07:43 AM
Does anyone know if it is possible to use an <image> tag to embed svg data directly inside another svg image in the same way you can for jpg's and png's? I want to be able to deliver one single svg image which may consist of other svg image data directly embedded.
My experiments seem to show that this is not supported in any currect viewers. If the <image> xlink:href references an external svg image then that works fine. However, as I wish to deliver a single svg image, I want to be able to embed the inner svg image data directly (not by including references to them). Before suggesting I should use <svg> tags for the embeded svg data, the inner svg image data that I am dealing with may have already been gzipped and base64 encoded - which I don't wan't to have to unnecessarilly decode, uncompress and/or process it.
For example,
This works ...
<image x="10" y="10" height="50" width="50" xlink:href="img2.svgz"/>
But this does NOT work ...
<image x="10" y="10" height="50" width="50" xlink:href="data:image/svg+xml;content-encoding:gzip;base64,PD94bWwgd ..... "/>
Any ideas?
TIA.
My experiments seem to show that this is not supported in any currect viewers. If the <image> xlink:href references an external svg image then that works fine. However, as I wish to deliver a single svg image, I want to be able to embed the inner svg image data directly (not by including references to them). Before suggesting I should use <svg> tags for the embeded svg data, the inner svg image data that I am dealing with may have already been gzipped and base64 encoded - which I don't wan't to have to unnecessarilly decode, uncompress and/or process it.
For example,
This works ...
<image x="10" y="10" height="50" width="50" xlink:href="img2.svgz"/>
But this does NOT work ...
<image x="10" y="10" height="50" width="50" xlink:href="data:image/svg+xml;content-encoding:gzip;base64,PD94bWwgd ..... "/>
Any ideas?
TIA.