Skip to content

Conversation

@adamretter
Copy link
Member

Backport of #152

  • Implements the missing XQuery prolog setters declare default decimal-format and declare decimal-format; these can now be used by fn:format-number
  • Fixes an issue with outputting double negative characters in negative exponents when using fn:format-number
    Closes fn:format-number - small number formatted with exponent fails eXist-db/exist#5943
  • Adds a number of previously missing checks for static error conditions
  • Increases decimal precision from 64 bits to 128 bits
  • Fixes a number of issues with groupings

All W3C QT3 format-number tests are now passing except:
1. numberformat121 and numberformat122 which raise a java.lang.StackOverflowError due to a lack of tail-call-optimisation
2. numberformat127 and numberformat128 which should fail on XQuery 1.0 and 3.0, and pass on XQuery 3.1. In Elemental these will pass on XQuery 1.0, 3.0, and 3.1.

…n exponent and also a percent or per-mille character
…r in the exponent part of the picture string given to fn:format-number
…re is no decimal separator in the picture, or there are no fractional digits, and the decimal separator is the right-most character
…part-grouping-positions.

All W3C QT3 format-number tests are now passing except:
1. `numberformat121` and `numberformat122` which raise a java.lang.StackOverflowError due to a lack of tail-call-optimisation
2. `numberformat127` and `numberformat128` which appear to be incorrect, see: w3c/qt3tests#73
@adamretter adamretter added this to the elemental-6.9.0 milestone Dec 15, 2025
@adamretter adamretter self-assigned this Dec 15, 2025
@adamretter adamretter added bug Something isn't working enhancement New feature or request labels Dec 15, 2025
@cla-bot cla-bot bot added the cla-signed label Dec 15, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working cla-signed enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants