Re: Details of string operations

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).

	Andy

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