Re: propose to make repeated-properties additive

On 9/19/15 5:02 PM, Karen Coyle wrote:
> 2) repeated properties
> This is a real and not uncommon example:
>
>   <bf_Person1>
>   bf:identifiedBy <http://id.loc.gov/authorities/names/n80103961#RWO> ;
>     #IRI from id.loc.gov, min 1, max 1
>   bf:identifiedBy <https://viaf.org/viaf/268367832/#Knape,_Joachim> .
>     #IRI from viaf.org, min 1, max unlimited

I agree it makes sense to talk about the requirements before requesting 
a change to the language. If I understand the intention correctly, then 
the above could be expressed with an incremental addition to the core 
library:

ex:MyShape
     a sh:Shape ;
     sh:property [
         sh:predicate bf:identifiedBy ;
         sh:qualifiedMinCount 1 ;
         sh:qualifiedMaxCount 1 ;
         sh:qualifiedValueShape [
             sh:constraint [
                 a sh:URIPatternConstraint ;
                 sh:uriPattern "^http://id.loc.gov" ;
             ] ;
         ] ;
     ] ;
     sh:property [
         sh:predicate bf:identifiedBy ;
         sh:qualifiedMinCount 1 ;
         sh:qualifiedValueShape [
             sh:constraint [
                 a sh:URIPatternConstraint ;
                 sh:uriPattern "^http://viaf.org" ;
             ] ;
         ] ;
     ] .

The new feature that would be needed would be sh:URIPatternConstraint - 
the current sh:pattern only applies to property values "one hop away" 
while here we would need something that talks about the IRI of the focus 
node itself. We had a similar topic recently with regards to 
sh:allowedValues. It may make sense to generalize the validation 
function mechanism so that the same infrastructure can be reused, but in 
the end this is about syntactic sugar only.

Holger

Received on Saturday, 19 September 2015 23:39:42 UTC