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 the sparql query 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 to insert the
> 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 the SPARQL Tutorial
> > 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 the SPARQL tab and insert some
> > 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 -
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---