[redland-dev] xpath query

Jagdev Bhogal Jagdev.Bhogal at bcu.ac.uk
Sun Jun 20 13:11:32 CEST 2010


Dear all
I have a c-program which currently parses an rdf file and retrieves all of the nodes using:
 
const char *query_string="select ?label, ?comment from <C:/datafile.rdf> where (?x rdf:type rdfs:Class) (?x rdfs:label ?label) (?x rdfs:comment ?comment) using rdf for <http://www.w3.org/1999/02/22-rdf-syntax-ns#>,rdfs for <http://www.w3.org/2000/01/rdf-schema#>";

Lets say I have a string defined as:
 
char keyword[]="City";
 
My question is can we have a where clause in the query, so that we only retrieve results where the strcmp(label, keyword) = 0 in other words only retrieve those results where the label is equal to the keyword which in this case is "City". 
 
If further explanation is needed let me know.
Thank you
Jagdev
 
 
 
 
 
 


Through our significant contribution to the creative industries and the city's cultural and artistic life,
Birmingham City University is proud to support Birmingham's bid to be UK City of Culture in 2013

http://birminghamculture.org
http://www.bcu.ac.uk/about-us/excellent-arts
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.librdf.org/pipermail/redland-dev/attachments/20100620/b66cc1f3/attachment.htm 


More information about the redland-dev mailing list