strata-d3-tutorial icon indicating copy to clipboard operation
strata-d3-tutorial copied to clipboard

SVG grammar diagram is accurate?

Open Guy--L opened this issue 8 years ago • 4 comments

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.

Guy--L avatar Aug 05 '16 21:08 Guy--L

Interesting! Where do you see that? In this section?

screen shot 2016-08-05 at 3 33 53 pm

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.

scotthmurray avatar Aug 05 '16 22:08 scotthmurray

unnamed

Forgive the fatbits on this little red roadmap. Follow the numbers for the path that got me in trouble.

Guy--L avatar Aug 05 '16 22:08 Guy--L

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'.

Guy--L avatar Aug 06 '16 01:08 Guy--L

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.

scotthmurray avatar Aug 08 '16 22:08 scotthmurray