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:
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- 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)
- Re: Proposal to close ISSUE-84 (from arthur.ryman@gmail.com on 2015-10-29)
- Re: Proposal to close ISSUE-84 (from arthur.ryman@gmail.com on 2015-10-29)
- Re: speeding up the working group (from kcoyle@kcoyle.net on 2015-10-20)
- Re: On how to deal with issues (was ISSUE-98 (cont'd): Further syntax improvements) (from lehors@us.ibm.com on 2015-10-19)
- Re: On how to deal with issues (was ISSUE-98 (cont'd): Further syntax improvements) (from lehors@us.ibm.com on 2015-10-19)
- Re: Proposal to close ISSUE-84 (from kcoyle@kcoyle.net on 2015-10-18)
- Re: Proposal to close ISSUE-84 (from holger@topquadrant.com on 2015-10-18)
- Re: Proposal to close ISSUE-84 (from pfpschneider@gmail.com on 2015-10-17)
- Re: Proposal to close ISSUE-84 (from kcoyle@kcoyle.net on 2015-10-17)
- Re: Proposal to close ISSUE-84 (from kcoyle@kcoyle.net on 2015-10-17)
- Re: Proposal to close ISSUE-84 (from holger@topquadrant.com on 2015-10-17)
- Re: ISSUE-98 (cont'd): Further syntax improvements (from holger@topquadrant.com on 2015-10-17)
- Re: Proposal to close ISSUE-84 (from kcoyle@kcoyle.net on 2015-10-16)
- Re: ISSUE-98 (cont'd): Further syntax improvements (from lehors@us.ibm.com on 2015-10-16)
- Re: RDF Data Shapes WG agenda for 8 October 2015 (from pfpschneider@gmail.com on 2015-10-16)
- AW: ISSUE-98 (cont'd): Further syntax improvements (from simon.steyskal@wu.ac.at on 2015-10-16)
- ISSUE-98 (cont'd): Further syntax improvements (from holger@topquadrant.com on 2015-10-16)
- Proposal to close ISSUE-84 (from holger@topquadrant.com on 2015-10-16)
- Re: RDF Data Shapes WG agenda for 15 October 2015 (from pfpschneider@gmail.com on 2015-10-14)
- Re: speeding up the working group (from holger@topquadrant.com on 2015-10-09)
- Re: RDF Data Shapes WG agenda for 8 October 2015 (from kcoyle@kcoyle.net on 2015-10-08)
- ISSUE-92 [Was: RDF Data Shapes WG agenda for 8 October 2015] (from eric@w3.org on 2015-10-08)
- Re: RDF Data Shapes WG agenda for 8 October 2015 (from pfpschneider@gmail.com on 2015-10-08)
- 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
Display change log