"Aryeh Gregor" <Simetrical+wikilist(a)gmail.com> wrote in message
news:7c2a12e20812220646m65db7035icda30fd0e104b7e1@mail.gmail.com...
On Mon, Dec 22, 2008 at 5:34 AM, Mark Clements
(HappyDog)
<gmane(a)kennel17.co.uk> wrote:
It is possible to have several identical headings
on a page, but you are
not
allowed to have duplicate id attributes within a page, so it's not as
simple
as just using the section name as is currently the case. Note that
duplicate values for the 'name' attribute is perfectly valid HTML
No, it's not.
"This attribute names the current anchor so that it may be the
destination of another link. The value of this attribute must be a
unique anchor name. The scope of this name is the current document.
Note that this attribute shares the same name space as the id
attribute."
http://www.w3.org/TR/html4/struct/links.html#h-12.2
The name attribute not only must be unique, but shares its namespace
with the id attribute, so any uniqueness problems with id's would have
already existed with names.
I wasn't aware of that. On form elements (input/select/etc.) duplicates for
the name attribute are allowed (and are, in fact, required in some
situations, such as radio-button arrays). It's somewhat confusing that the
same attribute has different meanings in different contexts!
On Mon, Dec 22, 2008 at 9:36 AM, Mark Clements (HappyDog)
<gmane(a)kennel17.co.uk> wrote:
But then section links will be incorrect if the
order of the duplicate
headings changes.
This is and always has been true. Of course, the same problem occurs
in the (far more common) case that an existing section is renamed or
deleted outright. Sections in MediaWiki are not versioned and are
accorded no permanence. This is reasonable enough, since their
content is routinely moved around the page. A permanent link to a
section isn't worth much if the page is refactored and half the
content is in some other section.
Agreed, and the proposed (now implemented?) fix handles this better than we
currently do.
On a side note, I would be interested to know how the purple numbers
extension (which was recently announced on this list) handles this. In as
much as I understand purple numbers, they give a permanent way of
referencing an article, down to the paragraph, or maybe even sentence level.
Are these numbers retained across edits? If so, perhaps this can be
leveraged to solve some of the various 'sections referenced by heading text'
issues that exist.
- Mark Clements (HappyDog)