-
Notifications
You must be signed in to change notification settings - Fork 29
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
base keyword breaks hash based URIs #179
Comments
I think the base URI must be an absolute URI i.e. an URI with no fragment hence no # |
Indeed, RFC3986 says: "A base URI must conform to the syntax rule (Section 4.3). @NicoRobertIn, I think that a base URI is not like a prefix : a prefix just entails a URI by simple string concatenation, while the base URI is used to resolve relative URIs and this is not only string concatenation. |
Additional: to fix your problem, you should set
|
The turtle syntax says that "@base" should be followed by an IRIREF. Unless my regex is wrong, the Turtle recommendation says that the base URL used in OP's file is correct. |
Hmmm.... indeed. But there's something weird. When I add '#' to the set of forbidden characters, then the regex still matches. |
@frmichel good catch, I updated the regex by decomposing the UCHAR regex: https://regex101.com/r/05Bh3v/3 |
Issue Description:
The parser ruins the URI part passed to the
@base
keyword if this URI part is hash basedBug Details:
When a URI is passed to the base keyword in a turtle file, if this URI ends with a #, then a part of this URI is lost during parsing, ruining all the URIs of the graph using this base
Steps to Reproduce:
Expected Behavior:
The broken URI should be
<https://example.org/route/disappeared#BrokenURI>
Actual Behavior:
The following turtle is returned
From this result we can conclude that the BrokenURI is now
<https://example.org/route/BrokenURI>
, which is different from<https://example.org/route/disappeared#BrokenURI>
Note to Developers:
This behaviour was tested on Corese python, Corese command and Corese GUI on different computers.
The same URI modification can also be seen with a simple
select * where {?s ?p ?o}
requestScreenshots/Attachments:
The text was updated successfully, but these errors were encountered: