ULB-Darmstadt / shacl-form

HTML5 web component for editing/viewing RDF data that conform to SHACL shapes
https://ulb-darmstadt.github.io/shacl-form/
MIT License
24 stars 4 forks source link

Dealing with recursion #17

Closed renevoorburg closed 1 month ago

renevoorburg commented 1 month ago

The data-values I have been trying to load contains constructs like

ex:dataObject_1
    ex:hasPart ex:dataObject_2 .

ex:dataObject_2
    ex:isPartOf ex:dataObject_1 .

Loading this data causes an error, "InternalError: too much recursion."

A way to deal with that would be to preprocess the data on our side, keeping only the "isPartOf" references (or the other way around), before trying to load it in shacl-form.

However, I think, ideally it would be nice if shacl-form handled situations like these in a more elegant way. Maybe the simplest approach would be that it recognized a reference to an object already loaded and just mention that in the form, without recursively (re-) displaying all the form fields for it.

s-tittel commented 1 month ago

I have a working prototype of this locally, but noticed that the validation library used by this project struggles with the same problem. FYI, here's the issue: https://github.com/zazuko/rdf-validate-shacl/issues/136

s-tittel commented 1 month ago

The issue has been closed and I think v1.4.9 should work. Could you give it try?

renevoorburg commented 1 month ago

The ""InternalError: too much recursion." is fixed for us now. Thanks!