- From: Sandro Hawke <sandro@w3.org>
- Date: Sun, 17 Apr 2011 12:55:14 -0400
- To: Steve Harris <steve.harris@garlik.com>
- Cc: Ivan Herman <ivan@w3.org>, Richard Cyganiak <richard@cyganiak.de>, Lee Feigenbaum <lee@thefigtrees.net>, antoine.zimmermann@insa-lyon.fr, public-rdf-wg <public-rdf-wg@w3.org>
On Sun, 2011-04-17 at 12:13 +0100, Steve Harris wrote:
> On 2011-04-17, at 12:02, Ivan Herman wrote:
> >
> > On Apr 17, 2011, at 12:49 , Richard Cyganiak wrote:
> >
> >> On 17 Apr 2011, at 08:45, Ivan Herman wrote:
> >>> My understanding is that rdf:plainLiteral is a Datatype (ie, it can be used as part of datatype reasoning in RDF, OWL, or RIF) which is not the case of plain literals,
> >>
> >> Yes.
> >>
> >>> and its value space[2] are pairs of the form <string,language-tag>
> >>
> >> Not quite. According to [2], the value space are all <string,lang-tag> pairs *and* all strings.
> >>
> >>> Ie, datatype("chat"@en) would return rdf:PlainLiteral.
> >>
> >> This would be consistent with the definition of the datatype. But since the value space of rdf:PlainLiteral also contains all simple strings, the same could be said for returning
> >>
> >> datatype("chat") == rdf:PlainLiteral
> >
> > Correct. Would that create huge problems?
>
> Well, rdf:PlainLiteral is not supposed to appear in RDF data, as I understand it.
It's not supposed to appear as the datatype of a literal (since RDF
already has a way to do plain literals) but it is supposed to appear as
a range -- that's much of what it's for -- as a way to say the range is
a plain literal.
Note that it allows for range constraints on the language of the
literal, such as the value must have a language tag, or must be in
certain languages.
You could also say it must be a plain literal without a language tag,
but you'd need to define your own class. Instead of:
:prop rdfs:range xs:string.
you'd say something like
:prop rdfs:range :PlainString.
and then define :PlainString (or refer to some on-the-web definition, if
you're in a situation where Linked Data is okay). My OWL isn't very
good, but looking at the Primer I guess the definition would be
something like:
:LangString owl:equivalentClass [
rdf:type rdfs:Datatype;
owl:onDatatype rdf:PlainLiteral;
owl:withRestrictions ( [ rdf:langRange "*" ] )
].
:PlainString owl:equivalentClass [
rdf:type rdfs:Datatype;
owl:intersectionOf (
rdf:PlainLiteral
[ rdf:type rdfs:Datatype;
owl:datatypeComplementOf :LangString ]
)
] .
Of course, this is OWL not SPARQL. I don't see any good way to deal
with this in SPARQL. I don't really understand how datatype() and
such are supposed to work in SPARQL -- are stores really supposed to
remember which values came in as xs:int vs xs:integer?
-- Sandro
> It would also change existing SPARQL queries in a way that users may not expect.
>
> - Steve
>
Received on Sunday, 17 April 2011 16:55:27 UTC