PREFIX skos: PREFIX : CONSTRUCT { [] a :Warning; :message 'Concept [1] has no broader in scheme [2], and is not declared as top concept for this scheme.'; :implicated ( ?x ?s ); . } WHERE { ?x skos:inScheme ?s. OPTIONAL { ?x skos:broader ?y. ?y skos:inScheme ?s. }. OPTIONAL { ?s skos:hasTopConcept ?z. FILTER ( ?z = ?x ) }. FILTER ( !bound(?y) && !bound(?z) ) }