ISSUE-98: Can property constraints also apply to focus nodes?

Node constraints

Can property constraints also apply to focus nodes?

State:
CLOSED
Product:
SHACL Spec
Raised by:
Holger Knublauch
Opened on:
2015-10-02
Description:
I am still not sure why this requires a new ISSUE, because it is mainly a response to already open issues such as

- ISSUE-84 (limit IRIs of focus nodes to enumeration)
- ISSUE-88 (sh:qualifiedValue)

As already mentioned in https://lists.w3.org/Archives/Public/public-data-shapes-wg/2015Sep/0128.html I would like to propose a generalization of the mechanism that we currently use for sh:property and ui:inverseProperty so that it also applies to sh:constraint. This would allow a syntax such as

ex:MyShape
a sh:Shape ;
sh:property [
# Applies to all objects of the property
sh:predicate ex:someProperty ;
sh:class ex:SomeClass ;
] ;
sh:inverseProperty [
# Applies to all subjects of the property
sh:predicate ex:someIncomingProperty ;
sh:class ex:SomeClass ;
] ;
sh:constraint [
# Applies to the focus node itself
a sh:NodeConstraint ;
sh:class ex:SomeClass ;
] .

Summary of suggested changes:
- Rename sh:valueClass to sh:class
- Rename sh:directValueType to sh:directType
- Rename sh:allowedValues to sh:memberOf (or sh:oneOf)
- Add sh:NodeConstraint with properties sh:datatype, sh:class, etc
- Generalize validation function mechanism to also work with NodeConstraints
- Make sh:NodeConstraint the default type of sh:constraint
- Use sh:SPARQLConstraint at sh:constraint if you need sh:sparql

Since the bulk of the property constraints has already been represented by validation functions, it is a relatively small step to allow these same validation functions to be used at sh:constraint, and have them apply to the focus node.

The spec should probably contain a matrix that ticks off constraint types against the columns sh:property, sh:inverseProperty, sh:constraint (and sh:argument).

I can elaborate and provide an updated SHACL system file if anyone needs details.
Related Actions Items:
No related actions
Related emails:
  1. Re: shapes-ISSUE-132 (sh:predicate in constraints): sh:predicate is used in many constraints but not always available [SHACL - Core] (from pfpschneider@gmail.com on 2016-04-12)
  2. Re: shapes-ISSUE-132 (sh:predicate in constraints): sh:predicate is used in many constraints but not always available [SHACL - Core] (from lehors@us.ibm.com on 2016-04-12)
  3. Re: shapes-ISSUE-132 (sh:predicate in constraints): sh:predicate is used in many constraints but not always available [SHACL - Core] (from holger@topquadrant.com on 2016-04-11)
  4. Re: shapes-ISSUE-132 (sh:predicate in constraints): sh:predicate is used in many constraints but not always available [SHACL - Core] (from irene@topquadrant.com on 2016-04-08)
  5. Re: shapes-ISSUE-132 (sh:predicate in constraints): sh:predicate is used in many constraints but not always available [SHACL - Core] (from pfpschneider@gmail.com on 2016-04-08)
  6. Re: shapes-ISSUE-132 (sh:predicate in constraints): sh:predicate is used in many constraints but not always available [SHACL - Core] (from holger@topquadrant.com on 2016-04-08)
  7. Re: shapes-ISSUE-132 (sh:predicate in constraints): sh:predicate is used in many constraints but not always available [SHACL - Core] (from holger@topquadrant.com on 2016-03-08)
  8. Re: Proposal to close ISSUE-84 (from arthur.ryman@gmail.com on 2015-10-29)
  9. Re: Proposal to close ISSUE-84 (from arthur.ryman@gmail.com on 2015-10-29)
  10. Re: speeding up the working group (from kcoyle@kcoyle.net on 2015-10-20)
  11. Re: On how to deal with issues (was ISSUE-98 (cont'd): Further syntax improvements) (from lehors@us.ibm.com on 2015-10-19)
  12. Re: On how to deal with issues (was ISSUE-98 (cont'd): Further syntax improvements) (from lehors@us.ibm.com on 2015-10-19)
  13. Re: Proposal to close ISSUE-84 (from kcoyle@kcoyle.net on 2015-10-18)
  14. Re: Proposal to close ISSUE-84 (from holger@topquadrant.com on 2015-10-18)
  15. Re: Proposal to close ISSUE-84 (from pfpschneider@gmail.com on 2015-10-17)
  16. Re: Proposal to close ISSUE-84 (from kcoyle@kcoyle.net on 2015-10-17)
  17. Re: Proposal to close ISSUE-84 (from kcoyle@kcoyle.net on 2015-10-17)
  18. Re: Proposal to close ISSUE-84 (from holger@topquadrant.com on 2015-10-17)
  19. Re: ISSUE-98 (cont'd): Further syntax improvements (from holger@topquadrant.com on 2015-10-17)
  20. Re: Proposal to close ISSUE-84 (from kcoyle@kcoyle.net on 2015-10-16)
  21. Re: ISSUE-98 (cont'd): Further syntax improvements (from lehors@us.ibm.com on 2015-10-16)
  22. Re: RDF Data Shapes WG agenda for 8 October 2015 (from pfpschneider@gmail.com on 2015-10-16)
  23. AW: ISSUE-98 (cont'd): Further syntax improvements (from simon.steyskal@wu.ac.at on 2015-10-16)
  24. ISSUE-98 (cont'd): Further syntax improvements (from holger@topquadrant.com on 2015-10-16)
  25. Proposal to close ISSUE-84 (from holger@topquadrant.com on 2015-10-16)
  26. Re: RDF Data Shapes WG agenda for 15 October 2015 (from pfpschneider@gmail.com on 2015-10-14)
  27. Re: speeding up the working group (from holger@topquadrant.com on 2015-10-09)
  28. Re: RDF Data Shapes WG agenda for 8 October 2015 (from kcoyle@kcoyle.net on 2015-10-08)
  29. ISSUE-92 [Was: RDF Data Shapes WG agenda for 8 October 2015] (from eric@w3.org on 2015-10-08)
  30. Re: RDF Data Shapes WG agenda for 8 October 2015 (from pfpschneider@gmail.com on 2015-10-08)
  31. shapes-ISSUE-98 (Node constraints): Proposal to generalize property constraints into node constraints [SHACL Spec] (from sysbot+tracker@w3.org on 2015-10-02)

Related notes:

RESOLUTION: Close ISSUE-98, adopting Holger's proposed changes, renaming sh:allowedValues to sh:in
See http://www.w3.org/2015/10/15-shapes-minutes.html#resolution03

Arnaud Le Hors, 15 Oct 2015, 21:46:32

Display change log ATOM feed


Chair, 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: 98.html,v 1.1 2018/11/26 09:03:43 carine Exp $