Plain literals are literals that may have a language tag, while xsd:string never has a language tag. But in fact, plain literals without language tag (what SPARQL calls "simple literals") are exactly the same as xsd:string-typed literals, provided that the tool used to manipulate the literals have support for this XSD datatype. In some cases, it may happen that a tool has no support for datatypes (which is uncommon), and in this case "blabla"^^xsd:string just looks like "blabla"^^xyz:abc.
rdf:PlainLiteral was made essentially to be able to specify that a property has a range restricted to plain literals, and similar assertions (which were not possible otherwise) but it's not intended to be used in a literal.
In any case, do not use PlainLiteral. For two reasons:
- The specification says so: "rdf:PlainLiteral literals are written as RDF plain literals in RDF and SPARQL syntaxes", which means, one has to write
"abc" instead of "abc@"^^rdf:PlainLiteral, and "hello"@en instead of "hello@en"^^rdf:PlainLiteral.
- The RDF 1.1 Working Group is preparing a new version of RDF where the notion of plain literals will disappear. The concrete syntax remains the same, but
"abc" in concrete syntax will be a short cut for "abc"^^xsd:string, and language-tagged plain literals will be in fact typed literals with type rdf:langString. See Section 3.3 Literals of RDF 1.1 Concepts and Abstract Syntax.
answered
13 Nov '12, 04:14
Antoine Zimm... ♦
8.3k●5●14
accept rate:
30%