- From: Daniel Glazman <glazman@netscape.com>
- Date: Tue, 20 Aug 2002 10:07:37 +0200
- To: www-validator@w3.org
A rumor says that Nick Kew wrote: > Name is overloaded, and is primarily useful in form inputs, where > duplicates definitely are acceptable (e.g. in a bunch of checkboxes). Right, I was specifically speaking of name attribute carried by links. >> The value of this attribute must be a >> unique anchor name. The scope of this name is the current document. > > I'd read that as meaning it must be unique in order to work properly > as a link target, not to meet the slightly different criterion of being > valid HTML. The DTD - the machine-readable spec for HTML - explicitly > doesn't require uniqueness. What means "work properly" ? Where do you read that ? No, when the HTML WG wrote that sentence, it meant "it is an error". I clearly remember Chris Lilley being in front of me at the HTML WG meeting saying "Good catch, this should be an error". >> Please note the "must". But Validator.w3.org does not detect when two >> named anchors have same name in the same document. > > If we accept your reading of that section, then we have an inconsistency > in the spec, which makes the HTML WG the guilty party. No. There is no way we can specify in a DTD that two attributes share the same value namespace. That can only come from wording. The HTML4 specification is not only made of a DTD, it contains also constraints in the text. >> I did not test the >> case when a name attribute and an ID have the same value. > > That is perfectly valid, provided there are no duplicate IDs. > Once again, it makes sense in the context of link targets, but not > in the context of other uses. I disagree. I was a member of the HTML WG when we discover this issue of name attribute and ID sharing the same namespace. That was during an HTML WG face-to-face meeting in Sophia-Antipolis in spring 1997. The resolution at that time was clearly that a name attribute carried by an anchor and an ID must NOT have same value in a document. >> IMHO, W3C's validator should test this unicity in the name/id namespace. > > I agree such a warning would have some merit in a diagnostic tool, > but that tool isn't a validator. If we only validate against the DTD, I agree. IMHO W3C's validator should validate _and_ check correctness. What the point verifying if a document is valid from a DTD point of view if the document is deeply incorrect from a spec point of view ? Reading the spec, <a name="foo">a</a><a name="foo">b</a> is forbidden in a document. </Daniel>
Received on Tuesday, 20 August 2002 04:07:41 UTC