SPARQL Update中更新的图形中的变量(Variable in the updated graph in SPARQL Update)

我可以使用变量来定义SPARQL更新中受影响的图形吗? 例如,我可以:

INSERT { GRAPH ?dest { ?person foaf:name ?name . ?person foaf:mbox ?email } } WHERE { GRAPH <http://example/people> { ?person foaf:name ?name . } }

May I use a variable in order to define the graph(s) affected in a SPARQL update? For example, can i have:

INSERT { GRAPH ?dest { ?person foaf:name ?name . ?person foaf:mbox ?email } } WHERE { GRAPH <http://example/people> { ?person foaf:name ?name . } }

最满意答案

?dest必须由WHERE子句定义(否则系统如何知道INSERT数据的位置?)。

如果你的意思是,所有命名的图形,然后将GRAPH ?dest {}添加到WHERE子句。

?dest must be defined by the WHERE clause (else how does the system know where in INSERT the data?).

If you mean, all named graphs, then add GRAPH ?dest {} to the WHERE clause.

更多推荐