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

Re: rq25 updates (STRBEFORE, STRAFTER, REPLACE and more)

From: Lee Feigenbaum <lee@thefigtrees.net>
Date: Tue, 01 Nov 2011 09:25:43 -0400
Message-ID: <4EAFF357.3030101@thefigtrees.net>
To: Steve Harris <steve.harris@garlik.com>
CC: Andy Seaborne <andy.seaborne@epimorphics.com>, SPARQL Working Group <public-rdf-dawg@w3.org>
On 10/31/2011 10:26 AM, Steve Harris wrote:
> On 2011-10-31, at 13:41, Andy Seaborne wrote:
>
>> I've put in text for STRBEFORE, STRAFTER and REPLACE, removed SHA224, and done some tidying up in the area.
>>
>> See
>> http://www.w3.org/2009/sparql/docs/query-1.1/rq25.xml#func-strings
>> and onwards.
>>
>>
>>
>> One issue arises:
>>
>> REGEX currently takes a simple literal only for the first argument.
>>
>> For RDF 1.1 preparation, this should change to xsd:string or simple literal.
>>
>>
>> REPLACE is like REGEX except it makes replacements.
>>
>> What should the first argument to REPLACE be?
>>
>> I'm assuming the pattern replacement and flags are still simple literals (or + xsd:strings for RDF 1.1).
>>
>> Like REGEX only working on plain strings.
>> Or also process language tagged literals?
>>   (c.f. STRBEFORE and STRAFTER)
>>
>> I'd like REGEX and REPLACE to align.
>>
>> Proposal 1:
>> REGEX and REPLACE work on strings (simple literal or xsd:string) only.
>>
>> Proposal 2:
>> REGEX and REPLACE work on all string-like forms as first argument (includes literals with language tag).  This adds first argument literal with language tag to REGEX.
>
> I prefer 2.
>
> There's even an option:
>
> Proposal 3:
> REGEX and REPLACE work on all literal forms as first argument (includes literals with language tags and typed literals). This adds first argument literal with language tag or datatype to REGEX.
>
> Not sure if I prefer that to 2, but it is an option.

I prefer option 2 or option 1. I understand the motivation for option 3, 
but in general we've shied away from that sort of automatic casting in 
SPARQL, and I believe we ought to continue that way.

Lee

>
> - Steve
>
Received on Tuesday, 1 November 2011 14:31:13 GMT

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