21Aug/080
SPARQL and still sub-querying
for x in g.query("SELECT ?xcreator WHERE { ?creator dc:creator ?xcreator }",
initNs=ns):
print x
sub_query = "SELECT ?creator WHERE { ?xcreator ?creator }"
for sub_x in g.query(sub_query, initNs=dict(ns)):
print 'Sub_x %s' % sub_x
This can't be the only way to do sub_queries with SPARQL and this doesn't work well for me because the first result is on a blanknode. The stuff is really apart of rdf:seq which I haven't figured out how to get yet even though my namespace is correct. ns#_1 contains all of the Literals for Dublin Core/Exif Metadata. I'm beginning to think maybe the binary tag from ExifTool is wrong or something.
SPARQL and Subquery; 3rd go
Well; I gave up and found an easier way using straight rdflib methods; another day wasted. The tutorials on rdflib are pretty bad. So you just can't jump straight in. WordPress formatting sucks, I know; prolly should upgrade.