ISSUE-146: treatment of unbound results from sh:hasShape in sh:qualifiedMinCount (and elsewhere)

sh:qualifiedMinCount

treatment of unbound results from sh:hasShape in sh:qualifiedMinCount (and elsewhere)

State:
CLOSED
Product:
SHACL - Core
Raised by:
Peter Patel-Schneider
Opened on:
2016-04-08
Description:
It's hard to determine just what is going on in the SPARQL code, but appears that if any call to hasShape returns unbound then a validation result will be produced, which does not match the text.


TEXTUAL DEFINITION of sh:qualifiedMinCount
A validation result must be produced if the number of triples that have the focus node as its subject, the sh:predicate as its predicate and where validating the object against the shape specified by sh:qualifiedValueShape produces no validation results with severity sh:Violation or a failure is less than sh:qualifiedMinCount. The produced validation result must have the focus node as its sh:subject, and the sh:predicate as its sh:predicate.
SPARQL DEFINITION of sh:qualifiedMinCount

SELECT $this ($this AS ?subject) $predicate ?failure
WHERE {
{
SELECT (SUM(?s) AS ?count)
WHERE {
{
FILTER NOT EXISTS { $this $predicate ?value } .
BIND (0 AS ?s) .
}
UNION
{
$this $predicate ?value .
BIND (sh:hasShape(?value, $qualifiedValueShape, $shapesGraph) AS ?hasShape) .
BIND (IF(bound(?hasShape), IF(?hasShape, 1, 0), 'error') AS ?s) .
}
}
}
BIND (!bound(?count) AS ?failure) .
FILTER IF(?failure, true, ?count < $qualifiedMinCount) .
}

Related Actions Items:
No related actions
Related emails:
  1. Re: Please review the SHACL draft (was Re: Editing progress) (from holger@topquadrant.com on 2016-08-31)
  2. Re: shapes-ISSUE-146 (sh:qualifiedMinCount ): treatment of unbound results from sh:hasShape in sh:qualifiedMinCount (and elsewhere) [SHACL - Core] (from holger@topquadrant.com on 2016-04-22)
  3. Re: shapes-ISSUE-146 (sh:qualifiedMinCount ): treatment of unbound results from sh:hasShape in sh:qualifiedMinCount (and elsewhere) [SHACL - Core] (from pfpschneider@gmail.com on 2016-04-21)
  4. Re: shapes-ISSUE-146 (sh:qualifiedMinCount ): treatment of unbound results from sh:hasShape in sh:qualifiedMinCount (and elsewhere) [SHACL - Core] (from holger@topquadrant.com on 2016-04-21)
  5. Re: shapes-ISSUE-146 (sh:qualifiedMinCount ): treatment of unbound results from sh:hasShape in sh:qualifiedMinCount (and elsewhere) [SHACL - Core] (from pfpschneider@gmail.com on 2016-04-14)
  6. Re: shapes-ISSUE-146 (sh:qualifiedMinCount ): treatment of unbound results from sh:hasShape in sh:qualifiedMinCount (and elsewhere) [SHACL - Core] (from holger@topquadrant.com on 2016-04-11)
  7. shapes-ISSUE-146 (sh:qualifiedMinCount ): treatment of unbound results from sh:hasShape in sh:qualifiedMinCount (and elsewhere) [SHACL - Core] (from sysbot+tracker@w3.org on 2016-04-08)

Related notes:

RESOLUTION: Close ISSUE-146 and ISSUE-190 as no longer relevant given the removal of sh:hasShape
https://www.w3.org/2016/10/26-shapes-minutes.html#resolution03

Arnaud Le Hors, 27 Oct 2016, 00:11:40

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