我有一组SHACL规则来验证传入的数据文件。问题是,当数据文件中的记录类型与SHACL TargetClass不匹配时,将无法进行验证,而SHACL验证引擎仅报告成功。我从这个网站获得了一个解决方案,但对我不起作用。我已经在此处发布了我的SHACL规则和简单数据:
https://s.zazuko.com/b8887fz
数据类型“ DatainVentoryRecord”(右图中的数据行20)是正确的;当我更改目标类型时,例如将其更改为“ datainVentoryRecord2”,我期望有错误,但没有报告错误。
我从下面的帖子中获得了唱片的想法,该帖子由Holger Knublauch回答:
如何使用SHACL检查许多课堂实例
任何帮助都将不胜感激!
I have a set of Shacl rules to validate the incoming data files. The issue is when the type of a record in the data file mismatches with the Shacl targetClass, no validation will be done and the Shacl validation engine just reports Success. I got a solution from this website, but it does not work for me. I have posted my Shacl rules and simple data here:
https://s.zazuko.com/b887FZ
The data type "DataInventoryRecord" (data row 20 from the right panel) is correct; when I change the target type, for example changing it to "dataInventoryRecord2", I expect an error, but no error is reported.
I got the idea of recordCountShape from the following post which was answered by Holger Knublauch:
How to check for a number of class instances with SHACL
Any help will be greatly appreciated!
发布评论
评论(1)
形状的定义对我来说看起来不错,并且似乎也可以在(旧的)shacl Playground
The shape definitions look fine to me and also seem to work on the (old) SHACL Playground https://shacl.org/playground/