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 4465 - K2-SeqExprCast-52 et seq
Summary: K2-SeqExprCast-52 et seq
Status: RESOLVED 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-04-13 10:32 UTC by Michael Kay
Modified: 2007-05-23 09:20 UTC (History)
0 users

See Also:


Attachments

Description Michael Kay 2007-04-13 10:32:44 UTC
The correct result of

K2-SeqExprCast-52
K2-SeqExprCast-53
K2-SeqExprCast-54
K2-SeqExprCast-55
K2-SeqExprCast-58
K2-SeqExprCast-59
K2-SeqExprCast-60
K2-SeqExprCast-61

hinges on whether types such as unsignedInt allow the lexical forms "-0" and "+0".

This is something of an old chestnut. In the past there were ambiguities in F+O. I believe that F+O now states unambiguously that if the string is in the lexical space of the data type (after whitespace fudging, which isn't relevant here), then it's OK. So the answer lies in Schema Part 2.

Schema Part 2 says in section 3.3.22.1: "unsignedInt has a lexical representation consisting of a finite-length sequence of decimal digits (#x30-#x39). For example: 0, 1267896754, 100000.", and this appears to disallow a sign.

However, there is nothing in the schema for schemas that disallows a sign, and the text at the top of section 3.3 says: "the complete definitions of the ·built-in·  ·derived· datatypes are provided in Appendix A Schema for Datatype Definitions (normative) (§A)." By implication the textual descriptions of the types in section 3.3 are incomplete.

So I believe that the S4S wins, and that "-" and "+" are therefore allowed in the lexical space.
Comment 1 Andrew Eisenberg 2007-04-24 21:45:33 UTC
I wouldn't say that S4S wins, but that Schema 1.0 is ambiguous on this point.

A look at the most recent draft of Schema 1.1 Part 2: Datatypes, 3.4.21 unsignedLong, however, shows the following:

"unsignedLong has a lexical representation consisting of an optional sign followed by a finite-length sequence of decimal digits (#x30-#x39). If the sign is omitted, the positive sign ('+') is assumed. If the sign is present, it must be '+' except for lexical forms denoting zero, which may be preceded by a positive ('+') or a negative ('-') sign. For example: 0, 12678967543233, 100000."

Similar text exists for the other unsigned numeric types. With this additional information, I feel that +0 and -0 should be allowed.
Comment 2 Michael Kay 2007-04-24 21:54:33 UTC
>followed by a finite-length sequence of decimal digits...

Must remember to add the test case that shows that infinite-length sequences are rejected ;-)
Comment 3 Frans Englich 2007-05-23 09:20:51 UTC
Yes, should be fixed in CVS, by allowing - & +.

I'm working on a test case for testing that infinite-length sequences are rejected, but, phew, I doubt I'll make it to the next release..