Using sh:maxExclusive to compare (the values of) two datatype properties

一个人想着一个人 提交于 2021-01-29 07:30:31

问题


Connected to this question:

I cannot use sh:lessThan with xsd:positiveInteger

Indeed, I managed to make my example working by writing:

        sh:property [
          sh:path ontology:has-age ;
          sh:maxExclusive 16 ;
        ] ;

However, now I would like to compare the value of "ontology:has-age" not with a constant but with the value of another datatype property defined on the same individual (and having 16 as value):

ontology:John
  rdf:type ontology:DataSubject ;
  ontology:has-age "14"^^xsd:positiveInteger ;
  ontology:has-minimalage "16"^^xsd:positiveInteger ;
.

As many of you probably know, the following does NOT work:

        sh:property [
          sh:path ontology:has-age ;
          sh:maxExclusive ontology:has-minimalage ;
        ] ;

I truly dug on https://www.w3.org/TR/shacl and other related web pages but I couldn't find out how to get the value of a property and compare it via sh:maxExclusive.

Could someone kindly tell me how to do it?

Thank you very much! Livio

来源:https://stackoverflow.com/questions/64105725/using-shmaxexclusive-to-compare-the-values-of-two-datatype-properties

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!