Hi Joshua,
>From the RDF spec definition of rdfs:SubclassOf ><https://www.w3.org/TR/rdf12-schema/#ch_subclassof> , it looks like subclasses >should be allowed in the range since all instances of the subclass should also >be instances of the class. We could try a different validator to see if this is an issue with PySHACL. Here’s an online validator: https://shacl.org/playground/ If you found any documentation to the contrary, let me know. Sean, Alexios – any thoughts? Gary > -----Original Message----- > From: [email protected] <[email protected]> On Behalf Of > Joshua Watt > Sent: Wednesday, October 25, 2023 12:06 PM > To: SPDX Technical Mailing List <[email protected]> > Subject: [spdx-tech] RDF range problem in SHACL model > > I dug further into trying to get my Yocto SPDX output to validate against the > JSON LD SHACL model. I've made some progress, but I think maybe I've come > up against a problem that don't know how to solve. > > Disclaimer: I'm not an SHACL, RDF or ontology expert so please excuse my > misuse of nomenclature. > > It looks like there might be a problem in the model in regard to the usage of > "rdfs:range" to validate the type values of object properties. Based on my > reading and experiments, it looks like that field requires that the referenced > object be of _exactly_ one of the listed types, and cannot be a subclass > derived from that type. As an example, the "createdBy" property of > core:CreationInfo has "rdfs:range" of "core:Agent". Practically speaking, this > means that only an _exact_ core:Agent is allowed in this field, and classes > derived from that class (such as core:Organization) are not allowed (or at > least, pyshacl indicates a violation). > > > -=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#5398): https://lists.spdx.org/g/Spdx-tech/message/5398 Mute This Topic: https://lists.spdx.org/mt/102185295/21656 Group Owner: [email protected] Unsubscribe: https://lists.spdx.org/g/Spdx-tech/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-
