I'm trying to make a SPARQL query, that returns a variable which contains two words, separated by something.. actually, I try to get a variable like ?πληθυσμός_population (greek and english). however, I'd prefer something different than "_", for example an "/" or "-" or even a ":" so that I can do something like "?Ελλ:Πληθυσμός/Eng:Population". How can I do this in a SPARQL query?
1 回答
The grammar for SPARQL variable names does not allow chars like /, :, or -, because these (and several others) have reserved meanings in SPARQL.
However, you have plenty of other choices. For example, a middle dot '·' is allowed, as is any combination character from the Unicode combining diacritical range, or indeed any Unicode char in the ranges mentioned in the PN_CHAR_BASE
grammar rule. Knock yourself out trying to find a char you fancy :)
I would point out, by the way, that using an underscore is actually a pretty well-established practice for separating two words in variables names.