w3c / dx-prof

The Profiles Vocabulary
https://w3c.github.io/dx-prof/prof/
Other
4 stars 2 forks source link

SheX feedback on example ResourceDescriptor #24

Open nicholascar opened 4 years ago

nicholascar commented 4 years ago

The Editor's Draft of PROF contains an updated example that characterises a ShEx resource for a profile, Example 4 [1].

[1] https://w3c.github.io/dxwg/prof/#eg-isInheritedFrom

The example is not specifically about ShEx or similar but it does contain the following RDF which lakes about a ShEx resource:

# example standard
# with a single resource indicated for this Standard
ex1:Standard_X
    a dct:Standard ;
    dct:title "Standard X" ;
    prof:hasResource ex1:RD_1 .  

# example ResourceDescriptor for Standard X
# using the ShEx Expression Language
# in the JSON format
# this ResourceDescriptor is to validate instance   
# data claiming conformance to Standard X
# the actual file the ResourceDescritor describes
ex1:RD_1
    a prof:ResourceDescriptor ;
    dct:conformsTo <http://shex.io/shex-semantics/> ;               
    dct:format <https://w3id.org/mediatype/application/json> ; 
    prof:hasRole role:validation ;
    prof:hasArtifact ex1:constraints.json .                                    

@tombaker, @ericprud: could either of you please indicate whther this looks like a sensible characterisation of a ShEx resource in PROF?

Specifically, the URI identifying the ShEx spec is a best guess URI since, as far as I'm aware, there is no specific "conformance target" URI specified for ShEx. If there is a better URI that we could use, please let us know!

nicholascar commented 4 years ago

Hi @tombaker & @ericprud, do you have any thoughts on this? I've bumped it out to our next PWD release of PROF (4PWD).

ericprud commented 4 years ago

@nicholascar, http://shex.io/shex-semantics/ points to the latest version, which has the effect of telling people they should update their software when implementations update to reflect new versions of the spec. You could also be more conservative and pick e.g. 2.1 with http://shex.io/shex-semantics-20191008/.

nicholascar commented 4 years ago

Thanks @ericprud, I've done that - should be in 3PWD soon.

Any other comments on this method of indicating conformance to something in general? Does this combination of a profile with a profile resource with role 'validation' that itself conforms to ShEx strike you as natural? Before this, how would you have indicated something (a spec) using a ShEx resource for validation, had you been asked?

ericprud commented 4 years ago

I think mostly people just add ShEx inline and maybe a ref to the semantics. I haven't edited any such specs apart from HL7/FHIR (which does everything its own way).

tombaker commented 4 years ago

@nicholascar @ericprud We suggest, instead of:

ex1:RD_1
    a prof:ResourceDescriptor ;
    dct:conformsTo <http://shex.io/shex-semantics/> ;               
    dct:format <https://w3id.org/mediatype/application/json> ; 
    prof:hasRole role:validation ;
    prof:hasArtifact ex1:constraints.json .          

to describe the schema as follows:

ex1:RD_1
    a prof:ResourceDescriptor ;
    dct:conformsTo <http://shex.io/shex-semantics-20191008/> ;
    dct:format <https://w3id.org/mediatype/text/shex> ; 
    prof:hasRole role:validation ;
    prof:hasArtifact <http://example.org/profile/x/resource/validator.shex> .

(Even though ShEx has RDF and JSON(LD) representations, the overwhelming majority of ShEx is ShExC).