Ecommerce Shopify WordPress Discussion

How many levels of recursion does SVG support?

I cannot get past 2 levels. (Tried on Iceweasel and Chromium.) As a test, I tried a variant of the code presented in this earlier reply. This one consists of 3 separate files, where a.svg includes b.svg, and b.svg includes c.svg. (NB: This is not a cycle.) <!-- a.svg --> <svg width="100%" height="100%" viewBox="-100 -100 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <circle cx="-50" cy="-50" r="30" style="fill:#b58900" /> <image x="10" y="20" width="80" height="80" xlink:href="b.svg" /> </svg> <!-- b.svg --> <svg width="100%" height="100%" viewBox="-100 -100 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <circle cx="-50" cy="-50" r="30" style="fill:#cb4b16" /> <image x="10" y="20" width="80" height="80" xlink:href="c.svg" /> </svg> <!-- c.svg --> <svg width="100%" height="100%" viewBox="-100 -100 200 200" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> <circle cx="-50" cy="-50" r="30" style="fill:#dc322f" /> </svg> I expected to see a large dark yellow dot, a medium-sized orange dot, and a small red dot, but I see only the first two. In fact, what I see is exactly the same as what I would see if b.svg did not include c.svg. Why is c.svg not being included? Is there a way to get SVG recursion to work for more than 2 levels?
SVG when used as an image must be complete in a single file. a.svg is not an image b.svg is included as an image by a.svg and is therefore subject to the complete in a single file image rule so any images it contains must be included as data URIs. c.svg is ignored as b.svg cannot refer to external files. Convert c.svg to a data URI and include it inline in b.svg to get round this.

February 4, 2024

TurboCommerce make the better internet purchasing globaly

Turbo Multi-language Translator

Make the better internet purchasing globaly

Turbosify SEO Speed Booster

5.0 (7) Free plan available
Get better conversions by improving store loading speed Installed

Turbo Multi-language Chat - AI Customer service in one hand

TurboCommerce make the better internet purchasing globaly
Our products

The help you need, when you need it

App by Turbo Engine

3 apps • 5.0 average rating

Turbosify Speed Booster

5.0 (7)
Get better conversions by optimizing shopify store Google page speed Installed

Turbosify Translator for Wordpress Woocommerce

5.0 (74) Free Wordpress Woocommerce Plugin
Translate your wordpress website to multiple language within 1 click, no configuration needed, no No technical required

Grow your business here

Whether you want to sell products down the street or around the world, we have all the tools you need.