strata-d3-tutorial
strata-d3-tutorial copied to clipboard
SVG grammar diagram is accurate?
The graphic in the cheatsheet would lead me to believe that I can nest G under RECT, which I have found does not work in practice. I have not looked at the SVG XSD yet, however, to verify.
Interesting! Where do you see that? In this section?
I believe you're right that g
cannot be nested inside a rect
(or any other graphic primitive). Probably if you try it, the g
(or its contents) simply wouldn't be rendered in any way.
Forgive the fatbits on this little red roadmap. Follow the numbers for the path that got me in trouble.
I don't know if shapes can be nested inside each other. To fix the 'g' nesting in this diagram, you can remove where '4' is and put a tight loop beneath 'g' opposite of '0'.
Ah thanks! Much appreciated. I'm cc'ing @jcukier as he made the diagram and may want to update it down the road.
I'm not super familiar with railroad diagrams, but I think you're right here. And no, you can't put primitives inside each other (e.g. rect inside of text or circle). Or, you can, but the inner ones won't render.