MERose
MERose

Reputation: 4421

Undefined namespace prefix on previously working SPARQL query

I am interested in the geographic coordinates of banks, central banks, financial institutions, universities and colleges. This is my query:

SELECT ?label ?lat ?long
WHERE {
  {?x dct:subject category:International_finance_institutions } UNION
  {?x dct:subject category:Federal_Reserve_Banks } UNION 
  {?x dct:subject category:Central_banks } UNION 
  {?x a <http://schema.org/CollegeOrUniversity> }.
     ?x geo:lat ?lat .
     ?x geo:long ?long .
     ?x rdfs:label ?label.
        FILTER (LANGMATCHES(LANG(?label), 'en')) 
}

Exactly this code worked (last download: June 21st, 2015). This morning however I keep getting this error: Virtuoso 37000 Error SP030: SPARQL compiler, line 5: Undefined namespace prefix at 'category' before '}'. I was checking the list of predefined namespaces, but all seems correct. What's wrong with category? BTW: I also tried other codes offered on this side, and some are also not working. Did the virtuoso guys change something?

Upvotes: 0

Views: 964

Answers (1)

Artemis
Artemis

Reputation: 3301

They have changed the namespaces. so you need to change category: to dbc:.

SELECT ?label ?lat ?long
WHERE {
  {?x dct:subject dbc:International_finance_institutions } UNION
  {?x dct:subject dbc:Federal_Reserve_Banks } UNION 
  {?x dct:subject dbc:Central_banks } UNION 
  {?x a <http://schema.org/CollegeOrUniversity> }.
     ?x geo:lat ?lat .
     ?x geo:long ?long .
     ?x rdfs:label ?label.
    FILTER (LANGMATCHES(LANG(?label), 'en')) 
}

Upvotes: 4

Related Questions