On 25/07/12 03:45, Erich Bremer wrote:
I have triples that have mixed typed and untyped literals for the same
predicate. I am trying to write a SPARQL query to select both within
the context of ARQ.
I was looking around and found a discussion on the subject:
http://answers.semanticweb.com/questions/16864/matching-typeduntyped-literals-in-sparql-joins
where Andy says, "In RDF 1.1, |:s :p "foo"| and |:s :p
"foo"^^xsd:String| are the same triple."
but I am trying to reconcile this with:
http://www.w3.org/TR/rdf11-concepts/#dfn-lexical-form
"Literal equality: Two literals are equal if and only if the two lexical
forms <http://www.w3.org/TR/rdf11-concepts/#dfn-lexical-form>, the two
datatype IRIs <http://www.w3.org/TR/rdf11-concepts/#dfn-datatype-iri>,
and the two language tags
<http://www.w3.org/TR/rdf11-concepts/#dfn-language-tag> (if any) compare
equal, character by character."
The two statements seem to be in conflict or am I not understanding
something here? - Erich
The paragraph immediately above the one you quoted says:
"""
Concrete syntaxes may support simple literals, consisting of only a
lexical form without any datatype IRI or language tag. Simple literals
only exist in concrete syntaxes, and are treated as syntactic sugar for
abstract syntax literals with the datatype IRI
http://www.w3.org/2001/XMLSchema#string.
"""
So in the brave new version of RDF {:s :p "foo"} is just syntactic sugar
for {:s :p "foo"^^xsd:String}. It's no longer that they are two
triples that are equivalent by datatype reasoning, they are
syntactically the same triple in the first place.
Dave