W3C home > Mailing lists > Public > www-tag@w3.org > December 2010

Javascriptfragid semantics

From: Tim Berners-Lee <timbl@w3.org>
Date: Thu, 2 Dec 2010 09:53:23 -0500
Cc: Jonathan Rees <jar@creativecommons.org>, www-tag@w3.org, Ben Adida <ben@adida.net>
Message-Id: <209F8AFC-5DDF-4747-AFA6-96C28792E295@w3.org>
To: nathan@webr3.org

On 2010-11 -29, at 19:05, Nathan wrote:

> Tim Berners-Lee wrote:
>> Well, not really.
>> A general way of saying it is that the fragid is a document-global identifier in whatever language.   You invent a new language, and it get s new global identifiers
>> So in a javascript module, for example,  I would expect
>> foo.js#bar to be the  global variable bar in the file foo.
> ahh insightful, I'd never seen it quite like that, so jumping a few hops one might conceivably specify a js require function and do something like:
>  FastGraph = require('http://openjs.net/api/core.js#FastGraph);

Yes, absolutely. With an RDF mesh of dependencies, that would
be a nice packaging system.

using core as 'http://openjs.net/api/core.js#' {
	var fg = new core::FastGraph();

It was interesting to chat with Brendan Eick about the ecmascript and e4X (ecmascript for xml) history.
He mentioned e4x is actually implemented for example in Rhino, and uses :: for namespaces,
but only in the context of XML, not RDF or js itself.

> Thus enabling a universal require for js and an open web scale set of classes that can be used anywhere - although perhaps I read too far in to it!

No, I think it would be neat.
See the red_import() for Python which
alas 404

>> It is really important to be able to ivent new languages,
>> and so it hard to say how theyr global address space will work.
>> In the case of HTML and RDFA, we have a mixture of languages
>> so an localid  can either identify an HTML anchor or a RDF concept.
>> I don't like the idea of things being both.
> Afaict, at runtime the two localids can never conflict, one is used within the scope of the DOM and the other combined with a string to create an RDF URI Reference / IRI - so is the issue that at webscale, when you encounter something with a fragmentid and that derefs to an HTML+RDFa document, you don't know to what it refers (wondering if again that's covered by the context within which you're asking the question),

What a URI refers to must NEVER be covered by the context in which you ask the question.
That is important web architecture.

> so then is it to do with what statements one may make about the said uri -with-frag thus creating possible ambiguity there?

Well, might you want to use RDF languages to talk about fragments of a hypertext document too?

	ele:Mg a ch:Element;   :warningNotice <warnings#mg>.

where warnings#mg is an anchor within an HTML document.
Or also you might want an RDF view of the DOM inside a script.

Received on Thursday, 2 December 2010 14:53:32 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 22:56:36 UTC