W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > April to June 2010

Re: [TF-PP] IRI and base URIs

From: Steve Harris <steve.harris@garlik.com>
Date: Thu, 27 May 2010 11:39:07 +0100
Cc: SPARQL Working Group <public-rdf-dawg@w3.org>
Message-Id: <E1C66988-FBD0-4738-9093-F7EE7C3FC261@garlik.com>
To: Andy Seaborne <andy.seaborne@talis.com>
I would very much like it to be defined for IRI inputs too, otherwise it requires this strange hoop jumping:

SELECT URI(STR(?o)) AS ?uri
WHERE { ?s ?p ?o }

as opposed to just SELECT URI(?o), i.e., IRI(<http://example.com/>) -> <http://example.com/>

As per the subject, is IRI("foo") intended to return <foo> relative to the base, or be an error?

- Steve

On 2010-05-27, at 10:45, Andy Seaborne wrote:

> While we're in and around the subject of base URIs:
> 
> The IRI function takes a string and produces an IRI: I propose that we define it only for valid, absolute IRIs, and anything else is an error.
> 
> Creating relative IRIs is plain bad, albeit occasionally necessary.
> 
> Errors in SPARQL can be replaced in an implementation by doing something but it indicates the something outside the spec.
> 
> IRI("foo")
> IRI("http://example/a space")
> IRI("http://example/[]")
> IRI("http://192.168.1.999/a")
> 
> The string is not automatically %-encoded - if that's needed, then call another function to perform the operation.
> 
> 	Andy
> 

-- 
Steve Harris, Garlik Limited
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD
Received on Thursday, 27 May 2010 10:39:49 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 16:15:42 GMT