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 3696 - K-GenCompEq-23
Summary: K-GenCompEq-23
Status: CLOSED INVALID
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: 1.0
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Andrew Eisenberg
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-09-11 09:47 UTC by Tim Mills
Modified: 2006-09-11 10:49 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2006-09-11 09:47:05 UTC
Under the normalization rules specified in formal semantics, the query:

(xs:anyURI("example.com/"), 
 1, 
 QName("example.com", "ncname"), 
 false(), 
 xs:hexBinary(\"FF\")) 
  = 
(xs:anyURI("example.com/NOT\), 
 0, 
 QName("example.com", "p:ncname"), 
 true(), 
 xs:hexBinary(\"EF\"))

expands to:

some $v1 in fn:data(([Expr1]Expr)) satisfies
  some $v2 in fn:data(([Expr2]Expr)) satisfies
    let $u1 := fs:convert-operand($v1, $v2) return
      let $u2 := fs:convert-operand($v2, $v1) return
        fs:eq($u1, $u2)

Now:

"When evaluating a general comparison in which either operand is a sequence of items, an implementation may return true as soon as it finds an item in the first operand and an item in the second operand that have the required magnitude relationship. Similarly, a general comparison may raise a dynamic error as soon as it encounters an error in evaluating either operand, or in comparing a pair of items from the two operands. As a result of these rules, the result of a general comparison is not deterministic in the presence of errors."

Since fs:eq is only defined when the two arguments have the same type, the comparison may result in a type checking error, which should be reflected in the expected results of this test.

Is there an argument for the following:

some $v1 in fn:data(([Expr1]Expr)) satisfies
  some $v2 in fn:data(([Expr2]Expr)) satisfies
    let $u1 := fs:convert-operand($v1, $v2) return
      let $u2 := fs:convert-operand($v2, $v1) return
        (if fs:eq is defined on type($u1), type($u2)
         then false
         else fs:eq($u1, $u2))

?
Comment 1 Tim Mills 2006-09-11 10:32:40 UTC
Please ignore.  

The test does expect a type checking error.