Skip to content

Parsing N3 with a @base IRI which does not include a slash #1216

@anatoly-scherbakov

Description

@anatoly-scherbakov

The issue is illustrated by this gist:

https://gist.github.com/anatoly-scherbakov/9fafb2863b877991f56ac7766b7c1bf0

  • I use @base <local:> . in an RDF/N3 document, which should convert an RDF term <Category> to <local:Category>.
  • But instead I get an error raised.
  • If I try <local:/> instead as a @base — everything works.

But I was trying to get <local:> working, and also, I believe, <local:Category> is a perfectly good IRI. Real world examples of such schemas may be doi and mailto.

This might be related to #816 but I am not certain of that.

rdflib version is 5.0.0. The exception is raised here:

https://github.com/RDFLib/rdflib/blob/master/rdflib/plugins/parsers/notation3.py#L139-L144

I would be happy to create a PR removing this check, but I would like first to understand why the check is implemented.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions