Closed DiellzaElshani closed 2 years ago
Sure we can remove the equivalence, but why?
JsonSerialized is effectively simply a string. The content of the string is some JSON text encoded in base64, but it remains a string.
Again, no problem in removing the equivalence, but perhaps @danielhz could clarify the reasoning behind this?
The equivalence jsonSerialized ≡ xsd:string implies two inclusions, namely jsonSerialized ⊑ xsd:string and xsd:string ⊑ jsonSerialized. There is no problem with the first inclusion, but there are with the second one. Not every xsd:string is a valid jsonSerialized. For instance, the string "{ \"a\": 1"
is not valid because a parenthesis is missing.
Thanks for clarifying that @danielhz. Is there a way we could specify jsonSerialized ⊑ xsd:string only?
To my knowledge, OWL does not provide a way to define hierarchies over data types. So, you cannot say that xsd:integer
is a sub datatype of xsd:decimal
with OWL. This hierarchy is defined for the XML data types (see https://www.w3.org/TR/xmlschema-2/#built-in-datatypes) but you cannot use OWL to describe this hierarchy. You cannot use the predicates owl:sameClass
and owl:subClassOf
between data types because they are not classes. Furthermore, I think that jsonSerialized ⊑ xsd:string is also wrong because the set of JSON documents is not included in the set of strings. The reason is the same for the fact that datatype xsd:integer
is not a subtype of xsd:string
. Although you can express numbers as strings, you cannot say that "9"^^xsd:integer
is also of type xsd:string
. The hierarchy of data types is not determined by the way literals are encoded, but by the elements literals represent. "9"^^xsd:integer
represents the number 9, which is not a string.
Thanks, you convinced me. I'll remove the equivalence.
Description:
jsonSerialized must not be equivalent to xsd:string.
comments from Daniel
Steps to reproduce:
Expected behaviour:
Test file(s):