Dear all, I will start to develop an engine to evaluate rules that combines SPARQL commands with rule terms. The purpose is to be possible to define rules like:
ex:SportsMan ex:minimumSportsPlayed 1 . ex:IronMan ex:minimumSportsPlayed 3 . (?x rdf:type ?t) <- ?t ex:minimumSportsPlayed ?n . (\\\SPARQL (Select ?x Where { ?x ex:playSport ?y . } group by ?x having (count(1) >=&n) \\\SPARQL). Note: in a first approach syntax "&n" is to make reference to ?n . my question is: how we should make reference to external variables in a Sparql command? To start the discussion, I have two proposals: the symbol "&"; keep the symbol "?", where some variables must be instantiated before the execution of the sparql command. Something like: (?x rdf:type ?t) <- ?t ex:minimumSportsPlayed ?n . (\\\SPARQL (Select ?x Where { ?x ex:playSport ?y . } group by ?x having (count(1) >=?n) \\\SPARQL). Miguel