linkeddata / rdflib.js

Linked Data API for JavaScript
http://linkeddata.github.io/rdflib.js/doc/
Other
564 stars 143 forks source link

N3 parsing of local names with special characters #523

Open acassaignemondeca opened 2 years ago

acassaignemondeca commented 2 years ago

Hello,

the goal of this commit is to improve the handling of local names with special characters. I modified the implementation of the "qname" function in accordance to https://github.com/RDFLib/rdflib/blob/master/rdflib/plugins/parsers/notation3.py (function "qname").

Also to align with https://github.com/RDFLib/rdflib/blob/master/rdflib/plugins/parsers/notation3.py:

I tested the modification with rdflib-evaluation. No regression and tests succeeding are up from 193 to 211 (out of 298). (Tests attached to this pull request).

Best regards, Arnaud

spec-rdflib-ntriples-patch.txt spec-rdflib-ntriples-reference.txt spec-rdflib-turtle-patch.txt spec-rdflib-turtle-reference.txt

angelo-v commented 2 years ago

Thanks for your contribution. I cannot say much about it contentwise and leave that up to @timbl .

From a quality perspective it is good to see more tests passing. I did not know rdflib-evaluation before. Could we include it in github actions? Nevertheless the code changes a lot and I would like to see this covered by unit tests as well. Those tests would also serve as a documentation of the changes so that it is easier to grasp how the code actually behaves.