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

Consider changing the range of ceterms:price from xsd:integer to xsd:decimal #635

Closed
siuc-nate opened this issue Nov 11, 2019 · 6 comments
Closed

Comments

@siuc-nate
Copy link
Contributor

This would enable more fine-grained descriptions of prices.

@stuartasutton
Copy link
Contributor

I've no objections other than affect on existing data.

@cwd-mparsons
Copy link

Could the type just be xsd:decimal?
http://books.xmlschemata.org/relaxng/ch19-77057.html

It seems that float includes scientific notation, and so on.
http://books.xmlschemata.org/relaxng/ch19-77095.html

I don't think that we should be trying to handle wide ranges for properties as straightforward as a price.

@siuc-nate
Copy link
Contributor Author

I don't know enough about how numbers like that are handled to really know the difference or which would be best for us. As far as I know, JSON doesn't distinguish between different kinds of numbers so it really only matters for consuming systems.

Decimal sounds fine; I suggested float because we use that everywhere else that we have a non-integer number. It might be worth reviewing other xsd:float ranges to see if they are correctly modeled.

@siuc-nate siuc-nate changed the title Consider changing the range of ceterms:price from xsd:integer to xsd:float Consider changing the range of ceterms:price from xsd:integer to xsd:decimal Nov 13, 2019
@stuartasutton
Copy link
Contributor

I've no expertise in how systems treat the distinction.

http://net-informations.com/q/faq/float.html

@siuc-nate
Copy link
Contributor Author

Proposal:

Remove:

Subject: ceterms:price
Predicate: schema:rangeIncludes
Object: xsd:integer

Add:

Subject: ceterms:price
Predicate: schema:rangeIncludes
Object: xsd:decimal

@siuc-nate
Copy link
Contributor Author

These changes have been made in pending CTDL and noted in the history tracking.

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

No branches or pull requests

4 participants