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

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

From: Andy Seaborne <andy.seaborne@epimorphics.com>
Date: Mon, 31 Oct 2011 14:59:25 +0000
Message-ID: <4EAEB7CD.9010500@epimorphics.com>
To: Steve Harris <steve.harris@garlik.com>
CC: SPARQL Working Group <public-rdf-dawg@w3.org>
>> 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.

To check I understand : you mean a sort of "automatic STR of literals" 
applied to the main (first) arg of REGEX and REPLACE?

I need to think about 3 + REPLACE a bit more, but you can produce 
illegal lexical forms by simple string bashing -- it's quite hard to do 
that with strings themselves.  Some systems do not handle illegal 
lexical forms at all.

REPLACE(123, "2", "A") -> "1A3"^^xsd:integer ???


	Andy
Received on Monday, 31 October 2011 15:00:10 GMT

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