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

Re: Details of string operations

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Sun, 05 Dec 2010 18:04:09 +0000
Message-ID: <4CFBD419.7000008@epimorphics.com>
To: Steve Harris <steve.harris@garlik.com>
CC: SPARQL Working Group <public-rdf-dawg@w3.org>


On 05/12/10 15:47, Steve Harris wrote:
>>> CONCAT(plain, anything) ->  plain
>>> >>  CONCAT(string, string) ->  string
>> >
>> >  CONCAT(simple, anything) ->  anything
> But if CONCAT(plain, string) gives plain, you don't need that case, it falls out naturally as "simple" literals are a subset of plain.


For me, it's whether the result follows the data or the query form and 
I'd rather it followed the data.  Not following the form of the data 
seems to more inconsistent and inconvenient.

CONCAT(?var1, " ->  ", ?var2)

where ?var1 and ?var2 are
   xsd:string -> xsd:string,
   simple ->  simple
   plain+lang -> when same lang tag, plain+lang

This allows people working with data using xsd:string to write unadorned 
" ->  ", and mixed data, on different solutions, keeps the form of the 
solution where it can.  If the app wants to pick a form, it can add a 
cast/STR/STRLANG.

Forcing use of xsd:string means that the expression is forced by the 
form of the constant, not the type of ?var1/?var2.  That can be achieved 
in the query by casting the result or using " ->  "^^xsd:string

	Andy
Received on Sunday, 5 December 2010 18:04:46 GMT

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