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

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.

Since it is an error then the browser, as per the spec, is at liberty to
interperet it as the browser sees fit. There is no "correct" behaviour.
}
Credits to Richard F. on this.

All this to say that when Konqueror 4.6 loads
http://test.csswg.org/suites/css2.1/20110111/html4/link-visited-selector-001.htm
and then I click the "Filler text" link, the color remains green (and
does not change to expected orange color) and I believe (am entitled to
think) that the testcase code is not irreproachable precisely because of
this code recourse to href="#"; for sure, Konqueror 4.6 supports
:visited selector.

Any other testcase with a reasonable, normal href value would suffice here.

Gérard Talbot

[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)
-- 
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 20:35:42 UTC