Hi, I'm currently working on a GSoC proposal to add PCB layout and schematics editing capabilities to Inkscape (it's not as hard as it sounds). In a PCB layout, you have a number of (physically stacked) layers (one copper layer on each side of the board, possibly multiple copper layers *inside* the board, green solder mask on both sides on top of the copper layers and white print on top of the solder mask for markings etc.). I'm currently unsure on how to map these layers to SVG.
It appears obvious to map these to Inkscape layers/SVG groups. This does not work too well however, since all components on the board span multiple layers (pads for the pins on the copper layer, cut-outs for the pads on the solder mask and a package outline and part id/number on the silkscreen). If a component is moved, all parts of it (on any layers) need to be moved simultaneously, and in fact, normally it does not make sense to even select the parts of a component individually.
My problem is that this would essentially require cross-group groups, i.e. groups whose elements can be elements of other groups not part of the group, which clashes with XML's tree structure.
Currently, I have two and a half ideas on how to address this issue:
1) I implement PCB layers as something different to Inkscape's layers that is just denoted by an object property (I don't like this). This attribute would be pretty similar to the z-order attribute that will be include in SVG 2. 2) I find some way of "linking" multiple groups on multiple layers (I don't like this either, it's easier but more "hackish").
I'm currently leaning towards the second option since I can imagine the first will require a *lot* of work (though I will still look into that further).
Perhaps you have some ideas on how this could be implemented in pre-2.0 SVG.
Thanks, Sebastian