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

Fragile to order of shapes #25

Closed
mgskjaeveland opened this issue Oct 1, 2024 · 1 comment
Closed

Fragile to order of shapes #25

mgskjaeveland opened this issue Oct 1, 2024 · 1 comment

Comments

@mgskjaeveland
Copy link

I noticed that the generated form changes if the order of the input shapes is changed. For instance, if the example:Person shape in your example (https://ulb-darmstadt.github.io/shacl-form/#example) is moved as the first node shape in the input, then the generated form ends up only supporting creating a single Person.

Perhaps you should infer what the topmost shape(s) is/are and/or allow the topmost shapes to be specified? (Perhaps you already support this and I have missed it.)

@s-tittel
Copy link
Collaborator

s-tittel commented Oct 1, 2024

Hi, correct, shacl-form does not try to infer a best matching shape. There a two ways to specify the root shape:

  • as attribute data-shape-subject on the HTML element as documted here
  • if you bind a data graph and it contains one of these triples:
    • <subject> <http://purl.org/dc/terms/conformsTo> <rootShapeId>
    • <subject> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <rootShapeId>
      then the referenced rootShapeId will be used

Closing, please reopen if you are still missing anything.

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

2 participants