Out of two SKOS thesauri, I want to get an overview list of all mappings
(with different relations, like skos:exactMatch, skos:broadMatch, etc.)
 
I tried:
 
PREFIX skos:  <http://www.w3.org/2004/02/skos/core#>
SELECT DISTINCT ?stw ?stw_pref ?rel ?thesoz_pref ?thesoz
WHERE {
  {
    SELECT DISTINCT ?stw ('=' as ?rel) ?thesoz
    WHERE {
      ?stw skos:exactMatch ?thesoz .
      ?stw skos:inScheme <http://zbw.eu/stw> .
      ?thesoz skos:inScheme <http://lod.gesis.org/thesoz/> .
    }
  } UNION {
    SELECT DISTINCT ?stw ('<' as ?rel) ?thesoz
    WHERE  {
      ?stw skos:broadMatch ?thesoz .
      ?stw skos:inScheme <http://zbw.eu/stw> .
      ?thesoz skos:inScheme <http://lod.gesis.org/thesoz/> .
    }
  } .
  ?stw skos:prefLabel ?stw_pref .
  ?thesoz skos:prefLabel ?thesoz_pref 
}

and got the error:
 
Variable used when already in-scope: ?rel in ("<" AS ?rel)
 
How could I work arround this? I suspect many of you had come across a
similar problems, and hopefully solved them somehow ...
 
Cheers, Joachim
 
 

Reply via email to