W3C home > Mailing lists > Public > www-html@w3.org > December 2001

Re: anchors

From: Vix <vixcc@yahoo.com>
Date: Sun, 2 Dec 2001 22:04:00 -0800 (PST)
Message-ID: <20011203060400.47882.qmail@web21108.mail.yahoo.com>
To: Masayasu Ishikawa <mimasa@w3.org>, www-html@w3.org
Same document, section 3.1:

" Relative URI references are distinguished from absolute URI in that
they do not begin with a scheme name.  Instead, the scheme is
inherited from the base URI, as described in Section 5.2."

Thus, I believe that the BASE URI must be taken into consideration in this case.

In section 5.2, as you mentioned...

> And "5.2. Resolving Relative References to Absolute Form" further says:
> 
>    For each URI reference, the following steps are performed in order:
> 
>    1) The URI reference is parsed into the potential four components and
>       fragment identifier, as described in Section 4.3.
> 
>    2) If the path component is empty and the scheme, authority, and
>       query components are undefined, then it is a reference to the
>       current document and we are done.  Otherwise, the reference URI's
>       query and fragment components are defined as found (or not found)
>       within the URI reference and not inherited from the base URI.
> 
> So a fragment identifier should be interpreted as a reference within
> the current document, regardless of the base URI.  Unfortunately,
> as you noticed, many user agents do it wrong.

But the case described in here is not a Relative URI. It is an absolute URI.
<BASE Href="http://url.com/">

Thus, Section 5.2 - Part 3 says:

3) If the scheme component is defined, indicating that the reference
      starts with a scheme name, then the reference is interpreted as an
      absolute URI and we are done.  Otherwise, the reference URI's
      scheme is inherited from the base URI's scheme component.

This means that in this case the URI is the BASE one. Thus, a <a href="#top"></a> case will be
interpreted as "http://url.com/#top"

Best regards,

Vix!


=====
_,.~=`^`=~.,_,.~=`^`=~.,_,.~=`^`=~.,
------> tAke a bReak! gEt eNtertained!
------> http://www.sallini.com/
^`=~.,_,.~=`^`=~.,_,.~=`^
-> http://netdesignplus.net/
-> It works... It Pays...
_,.~=`^`=~.,_,.~=

__________________________________________________
Do You Yahoo!?
Buy the perfect holiday gifts at Yahoo! Shopping.
http://shopping.yahoo.com
Received on Monday, 3 December 2001 01:04:01 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Tuesday, 27 March 2012 18:15:50 GMT