datatypes: float/decimal non-number values incorrect #43

pabigot opened this Issue Aug 21, 2015 · 0 comments


None yet

1 participant

pabigot commented Aug 21, 2015

From direct email:

In section of the following document it states that allowed special values for floats in xml files are "INF", "-INF" and "NaN".
Pyxb seems to convert "INF" to "inf". I have not tested the other values, but suspect similar behavior.
As this violates the xml standard I would like to ask kindly, whether you could fix this bug in pyxb. Other parsers fail on this value. (Tested on MSxml)

Also note constraints on canonical lexical representation that are probably not handled.

@pabigot pabigot self-assigned this Aug 21, 2015
@pabigot pabigot added a commit that closed this issue Aug 30, 2015
@pabigot fix #43: float/double non-number values incorrect.
There are three cases: PyXB accepts as INF, -INF, and NaN string values
that it shouldn't (issue #44); PyXB generates non-canonical literal
values for normal floating point (e.g. `0` instead of `0.0E0`) (issue
#45), and it generates non-canonical literal values for special values
(`inf`, `nan`).

Fix the last one, which is easy and non-intrusive.  Ignore the others
which are neither.
@pabigot pabigot closed this in 527c202 Aug 30, 2015
@pabigot pabigot added this to the PyXB 1.2.5 milestone Sep 18, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment