Bug #2361
closedfn:format-number - escapes not accepted in decimal format declaration
100%
Description
-
the following query returns "FODF1310: format-number picture: Cannot have a grouping separator adjacent to the decimal separator", but there is no decimal separator:
format-number(1, '#,i')
-
the following query returns XQST0097: Attribute zero-digit should be a single character
declare default decimal-format zero-digit = "٠";
format-number(1, '٠')
Updated by Michael Kay over 9 years ago
- Category set to XPath conformance
- Assignee set to Debbie Lockett
- Priority changed from Low to Normal
Updated by Michael Kay over 9 years ago
On the first one, we think this might be a spec problem. I think the intent of the spec is to disallow a grouping separator at position zero.
On the second one, we are having trouble reproducing it. We think the intended character is x0660 but that character appears to work fine in Saxon. Is it possible that some encoding issue has been lost in transit?
Updated by Christian Grün over 9 years ago
On the second one, we are having trouble reproducing it. We think the intended character is x0660 but that character appears to work fine in Saxon. Is it possible that some encoding issue has been lost in transit?
Yes, it seems that my entity was resolved in the HTML view. The query I tried should look as follows:
declare default decimal-format zero-digit = "٠";
format-number(1, '٠')
Updated by Christian Grün over 9 years ago
Once again it's not how it was supposed to look like. I discovered the "Preview" link, now it should be alright:
declare default decimal-format zero-digit = "٠";
format-number(1, '٠')
Updated by Debbie Lockett over 9 years ago
For the first issue, bug 28567 has been raised against the spec, to clarify whether a grouping-separator-sign is allowed at the end of the integer part.
Updated by Debbie Lockett over 9 years ago
I have now reproduced the second issue, when running the query directly from the command line. (But note that QT3 test format-number/numberformat155 containing this query passes.)
Updated by Michael Kay over 9 years ago
It seems that the XQuery parser is not applying unescaping (of &x..; sequences) to StringLiterals that appear other than in expression contexts. The problem apparently applies to the version and encoding declaration, option declarations, and the name in a processing-instruction node test as well as to values of decimal format declarations.
Patch committed for the 9.6 and 9.7 branches; test cases added to QT3.
Updated by Michael Kay over 9 years ago
- Subject changed from fn:format-number to fn:format-number - escapes not accepted in decimal format declaration
- Category changed from XPath conformance to XQuery conformance
- Status changed from New to Resolved
- Found in version changed from EE 9.6.0.5 to 9.6
Updated by O'Neil Delpratt over 9 years ago
- Status changed from Resolved to In Progress
I am reopening this bug issue as the fix is failing the following QT3 tests:
-
version_declaration-010
-
K-VersionProlog-3
-
K-VersionProlog-4
-
XQST0087
Updated by O'Neil Delpratt over 9 years ago
- Status changed from In Progress to Resolved
- % Done changed from 0 to 100
Fix applied in the class XQueryParser
Updated by O'Neil Delpratt over 9 years ago
- Status changed from Resolved to Closed
- Fixed in version set to 9.6.0.6
Bug fix applied in the Saxon 9.6.0.6 maintenance release.
Updated by O'Neil Delpratt about 9 years ago
- Sprint/Milestone set to 9.6.0.6
- Applies to branch 9.6 added
- Fix Committed on Branch 9.6 added
- Fixed in Maintenance Release 9.6.0.6 added
Please register to edit this issue