This sounds like a use case for magic properties aka property functions. I may 
misunderstand the details but you seem to first create some auxiliary triples 
so that you can query them later. Have a look at

http://composing-the-semantic-web.blogspot.com/2009/11/magic-properties-with-spin.html

to see whether these magic properties - that are created on demand at query 
time - make writing your queries easier.

Holger



On Sep 3, 2011, at 11:28 PM, Jan Polowinski wrote:

> I'm trying to construct a graph depending on 
> 
> a) an existing graph + 
> b) the already created part of the new graph.
> 
> Does the WHERE part of an INSERT statement only consider the graph before 
> starting the INSERT? Or should it consider the newly created triples already? 
> Here is what I tried:
> 
> 
> # construct a GO for all subjects in knows-relations
> INSERT  {
>    _:0 a :GO .
>    _:0 :represents ?who .
> }
> WHERE {
>    ?who :knows ?whom .
>    NOT EXISTS {
>        ?someGO :represents ?who .
>    } .
> }
> 
> Although using NOT EXISTS, in the first run, I create more blank nodes than I 
> want to. In additional runs then everything works as expected.
> 
> I'm happy for any hints. Do I expect too much of SPARQL here? Or am I only 
> missing some setting? I could not explicitly find something about this issue 
> in the SPARQL 1.1 Update specification. Does anybody know an alternative to 
> achieve that the newly created triples are immediately considered in the 
> WHERE clause?
> 
> Jan
> 
> 
> 
> 
> -- 
> You received this message because you are subscribed to the Google
> Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
> TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
> To post to this group, send email to
> [email protected]
> To unsubscribe from this group, send email to
> [email protected]
> For more options, visit this group at
> http://groups.google.com/group/topbraid-users?hl=en

-- 
You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include TopBraid Composer,
TopBraid Live, TopBraid Ensemble, SPARQLMotion and SPIN.
To post to this group, send email to
[email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/topbraid-users?hl=en

Reply via email to