Project

Profile

Help

Bug #2361

closed

fn:format-number - escapes not accepted in decimal format declaration

Added by Christian Grün about 9 years ago. Updated over 8 years ago.

Status:
Closed
Priority:
Normal
Category:
XQuery conformance
Sprint/Milestone:
Start date:
2015-04-23
Due date:
% Done:

100%

Estimated time:
Legacy ID:
Applies to branch:
9.6
Fix Committed on Branch:
9.6
Fixed in Maintenance Release:
Platforms:

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, '٠')

Actions #1

Updated by Michael Kay about 9 years ago

  • Category set to XPath conformance
  • Assignee set to Debbie Lockett
  • Priority changed from Low to Normal
Actions #2

Updated by Michael Kay about 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?

Actions #3

Updated by Christian Grün about 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, '٠')

Actions #4

Updated by Christian Grün about 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, '٠')

Actions #5

Updated by Debbie Lockett almost 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.

Actions #6

Updated by Debbie Lockett almost 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.)

Actions #7

Updated by Michael Kay almost 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.

Actions #8

Updated by Michael Kay almost 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
Actions #9

Updated by O'Neil Delpratt almost 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

Actions #10

Updated by O'Neil Delpratt almost 9 years ago

  • Status changed from In Progress to Resolved
  • % Done changed from 0 to 100

Fix applied in the class XQueryParser

Actions #11

Updated by O'Neil Delpratt almost 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.

Actions #12

Updated by O'Neil Delpratt over 8 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

Also available in: Atom PDF