Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Namespaces with # #65

Open
ksahlmann opened this issue Aug 21, 2019 · 0 comments
Open

Namespaces with # #65

ksahlmann opened this issue Aug 21, 2019 · 0 comments

Comments

@ksahlmann
Copy link

Hello,
I found a bug considering namespaces with # character.
See also the post https://groups.google.com/d/msgid/rdflib-dev/fe39d9fc-d407-45b3-b341-5d12d08de90a%40googlegroups.com.
Briefly described: when the instance names are separated by # from the namespace and you parse the graph and do SPARQL-queries on it, the result has a wrong namespace with / as separator. Note: there is no prefix or context defined, and JSON-LD has an expanded format.

Debugging the code, I found two places, where the magic and the error happens:
comment out in context.py file the following two lines (46, 47):
#if hash_index > -1:
#base = base[0:hash_index]
and in the util.py file let the function norm_url(base, url) do nothing and just return the url as the result.
These bugfix worked for expanded JSON-LD with namespaces with # and / as separators to the instance names.
Please consider this bugfix on the next release.
Thanks!

ksahlmann pushed a commit to ksahlmann/rdflib-jsonld that referenced this issue Sep 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant