angular-sparql support
It would be nice if I could something like this:
<tr ardf-repeat="SELECT ?p, ?t
WHERE { ?user foaf:page ?p .
OPTIONAL { ?p rdfs:label ?t }}">
<td>{{ p.uri }}</td><td>{{ t.value }}</td></tr>
Such an ardf-repeat directive would need to understand SPARQL far enough (ie. reach into rdflib.js' parsed structure and later evaluate it) to understand which variables are being assigned in the loop (?p would become this.p on the scope), which are not and should thus be bound from the outside scope. Namespaces would need to be bound from the scope context too.
This issue is not fixed about its syntax; it could just as well become ardf-select="?p, ?t WHERE..."
, possibly even switching between just assigning the value and iterating (though honestly, what's the difference) depending on whether the query can be shown to have only one result. That reasoning could be useful in making the resulting variable an editable one (possibly some trickery required, raning from <input ng-model="name" ardf-select="?name WHERE ?person foaf:name ?name">
to <input ng-model="name.value" ardf-bind-single="SELECT ?name WHERE ?person foaf:name ?name">
).