ISSUE-219: Should we add a one-of-a-list-of-shapes operator

One-of shapes

Should we add a one-of-a-list-of-shapes operator

State:
CLOSED
Product:
SHACL - Core
Raised by:
Holger Knublauch
Opened on:
2017-01-24
Description:
Use case: a node must have either ex:fullName or (ex:firstName and ex:lastName) but not both. Expressing this is currently verbose and leads to combinatorial explosions of "A but not B or C or D" cases.

We could add a new constraint component that takes a list of shapes and makes sure that the value node conforms to exactly one of these shapes. I don't think this is any more difficult than sh:or and sh:and but covers additional use cases.

PROPOSAL: Add sh:choice (or sh:oneOf) taking a list of shapes, passes if value node conforms to exactly one of these shapes.

Note: We had discussed this before https://www.w3.org/2015/09/17-shapes-minutes.html#resolution04 but sh:xor was rejected because of the meaning of an odd number of matches.
Related Actions Items:
No related actions
Related emails:
  1. ISSUE-219: sh:xor added (from holger@topquadrant.com on 2017-01-26)
  2. shapes-ISSUE-219 (One-of shapes): Should we add a one-of-a-list-of-shapes operator [SHACL - Core] (from sysbot+tracker@w3.org on 2017-01-24)

Related notes:

[TallTed]: Should we add a one-of-a-list-of-shapes operator

25 Jan 2017, 13:13:04

[TallTed]: Should we add a one-of-a-list-of-shapes operator

25 Jan 2017, 13:13:04

RESOLUTION: close issue-219, adding sh:xor, meaning one-and-only-one-of, wording carefully to avoid confusions and to align with sh:or (meaning at-least-one-of)

https://www.w3.org/2017/01/25-shapes-minutes.html

Irene Polikoff, 9 Feb 2017, 23:59:34

Display change log ATOM feed


Chair, Eric Prud'hommeaux <eric@w3.org>, Staff Contact
Tracker: documentation, (configuration for this group), originally developed by Dean Jackson, is developed and maintained by the Systems Team <w3t-sys@w3.org>.
$Id: index.php,v 1.325 2014-09-10 21:42:02 ted Exp $