W3C home > Mailing lists > Public > www-svg@w3.org > July 2003

Logical Groups

From: Doug Schepers <doug@schepers.cc>
Date: Tue, 29 Jul 2003 17:09:57 -0700
Message-ID: <077701c3562e$e9774ce0$220f1918@Raven>
To: <www-svg@w3.org>

At the SVG-Open WG panel discussion, a question regarding roads was put to
the WG, wishing to somehow allow variable z-index to simulate, for instance,
a road passing over and under another road at different points. A possible
solution was floated by a WG member (maybe Jon?), that called for the
virtual linking of separate path elements, so that they could be logically
linked while retaining the painter's model rendering. This idea seemed to
satisfy people, though it was only speculative.

In a recent discussion with Jim Ley about text in SVG, he brought up the
idea of  "linking separate <text> elements into something that can be
selected as a whole, which would need some kind of read-index attribute."
This struck me as an opportunity for two-birds-with-one-stone elegance.

After some dialog, we thought up a possible mechanism that would satisfy
both these use cases: the declaration of a logical grouping of elements,
similar to <use>, that would "logically render" in the same painter's model
fashion, without changing the graphical rendering. In the case of text, this
might look like:

<logicalGroup id='myParagraph'>
   <member xlink:href='#foo'/>
   <member xlink:href='#bar'/>
   <member xlink:href='#buh'/>

<text id='buh' x='0' y='13'>One</text>
<text id='foo' x='0' y='15'>Two</text>
<text id='bar' x='0' y='18'>Three</text>

(<member> could also simply be <use>, since the logicalGroup would not
visibly render.)

This would allow for some very interesting possibilities:
 * selection of members of the logical group for certain DOM manipulations,
such as toggling visibility, and possibly transformations
 * reading order control by virtual group, for accessibility issues
 * selection of text within virtual group as a whole, rather than just
individual text elements
 * obviation of need for metadata, in many cases

Received on Tuesday, 29 July 2003 17:10:09 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 8 March 2017 09:46:56 UTC