Closed nebucaz closed 3 months ago
Thank you very much for the clear explanation and for the example.
EYE is now fixed so that it does not use sub-delims in a QName. The output is now
@prefix : <https://example.org/>.
:s :p :o.
<https://example.org/plus+is+not+allowed+in+qnames> :p :o.
Thank you!
When using EYE for reasoning on our triples, we encountered an issue where EYE generates prefixed names from IRIs that contain characters not allowed in QName syntax. According to RFC 3987, IRIs can be written as either relative or absolute IRIs. Relative and absolute IRIs are enclosed in < and > and may include numeric escape sequences. Notably, the "path" part of an IRI may contain characters like "+" as defined in "sub-delims":
(Excerpt from RFC 3987)
EYE replaces the absolute IRI in the given example with a "prefixed qualified name" as per the W3C RDF 1.1 Turtle recommendation (https://www.w3.org/TR/turtle/#sec-iri). The QName syntax is also mentioned in the Namespaces section of the W3C Team submission for Notation 3 (https://www.w3.org/TeamSubmission/n3/):
However, the N3 document lacks a formal definition of QName. The definition can be found in RDF 1.1 Turtle (https://www.w3.org/TR/turtle/#sec-iri):
This refers to the use of QNames in XML, originally introduced by XML Namespaces. They were defined for element and attribute names to concisely identify a {URI, local-name} pair (https://www.w3.org/2001/tag/doc/qnameids), and are specified in Namespaces in XML 1.0 (Third Edition) (https://www.w3.org/TR/REC-xml-names/):
Steps to reproducs
File: test.n3:
Expected Result
Actual result
$ eye --nope --quiet --pass test.n3
yelds
This demonstrates the issue where the IRI https://example.org/plus+is+not+allowed+in+qnames is incorrectly replaced with a QName, despite containing characters not allowed in QName syntax.
Python Test Script
Additionally, a Python script using RDFLib to parse the result confirms the issue:
$ eye --nope --quiet --pass test.n3 > test_result.n3
yields:
This error further indicates that the generated QName is invalid due to the presence of characters not allowed in QName syntax.
Conclusion
Request for Clarification
If we are using the EYE incorrectly, we would greatly appreciate any guidance on how to properly handle IRIs containing characters not allowed in QName syntax. Please let us know if there are specific configurations or approaches we should be using to avoid this issue.
Please investigate and address this issue.