Re: Is this use of BASE kosher?

Daniel W. Connolly (connolly@beach.w3.org)
Tue, 1 Aug 95 13:23:45 EDT

In message <9508011641.AA27553@plato.ansa.co.uk>, Owen Rees writes:
>>
>> I think that http://a and http://%61 are exactly the same URL.
>
>Doing more encoding of text already known to be a URL is not the problem I am
>concerned about. What I want to be certain about is whether a piece of text is
> a URL (therefore encoded already) or is a something that can be turned into a
> URL by applying the encoding.

The HREF attribute is intended to be a the former: a URL.
The NAME attribute is not.

>Current practice seems to be that
> <A HREF="%2562.html#%61">%2562.html#%61</A> refers to
> <A NAME="%61">This is %61 in %62.html</A> and not to
> <A NAME="a">This is a in %62.html</A>.
>Neither anchor names not fragment identifiers behave as if encoded.

Blech! Barf! Another one for the test suite:

http://www.w3.org/hypertext/WWW/MarkUp/html-test/hyperlinks/frag-encode.html

Of course you don't need to write #%61 in the HREF -- you can always
write #a. But if the anchor name is "ab/cde" then you're in trouble.

I suggested a long time ago that anchor names should be SGML IDs.
This would eliminate the need to express an anchor name of "ab/cde",
but it would introduce case-folding.

Hmmm.. this could be a problem if/when fragment identifiers are used
for more sophisticated purposes (arguments to Java scripts, etc.)

I'm also updating the reference in the DTD:

<!ENTITY % URI "CDATA"
-- The term URI means a CDATA attribute
whose value is a Uniform Resource Identifier.
The syntax is defined by

RFC 1808, "Relative Uniform Resource Locators."
R. Fielding, June 1995

Dan