Validating arrays embedded in arrays with Javascript functions

5 views
Skip to first unread message

Angelo Frozza

unread,
Sep 10, 2020, 11:21:30 AM9/10/20
to topbrai...@googlegroups.com
Hello, I hope to find you all well !!

Look at this attached datafile and its shapesfile.
The datafile represents two instances of a geographic data of type LineString.

In order to do the validation, I created Javascript functions and I'm testing with the SHACL API:
> shaclvalidate -datafile 204-JS4Geo-LineString-DataGraph.ttl -shapesfile 203-JS4Geo-LineString-ShapeGraph.ttl

Javascript functions are used to count the minimum and maximum number of elements in the array (considering that it can have elements with the same value, so I cannot use sh:minCount that does not count equal values in the array).

The instance ex:MyExample_01 is validating correctly.

The instance ex:MyExample_02 should have an error in the 1st element of ex:coordinates, because it has only one value in the internal array.

I am not able to identify why the internal array is not being validated by the Javascript function. Can you help me?

--

-----
Prof. Angelo Augusto Frozza, M.Sc.
Doutorando PPGCC/UFSC

Professor EBTT
IFC - Instituto Federal Catarinense - Campus Camboriú
http://about.me/tilfrozza

Sugestões de leitura:

204-JS4Geo-LineString-DataGraph.ttl
203-JS4Geo-LineString-ShapeGraph.ttl
Reply all
Reply to author
Forward
0 new messages