W3C home > Mailing lists > Public > public-dxwg-wg@w3.org > January 2019

Re: [dxwg] Indicate a conventional way to automatically validate data instances of application profiles (#698)

From: Nicholas Car via GitHub <sysbot+gh@w3.org>
Date: Mon, 28 Jan 2019 11:54:25 +0000
To: public-dxwg-wg@w3.org
Message-ID: <issue_comment.created-458102895-1548676464-sysbot+gh@w3.org>
@paulwalk I'm not sure you'll get exactly what you want as noone's yet able to agree on The Correct Way to validate against a profile (application profile). For instance, what constraint language is to be used, does validation need to validate against all dependency validators or not, what if dependencies use different forms of validators etc. At the moment, everyone's talking SHACL as a constraint language... except for those who prefer ShEx. And in my XML life, I use Schematron. So right there we don't have language uniformity.

Let's break this point down into sub points, just as I listed them above, but adding a few more lower-level ones:

To "Indicate a conventional way to automatically validate data instances of application profiles" PROF may need to:

1. Indicate which validators are available
2. Indicate a particular constraint language validator (standard & format)
3. Indicate the role the validator plays (all constraints, partial etc.)
4. Indicate whether dependency validators need to be consulted for validation or if this profile's validator is sufficient

For 1.: Currently Possible. The Profile just includes one or more `pref:ResourceDescriptor` classes describing validators.

```
<http://example.org/profile/x> a preof:Profile ;
    prof:hasResource [
        prof:hasArtifact <SOME_FILE_URI> ;
        ...
    ] ;
    ....
```
For 2.:  Currently Possible. PROF suggests use of `dct:conformsTo` & `dct:format` to indicate this:

```
<http://example.org/profile/x> a preof:Profile ;
    prof:hasResource [
        prof:hasArtifact <SOME_FILE_URI> ;
        dct:conformsTo <http://www.w3.org/ns/shacl> ;
        dct:format <https://w3id.org/mediatype/text/turtle> ;
        ...
    ] ;
    ....
```

For 3.: Currently Possible. PROF uses `prof:hasRole` to indicate the particular role a `prof:ResourceDescriptor` plays with suggested roles defined at https://w3c.github.io/dxwg/profilesont/resource_roles.html but more are possible.

```
<http://example.org/profile/x> a preof:Profile ;
    prof:hasResource [
        prof:hasArtifact <SOME_FILE_URI> ;
        dct:conformsTo <http://www.w3.org/ns/shacl> ;
        dct:format <https://w3id.org/mediatype/text/turtle> ;
        prof:hasrole <http://www.w3.org/ns/dx/prof/role/validation> ;
        ...
    ] ;
    ....
```

For 4.: Not currently spelled out but perhaps able to be indicated with roles. E.g. if a validator with Role [Full Constraints](https://w3c.github.io/dxwg/profilesont/resource_roles.html#Role:fullConstraints) is used (defn: "Complete set of constraints for a profile") then it is sufficient to use this for profile validation. If only a validator with [Part Constraints](https://w3c.github.io/dxwg/profilesont/resource_roles.html#Role:partConstraints) is available, then more info is needed. 

I could imagine a new Role: "Differential Constrains" which would be this Profile's constraints, i.e. only those that this profile adds on top of those belonging to the things it is profiling.  If this was available, you'd know you'd have to pull in dependency constraints to perform a complete validation.

I will suggest updates to the Roles Vocab for this.

-- 
GitHub Notification of comment by nicholascar
Please view or discuss this issue at https://github.com/w3c/dxwg/issues/698#issuecomment-458102895 using your GitHub account
Received on Monday, 28 January 2019 11:54:27 UTC

This archive was generated by hypermail 2.3.1 : Monday, 25 March 2019 10:33:29 UTC