I have an application where I use the validation sh:resultPath to display
violation messages, but I've hit a conundrum with dependent/contingent
properties
a simple example: schema:AggregateRating can have either or both of
ratingCount and reviewCount, with a structure as follows:
{
"@context": { "@vocab": "http://schema.org/" },
"@type": "AggregateRating",
"ratingCount": 25,
"ratingValue": "3.5",
"reviewCount": 5,
"@id": "http://schemaapp.com/db/SchemaApp#AggregateRating"
}
what I would like to do is to attach a PropertyShape with a sh:path
schema:reviewCount that will pass if either (or both) properties are
present, but return a violation (with sh:resultPath schema:reviewCount) if
both are missing
It was very easy to phrase using sh:alternativePath in a NodeShape, but
that gives the sh:alternativePath blank node as the resultPath. I might be
stuck with that, but hoping there's a way to do it the way I need
--
Gary Lawrence Murphy <[email protected]> - Hunch Manifest, 15 Wyndham N
'C', Guelph
--
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 [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/topbraid-users/CADnyxpsmyhQ7j7-qYDdu87iPvQ6Fo09je97%3DStwqzK3cj5N55Q%40mail.gmail.com.