W3C home > Mailing lists > Public > public-data-shapes-wg@w3.org > January 2017

shapes-ISSUE-219 (One-of shapes): Should we add a one-of-a-list-of-shapes operator [SHACL - Core]

From: RDF Data Shapes Working Group Issue Tracker <sysbot+tracker@w3.org>
Date: Tue, 24 Jan 2017 05:45:48 +0000
To: public-data-shapes-wg@w3.org
Message-Id: <E1cVtvQ-0001Q4-Ci@nash.w3.org>
shapes-ISSUE-219 (One-of shapes): Should we add a one-of-a-list-of-shapes operator [SHACL - Core]

http://www.w3.org/2014/data-shapes/track/issues/219

Raised by: Holger Knublauch
On product: SHACL - Core

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.
Received on Tuesday, 24 January 2017 05:45:54 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 24 January 2017 05:45:56 UTC