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

[Bug 5671] [F&O] Type promotion in fn:min and fn:max

From: <bugzilla@farnsworth.w3.org>
Date: Wed, 30 Apr 2008 13:59:26 +0000
To: public-qt-comments@w3.org
Message-Id: <E1JrCqE-0007RJ-Lh@farnsworth.w3.org>


           Summary: [F&O] Type promotion in fn:min and fn:max
           Product: XPath / XQuery / XSLT
           Version: Candidate Recommendation
          Platform: PC
        OS/Version: Windows NT
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Functions and Operators
        AssignedTo: mike@saxonica.com
        ReportedBy: oliver@cbcl.co.uk
         QAContact: public-qt-comments@w3.org

The summary for fn:min/fn:max says:
Selects an item from the input sequence $arg whose value is [less/greater] than
or equal to the value of every other item in the input sequence

However further down in their summaries:
This function returns an item from the converted sequence rather than the input

Could this be worded more clearly.

Reading the rules for promotion:
Numeric and xs:anyURI values are converted to the least common type that
supports the [le/ge] operator by a combination of type promotion and subtype 

>From reading this I would say that if your input is a single value of type
xs:unsignedShort, then you would return a value of type xs:integer, as this is
"the least common type that supports the [le/ge] operator"; however the XQTS
test K2-SeqMINFunc-15 seems to disagree with me here.  What is the correct
Received on Wednesday, 30 April 2008 14:00:01 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 16:57:22 UTC