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

RE: "Hash URIs" and content negotiation

From: T.Heath <T.Heath@open.ac.uk>
Date: Wed, 8 Nov 2006 20:04:44 -0000
Message-ID: <E0FEA5DF00E59E409F90C854A1B45BAA012A050B@EPPING-EVS1.open.ac.uk>
To: "Richard Cyganiak" <richard@cyganiak.de>, "T.Heath" <T.Heath@open.ac.uk>
Cc: <danbri@danbri.org>, "Semantic Web" <semantic-web@w3.org>

Hi Richard,

Please do go and pose (and answer!) different questions at http://www.semanticwebfaq.com/ :)

You're right, it doesn't capture your original question, but I do think "When should I use hash vs slash URIs?" is still worth answering so others have access to that knowledge. The ideal answer in my view would clarify the issue down to the level of your question, starting from the basics. Any volunteers? ;)


-----Original Message-----
From: Richard Cyganiak [mailto:richard@cyganiak.de]
Sent: Tue 07/11/2006 9:20 PM
To: T.Heath
Cc: danbri@danbri.org; Semantic Web
Subject: Re: "Hash URIs" and content negotiation

On 7 Nov 2006, at 21:24, T.Heath wrote:
> I've posed the question "when should I use hash vs slash URIs?" on  
> the semanticebfaq.com wiki - answers/contributions encouraged!  
> <http://www.semanticwebfaq.com/index.php? 
> title=When_should_I_use_hash_vs_slash_URIs%3F>

Tom, I agree with your post, but I think that's the wrong question.

For web documents, the answer is clear. Web documents have slash URIs.

A question arises only for other, non-document resources. But simple  
slash URIs (which respond with 200 OK) are not allowed according to  
[1]. The remaining options are

1. hash URI
2. slash URI with 303 See Other
3. slash URI with 404 Not Found
4. some kind of non-HTTP URI

I will ignore 3 because it's boring and 4 because it's non-webbish.

To me, the interesting question is: When should I use hash vs 303  
URIs to identify non-document resources?

(There are clearly pros and cons for both options, some of which are  
listed in [2], and that's the context in which I asked the original  
question: How does one correctly implement content negotiation for  
hash URIs?)


[1] http://www.w3.org/2001/tag/issues.html#httpRange-14
[2] http://www.w3.org/TR/swbp-vocab-pub/

> Cheers,
> Tom :)
> -----Original Message-----
> From: semantic-web-request@w3.org on behalf of Dan Brickley
> Sent: Tue 07/11/2006 3:50 PM
> To: Richard Cyganiak
> Cc: Semantic Web
> Subject: Re: "Hash URIs" and content negotiation
> Richard Cyganiak wrote:
>> Hi all,
>> One good practice for identifying non-document resources is to use  
>> "hash
>> URIs" like http://example/john#me, and to serve a description at  
>> the URI
>> obtained by taking the part before the hash, e.g. http://example/ 
>> john.
>> Now let's say I want to serve both RDF and HTML descriptions of John.
>> That is, both formats should be available from http://example.org/ 
>> john,
>> depending on the request's Accept: header. How to do this?
>> a) Just return the requested type of content right at
>> http://example.org/john
>> b) Redirect to two different URLs, depending on the requested  
>> type, e.g.
>> http://example.org/john.html and http://example.org/john.rdf
>> I notice that the SWBP Vocabulary Recipes [1] suggest b). I have a  
>> hunch
>> that a) is problematic because it's a bit ambiguous,
>> http://example.org/john#me could refer either to John, or to an  
>> anchor
>> within an HTML page, if there's no 303 redirect in between. So, is  
>> only
>> b) allowed, or is a) fine too?
>> Comments?
> This is the oldest and least rewarding discussion in the SW community!
> You're very right of course, it's problematic to conneg in context of
> such URIs. This is why I always preferred slash URIs! Ah well...
> I guess we're in a
> "Doctor doctor, it hurts when I poke my finger in my eye" situation
> here? Sometimes conneg is best avoided...
> cheers,
> Dan
>> [1] http://www.w3.org/TR/swbp-vocab-pub/#recipe3
Received on Wednesday, 8 November 2006 20:05:06 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 08:44:58 UTC