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

Add a method to convert qname back to URI #1868

Closed
dany-nonstop opened this issue Apr 25, 2022 · 1 comment
Closed

Add a method to convert qname back to URI #1868

dany-nonstop opened this issue Apr 25, 2022 · 1 comment

Comments

@dany-nonstop
Copy link

rdflib.Graph already has a very helpful method qname() which basically converts http://example.com/ns#object to ns:obj if the namespace prefix ns has already been bound by bind('ns', Namespace('http://example.com/ns')).

I sometimes need use the reverse of qname() to make the URI input more human-friendly. It would be great if we have something like resolve_qname() which would translate a qname ns:obj back to http://example.com/ns#object. A neat solution is already provided here by somebody on stackoverflow.

https://stackoverflow.com/questions/63088670/rdflib-python-how-to-get-a-uriref-from-a-string-such-as-nsxxx

@ghost
Copy link

ghost commented Apr 28, 2022

Resolved in #1869

This issue was closed.
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