[Mulgara-general] SPARQL question
gearon at ieee.org
Wed Nov 26 20:51:21 UTC 2008
On Wed, Nov 26, 2008 at 2:39 PM, Jim Irwin <jimirwin at acm.org> wrote:
> I wrote a SPARQL query that attempts to find all the root classes of an
> ontology, i.e. those that are not subclasses of classes other than
> owl:Thing and rdfs:Class.
> Here's my question: In my SPARQL query's OPTIONAL group, I filter out
> all the rdfs:subClassOf triples that contain owl:Thing or rdfs:Class as
> the object. So I would expect that the ?sup variable would not be bound
> outside that group, and that foaf:OnlineAccount would pass the
> !bound(?sup) filter. However, it appears that it does not pass the
> filter, as if the !bound filter were being applied inside the OPTIONAL
> group rather than outside it.
The FILTER(!isBound) should certainly be applied outside of the
OPTIONAL. I'm not saying that it is (I need to check), but that's the
> Just for comparison, I ran the same query using Jena, and
> foaf:OnlineAccount does appear in the results list when using Jena, as I
> would expect it to.
> Is this a bug in Mulgara's implementation of SPARQL filters, or is this
> just an area of ambiguity in the SPARQL spec that allows for different
No, I don't read this as an ambiguity. If I got it wrong, then it's me
and not the spec.
I think the best way to handle this is to step through it in a
debugger and follow it carefully. I'll let you know how this goes.
More information about the Mulgara-general