'Parameterized SPARQL string

I'm developing my own SPARQL parameterized query String. I want to inject values into the string using a specified convention.

I'm using a colon followed by a number to denote injectable values, e.g., Filter(?myVar = :1). Then I would search for ":" followed by a number and replace it. Only one restriction: no ttl based uris are allowed, so that the ":" won't mix with uris.

Apache Jena uses variables for injection (normal SPARQL variables that start with a question mark followed by a variable identifier) and dot net Rdf uses "@" followed by identifier.

Question Do you see anything wrong with my approach of ":" followed by number? What should be considered to provide a method with minimal ambiguity or undesired behaviours?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source