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

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.

- Steve

-- 
Steve Harris, CTO, Garlik Limited
1-3 Halford Road, Richmond, TW10 6AW, UK
+44 20 8439 8203  http://www.garlik.com/
Registered in England and Wales 535 7233 VAT # 849 0517 11
Registered office: Thames House, Portsmouth Road, Esher, Surrey, KT10 9AD

Received on Monday, 31 October 2011 14:27:14 UTC