Catrina; Using urn:var to redirect to special graphs such as <http:// tb-session> is not supported in PerformUpdate. We'll change the documentation to make this clear. You should use the URI of the open model instead of tb-session.
-- Scott On Sep 8, 3:22 pm, Catrina <[email protected]> wrote: > I can get this to work with the URI to one of my hierarchies, but I > cannot seem to get this to work when I set the variable to "http:\\tb- > session" using Ensemble with localhost. > > Here's an example of a BindBySelect module that sets GRAPH_VAR to tb- > session: > LET (?GRAPH_VAR := smf:buildURI("http://tb-session")) . > > Here's an example of a BindBySelect module that sets GRAPH_VAR to a > specific ontology: > LET (?GRAPH_VAR := smf:buildURI("http://www.ontologies.thomson.com/ > NEWS_n3file")) . > > Then, my PerformUpdate module contains something like: > INSERT INTO <urn:var:GRAPH_VAR> { > > When the variable is set to "http://tb-session", the SPARQLMotion > script fails when run from Ensemble localhost. > > This is the message displayed in a popup box from Ensemble > fromhttp://localhost:8083/tbl/: > Error executing 'ImportUpdateHierarchyXML': > Could not run SPARQLmotion script. Reason: we're having > difficulties opening urn:var:GRAPH_VAR. > Open this file in TopBraid Composer > > Is it possible to use this alternative syntax when I want the graph to > be the tb-session? > > Thanks, > Catrina > > On Sep 8, 1:41 pm, Scott Henninger <[email protected]> wrote: > > > Catrina, The <urn:var:varname> syntax is an alternative syntax to ? > > varname that is necessary because the SPARQL syntax expects a URI, not > > a variable, in MODIFY GRAPH <>, INSERT INTO <>, and DELETE FROM <>. > > > Therefore you can set up an argument (spin:constraint) in your SPARQL > > Function (aka "SPIN FUnction") to receive the name of the graph that > > you want to apply the query to. Let's say you define the argument as > > sp:graphToModify. This binds the variable ?graphToModify to the > > argument. The alternative syntax is <urn:var:graphToModify>, which > > can be used in the PerformUpdate statements. > > > -- Scott > > > On Sep 8, 9:58 am, Catrina <[email protected]> wrote: > > > > Hello, > > > > I have a SPIN function that is defined with a SPARQLMotion script > > > which contains some PerformUpdate modules. I'd like to set the named > > > graph dynamically in the PerformUpdate modules with a method that was > > > posted in a previous Google User group posting. > > > > For reference, I am looking into Holger's solution back in May from > > > the following > > > post:http://groups.google.com/group/topbraid-users/browse_thread/thread/6a... > > > Message snippet: > > > <urn:var:VAR_NAME> > > > where VAR_NAME is the name of a bound SM variable. Example: > > > INSERT INTO <urn:var:targetGraph> > > > > In my script, I'd like to set the graph as tb-session at times, but > > > other times I'd like to set the graph more specifically to named > > > graph. Is it possible to set the tb-session to VAR_NAME in the > > > solution shown above? > > > > Thanks, > > > Catrina- 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
