ISSUE-150: nested severities

This is a proposal to simplify the severity design from my POV

At the moment we require a severity of sh:violation to mark something as a
violation
e.g.
ex:S a sh:Shape ;
sh:property [
  sh:predicate ex:p;
  sh:minCount 1;
  sh:severity sh:Warning
]

when the above shape fails, the validation is successful because the
severity is lower than sh:Violation.

This behavior is not very intuitive as also raised by Peter when we nest
the above example in a sh:not [...],
e.g. when the inner shape returns a warning, the inner validation is
successful but sh:not reverts it to false.

part of my proposal is to remove the restriction that only sh:Violation is
considered an error.
With this approach we also include sh:Warning / sh:Info, This also makes
the language more consistent when severities are nested
consider the following example:

ex:S a sh:Shape ;
sh:property [
  sh:predicate ex:p1;
  sh:minCount 1;
  sh:severity sh:Warning ;
]
sh:property [
  sh:predicate ex:p2;
  sh:severity sh:Warning ;
  sh:shape [
    sh:property [
      sh:predicate ex:p3;
      sh:minCount 1;
      sh:severity sh:Warning ;
    ];
  ];
];

with the existing design we would get back a warning for ex:p1 when
sh:minCount is violated but not for ex:p2/ex:p3 because ex:p3 is nested and
declared as a warning,
With my proposal we would get both back.

the other part of my proposal is which severity level do nested severities
get
I would prefer the following two options:
a) always the outer severity e.g.
outer: Warning,  inner: Info -> use Warning
outer: Warning,  inner: Violation -> use Warning

b) Use the outer, unless the inner was lower e.g.
outer: Warning,  inner: Info -> use Info
outer: Warning,  inner: Violation -> use Warning

I have a preference for (b) but would also fine with (a) that is in-line
with the current design

-- 
Dimitris Kontokostas
Department of Computer Science, University of Leipzig & DBpedia Association
Projects: http://dbpedia.org, http://rdfunit.aksw.org,
http://aligned-project.eu
Homepage: http://aksw.org/DimitrisKontokostas
Research Group: AKSW/KILT http://aksw.org/Groups/KILT

Received on Thursday, 28 July 2016 08:39:04 UTC