Skip to content

Conversation

@KACAH
Copy link

@KACAH KACAH commented Feb 25, 2021

Hi!

XML Schema Definition (XSD) does not support scientific notation (1.1234e-3) in xsd:decimal by standart. Some resources doesn't mention scientific notation at all. Some mention the restriction directly.

The decimal separator is always a point (.), and no separation at the thousand mark may be added. There is no support for scientific notation.

Right now str(value) in Decimal builtin type makes the xml value without beeing aware of this restriction. Here is a small fix and couple of tests for this case. The fix uses Python format {:f} method which converts value to Fixed Point string.

@mvantellingen mvantellingen merged commit 83eefa2 into mvantellingen:master Apr 11, 2021
@mvantellingen
Copy link
Owner

Thanks!

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