Closed dmap1514 closed 1 week ago
Hi and thanks for the feedback. When binding a data graph to the form, <shacl-form>
only has some basic logic to determine the shacl shape to use for the values, one of which is using sh:targetClass
. In your case, the triple
<http://example.org/Natanael> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://xmlns.com/foaf/0.1/Person>
results in using ex:PersonShape
, because of its corresponding sh:targetClass
definition. When this triple is missing (I guess this is the case in your first example), shacl-form
doesn't know what shacl shape the data conforms to.
BTW, you can always manually set the shacl shape on the HTML element like so:
<shacl-form data-shape-subject="http://example.org/PersonShape" ...></shacl-form>
Thank you very much, that helped!
When trying to autopopulate data-values for the editor, I noticed that data-values are not automatically entered if the data-shapes follow a specific format, such as:
or
Result without data-values-subject:
Result with data-values-subject:
However, it works, when using a format, such as:
Result without data-values-subject:
Result with data-values-subject:
shacl-form element of the above:
Is it possible to fix this error, without changing the data-shapes format?