Re: ISSUE-22: Proposal based on sh:hasShape


Are you saying that validation will fail if your engine encounters a
recursive call?

If so, I disagree with this proposal because it eliminates very
natural and useful forms of recursion that have completely
well-defined semantics, e.g. the way oslc:valueShape works.

The way to avoid infinite loops is to keep track of which shapes must
be validated on which nodes. In effect, you are maintaining a graph
whose nodes are pairs (x,s) where x is an RDF node and s is a shape
name. As you validate x wrt s, you mark (x,s) as visited. During the
validation, you may need to validate a neighbouring RDF node y with a
shape r. You see if (y,r) is already visited. If not, you continue the
validation on y wrt r. This process never leads to infinite loops. I
have described it in detail in [1].

That being said, I am not sure about the case involving negation and
disjunction of shapes, but Iovka has a proposed semantics for that.


-- Arthur

Received on Wednesday, 24 June 2015 19:52:00 UTC