Have you tried single quotes (ie: 'en' )? Or this syntax?:
FILTER ( lang(?label) = 'en' ) Zbyněk Botló, 01-12-2010 19:50: > Hi, > > I've got a problem querying public DBpedia sparql endpoint > (http://dbpedia.org/sparql). Everything works fine when I use the web > interface to run the query. Problem occurs when I want to execute the > same query through my application. I'm using the HTTP POST method to > pass the input encoded query but the server response is "*500 SPARQL > Request Failed"* with following message included: > > *RDFXX Error Unknown language in DB.DBA.RDF_LANGUAGE_OF_LONG, bad id 0* > > * > * > My query looks like this: > > PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> > PREFIX foaf: <http://xmlns.com/foaf/0.1/> > PREFIX db-prop: <http://dbpedia.org/property/> > PREFIX db-ont: <http://dbpedia.org/ontology/> > PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#> > > SELECT DISTINCT ?subject ?label ?comment ?homepage ?page ?thumb > ?photo ?latlong > (sql:rnk_scale (<LONG::IRI_RANK> (?subject))) AS ?rank > WHERE > { > ?subject rdfs:label ?label . > OPTIONAL { ?subject rdfs:comment ?comment } . > OPTIONAL { ?subject foaf:homepage ?homepage } . > OPTIONAL { ?subject foaf:page ?page } . > OPTIONAL { ?subject db-ont:thumbnail ?thumb } . > OPTIONAL { ?subject db-prop:hasPhotoCollection ?photo } . > OPTIONAL { ?subject geo:geometry ?latlong } . > FILTER(bif:contains(?label, '"berlin"') && langMatches(lang(?label), > "en") && langMatches(lang(?comment), "en")) . > } > ORDER BY DESC(?rank) > LIMIT 3 > > > > Thank you for your help > Zbynek Botlo > > > > ------------------------------------------------------------------------------ > Increase Visibility of Your 3D Game App& Earn a Chance To Win $500! > Tap into the largest installed PC base& get more eyes on your game by > optimizing for Intel(R) Graphics Technology. Get started today with the > Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. > http://p.sf.net/sfu/intelisp-dev2dev > > > > _______________________________________________ > Dbpedia-discussion mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion ------------------------------------------------------------------------------ Increase Visibility of Your 3D Game App & Earn a Chance To Win $500! Tap into the largest installed PC base & get more eyes on your game by optimizing for Intel(R) Graphics Technology. Get started today with the Intel(R) Software Partner Program. Five $500 cash prizes are up for grabs. http://p.sf.net/sfu/intelisp-dev2dev _______________________________________________ Dbpedia-discussion mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/dbpedia-discussion
