Can one form QNames from URIs such as http://dbpedia.org/resource/Jesuit_Church,_Mannheim
? Dbpedia lists this as dbpedia:Jesuit_Church,_Mannheim
, but when I run this QName e.g. through Jena's Turtle parser, I get the following exception:
Not a valid token for an RDF term: [COMMA]
This makes sense under the Turtle specification, which apparently excludes commas from QNames. However the Namespaces in XML 1.0 specification apparently allows "any Unicode character, excluding the surrogate blocks, FFFE, and FFFF" inside them.
So which specification is "correct" and how (if at all) could I use such URIs in abbreviated form inside Turtle documents? I've tried percent encoding but in this case Jena's turtle parser apparently returns a model which retains the escaped URIs, i.e. http://dbpedia.org/resource/Jesuit_Church%2C_Mannheim
instead of http://dbpedia.org/resource/Jesuit_Church,_Mannheim
, and which causes later string comparisons (in my code) to fail.
UPDATE I must have made an error with my escaping. As is pointed out in the accepted answer it is indeed possible to use dbpedia:Jesuit_Church\,_Mannheim
, e.g. with Jena 2.11.0.
In a note in Turtle (CR) it says:
→ Reserved character escape sequences
So it should be possible to use: