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

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 UTC