- From: Holger Knublauch <holger@topquadrant.com>
- Date: Mon, 2 Nov 2020 08:49:54 +1000
- To: public-shacl@w3.org
- Message-ID: <f279924e-b436-3a46-946a-96555687f59d@topquadrant.com>
Hi Håvard,
yes this is how it is supposed to work, because sh:minInclusive (etc)
rely on the SPARQL operators such as < and those operators don't support
user-defined datatypes. The SHACL Playground has slightly incorrect
handling of datatypes. I guess the best thing you could do is to define
a SPARQL-based solution that does something like
FILTER (xsd:decimal(?value) < xsd:decimal($minInclusive))
Holger
On 11/1/2020 7:27 PM, Håvard Ottestad wrote:
> Hi,
>
> I’m wondering how to make sh:minInclusive work with custom datatypes.
>
> Essentially I would like to achieve something like the following:
>
> ex:measurementShape
> a sh:NodeShape ;
> sh:targetClass ex:Measurement ;
> sh:property [
> sh:path ex:temperature ;
> sh:minInclusive "0”^^unit:celsius ;
> ] .
>
> And allow for data such as:
>
> [] a ex:Measurement;
> ex:temperature "10”^^unit:celsius.
>
> Currently this is leading to a validation error with the reference
> validator, unless the temperature is exactly 0.
>
> I supposed this is how it is supposed to work! However it doesn’t lead
> to a validation error on https://shacl.org/playground/
> <https://shacl.org/playground/>
>
> Cheers,
> Håvard
Received on Sunday, 1 November 2020 22:50:10 UTC