Skip to content

bug: Do not use xsd:minInclusive and xsd:maxInclusive #307

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
maximelefrancois86 opened this issue Mar 27, 2025 · 5 comments
Open

bug: Do not use xsd:minInclusive and xsd:maxInclusive #307

maximelefrancois86 opened this issue Mar 27, 2025 · 5 comments
Assignees

Comments

@maximelefrancois86
Copy link
Contributor

I don't know when these properties were used to replace schema:minValue and schema:maxValue . Now they are everywhere

This was a bad decision.

in OWL, xsd:minInclusive and xsd:maxInclusive are only allowed to define restrictions in the definition of a datatype . See https://www.w3.org/TR/owl2-syntax/ section 4.1. and https://www.w3.org/TR/xmlschema-2/#rf-minInclusive

Value ranges cannot be modeled easily and they seem to bring confusion.
I suggest we just define two properties to observe: one for the lower bound, and one for the upper bound.

For example: MinOperatingTemperature / MaxOperatingTemperature

@oldskeptic
Copy link
Contributor

This dates back to the 2024-11-27 meeting for issue #239, changes were made in #256.

There was a lot of back and forth about this, but the short version is that xsd is more authoritative than schema. I understand the issues with datatypes but is that a reason to switch to schema org?

@maximelefrancois86
Copy link
Contributor Author

its nice to use things that are authoritative, but one should use them right.
my proposal to not to switch back to schema.org, but just avoid having to represent ranges of values.

Sorry I wasn't there at the 2024-11-27 meeting, but I don't understand why no one screamed about this before. We shouldn't leave it this way.

@oldskeptic
Copy link
Contributor

Maybe I'm not reading 4.1 properly, do you want to write a synopsis here that we can then push into the spec for explanation?

@maximelefrancois86
Copy link
Contributor Author

Here are some excerpts of https://www.w3.org/TR/owl2-syntax/

2.4 IRIs
[...]
IRIs with prefixes rdf:, rdfs:, xsd:, and owl: constitute the reserved vocabulary of OWL 2. As described in the following sections, the IRIs from the reserved vocabulary that are listed in Table 3 have special treatment in OWL 2.

(xsd:minInclusive and xsd:maxInclusive are listed in Table 3)

5.3 Object Properties
[...]
IRIs from the reserved vocabulary other than owl:topObjectProperty and owl:bottomObjectProperty MUST NOT be used to identify object properties in an OWL 2 DL ontology.

4.1 Real Numbers, Decimal Numbers, and Integers
[...]
For each datatype from the above list that is identified by an IRI with the xsd: prefix, the definitions of the value space, the lexical space, and the facet space are provided by XML Schema [XML Schema Datatypes]; furthermore, the normative constraining facets for the datatype are xsd:minInclusive, xsd:maxInclusive, xsd:minExclusive, and xsd:maxExclusive. An OWL 2 implementation MAY support all lexical forms of these datatypes; however, it MUST support at least the lexical forms listed in Section 5.4 of XML Schema Datatypes [XML Schema Datatypes], which can be mapped to the primitive values commonly found in modern implementation platforms.

7.5 Datatype Restrictions
[...]
example in RDF (reworked):

ex:integerBetween5and10 rdf:type rdfs:Datatype .
    owl:onDatatype xsd:integer .
    owl:withRestrictions ( _:y _:z ) .
_:y xsd:minInclusive "5"^^xsd:integer .
_:z xsd:maxExclusive "10"^^xsd:integer .

That is:
In an OWL 2 DL ontology, one must not use xsd terms to identify Ontologies, Classes, Object Properties, Datatype Properties, Individuals. xsd:minInclusive and xsd:maxInclusive can only be used to define datatypes that restrict xsd datatypes for real numbers, decimal numbers, and integers, with additional facets

@maximelefrancois86
Copy link
Contributor Author

Requirements for the way of modeling things:

  • avoid the combinatorial explosion of terms
  • try to be elegant: use the same observation-result modeling also for data items in the datasheet ?
  • be able to determine how system properties relate to observation results. In particular, cover the case of sensors that make multi-dimensional observations (ex. temperature + humidity) --> to what does the sensor resolution refer to ?

make a choice between two opposite design principles:

  • break down to atomic descriptions, or
  • allow for the description of composite entities and enforce coherence ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants