-
Notifications
You must be signed in to change notification settings - Fork 38
#429: Have SHACL-SHACL warn about unsatisfiable usage of sh:in
and sh:xone
#451
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
base: gh-pages
Are you sure you want to change the base?
Conversation
…:xone This patch revises part of the implementation in PR 417. * `in-minListLength` was not added to the Core document, but it was referenced in SHACL-SHACL. Verbiage is added to Core in line with the text drafted for Issue 429. * `xone-memberShape` was added as a reference in SHACL-SHACL, but doesn't exist in the Core document. `xone-members-node` is the anchor in the Core document. `xone-members-node` is now used. * The `PropertyShape` for `sh:in` set a minimum required length of 1, which after discussion in Issue 429 appears to be a backward- incompatible change. A shape paralleling the original suggestion for `sh:xone` is added to house that new restriction at the same warning- level severity. An implementation style point: The property shapes housing `sh:minListLength` are given IRIs after sketching a test (`.../in-003.ttl`) and assuming it would be more desirable to have an IRI-identified shape in the results graph, rather than a blank node. A testing style point: Rather than running SHACL-SHACL over the whole of a test, shapes from SHACL-SHACL are copied into some focused tests (`.../{in,xone}-003.ttl`). References: * #429 * #417 Signed-off-by: Alex Nelson <alexander.nelson@nist.gov>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM - apologies for the delay in reviewing
@ajnelson-nist, can this PR be merged? |
<span data-syntax-rule="xone-members-node">Each <a>member</a> of such list must be a <a>well-formed</a> <a>shape</a>.</span> | ||
<span data-syntax-rule="xone-minListLength">There should be at least one <a>member</a> of such list.</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If these are not intended to be RFC2119 keywords, it's best to not use them, even in lowercase, to avoid common confusion.
<span data-syntax-rule="xone-members-node">Each <a>member</a> of such list must be a <a>well-formed</a> <a>shape</a>.</span> | |
<span data-syntax-rule="xone-minListLength">There should be at least one <a>member</a> of such list.</span> | |
<span data-syntax-rule="xone-members-node">Each <a>member</a> of such list <em title="MUST in RFC 2119 context" class="rfc2119">MUST</em> be a <a>well-formed</a> <a>shape</a>.</span> | |
<span data-syntax-rule="xone-minListLength">Each such list <em title="SHOULD in RFC 2119 context" class="rfc2119">SHOULD</em> have at least one <a>member</a>.</span> |
A <a>SHACL list</a> that has the allowed values as <a>members</a>. | ||
<span data-syntax-rule="in-node">Each value of <code>sh:in</code> in a shape is a <a>SHACL list</a>.</span> | ||
<span data-syntax-rule="in-maxCount">A shape has at most one value for <code>sh:in</code>.</span> | ||
<span data-syntax-rule="in-minListLength">There should be at least one <a>member</a> of such list.</span> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
<span data-syntax-rule="in-minListLength">There should be at least one <a>member</a> of such list.</span> | |
<span data-syntax-rule="in-minListLength">Each such list <em title="SHOULD in RFC 2119 context" class="rfc2119">SHOULD</em> have at least one <a>member</a>.</span> |
Closes #429 .
This patch revises part of the implementation in PR 417.
in-minListLength
was not added to the Core document, but it was referenced in SHACL-SHACL. Verbiage is added to Core in line with the text drafted for Issue 429.xone-memberShape
was added as a reference in SHACL-SHACL, but doesn't exist in the Core document.xone-members-node
is the anchor in the Core document.xone-members-node
is now used.PropertyShape
forsh:in
set a minimum required length of 1, which after discussion in Issue 429 appears to be a backward- incompatible change. A shape paralleling the original suggestion forsh:xone
is added to house that new restriction at the same warning- level severity.An implementation style point: The property shapes housing
sh:minListLength
are given IRIs after sketching a test (.../in-003.ttl
) and assuming it would be more desirable to have an IRI-identified shape in the results graph, rather than a blank node.A testing style point: Rather than running SHACL-SHACL over the whole of a test, shapes from SHACL-SHACL are copied into some focused tests (
.../{in,xone}-003.ttl
).