Hi Joe,

here is an example script (attached).

In the (upcoming) SPARQLMotion XML syntax, this will look like

<sparqlmotion>

    <sml:BindBySelect sml:selectQuery="{#
        SELECT ?myGraph
        WHERE {
            LET (?myGraph := &lt;http://topbraid.org/examples/kennedys&gt;) .
        } }"/>

    <sml:PerformUpdate sml:updateQuery='{#
        INSERT INTO &lt;urn:var:myGraph&gt; {
            owl:Thing rdfs:comment "Test" .
        }
        WHERE {
        } }'/>

</sparqlmotion>

HTH
Holger


On Jun 22, 2010, at 11:37 PM, Joseph Shea wrote:

> Can you give me an example of this?
> 
> On Jun 21, 6:39 pm, Holger Knublauch <[email protected]> wrote:
>> Hi Joe,
>> 
>> having variables there is not supported (yet?) by the SPARQL syntax, so we 
>> had to add a "hack" to allow this common requirement. The trick is that you 
>> need to pre-bind a variable (such as ?myGraph) to the URI resource of the 
>> named graph in a previous SM step. Then, you can "call" this named graph 
>> using the naming convention <urn:var:myGraph>.
>> 
>> I believe this mechanism should be working in 3.3.1 - if not then you will 
>> need to wait for 3.3.2 (soon).
>> 
>> Regards,
>> Holger
>> 
>> On Jun 22, 2010, at 6:45 AM, Joseph Shea wrote:
>> 
>> 
>> 
>>> I would like to use Sparql update commands like insert and delete in
>>> SparqlMotion using the PerformUpdate Module, but have a variable name
>>> for the graph. An example would be
>> 
>>> INSERT INTO <http://www.testontology.com{?DBName}> {
>> 
>>>    ?s ?p ?o .
>> 
>>> }
>> 
>>> WHERE {
>> 
>>>    ?s a Owl:Thing.
>> 
>>>    ?s ?p ?o .
>> 
>>> }
>> 
>>> --
>>> 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- Hide quoted text -
>> 
>> - Show quoted text -
> 
> -- 
> 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

Attachment: smlPerformUpdateWithVarGraph.ttl
Description: Binary data

Reply via email to