Ah you are right. The sml:ModifyPrefixes module does not do variable  
substitution. I will fix this for the next release.

Holger


On Oct 8, 2008, at 6:28 PM, Smith, Tim wrote:

> Hi Holger,
>
> Actually, I am using sml:ModifyPrefixes – I’m just using a variable  
> as the input to the addedPrefix property instead of hard-coding a  
> prefix.  I’m not in anyway trying to manipulate a SPARQL query.
>
> Here’s the source code for the instance of ModifyPrefixes.  In the  
> full script,?prefix_1 is set to an appropriate string upstream of  
> the ModifyPrefixes.  I was hoping the SPARQLMotion engine would  
> replace the variable with its value on execution.
>
> Tim
>
> :Add_Prefix
>       a       sml:ModifyPrefixes ;
>       rdfs:label "Add_Prefix"^^xsd:string ;
>       sm:next :construct_a ;
>       sml:addedPrefix "{?prefix_1}"^^xsd:string .
>
>
>
>
> From: [email protected] 
> [mailto:[email protected] 
> ] On Behalf Of Holger Knublauch
> Sent: Wednesday, October 08, 2008 8:04 PM
> To: [email protected]
> Subject: [tbc-users] Re: Using a variable in Modify Prefixes
>
> Hi Tim,
>
> no sorry, String manipulations of SPARQL queries are not supported  
> and won't be supported in SPARQLMotion. I would like to keep at  
> least the queries in the language static so that future engines can  
> analyze existing queries in a script, for example to optimize them.  
> We also want to be able to change the storage format of the queries  
> themselves. More on that in 3.0 :)
>
> Why can't you use sml:ModifyPrefixes?
>
> Holger
>
>
> On Oct 8, 2008, at 3:35 PM, Smith, Tim wrote:
>
>
> Hi – If I define a variable upstream of a ModifyPrefixes module, can  
> I use it to define a prefix via the addedPrefix property?
>
> I was thinking of something like ?pre = “prefix <uri>”  and using {? 
> pre} to reference it in addedPrefix in a downstream ModifyPrefixes  
> module.
>
> When I try this, I can define a variable to mimic the input format  
> required for the prefix and, but the value does not appear to be  
> substituted into the addedPrefix attribute.  According to the help  
> system, all string variables of SPARQLMotion modules should be able  
> to accept a bound variable as input so I was hoping this might work.
>
>
> Thanks,
>
> Tim
>
>
>
>
>
> >
>


--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to