-
Notifications
You must be signed in to change notification settings - Fork 1
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
Should pos-resource support blank nodes? #35
Comments
You are right, PodOS mostly assumes named nodes currently and I did not spent much thoughts on blank nodes(yet). I am trying to avoid them as described in your workaround. Some things come to my mind, but the whole blank node situation must be carefully thought through:
|
My current use case actually relates to collections - my list component creates pos-resource elements and sets their uri. Calling lazy=true suppresses fetching but allows descendants to receive the resource. If it's a blank node, the uri starts with an underscore, e.g. _g_L9C317 Options for renaming would be resource or about. consistent with https://www.w3.org/TR/rdfa-lite/#resource or https://www.w3.org/TR/rdfa-primer/#alternative-for-setting-the-context-about Just checking now, it turns out RDFa supports explicitly defining blank nodes, which would work well for our case here. |
There might be an architectural decision to make here. I'll describe my use case and current blockers.
I use pos-resource to make a resource available to descendants. This includes creating pos-resource elements and setting their uri programmatically (usually with lazy=true)
When the resource is a blank node, pos-resource errors with e.g. NamedNode IRI "_g_L9C317" must be absolute
I would need to confirm, but it appears the error is thrown by os.store.get when checking editable, which in turn assumes that the Uri is a named node: https://github.com/linkeddata/rdflib.js/blob/cd9a5960ef01bf9350c55a349db4410bc029a796/src/update-manager.ts#L154
There are other places that the PodOs code currently assumes a Uri is a named node/sym, e.g.
PodOS/core/src/thing/Thing.ts
Line 99 in e490428
Current workaround is to rewrite data to avoid using blank nodes.
Issues to address:
The text was updated successfully, but these errors were encountered: