You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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!
The text was updated successfully, but these errors were encountered:
ksahlmann
pushed a commit
to ksahlmann/rdflib-jsonld
that referenced
this issue
Sep 4, 2019
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!
The text was updated successfully, but these errors were encountered: