|
From: Alexander S. <ale...@gm...> - 2010-03-27 09:10:25
|
Hi Rob,
Sorry, I didn't notice it replaces parameters starting from the longest one.
But nevertheless there could be some conflicts. I think the best solution
would be to use regexp like this: String.Format(@"\s{0}\s", parameterName).
Regards,
Alexander
2010/3/25 <dot...@li...>
> Send Dotnetrdf-develop mailing list submissions to
> dot...@li...
>
> To subscribe or unsubscribe via the World Wide Web, visit
> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-develop
> or, via email, send a message with subject or body 'help' to
> dot...@li...
>
> You can reach the person managing the list at
> dot...@li...
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of Dotnetrdf-develop digest..."
>
>
> Today's Topics:
>
> 1. Re: SparqlParameterizedString parameters bug (Rob Vesse)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 24 Mar 2010 13:58:49 -0700
> From: "Rob Vesse" <rv...@do...>
> Subject: Re: [dotNetRDF-develop] SparqlParameterizedString parameters
> bug
> To: "dotNetRDF Developer Discussion and Feature Request"
> <dot...@li...>
> Message-ID: <42331e35$36525672$43c91c49$@com>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi Alexander
>
> If you've set all the parameters then this shouldn't happen since it
> replaces parameters starting from the longest parameter name BUT if @graph1
> / @graph2 haven't been set then they will be partially replaced since those
> parameters will be inserted first.
>
> Problem is that it's quite hard to determine what exactly is a parameter
> since there's always the chance that you might have something like a email
> address in the query or a language tag on a literal which could clash with
> a parameter name
>
> Not really sure what if anything can be done to address this, could do some
> kind of regexp based replace and restrict parameter names to a specific set
> of characters (alphanumerics, hyphens and underscores?) if you think that'd
> be more useful?
>
> Rob
>
> ----------------------------------------
> From: "Alexander Sidorov" <ale...@gm...>
> Sent: Tuesday, March 23, 2010 2:39 AM
> To: dot...@li...
> Subject: [dotNetRDF-develop] SparqlParameterizedString parameters bug
>
> Hello!
>
> Current parameter replacing by it's value implementation in
> SparqlParamterizedString is a bit incorrect. The wrong thing is that it
> doesn't check whether found parameter string is a whole parameter or a part
> of another parameter. Example:
>
>
> We have "@graph", "@graph1" and "@graph2" parameters. We set "@graph"
> parameter value first - "@graph1" and "@graph2" will be partly replaced
> too.
>
>
> Regards,
> Alexander
>
>
> -------------- next part --------------
> An HTML attachment was scrubbed...
>
> ------------------------------
>
>
> ------------------------------------------------------------------------------
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
>
> ------------------------------
>
> _______________________________________________
> Dotnetrdf-develop mailing list
> Dot...@li...
> https://lists.sourceforge.net/lists/listinfo/dotnetrdf-develop
>
>
> End of Dotnetrdf-develop Digest, Vol 4, Issue 9
> ***********************************************
>
|