- From: Holger Knublauch <holger@topquadrant.com>
- Date: Fri, 12 Jun 2015 09:33:22 +1000
- To: RDF Data Shapes Working Group <public-data-shapes-wg@w3.org>
- Message-ID: <557A1AC2.40900@topquadrant.com>
On 6/12/2015 9:29, Arnaud Le Hors wrote: > Holger Knublauch <holger@topquadrant.com> wrote on 06/10/2015 06:11:24 PM: > > > From: Holger Knublauch <holger@topquadrant.com> > > To: RDF Data Shapes Working Group <public-data-shapes-wg@w3.org> > > Date: 06/10/2015 06:13 PM > > Subject: ISSUE-22: Proposal based on sh:hasShape > > > > I would like to write down the solution to the recursion issue that I > > have currently implemented in my prototype, and welcome comments > whether > > this would resolve the issue. > > > > Recursive evaluation of shapes can only be triggered via the > sh:hasShape > > function. sh:hasShape takes three arguments: > > > > sh:hasShape(?focusNode, ?shape, ?shapesGraph) > > > > Proposal: sh:hasShape must fail with a constraint violation, if it > > encounters a recursive call involving the same combination of > arguments. > > I'd like to know what makes you choose to declare this a failure. > Couldn't we just as well decide that in this case the recursion stops > there assuming the constraint is satisfied (for the next iteration)? Yes, perhaps. Indeed I have this implemented too, and it seems to also work OK for the Italian family test case. The main reason why I chose the failure was to be extra-safe without getting too deep into the theoretical implications. I am not the best person to ask whether the other solution would work in theory - we have better firepower on these topics in the WG ;) Holger > This would mean that Peter's example in ISSUE-66 would be valid: > > ex:i rdf:type ex:C . > ex:i ex:p ex:i . > > with the shape > > exs:S rdf:type sh:Shape; > sh:classScope ex:C ; > sh:property [ sh:predicate ex:p ; > sh:minCount 1 ; sh:maxCount 1 ; > sh:valueShape exs:S ] . > > As a user this seems quite natural to me but maybe there are other > examples for which this wouldn't be the case. I don't know. > -- > Arnaud Le Hors - Senior Technical Staff Member, Open Web Technologies > - IBM Software Group > > > The constraint violation could have a system generated message such as > > "Failed to evaluate constraint due to unsupported recursive use of > > sh:hasShape" and point at the focus node that was visited twice. > > > > This would still allow most interesting cases that involve recursion > > between shapes, but excludes cases where the same instances are visited > > more than once. > > > > What am I missing? > > > > Thanks, > > Holger > > > > >
Received on Thursday, 11 June 2015 23:35:34 UTC