RE: URI in a URI

Thanks Hugh,

It really helps. The examples give me more understanding on how URI is constructed. 

I think this is a very useful feature to name emerging services.

Best,

Vincent

-----Original Message-----
From: Hugh Glaser [mailto:hg@ecs.soton.ac.uk] 
Sent: den 4 februari 2011 15:08
To: <nathan@webr3.org>
Cc: Vincent Huang A; semantic-web@w3.org
Subject: Re: URI in a URI

A very useful question.
It is an important issue for the emerging services accessing the semantic web.

Yes in general using a # is a bad thing.
It is likely the server will never see the fragment after the #.

I don't know if it is written anywhere, but there seems to me a bit of a consensus around this.
And it is folded into the RESTful stuff.
So for example
http://kmi-web05.open.ac.uk/REST_API.html
describes a typical service invocation with a URI as argument as:
http://watson.kmi.open.ac.uk/API/semanticcontent/metadata/?uri=[docURI]

We do something similar in http://sameas.org/ http://sameas.org/about.php describes in detail, with things like:
http://sameas.org/?uri=http://dbpedia.org/resource/London (the NIR) and http://sameas.org/rdf?uri=http://dbpedia.org/resource/London (an IR) etc.
and also in the rkbexplorer services things like http://www.rkbexplorer.com/network/?uri=http://southampton.rkbexplorer.com/id/person-00021&type=person-person&format=tsv
as well as with two URIs
http://www.rkbexplorer.com/connections/?source=http://southampton.rkbexplorer.com/id/person-da9c463f8b783083d7d7e9003db8224f-57e2ec2d7aee429c73fef344805033e2&target=http://southampton.rkbexplorer.com/id/person-17e6d4cf4846bd195454a7c1143a20fb-32a6807d38b58d6d56e31d88f5e48de2&type=person-person

So you could use
http://example.com/sensors/sensor1/lookup?uri=http://sweet.jpl.nasa.gov/2..1/propTemperature

Unless someone wants to tell us that is crazy?
This is the sort of thing it is useful to have some best practice emerge on..
Or can anyone point us at where it is written?

Best
Hugh

On 4 Feb 2011, at 12:41, Nathan wrote:

> Vincent Huang A wrote:
>> Can I have a URI in another URI definition?
>> For example, if I want to give a name to a temperature service coming from a sensor, can I say:
>> http://example.com/sensors/sensor1/services#http://sweet.jpl.nasa.gov
>> /2.1/propTemperature
> 
> well now, that's just one, valid, URI :) so long as it conforms to the syntax restrictions then you're fine.
> 
> note: be clear on the fact that it's only one URI though, not two URIs, or a "URI in a URI", and that #fragments have certain restrictions (see [1]), as in you can't have a '#' in a fragment.
> 
> [1] http://tools.ietf.org/html/rfc3986#section-3.5
> 
> Best,
> 
> Nathan
> 

--
Hugh Glaser,  
              Intelligence, Agents, Multimedia
              School of Electronics and Computer Science,
              University of Southampton,
              Southampton SO17 1BJ
Work: +44 23 8059 3670, Fax: +44 23 8059 3045
Mobile: +44 78 9422 3822, Home: +44 23 8061 5652 http://www.ecs.soton.ac.uk/~hg/

Received on Friday, 4 February 2011 14:25:25 UTC