This post follows on from my last one, adding some thoughts about the way Compendium links can be encoded in SVG, a way that permits the links to be straight lines or any sor of arc or curve. There’s also a bit more scripting: a first go at handling links to transclusions of a node. This post includes svg code for the links and an example image.
Here is the code used to draw the link between the activity and learning outcome nodes:
The link is coded as a group (<g>) of elements, includinga title and a description. In this example, the rendering of the link graphic (i.e. the arrow between the nodes) is coded as a <line> element. However, it could be coded as a <path>: SVG paths can be any arbitrary line, arc or curve. The <desc> element holds the ids of the nodes that the link connects between that could be used by both people and algoriths processing the map code. The <title> element is a title intended primarily for human consumption. This group of elements is identified as being a ‘link’ by the class atribute i.e. the code:
<g id=”link1″ class=”link”>.
The ’2′ at the bottom right hand orner of the learning ourcome node indicates that this node appears in 2 maps; it is transcluded to 2 maps. If you hover your mouse over the ’2′ , you wuill see the titles of the two maps that this node appears in. One is ‘This map’, the is a link to the other map that the same node appears in.
I’ll add some notes about the coding of the transclusions later.
Finally, a note to myself. To make these SVG maps it editable in Inkscape, the CSS style information must be embedded in the file, not linked externally.