Multiple decimal-format declarations

Bug #1167427 reported by Paul J. Lucas
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zorba
Fix Committed
High
Sorin Marian Nasoi

Bug Description

The XQuery 3.0 spec, section 4.10, says in part:

> It is a static error for a query prolog to contain two decimal format declarations with the same name, or to contain two default decimal format declarations [err:XQST0111].

Yet FOTS test numberformat41:

declare namespace foo = "http://foo.ns";
declare namespace baz = "http://foo.ns";
declare decimal-format foo:decimal1 minus-sign="-" NaN="not a number" ;
declare decimal-format baz:decimal1 NaN="not a number" decimal-separator="." ;
string-join((
                format-number("NaN","###","foo:decimal1"),
                format-number(-13.2,"###.0","foo:decimal1"),
                format-number("NaN","###","baz:decimal1"),
                format-number(-13.2,"###.0","baz:decimal1")), "|")
);

seems to have two decimal format declarations with the same (resolved) name. Zorba reports this an an error. Is Zorba correct (in which case the test is wrong), or is Zorba wrong (in which case the spec is wrong or unclear)? Does the spec mean that it's actually OK to declare multiple decimal-format declarations with the same name as long as their property names don't overlap (in which case their properties are merged)?

Tags: fots

Related branches

Revision history for this message
Paul J. Lucas (paul-lucas) wrote :

FOTS test numberformat42 is similar.

description: updated
Revision history for this message
Dana Florescu (dflorescu) wrote :

Ghislian, I lost track of the XQuery standard... Could you please double check and then tell Paul the answer ? Thanks

Changed in zorba:
assignee: Dana Florescu (dflorescu) → Ghislain Fourny (gislenius)
milestone: none → 2.9
Revision history for this message
Ghislain Fourny (gislenius) wrote :

I think you are right, my interpretation of the specification is that err:XQST0111 should be raised.

I reopened the following bug (see comment 3) and will keep you informed:

https://www.w3.org/Bugs/Public/show_bug.cgi?id=19716

Changed in zorba:
milestone: 2.9 → 3.0
Changed in zorba:
importance: Undecided → High
Changed in zorba:
assignee: Ghislain Fourny (gislenius) → Sorin Marian Nasoi (sorin.marian.nasoi)
status: New → In Progress
Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) wrote :

As mentioned by Mike Kay in
https://www.w3.org/Bugs/Public/show_bug.cgi?id=19716#c5
the 'xpath-1.0-compatibility' dependency is added only for XPath 1.0 test-cases.

In Zorba's case we should set 'xpath-1.0-compatibility' dependency to 'false' since we only care about running XQuery test-cases.

Revision history for this message
Sorin Marian Nasoi (sorin.marian.nasoi) wrote :

The linked branch is fixing the problems.

Changed in zorba:
status: In Progress → Fix Committed
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.