W3C home > Mailing lists > Public > semantic-web@w3.org > November 2011

Re: Metadata about a JavaScript file

From: Denny Vrandecic <denny.vrandecic@kit.edu>
Date: Thu, 10 Nov 2011 14:48:28 +0100
Cc: SWIG Web <semantic-web@w3.org>, Mark Nottingham <mnot@mnot.net>, Phil Archer <phil@philarcher.org>
Message-Id: <CC883E72-EB3E-4938-8AF0-44B41468A4D3@kit.edu>
To: Tim Berners-Lee <timbl@w3.org>
I am unhappy with that solution for several reasons, but I recognize that it might nevertheless be the best one currently available.

My reasons are:

1) it is not that easy to fiddle around with your HTTP settings. E.g. if you publish the code via Google Code or Github instead of publishing it yourself, I would not know how to convince them to set the HTTP link header as wished.

2) I am unsure about the tool support for this solution. It sounds to me slightly obscure (uhm, yeah, unlike conneg :P )

If someone has more thoughts on this I would appreciate them. For now I think I will go towards making HTTP link the preferred solution, but have a comment in the JavaScript file pointing to the metadata as a simpler back up plan (similar to HTML's link rel="alternate" element).

Is the HTTP link solution used anywhere already, e.g. to publish metadata about pictures, songs, other type of files?

Cheers,
Denny

On Nov 10, 2011, at 13:29, Tim Berners-Lee wrote:

> Yes, the link header is a perfect solution.
> 
> Hmm The tabulator follows rel=meta (in link: header or HTML <link> attribute identically) 
> but "meta' I see isn't mentioned in the draft.
> 
> Tim
> 
> On 2011-11 -10, at 06:27, Phil Archer wrote:
> 
>> Denny,
>> 
>> I'd suggest using the HTTP Link element [1] with @rel=describedby, pointing to a file that included your triple or, more simply, just @rel=license and link to the licence directly. You need to do a bit of server config (use Mod_headers) but assuming you have access to do that it shouldn't be be too hard.
>> 
>> HTH
>> 
>> Phil.
>> 
>> [1] http://tools.ietf.org/html/rfc5988
>> 
>> On 10/11/2011 11:06, Denny Vrandecic wrote:
>>> Hi,
>>> 
>>> sorry, folks, stupid technical question:
>>> 
>>> how would I add RDF metadata to a JavaScript file?
>>> 
>>> Assume I have at
>>> 
>>> http://example.org/script.js
>>> 
>>> a JavaScript file. I want to add some metadata about it, like its license. I.e. I want to be able to state e.g.
>>> 
>>> <http://example.org/script.js>  cc:license license:BSD .
>>> 
>>> Where do I put this triple?
>>> 
>>> And how can I let a tool know where this triple is, if the tool only has the script's URI?
>>> 
>>> Cheers,
>>> Denny
>>> 
>> 
>> -- 
>> 
>> Phil Archer
>> http://philarcher.org/
>> @philarcher1
>> 
>> 
> 
> 
Received on Thursday, 10 November 2011 13:48:59 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 21:45:46 GMT