- From: Steve Harris <steve.harris@garlik.com>
- Date: Mon, 31 Oct 2011 16:06:24 +0000
- To: Andy Seaborne <andy.seaborne@epimorphics.com>
- Cc: SPARQL Working Group <public-rdf-dawg@w3.org>
On 2011-10-31, at 15:39, Steve Harris wrote: > Even without REPLACE on arbitrary literals you can do STRDT(REPLACE(STR(?x), "2", "A"), DATATYPE(?x)) if you're so inclined. Actually, that would mangle language tagged literals in a very unfortunate way in RDF 1.1, so it would have to be something like: IF(LANG(?x), STRLANG(REPLACE(STR(?x), "2", "A"), LANG(?x)), IF(DATATYPE(?x) == xsd:string, REPLACE(STR(?x), "2", "A"), STRDT(REPLACE(STR(?x), "2", "A"), DATATYPE(?x)))) That will be hard for optimisers to spot reliably, so Option 3 is looking a bit more tempting. I imagine most systems could process REPLACE(123, "2", "A") -> "1A3"^^xsd:integer more efficiently the the thing above. - 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 16:07:05 UTC