ruricolist/spinneret

Add an :SVG tag

svetlyak40wt opened this issue · 6 comments

This can be useful to support SVG tag to draw D3 graphs.

Right now I'm using this as a workaround:

(pushnew :svg spinneret::*html5-elements*)
(:tag :name "svg" :class "graph")

To be clear, are you just asking for Spinneret to support an :svg tag, or are you asking for Spinneret to support producing inline SVG documents? Because the latter would require a fair amount of work and I'm not sure it's a good idea (although I could probably be persuaded otherwise).

I did learn something researching this issue: I always thought that to embed SVG and MathML in an HTML document, the embedded markup had to be valid XML, but it doesn't -- browsers just use the HTML parser to construct the XML DOM.

So is adding <svg><path></path></svg> something that's on the timeline?

I'm not inherently opposed to it but it would be a fair amount of work to add all the SVG and MathML elements and their permitted attributes and I have no short-term plans in that direction.

Is there a way to make this extension as a separate ASDF system?

It should be possible, although some parts of Spinneret would have to be rewritten to scale to adding so many extra tags and properties. I'm working on that in a separate branch: https://github.com/ruricolist/spinneret/tree/use-hash-table.