- From: Boris Zbarsky <bzbarsky@MIT.EDU>
- Date: Tue, 28 Jun 2011 01:15:49 -0400
- To: Larry Masinter <masinter@adobe.com>
- CC: "public-iri@w3.org" <public-iri@w3.org>
On 6/28/11 12:30 AM, Larry Masinter wrote:
>
>
>> OK. So your proposal is that if I copy a same-document link from some
>> document in a browser and paste it into a different browser window it
>> should just fail, right?
>
> I'm not sure I know what you mean by "copy " and "paste" here; copy/paste processing in most windowing systems are based on context-dependent processing and conversion (converting from source format to destination format). Perhaps it would help to elaborate the scenario you're concerned about. You're not talking about "copy" from a "view source" window. Perhaps you're talking about "copy" from the Address bar?
I'm talking about this scenario:
1) Open up your favorite web browser.
2) Go to a web page. Right click on a link (Ctrl-Click if you're on
a Mac with one mouse button), or whatever your OS's way to bring
up a context menu is.
3) Select "Copy Link Location" or "Copy Link Address" or "Copy Link"
or whatever your browser calls that context menu option.
4) Start composing an e-mail to a friend.
5) Paste the link into the e-mail.
> In any case, I think "thismessage:/" is only useful in cases where the fragment occurs in a document that has no URI that is useful for accessing the same document without re-retrieval.
OK. I agree that if you have such a document you need _something_ to
represent internal links inside it. Is this situation common?
(Note that Gecko, for example, always has URIs associated with all
documents; if the document doesn't have a URI by default it makes one up
as needed in various situations.)
> Let's take the example of a "same-document" reference inside a document that is entirely inside a data: URI:
>
> data:text/html,<html><head></head><body><a%20href="#fragment">Link%20to%20fragment</a><a%20name=fragment>linked%20from%20%earlier</a></body></html>
>
> If you copy #fragment or any URL you construct based on it, into another document, then it will fail. It MUST fail -- the content linked to by "#fragment" has no URL, so there is nothing you can copy to paste somewhere else that will function. Right? Do you have a proposed solution which satisfies your requirement?
First of all, your URI as written is probably not what you meant (since
everything after '#' is fragment identifier). Assuming you had
correctly escaped the '#', then
data:text/html,<html><head></head><body><a%20href="%23fragment">Link%20to%20fragment</a><a%20name=fragment>linked%20from%20%earlier</a></body></html>#fragment
seems like the obvious URI representing "load this document and scroll
to the <a name="fragment">.
There are some backwards compat issues there with old Gecko releases
(which didn't really support fragment identifiers on data: URIs at all)
and in WebKit (which treats that closing "#fragment" as both as fragment
identifier _and_ part of the content, as far as I can tell), but those
seem like implementation bugs to me. Gecko's, in particular, is fixed
in current builds.
-Boris
Received on Tuesday, 28 June 2011 05:16:17 UTC