APAR status
Closed as program error.
Error description
If the first argument to fn:min or fn:max is a sequence of numeric values, all values should be converted to their least common type reachable by subtype substitution and promotion. The result is the item in the sequence with the minimum or maximum value, respectively. The result of the function is an item from the converted sequence. Thus, if the first argument is a sequence of values of type xs:short or a mixture of values of type xs:short and xs:byte, the result should be a value of xs:short - the least common type reachable by subtype substitution. If the first argument is a sequence of values of a particular subtype of xs:dateTime, the result should be a value of that particular subtype. The processor is instead always promoting the result of the function to xs:integer, xs:decimal, xs:float, xs:double, xs:date, xs:dateTime, xs:time, xs:dayTimeDuration, xs:yearMonthDuration or xs:boolean.
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: All IBM WebSphere Application Server Feature* * Pack for XML users * **************************************************************** * PROBLEM DESCRIPTION: The processor always promotes the * * result of the fn:min or fn:max * * function to one of the built-in types * * xs:integer, xs:decimal, xs:float, * * xs:double, xs:date, xs:dateTime, * * xs:time, xs:dayTimeDuration, * * xs:yearMonthDuration or xs:boolean. * **************************************************************** * RECOMMENDATION: Install a fix pack that contains this APAR. * **************************************************************** The implementations of the fn:min and fn:max functions iterate over the sequence of items in the first argument, and keep track of the least and greatest values, respectively, as well as whether the least or greatest such value is an instance of the type xs:integer, xs:decimal, xs:float, xs:double, xs:date, and so on. However, the implementations of those functions do not keep track of the actual type annotation of that least or greatest value, which might be a subtype of one those of types. After it finishes iterating over the sequence of items, the functions return the least or greatest value as an instance of the type that the implementation kept track of through the process of iterating. If the argument was a sequence of items of type xs:short, for instance, the result of the function is an instance of xs:integer, rather than the required type, xs:short.
Problem conclusion
The problem was resolved by having the implementations of the fn:min and fn:max functions keep track of the least and greatest values in the first argument both with and without its type annotation. The value without the type annotation can be used in a comparison operation more efficiently, than the value that has the type annotation associated with it. If a value of type xs:integer or xs:decimal has to be promoted to xs:float or xs:double, or a value of type xs:float has to be promoted to xs:double, the implementations of the fn:min and fn:max functions use that value with the promoted type instead of the original type annotation of that item in the sequence. After it finishes iterating over the sequence of items, the function returns the least or greatest value in the first argument along with its type annotation, which will ensure that the fn:max or fn:min function returns a result whose type is the least common type reachable by subtype substitution and promotion. The fix for this APAR is currently targeted for inclusion in fix pack 1.0.0.9. Please refer to the Recommended Updates page for delivery information: http://www.ibm.com/support/docview.wss?rs=180&uid=swg27004980
Temporary fix
Comments
APAR Information
APAR number
PM32166
Reported component name
XML FEATUREPACK
Reported component ID
5724J0856
Reported release
700
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt
Submitted date
2011-02-08
Closed date
2011-04-15
Last modified date
2011-04-15
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
XML FEATUREPACK
Fixed component ID
5724J0856
Applicable component levels
R700 PSY
UP
[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SUPPORT","label":"IBM Worldwide Support"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"1.0","Edition":"","Line of Business":{"code":"","label":""}}]
Document Information
Modified date:
09 February 2022