W3C home > Mailing lists > Public > public-css-testsuite@w3.org > February 2011

Fixed Re: [RC5, pre-RC6] link-visited-selector-001 questionable under 2 RFCs

From: Gérard Talbot <css21testsuite@gtalbot.org>
Date: Mon, 21 Feb 2011 14:46:10 -0800
Message-ID: <e42331a98f4abb61cbf7df240df44a27.squirrel@cp3.shieldhost.com>
To: "Arron Eicholz" <arron.eicholz@microsoft.com>
Cc: "Public CSS test suite mailing list" <public-css-testsuite@w3.org>

Le Lun 21 février 2011 12:35, "Gérard Talbot" a écrit :
> Arron,
>
> http://test.csswg.org/suites/css2.1/20110111/html4/link-visited-selector-001.htm
> (RC5)
>
> http://test.csswg.org/suites/css2.1/nightly-unstable/html4/link-visited-selector-001.htm
>
>
> http://test.csswg.org/source/contributors/microsoft/submitted/Chapter_5/link-visited-selector-001.xht
>
> Under RFC 1808 [1] and RFC 2396 [2], there is no clear and explicit rule
> governing how to parse and proceed with an empty fragment identifier
> (href="#").
>
> There may be a de facto standard among mainstream browsers on bringing
> document view to the top when dealing with href="#" ... but that's it.
>
> This matter has been discussed before in web authoring newsgroups
> (alt.html in 2004).
>
> The closest I could find was:
> "
>    an empty URI reference within a
>    document is interpreted as a reference to the start of that document,
> and a reference containing only a fragment identifier is a reference
> to the identified fragment of that document.
> "
> Section 4.2. Same-document References of rfc2396.txt
>
> Some browsers may be designed, backend-coded to not reload the already
> loaded document too if the URI is empty or if fragment identifier is
> empty.
>
>
> Some say href="#" should be invalid according to specs:
>
> {
> RFC1808, in section 2.2 defines in modified BNF form
>  "fragment = 1*pchar"
> and mentions that the 1* means "[one] or more repetitions of the
> [pchar].
>
> So, zero repetitions is not allowed and href="#" is therefore an error.

Argh..

The exact form, as given in
2.2.  BNF for Relative URLs
is rather

fragment    =  *( uchar | reserved )

so zero or several repetitions of uchar or reserved is allowed.

{
If the
   crosshatch (#) is the last character, or no crosshatch is present, then
   the fragment identifier is empty.  The matched substring, including
   the crosshatch character, is removed from the parse string before
   continuing.

   Note that the fragment identifier is not considered part of the URL.
}
2.4.1.  Parsing the Fragment Identifier
http://www.ietf.org/rfc/rfc1808.txt

So a webpage should link to itself when one of its link is href="#".

> [1]:
> http://www.ietf.org/rfc/rfc1808.txt
> (section 2.4.1. Parsing the Fragment Identifier)
>
>
> [2]:
> http://www.ietf.org/rfc/rfc2396.txt
> (section G.4. Modifications from RFC 1808 and section 4.2. Same-document
> References)

Ok. Never mind.

Gérard
-- 
Contributions to the CSS 2.1 test suite:
http://www.gtalbot.org/BrowserBugsSection/css21testsuite/

CSS 2.1 test suite (RC5; January 11th 2011):
http://test.csswg.org/suites/css2.1/20110111/html4/toc.html

CSS 2.1 test suite contributors:
http://test.csswg.org/source/contributors/
Received on Monday, 21 February 2011 22:46:46 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Monday, 21 February 2011 22:46:54 GMT