Re: Question about literals in subject position

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.

Regards,
Paul Gearon

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