Re: parser missing an html error

On Wed, 9 Oct 2002, Irene Vatton wrote:

> 
> On Tue, 08 Oct 2002 07:59:59 -0400
> "John Russell" <ve3ll@rac.ca> wrote:
> 
> > 
> > Isn't the parser supposed to flag errors in html constructs.
> > I had been using ones like
> > <h2 id="x"><a name="x"></a>Topic Heading</a>
> > to give a target anchor for both old and new browsers
> > (the null instead of 'a' spanning the caption is to avoid
> > a known netscape 4 quirk.  But my first use of the 
> > w3.org link checker bled so much red that i had to refill
> > the video's supply ;-] ;-]    I contacted
> >   Bjoern Hoehrmann <derhoermi@gmx.net> and he explained
> > that it was a duplicate id problem.  Neither Amaya nor the
> > w3 validator flag this problem and i was lulled into a false sense
> > that i had done things correctly.  Is there a reason why Amaya
> > does not warn on duplicate id problems. 
> 
> Amaya avoids to generate duplicate ids but doesn't check existing 
> ones.

John,

somewhere in the transition documentation, I think
they suggest coding that as
<h2><a name="x" id="x"></a>Topic Heading</h2>
which puts the identifier "x" redundantly on the
same tag twice.

(I came away from that piece of the specification
thinking of it as the name attribute and the id
attribute being separate namespaces; but, thinking
it through after reading your paragraph above,
that would not work because href="#x" has to point
at exactly one location in the document.)

dan

Received on Wednesday, 9 October 2002 08:58:42 UTC