Can shapes be recursive?


#1

Can shapes be recursive?

According to
https://shexspec.github.io/spec/#shapeExprRef-requirement:

“Additionally, a shapeExprLabel cannot refer to itself through a shape reference either directly or recursively.”

but according to
https://book.validatingrdf.com/bookHtml013.html#sec206:

“ShEx supports the definition of cyclic data models with recursive shapes”

and according to
https://www.w3.org/2014/data-shapes/wiki/SHACL-ShEx-Comparison:

“SHACL leaves validation of recursive shapes to implementations. It is not clear what ShEx does.”

I tried validating a recursive shape at https://shaclex.herokuapp.com/, and it didn’t validate until I removed the recursion. So maybe not, but it doesn’t seem nearly as useful without it. Is there another way to do that?