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

I've implemented option 2 for now.  If there is further support for 
option 3, we can do that as well as the document if in a better state 
for making changes.

In doing the changes, and for general editting, I have cleaned up all 
the function prototypes, invented the term "string literal" to cover 
simple literal, plain literal with language string and xsd:string. 
"string literal" is used in quite a few places where we already had this 
situation (e.g. UCASE).

There is text discussing the return type as being the same kind as the 
main argument acted up (which happens to be the first one).

A lot of fixing up the XML because the original conversion from XHTML 
had broken the formatting.

Please - could someone check 17.4 - I'm now at the point where I see 
what should be there, not what is there.

I changed ARQ for the more liberal argument input and didn't get any 
test fails from the suite.

	Andy

On 01/11/11 13:25, Lee Feigenbaum wrote:
> 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 Wednesday, 2 November 2011 09:35:47 UTC