- From: Peter Waher <Peter.Waher@clayster.com>
- Date: Thu, 28 Jun 2012 20:03:57 +0000
- To: "public-rdf-dawg-comments@w3.org" <public-rdf-dawg-comments@w3.org>
- Message-ID: <1693EFE1FD641C42A0D542FCBC732DE69627F084@EX3.YODA.UTOPIA.LOCAL>
Hello Perhaps you’ve already discussed this in previous messages, or corrected it somehow. I just wanted to point it out, and/or receive your thoughts about the matter: http://www.w3.org/TR/sparql11-query/#func-strbefore To me, there seem to be two inconsistencies between the specification and the conformance tests: The first is how STRBEFORE() or STRAFTER() handles the case of language literals in first parameter, and the second parameter not found. There’s also no example showing how to interpret this, and the tests interpret it differently for the two functions: According to the strbefore01a conformance test (which is declared as Not Classified), STRBEFORE("日本語"@ja,”s”) = ”” (i.e. a simple literal with the empty string, without language tag). This violates this statement in the specification: “The function returns a literal of the same kind (simple literal, plain literal same language tag, xsd:string) as the first argument arg1.”. Later in the text, it states that if the string is not found, it should only return an “empty string”, without stating if this means a simple literal, overriding the previous statement that it should be of the same type as arg1. Then it re-uses the phrase “empty string” again: “If the lexical form of arg2 is the empty string, the lexical form of the result is the emprty string.”. In this case, the specification shows that “empty string” in this case is not a simple literal, but a literal of the same type as arg1 (as shown in the typed literal example following.). What’s the correct response? A simple literal (regardless of type of arg1)? Or an empty string of the same type as arg1? The second inconsistence, this time in the specification (the test is the logical one here), is strafter02 (also Not Classified). Here: STRAFTER(“abc”,””) = “abc” STRAFTER(“abc”@en,””) = “abc”@en STRAFTER(“abc”^^xsd:string,””) = “abc”^^xsd:string However, this contradicts the specification, which states that the result should be an empty string if arg2 is the empty string. However, the logical response is to return the entire string again. In this way CONCAT(STRBEFORE(?s,?x),STRAFTER(?s,?x)) would return ?s with the first occurrence of ?x removed, even if ?x is the empty string. Thanks for your time, Sincerely, Peter Waher
Received on Thursday, 28 June 2012 20:04:44 UTC