I've got a query like this::

PREFIX...


SELECT ?author_uri ?author_name ?mbox ?link ?title ?term ?scheme ?entry_id
WHERE {
     ?author_uri foaf:name ?author_name .
     ?author_uri foaf:mbox ?mbox .
     ?annotation annotea:author ?author_uri .
     ?annotation annotea:annotates ?link .
     ?annotation annotea:body ?term_uri .
     ?annotation annotea:related ?entry_uri .
     ?entry_uri rdf:type atom:entry .
     ?entry_uri rdf:ID ?entry_id .
     ?term_uri   rdfs:label    ?term .
     ?term_uri   rdf:type     foaf:topic .
     OPTIONAL {?link       dc:Title     ?title .}
     OPTIONAL {?term_uri tagger:hasScheme ?scheme .}
     ?annotation annotea:annotates <http://example.org/ann-page.html> .
}

This query used to return 'None' for the bound names in the OPTIONAL blocks, now it errors out upon this assertion in line 703::

 assert maxKeys == bound.bindings.keys()

when say, ?title or ?scheme are not found in the data.

Shouldn't the optional values still be bound even if not applicable? this would seem to limit the usage of optional to only time when you knew it to exist... therefore it would not be OPTIONAL...

or maybe there is some other way to do this in sparql I have not found?

-w

--

------ d. whit morriss ------
- senior engineer, opencore -
- http://www.openplans.org  -
- m: 415-710-8975           -

"If you don't know where you are, you don't know anything at all"
Dr. Edgar Spencer, Ph.D., 1995

begin:vcard
fn:D. Whitfield  Morriss
n:Morriss;D. Whitfield 
org:The Open Planning Project;OpenPlans
adr:;;1309 Ashwood Ave;Nashville;TN;37212;USA
email;internet:[EMAIL PROTECTED]
title:Lead Developer 
tel;home:615 292-9142
tel;cell:415 710-8975
x-mozilla-html:FALSE
version:2.1
end:vcard

_______________________________________________
Dev mailing list
Dev@rdflib.net
http://rdflib.net/mailman/listinfo/dev

Reply via email to