Open mhrimaz opened 2 weeks ago
Thanks, @mhrimaz ! I think it would be easiest to fix the examples, assuming that the RDF and SHACL schemas are already usable.
Can you please explain me exactly how I should change the examples? (Maybe make a two-three concrete rewrites?)
Sorry, now I see it again. It's the problem of inheritance -- LangStringNameType
inherits from AbstractLangString
; so then how should the inheritance be dealt with? That is, how should we represent it in SHACL/RDF and/or in the examples?
(You have to explain me everything like I'm 5 -- I still don't really know much about RDF/SHACL.)
Subclasses of AbstractLangString serialized differently in XML and RDF. Due to this inconsistency, SHACL shapes cannot validate most of the official examples that have displayName, dataSpecificationIec61360 preferred name, ...
XML
Let's see an example in XML: maximal AssetAdministraionShell XML example
In this example to have displayName we have:
and to have dataSpecificationIec61360 preferred name we have:
RDF
Now let's look at the RDF maximal AssetAdministraionShell RDF/Turtle example
Here to have displayName we have:
However, if we want to follow the same pattern as we have in XML we should have something like this:
Indeed this is what SHACL states:
For this reason, the official example is actually incorrect. This is the same for other cases like dataSpecificationIec61360. I know that Ontology workgroup is working on a new representation, but regardless, IMO, if the effort to fix this is low, it would be better to fix it for now. We can fix by correcting the examples, or by correcting the SHACL shape. This issue doesn't appear in JSON serialization.