W3C home > Mailing lists > Public > public-qt-comments@w3.org > July 2008

[Bug 5671] [FO] Type promotion in fn:min and fn:max

From: <bugzilla@wiggum.w3.org>
Date: Sat, 19 Jul 2008 08:56:03 +0000
To: public-qt-comments@w3.org
Message-Id: <E1KK8EV-0006jd-A4@wiggum.w3.org>

http://www.w3.org/Bugs/Public/show_bug.cgi?id=5671





--- Comment #10 from Michael Kay <mike@saxonica.com>  2008-07-19 08:56:03 ---
>But if we say "numeric and xs:anyURI values are converted to the least common type
reachable by a combination of type promotion and subtype substitution",
then we'll look at just the xs:anyURI values, convert them to a common type
(some subtype of xs:anyURI, possibly xs:anyURI itself), and leave the
xs:string values untouched.

My reading of "least common type" was "least common type of all the items in
the input sequence", not "least common type among the numeric and xs:anyURI
values". As you say, that latter reading wouldn't make sense.

>"All items in $arg must be
numeric or derived from a single base type for which the ge/le operator is
defined", it fails, because the xs:anyURI values and xs:string values are
not derived from a single base type. [I'm assuming that where it says
"$arg", it actually means "converted sequence", otherwise other things
happen.]

I think that where it says $arg, it means $arg, and that it fails to capture
the effective equivalence of xs:anyURI and xs:string.

>It's odd that we would require values of two subtypes of xs:integer to be
converted to a common type (because they're numeric values), but not
require values of two subtypes of (say) xs:date to be converted to a common
type. Wouldn't it be correct to say that *all* values are converted to a
common type, not just numerics and xs:anyURI?

Yes, it's a bit odd, but not odd enough to require a 1.0 change that will
impact existing implementations.

>And it's odd that we say "Duration values must either all be
xs:yearMonthDuration values or must all be xs:dayTimeDuration values",
since surely that's implied

It's not unusual, unfortunately, for the F+O spec to say things more than once
in different ways.


-- 
Configure bugmail: http://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
Received on Saturday, 19 July 2008 08:56:36 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Saturday, 19 July 2008 08:56:38 GMT