scott, that fixed the problem! i am confused about one thing, though. preceding the performUpdate module is a sml:ImportCurrentRDF module. i (mistakenly?) thought that this would be needed to make the current model, i.e., the one defined in the imported owl file containing the countries-cities-capitals model, available to the script. is this module even needed? also, thanks for pointing out my confusion between the qname and uri.
regards, bob s. On Jul 7, 9:56 am, Scott Henninger <[email protected]> wrote: > Bob, can you clarify this? When executing anINSERTfrom a > performUpdate module, the triples are added directly into the script's > model. You can do anINSERTINTO to define the base URI to specify > the model you want to add the triples to. > > BTW, your buildURI statement seems to be mixing qname and URI syntax. > It should either be > region:{?arg1} > or > http://www.topbraid.org/owl/geo/region#{?arg1} > > -- Scott > > On Jul 7, 8:44 am, Bob <[email protected]> wrote: > > > > > Holger, > > > thanks for your suggestion. i now have the following query: > > >INSERT{ > > ?cityURI a region:City . > > ?cityURI rdfs:label ?cityLabel .} > > > WHERE { > > LET (?cityURI := smf:buildURI(smf:buildString("<region:{?1}>", ? > > arg1))) . > > LET (?cityLabel := smf:setLanguage(?arg1, "en")) . > > > } > > > when executed from thesparqlquery editor it automatically adds the > > triples to the current model; however, when executed from within my > > sparqlmotion script in a perform_update module, i must still manually > > infer these triples. how can i coax topbraid to automatically infer > > these triples when the script is executed? > > > On Jul 6, 8:35 pm, Holger Knublauch <[email protected]> wrote: > > > > Hi Bob, > > > > this was a bug in the sml:PerformUpdate module. Cases in which the > > > argument was used as a string template {?arg1} failed toinsertthe > > > variable values correctly. This is fixed for the next release. As a > > > work-around, work-around the string template using something like > > > >INSERT{?person rdfs:label ?newName} > > > WHERE { > > > ?person a kennedys:Person . > > > ?person kennedys:name ?name . > > > LET (?newName := smf:buildString("{?1}, ?arg1, {?name}")) > > > > } > > > > Holger > > > > On Jul 6, 2009, at 11:04 AM, Bob wrote: > > > > > I am creating a simple web service based on theSPARQLTutorial > > > > exercises. I have the following PerformUpdate query: > > > > >INSERT{ > > > > ?cityURI a region:City . > > > > ?cityURI rdfs:label ?cityLabel . > > > > } > > > > WHERE { > > > > LET (?cityURI := smf:buildURI("<region:{?arg1}>")) . > > > > LET (?cityLabel := smf:setLanguage(?arg1, "en")) . > > > > } > > > > > The value of ?arg1 is meant to come from the web service invocation. > > > > > When I execute the query using theSPARQLtab andinsertsome > > > > arbitrary value for ?arg1, the required triples are inserted into the > > > > current model; however, when I run the query using the debug feature, > > > > the following exception occurs: > > > > > Error: com.hp.hpl.jena.query.QueryParseException: Lexical error at > > > > line 27, column 50. Encountered: "\"" (34), after : "ABCD" > > > > > where ABCD was entered for the value of ?arg1. What might be causing > > > > the difference in behavior, and, more importantly, how might I fix the > > > > query? > > > > > Thanks in advance for your help.- Hide quoted text - > > > > - Show quoted text -- Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "TopBraid Composer Users" group. 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-composer-users?hl=en -~----------~----~----~----~------~----~------~--~---
