W3C home > Mailing lists > Public > public-svg-wg@w3.org > July to September 2012

Re: id's in the SVG2 spec

From: Chaals McCathieNevile <w3b@chaals.com>
Date: Sat, 28 Jul 2012 15:50:39 +0200
To: "Robin Berjon" <robin@berjon.com>, "Tab Atkins Jr." <jackalmage@gmail.com>
Cc: "Erik Dahlstrom" <ed@opera.com>, public-svg-wg@w3.org
Message-ID: <op.wh5sqpfh22x22q@widsith-3.local>
On Fri, 27 Jul 2012 23:34:42 +0200, Tab Atkins Jr. <jackalmage@gmail.com>  
wrote:

> On Fri, Jul 27, 2012 at 2:24 PM, Robin Berjon <robin@berjon.com> wrote:
>> On Jul 27, 2012, at 19:54 , Tab Atkins Jr. wrote:
>>> On Fri, Jul 27, 2012 at 6:05 AM, Erik Dahlstrom <ed@opera.com> wrote:
>>>> A thing about the SVG2 draft, I'd be happy if we could make it  
>>>> possible to
>>>> reference all sections and paragraphs. For example in some elements  
>>>> that
>>>> have several paragraphs of requirements most often there's only a  
>>>> single id
>>>> on the heading, which isn't good for referencing.
>>>>
>>>> So, if you're editing and spot places where we could use some more  
>>>> id's
>>>> please add them.
>>>
>>> Couldn't we just put this into the build process and add generated ids
>>> to every <p>/etc?
>>
>> That would be great, but do you have a way of guaranteeing that they  
>> remain stable (enough)?
>
> There are methods that would help increase stability.  For example,
> generate ids prefixed with the ids of all ancestor sections, so that
> fiddling in one part of the document will only affect things in the
> given subsection.

This is not a simple problem. Your proposal works so long as you put  
everything in the right place first time - which is probably going to  
happen in a majority of cases but not all. A similar approach is to have  
sub-headings at pretty detailed granularity, so even if you move them  
around, they exist. And if you remove something, changelogs help as a  
place to collect the orphan ids.

There's no beautiful solution - but the work that people have done on  
anotation systems over the last decade and a half probably gives a lot of  
clues about best known practice...

cheers

Chaals

-- 
Chaals - standards declaimer
Received on Saturday, 28 July 2012 13:51:09 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 28 July 2012 13:51:10 GMT