From: Rob V. <rv...@do...> - 2010-03-24 20:59:37
|
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 |