Surprising validation results with sh:or

19 views
Skip to first unread message

A.L. Kleijngeld

unread,
Feb 10, 2023, 8:27:11 AM2/10/23
to TopBraid Suite Users
Hi,

I just read some very enlightening discussions on here that cleared up sh:or big time for me!

Still, I'm a bit confused.

So, the way I interpret what I've written is as follows. 

The indivual <example> is targeted by all three node shapes connected by the sh:or, i.e. testShape and the two blank nodes that are node shapes.

One of these node shapes validates the focus node <example> successfully, so I would've expected the net result to be that the validation result is "Success".

It feels like I'm saying 1 OR 0 OR 0 and it gives me 0, which is erroneous.

What am I misunderstanding?

Thanks!

Holger Knublauch

unread,
Feb 10, 2023, 8:33:50 AM2/10/23
to topbrai...@googlegroups.com
But the page says Success: No

and then lists two violations.

PastedGraphic-1.png

I guess the violations shows up twice because the inner anonymous node shapes also have a sh:targetClass. But the sh:or validates fine because the second shape about having at least one comment is valid.

Holger


--
You received this message because you are subscribed to the Google Groups "TopBraid Suite Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to topbraid-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/topbraid-users/2e6cab91-93fc-4ef4-a438-86e6ecba0ccbn%40googlegroups.com.

A.L. Kleijngeld

unread,
Feb 10, 2023, 8:55:49 AM2/10/23
to TopBraid Suite Users
Hi Holger,

My point is that I expected the overall report status to be "Success: Yes". If one of the three shapes in the OR succeeds (and like you say, one does), then there's no actual violation, right?

(Btw, I do understand that during the evaluation of the OR, two node shapes yield a (similar) violation.)

Holger Knublauch

unread,
Feb 10, 2023, 8:59:00 AM2/10/23
to topbrai...@googlegroups.com
But in the example that you linked to, the 3rd condition is outside of the sh:or block, which is enclosed by ( ... )

So it's evaluated directly under ex:Person and not as part of sh:or, which only has two operands.

Holger


A.L. Kleijngeld

unread,
Feb 10, 2023, 9:42:05 AM2/10/23
to TopBraid Suite Users
> the inner anonymous node shapes also have a sh:targetClass

Ahh, I get it now! Because of the target class specifications these blank nodes target the <example> node (again). Removing those made things work as expected :).

Thanks for your prompt help!
Reply all
Reply to author
Forward
0 new messages