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 4244 - Static typing of K2-StringEqual-1 to 6
Summary: Static typing of K2-StringEqual-1 to 6
Status: CLOSED FIXED
Alias: None
Product: XML Query Test Suite
Classification: Unclassified
Component: XML Query Test Suite (show other bugs)
Version: unspecified
Hardware: PC Windows XP
: P2 normal
Target Milestone: ---
Assignee: Frans Englich
QA Contact: Mailing list for public feedback on specs from XSL and XML Query WGs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-01-17 08:41 UTC by Tim Mills
Modified: 2007-01-22 09:01 UTC (History)
0 users

See Also:


Attachments

Description Tim Mills 2007-01-17 08:41:49 UTC
In static typing implementations, declarations such as:

declare variable $vA as xs:string := ("B STRING", current-time(), string(<e>cont
ent</e>))[1];

may fail because under the FS typing rules, the RHS is typed as the union type ( xs:string | xs:time ).

(:*******************************************************:)
(: Test: K2-StringEqual-1                                :)
(: Written by: Frans Englich                             :)
(: Date: 2007-01-15T15:15:44+01:00                       :)
(: Purpose: Compare two values returned from fn:lower-case(). :)
(:*******************************************************:)
declare variable $vA as xs:string := ("B STRING", current-time(), string(<e>cont
ent</e>))[1];
declare variable $vB as xs:string := ("b string", current-time(), string(<e>cont
ent</e>))[1];
(lower-case($vA) eq lower-case($vB))
Comment 1 Tim Mills 2007-01-17 08:45:30 UTC
K2-GenCompEq-1 to 6 fail in a similar way.
Comment 2 Tim Mills 2007-01-17 12:29:48 UTC
K2-compareFunc-4 to 9 have a similar problem.
Comment 3 Tim Mills 2007-01-17 12:32:13 UTC
K2-CodepointEqual-1 to 6 also have this problem.
Comment 4 Tim Mills 2007-01-17 12:52:11 UTC
... and K2-ContainsFunc-1 to 6
Comment 5 Nick Jones 2007-01-19 14:06:23 UTC
Not identical, but a similar problem in K2-SeqSubsequenceFunc-1 with:

declare variable $start as xs:integer := (current-time(), 2)[2];
declare variable $len as xs:integer := (current-time(), 1)[2];
Comment 6 Frans Englich 2007-01-21 12:45:54 UTC
A fix has been attempted in CVS, and XQTS_current.zip has been updated to contain the new change. If it can be verified that the change is correct, it would be appreciated.

If this resolution is satisfiable, feel free to change status to closed. Otherwise, reopen this report. If no opinion on the resolution is expressed within two weeks, I will change status to closed.

This change to this report was part of a batch-change of several reports.
Comment 7 Tim Mills 2007-01-22 09:01:43 UTC
These are all now fixed.  THanks.