rdfjs / N3.js

Lightning fast, spec-compatible, streaming RDF for JavaScript
http://rdf.js.org/N3.js/
Other
712 stars 130 forks source link

URIs fragments in Turtle #70

Closed StatelessCat closed 8 years ago

StatelessCat commented 8 years ago

Hey, I was loading the turtle-serialised PROV-O ontology into N3.JS, and I realized N3.JS does not accept URIs with fragments. For example: @base <http://www.w3.org/ns/prov-dc#> . causes an Error: Invalid base IRI .

I think the Turtle spec considers URI as RFC3986, but maybe I'm missing something.

Here you will find a minimal working example: https://github.com/StatelessCat/mwe-n3js/blob/master/mwe-n3.js . I also notice a bug on triple patterns with <#> as subject, but I think this is a direct consequence of the previous issue.

Thanks in advance for your help. Raphaël .

RubenVerborgh commented 8 years ago

Interesting. I followed cwm and eye here, but I don't immediately find a reference in the spec indeed. Let me investigate.

RubenVerborgh commented 8 years ago

Thanks for reporting, this should be fixed now.

I also added a test with <#> as subject and this seems to work as expected. Any counterexamples?

StatelessCat commented 8 years ago

Thanks for the fix (:, I don't see any counterexample.