Re: Schema strictness

On Wed, Jun 18, 2014 at 2:50 PM, Dimitris Kontokostas <
kontokostas@informatik.uni-leipzig.de> wrote:

> Hi all,
>
> As discussed off the list I am planning to add implement Shapes through
> the RDFUnit suite[1].
>

That would be a very interesting use case.


> In our research we noticed that not all errors are of equal importance and
> we decided to provide different levels of error severity reporting.
>
> For instance, having an incorrect rdfs:domain yields "error", having a
> missing rdfs:range yields a "warning" (since it might be defined
> elsewhere), using an owl:deprecated property also yields a "warning" and in
> some specific vocabularies, not defining the reverse symmetric properties
> as an "info".
> (we use the common programming logging variables through the rlog
> vocabulary)
>
> The general idea is to have the actual errors and the nice-to-validate
> data. Depending on how nice it is to validate something we mark it in a
> different (logging) level.
>
> I searched through the specs and didn't find anything related in Shapes. I
> am new to the spec so maybe I missed it. If not, do you plan to add support
> for this?
>

At this moment, ShEx does not have the notion of different levels of
validation. I mean, the current implementations take a strict "yes/no"
approach to validation.

However, ShEx can also be seen as a type interence systen where the types
inferred are the different shapes. With this view in mind, it would be
possible to model the different error levels as different shapes and the
validator could infer which shapes correspond.

As an example, I tried to implement a small part of your example using the
following definitions:

:WarningIntProperty {  a ( :IntProperty ), !(rdfs:range .)  }

:ErrorIntProperty {  a ( :IntProperty ) , rdfs:range (- xsd:integer)  }

:GoodIntProperty {  a ( :IntProperty ) , rdfs:range (xsd:integer) }

which declare that an IntProperty can be Good if it has "rdfs:range" with
value "xsd:integer", Warning if it does not have rdfs:range, and Error if
it has an rdfs:range which is not xsd:integer.

In the previous definitions I am using "!" to express negations of arcs,
and "-" to express exclussions of values. I think those 2 extenssions are
only supported by ShExcala so they could be considered non-standard...

You can play with the example here: http://goo.gl/VvuLBY

Best regards, Jose Labra

Received on Thursday, 19 June 2014 15:48:39 UTC