This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 2587 - fn:deep-equal()
Summary: fn:deep-equal()
Status: CLOSED INVALID
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 0.8.2
Hardware: PC Linux
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-12 16:15 UTC by Martin Probst
Modified: 2005-12-16 16:15 UTC (History)
1 user (show)

See Also:


Attachments

Description Martin Probst 2005-12-12 16:15:09 UTC
I'm not sure if this is indeed a bug in the test suite, the spec or in my
understanding of the spec ...

fn-deep-equal-mix-args-011 and fn-deep-equal-mix-args-012 do a deep-equal
between strings and anyURIs. 
a) Type promotion will not take place as the expected arguments of the 
   function deep-equal() are item()* - correct?
b) Comparison is done using the eq operator, which does no type promotion.
   According to http://www.w3.org/TR/xquery/#mapping there is no mapping for the
   eq operator on xs:anyURI and xs:string

It's probably not what's intended, but to my reading the spec mandates to return
false to something like "fn:deep-equal( xs:anyURI("www.example.com") ,
"www.example.com")"
Comment 1 Andrew Eisenberg 2005-12-16 16:04:34 UTC
I believe that xs:anyURI to xs:string promotion is defined in a section just
prior to the one that you cited, http://www.w3.org/TR/xquery/#promotion. This
section says, in part, the following:

"URI type promotion: A value of type xs:anyURI (or any type derived by
restriction from xs:anyURI) can be promoted to the type xs:string."

As such, I believe that this test case is correct as is.

Please close this bug report if you agree with this resolution.



Comment 2 Martin Probst 2005-12-16 16:15:51 UTC
Indeed, that's another exception from the rule.