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: Sat, 04 Dec 2010 20:25:03 +0000
Message-ID: <4CFAA39F.4070809@epimorphics.com>
To: Steve Harris <steve.harris@garlik.com>
CC: SPARQL Working Group <public-rdf-dawg@w3.org>

On 02/12/10 14:36, Steve Harris wrote:
>> >  No strong opinion here but there is a reason:
>> >
>> >  My thinking was that if there is an xsd:string from the data, but the query writes a simple literal (convenience) then the result is typed.
>> >
>> >  e.g. CONCAT(?var1, " ->  ", ?var2)
>> >
>> >  and ?var1 and ?var2 are xsd:strings from the data.
> I see where you're coming from, but you could equally write CONCAT(?var1, " ->  "^^xsd:string, ?var2), if you cared about the distinction for some reason.

The two cases I think matter are (when no lang tags around):
1/ All the data is simple literals
2/ All the data is xsd:strings

Making the output of CONCAT(?var1, " ->  ", ?var2) when ?var1 and ?var2 
are xsd:strings means that this form works for both cases.

> CONCAT(plain, anything) -> plain
> CONCAT(string, string) -> string

CONCAT(simple, anything) -> anything

"plain" is two cases: simple and with-lang and we have 
lang-compatibility rules. Treat lang tags like datatypes (which is OK 
because you can't have lang and a real datatype).

Received on Saturday, 4 December 2010 20:25:40 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:01:02 UTC