-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
sparql-17-4-2-5 query parsed output malformed? #7
Comments
In SPARQL literals, It also makes sense: in example 17.4.2.5 of the SPARQL spec, the purpose of the regex is to match So the output is correct as far as I understand. |
@RubenVerborgh the problem here is that when you unescape |
I still think it's the same.
Note how the interpretation is the same in both languages (but the N3.js wraps all literals in double quotes). In order to convert from the representation to SPARQL, you will need to escape the backslash. Note that you generally never escape during parsing: parsing means unescaping, generating means escaping. (See for instance how we parse URLs.) |
Hmm.. Makes sense! Good, then I'll escape backslashes specifically during query generation. |
Yeah, that's probably something that needs to be done for all literal generation, because backslashes have special meaning. |
Not sure here, but maybe there's an issue.
Query looks like this:
FILTER regex(str(?mbox), "@work\\.example$")
Output looks like this
Decoding
"\"@work\\.example$\""
turns it into"@work\.example$"
which is wrong.Am I right here? That's a bug?
The text was updated successfully, but these errors were encountered: