Re: semantic level of SVG usage

> And, although the semantic payload of the diagram is largely concerned 
> with connectivity, the SVG contains no information on this.  The only 
> way I can see to get connectivity information is to compare locations 
> of line endpoints with the (fuzzy) boundaries of geometric shapes.


I've ported the GUI of Pure Data (diagram-based realtime DSP 
language) from tcl/tk-- using tk canvas-- to nw.js-- using SVG.  In 
both cases it's trivial to walk the graph-- with tk canvas you'd leverage 

the "-tags" flag, and with SVG you'd leverage the "class" attribute.  

Furthermore, in SVG you can leverage <g> to group the rectangles or 
paths that belong to a particular "node" in the diagram.  Let's say you 
have a <g id="node1"> and <g id="node2">.  To connect them, use a 
<line id="line1" class="from_node1 to_node2">.  It's completely unambiguous.

-Jonathan

Received on Wednesday, 17 August 2016 18:21:00 UTC