Skip to content
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

xsd:float -> xsd:decimal #89

Merged
merged 1 commit into from
Sep 15, 2023
Merged

Conversation

jmkeil
Copy link
Contributor

@jmkeil jmkeil commented Sep 15, 2023

This solves #42.

I used a RegEx based python script to do the transformation.

@HajoRijgersberg HajoRijgersberg merged commit b836dd1 into HajoRijgersberg:master Sep 15, 2023
@HajoRijgersberg
Copy link
Owner

Thanx again so much, Jan Martin! Your contributions are so greatly appreciated! :)
So, I have reviewed all changes and they seemed fine. Everyone who reads this, see issue #42 for more details why this is very important.
There's maybe only one point of attention: conversions of numbers greater than 1, like:

<!-- hasDefinition --> <om:hasFactor rdf:datatype="&xsd;float">1.0e9</om:hasFactor>

to:

<!-- hasDefinition --> <om:hasFactor rdf:datatype="&xsd;decimal">1000000000</om:hasFactor>

Now, the significance of the number has changed (the precision). Of course this is less severe than the issues raised in #42, so I think we should accept this. Hopefully in the future, datatypes will improve so that we will be able to indicate the proper significances. What do you think, Jan Martin?

@jmkeil
Copy link
Contributor Author

jmkeil commented Sep 18, 2023

None of the current standard datatypes supports significance. It is only the lexical representation, which (falsely) seems to represent significance. But it is not reflected in the lexical mapping: "1.0e9"^^xsd:float"1.00e9"^^xsd:float and "1000000000"^^xsd:decimal"1000000000.000000"^^xsd:decimal. There once was an attempt to define precisionDecimal as a numeric datatype preserving significance. But it got dropped in the XSD standardization process.

@HajoRijgersberg
Copy link
Owner

HajoRijgersberg commented Sep 21, 2023

Thanx, you're completely right. I also dived in it and it became clear to me. Wanted to let you know, but you were faster than me. ;)

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

Successfully merging this pull request may close these issues.

2 participants