afs commented on issue #2102:
URL: https://github.com/apache/jena/issues/2102#issuecomment-1824363738
It's a bug IMO. The Turtle parse accepts the data with a warning. There
ought to be consistency between the SPARQL parser and the Turtle parser.
That said - the data is not legal. `[` and `]` are not legal in a URI except
for IPv6 host addresses.
No amount of escaping will change that.
URI do not have a `\\` escape.
Using `\u005B` doesn't work.
%-encoding as @rvesse mentions is replacing the character `[` with `%5B` and
really does put 3 characters `%`, `5`, `B` into the URI which then must match
the data.
Not using `[`, `]`, or using %-encoding consistently is the best solution.
Even if Jena allowed it, then the current data is likely to cause problems
eslewhere.
The SPARQL query can work with the string form of the URI in the data in an
potentially inefficient manner:
```
.... brick:isPartOf ?X .
FILTER ( str(?X) =
"https://brickschema.org/schema/1.0.2/building_example#building:gtc/vavs/3/port[zn]")
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]