Paul; Keep in mind that when running a SPARQLMotion script, there is a
difference between the graph you define the script on and the graph
you create in the SPARQLMotion session.  Your query runs on the
default graph, and the system is telling you that it isn't defined.
You could use the session graph <urn:x-tb:session> to do this or some
other graph. I.e. you need to specify which graph :cursor and :limit
are defined on using GRAPH.  I.e.:

DELETE
{  GRAPH <urn:x-tb:session>
   {  x :cursor ?cursor .
   }
}
...

...this assumes that :cursor is defined in the session, i.e. that one
of the import modules defined it.  I would suggest that you import a
text serialization file with the current values.  I.e. a "sysVar.ttl"
file:

DELETE
{  GRAPH <http://example.org/mystuff/sysVar>
   {  x :cursor ?cursor .
   }
}
...

Either way, specifying the graph that is being written to is required
for SPARQLMotion scripts.  The SPARQL "default graph" is undefined
purposefully because the script runs in a session that you need to add
your data to.

-- Scott

On Jun 26, 10:08 am, PaulZH <[email protected]> wrote:
> I have a sml:IterateWhile module with parameter: sml:AskQuery
> ASK WHERE {
>     :x :cursor ?cursor .
>     :x :total ?total .
>     FILTER (?cursor < ?total) .
>
> }
>
> When within the body of this iteration, I try to change the values using a
> sml:PerformUpdate
> DELETE {
>     :x :cursor ?cursor .}
>
> INSERT {
>     :x :cursor ?newcursor .}
>
> WHERE {
>     :x :cursor ?cursor .
>     :x :limit ?limit .
>     BIND ((?cursor + ?limit) AS ?newcursor) .
>
> }
>
> I get an error:
> Failed to find urn:x-arq:DefaultGraphNode for update.

-- 
-- You received this message because you are subscribed to the Google
Group "TopBraid Suite Users", the topics of which include Enterprise Vocabulary 
Network (EVN), TopBraid Composer, TopBraid Live,
TopBraid Ensemble, SPARQLMotion, SPARQL Web Pages 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