lynx-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: lynx-dev Bug with multiple A HREF's sharing same NAME


From: Stephen Kitt
Subject: Re: lynx-dev Bug with multiple A HREF's sharing same NAME
Date: Wed, 23 Sep 1998 15:34:34 +0100

On Wed, Sep 23, 1998 at 09:51:35AM -0400, Larry W. Virden wrote:
> This is not intended to be sarcastic.  Exactly how would one fix lynx?
> What algorithm should be used in lynx to determine to which one of multiple
> labels, all the same name, an HREF is referring?

The problem's not there. The "bug" (which it isn't, since the HTML DTD
specifies that tags have to be unique within one HTML file) occurs when
there are links of the form:

        ...
        <A HREF="http://somewhere"; NAME="name">
        ...
        <A HREF="http://elsewhere"; NAME="name">
        ...

ie the HREF part changes, but the NAME doesn't. That is incorrect, and
LaTeX2HTML should be fixed, but there are many pages out there which exhibit
this problem and won't be fixed. But in the LaTeX2HTML case, links such as
these are never used as anchors, just as links - ie nothing points to them,
so the NAME doesn't really matter, but they do point to something, so the
HREF does matter. <A> tags used as anchors by L2H do have unique NAMEs.

Lynx follows the DTD and makes each one point to the same thing, ie the URL
given in the HREF for the first tag with the same NAME in the page. I don't
know how Lynx represents pages internally (I'm just a user trying to get
things working - the code isn't mine, the troublesome pages aren't mine
either, but I'm trying to use Lynx to view the pages in question), and it
probably makes things easier to follow the DTD. Nevertheless, all that is
required to "fix" this is to preserve HREF information for every <A> tag,
rather than somehow merge tags with identical NAMEs (as happens now);
searching for a NAME tag, to find an anchor, would stop at the first
corresponding <A> tag, but broken <A> tags as above would point to their
own, intended, URL.

Stephen

-- 
  Stephen Kitt - address@hidden - http://www.tardis.ed.ac.uk/~steve/
           "It's kind of fun to do the impossible" -- Walt Disney

reply via email to

[Prev in Thread] Current Thread [Next in Thread]