Re: Overriding rules in sub-classes

Since LocalBusiness is a subclass of Organization, you do not need to repeat the constraint for it.

It is already in place. There is no override since the constraints say the same thing. It is just unnecessary repetition.

> On Sep 5, 2019, at 2:32 PM, Gary Murphy <gary@schemaapp.com> wrote:
> 
> 
> Is it possible to specifically override a rule when applied to a subclass?
> 
> I have
> schema:LocalBusiness rdfs:subClassOf schema:Organization
> 
> and in the shapes rules for both I have 
> sh:path schema:sameAs ;
> sh:minCount 1 ;
> 
> and each has a message, but the message is (slightly) different; when I validate the file, I get both rules reporting, so there are two messages, one for Organization, one for LocalBusiness
> 
> Is there a general pattern for avoiding this?  I'd like to override the Organization rule rather than see both.
> 
> -- 
> Gary Lawrence Murphy <gary@schemaapp.com> - Hunch Manifest, 15 Wyndham N 'C', Guelph

Received on Thursday, 5 September 2019 19:10:48 UTC