Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[rdf4j-dev] SHACL boolean

Hi,

SHACL is full of nasty little buggers.

What do you guys think of this one?

################################
ex:s1 a sh:PropertyShape ;
sh:targetNode ex:i ;
sh:path ex:message ;
sh:minCount 0 ;
sh:uniqueLang "1"^^xsd:boolean .

# Note that the value above is "1"^^xsd:boolean, which is distinct from "true"^^xsd:boolean.
# Only true is mentioned in the spec, meaning that "1" will not activate the constraint
# and the constraint is being ignored.
################################

When I query the memory store I parse it into, "1"^^xsd:boolean == true.

I use the following java code:

boolean uniqueLang = ((Literal) object).booleanValue();



I think this is mean and sad from the creators of the spec. I don’t really know how to describe it, but it makes me very sad.

This isn’t the first time I’ve seen things in the test suite that should obviously have been mentioned in the spec, if that was the intention of the spec. 

Håvard

Back to the top