SolidLabResearch / Challenges

24 stars 0 forks source link

Determinate skolemisation #91

Open jeswr opened 1 year ago

jeswr commented 1 year ago

The description for this is a Work In Progress.

Pitch

So long as we have a document view of Solid containing blank nodes - we will be faced with issues handling those blank nodes via other API's. For instance; how do I reference a blank node when it appeared in a skolemised format when using the QPF endpoint; and I now want to reference it again through another endpoint (e.g. SPARQL) as it is unlikely that both endpoints use the same skolemised identifier (if they perform skolemisation at all),

Desired solution

A well defined algorithm for generating the skolemID of each blank node in a document (both for JSONLD and turtle). In particular the URI should be something like <skolem:://{encodeURI(documentURI)}/{md5(documentContents)}/{bnodeId}> where the bnodeId is determined based on some determinate way of "ordering" the blank nodes in the document.

Ideally the solution should be serialization independent. In particular; I believe that the algorithm should first parse the data into a dataset and then apply that algorithm on the dataset. In this case the md5(documentContents) part of the URI should be more a hash of the dataset than a hash of the document contents as well. This means that operations like adding a comment to a document; or retrieving as a different content type will not affect the skolem URI.

Acceptance criteria

Pointers

Scenarios

josephguillaume commented 8 months ago

URIs of the type http://example.com/.well-known/genid/d26a2d0e98334696f4ad70a677abc1f6 would then be consistent with the recommendation https://www.w3.org/TR/rdf11-concepts/#section-skolemization