- From: Alex Hall <alexhall@revelytix.com>
- Date: Wed, 20 Apr 2011 19:11:29 -0400
- To: Richard Cyganiak <richard@cyganiak.de>
- Cc: Peter Frederick Patel-Schneider <pfps@research.bell-labs.com>, public-rdf-wg@w3.org
- Message-ID: <BANLkTimdwj_Lq6CnSiBb68tVrsM6hTTEoA@mail.gmail.com>
On Wed, Apr 20, 2011 at 5:22 PM, Richard Cyganiak <richard@cyganiak.de>wrote: > On 20 Apr 2011, at 18:15, Peter Frederick Patel-Schneider wrote: > > It turns out that the RDF Semantics document already contains wording in > > Section 5.1 about the equivalence of plain literals and xsd:string > > literals. Any change to the document to indicate that xsd:string > > literals are considered to be archaic and that plain literals should be > > used instead would look similar to the wording for anything else the WG > > considers to be archaic. > > Related here is Section 6.5.1 of RDF Concepts & Abstract Syntax, which > states that two literals are equal if and only if they are equal in lexical > form, datatype URI, and language tag [1]. > Yes, that gets at the heart of the problem from a user's perspective: Two RDF nodes which are syntactically distinct are semantically equivalent (under datatype entailment). The very next section goes on to say that value comparison is more often more useful in an application context than lexical comparison. Again from a user's perspective, the issue is that many tools implement equality as a lexical comparison as opposed to a value comparison. For instance, SPARQL BGP matching is defined in terms of RDF simple entailment which does not allow one to infer the equivalence of a plain literal and an xsd:string literal with the same value. So the BGP { ?x :b "c" } cannot match the statement :a :b "c"^^xsd:string. For SPARQL there are workarounds, such as pushing the literal comparison into a filter, but this tends to lead to more complex, less efficient queries, and you can quickly work yourself in circles trying to account for every possibility. SPARQL also calls out XSD entailment as a possible semantic extension; I'm not sure how widely this is implemented. -Alex > > Not suggesting any particular course of action, just pointing out related > text. > Best, > Richard > > [1] http://www.w3.org/TR/rdf-concepts/#section-Literal-Equality > > > > > > I claim, therefore, that ACTION-27 is done, and have marked it as > > pending approval. > > > > peter > > > > PS: I think that ISSUE-12 should be marked as closed, but that's not my > > call. > > > > >
Received on Wednesday, 20 April 2011 23:11:57 UTC