IBM Support

PM41710: THE RESULT OF THE FN:MIN OR FN:MAX FUNCTION IN XSLT, XQUERY OR XQUERY SHOULD BE THE LEAST COMMON TYPE REACHABLE

Subscribe

You can track all active APARs for this component.

 

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:  Users of the XML API for IBM WebSphere      *
    *                  Application Server V8.0                     *
    ****************************************************************
    * 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 8.0.0.1.  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

    PM41710

  • Reported component name

    WEBSPHERE APP S

  • Reported component ID

    5724J0800

  • Reported release

    800

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-06-15

  • Closed date

    2011-06-15

  • Last modified date

    2011-06-28

  • APAR is sysrouted FROM one or more of the following:

    PM32166

  • APAR is sysrouted TO one or more of the following:

Fix information

  • Fixed component name

    WEBSPHERE APP S

  • Fixed component ID

    5724J0800

Applicable component levels

  • R800 PSY

       

[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"8.0","Line of Business":{"code":"LOB45","label":"Automation"}}]

Document Information

Modified date:
27 October 2021