W3C home > Mailing lists > Public > public-rdf-dawg@w3.org > July to September 2009

Re: Question about literals in subject position

From: Paul Gearon <gearon@ieee.org>
Date: Tue, 22 Sep 2009 06:56:57 -0400
Message-ID: <a25ac1f0909220356m53af52b5i5d69296ea88be46b@mail.gmail.com>
To: Birte Glimm <birte.glimm@comlab.ox.ac.uk>
Cc: SPARQL Working Group <public-rdf-dawg@w3.org>
Hi Birte,

On Tue, Sep 22, 2009 at 6:44 AM, Birte Glimm
<birte.glimm@comlab.ox.ac.uk> wrote:
> Hi all,
> I just wanted to confirm that I understand the specs correctly...
> As I read the SPARQL query grammar, I understand it that literals are
> allowed in subject position. Thus, a query such as
> SELECT ?x WHERE { ?x rdf:type rdf:XMLLiteral }
> under say RDF or RDFS entailment would have to return all valid RDF
> XML literals (if not sufficently restricted) of which there are
> infinitely many. Although RDF itself does not allow literals in
> subject position, SPARQL queries do allow it and in fact according to
> the RDF(S) semantics (under RDF(S) entailment) the statement XXX
> rdf:type rdf:XMLLiteral is entailed by any graph for XXX a valid XML
> Literal lexical form. All correct?

This is how I read it, though I confess I was looking to read it this
way since it matched some existing implementation that I had.

Also, while the result space of something like { ?x rdf:type
rdfs:Literal } is potentially infinite, so is the result space of any
graph pattern. However, SPARQL takes the pragmatic approach of only
returning the data that your application is aware of. So in the
pattern I mentioned here (looking for rdfs:Literal) I return every
literal in the system.

That said, I don't know how others approach it.

Paul Gearon
Received on Tuesday, 22 September 2009 10:57:36 UTC

This archive was generated by hypermail 2.3.1 : Wednesday, 7 January 2015 15:00:57 UTC