Two optionals, but we need at least one value
Working on "number range custom datatypes". I want a template that can take a minimum, a maximum, or both -- but if both are missing, then nothing should be returned.
Here is the template:
<<template-prefixes>>
@prefix : <http://norsok.org/templates/RestrictionMinMaxInclusiveExclusive#> .
<http://norsok.org/templates/RestrictionMinMaxInclusiveExclusive> a ottr:Template ;
ottr:hasParameter
[ ottr:index 1; ottr:nonLiteralVariable :restriction ] ,
[ ottr:index 2; ottr:nonLiteralVariable :xsdDatatype ] ,
[ ottr:index 3; ottr:literalVariable "minimum" ; ottr:optional true ] ,
[ ottr:index 4; ottr:literalVariable "maximum" ; ottr:optional true ] .
:restriction rdf:type rdfs:Datatype ; owl:onDatatype :xsdDatatype ;
owl:withRestrictions ( [ xsd:minInclusive "minimum" ] [ xsd:maxExclusive "maximum" ] ) .
When both the minimum and maximum are empty, the following anonymous individual is output. Is there a way to avoid it?
[] a rdfs:Datatype ;
owl:onDatatype xsd:double ;
owl:withRestrictions
([] []) .