MPSPARQL-17: Accepr bnodes as well as uris
authorHeikki Levanto <heikki@indexdata.dk>
Mon, 11 May 2015 13:45:48 +0000 (15:45 +0200)
committerHeikki Levanto <heikki@indexdata.dk>
Mon, 11 May 2015 13:45:48 +0000 (15:45 +0200)
SOme returned nodes have internal node-ids, and not external
uris. This patch makes them fetchable as welll

src/filter_sparql.cpp

index 11206a7..cef45ef 100644 (file)
@@ -506,7 +506,9 @@ Z_Records *yf::SPARQL::Session::fetch(
             {
                 if (n->type == XML_ELEMENT_NODE)
                 {
-                    if (!strcmp((const char *) n->name, "uri"))
+                    //if (!strcmp((const char *) n->name, "uri"))
+                    if (!strcmp((const char *) n->name, "uri") ||
+                        !strcmp((const char *) n->name, "bnode") )
                     {
                         uri = mp::xml::get_text(n->children);