Closed bourgeoa closed 1 year ago
I am so sorry for not replying to you sooner.
I understood the problem and added new test case test-issue-4 . Currently, ttl2jsonld.js has been improved to pass test-issue-4.
Please try demo again. And let me know if new test case is not suitable.
Thanks issue resolved.
In test-issue-4 I would have also added a line @prefix : <#>.
The demo results are OK.
Waiting for the npm version.
Thank you again, Version 0.0.9 released.
I encountered this issue when implementing
ttl2jsonld
to serialize jsonld in https://github.com/linkeddata/rdflib.js (see screens below) Your app does a good job to create a compact jsonld output with relative links from a compact ttl. rdflib produce compact ttl with relative links and collections@list.
Actually the only issue is when ttl contains
@prefix
with non abolute IRI, like@prefix : <#>.
or@prefix n: </#>.
@id
value accepts relative url without any problem.I made a simple function to find non valid IRI in @context. Then rebuild any @id value and delete @context declaration. A better solution would to make a PR.