IBM Support

IZ97552: RESULT OF XSLT COUNT FUNCTION IS ALWAYS ONE IF THE ARGUMENT IS A NODELIST RETURNED FROM AN EXTENSION FUNCTION

Subscribe

You can track all active APARs for this component.

 

APAR status

  • Closed as program error.

Error description

  • Error Message: N/A
    .
    Stack Trace: N/A
    .
    

Local fix

  • The user could switch to using the XSLT interpreter, or the user
    could write a named template that uses recursion to count the
    number of nodes in the NodeList instead of using the count
    function.
    

Problem summary

  • If an extension function returns a NodeList, the result of
    applying the count function to that result is always one when
    using the XSLT compiling processor.  This affects some extension
    functions supplied by the XSLT processor, including the EXSLT
    string:tokenize and string:split extension functions.
    

Problem conclusion

  • This defect will be fixed in:
    6.0.0 SR9 FP2
    .
    The XSLT processor uses an object called a cursor to represent a
    node set along with its position and size.  In the case of a
    NodeList returned by an extension function, the processor uses
    one cursor for each DOM Node in the NodeList, and then a "proxy"
    cursor that contains an array holding each of those individual
    cursor objects.  As the processor iterates through nodes in the
    node set represented by the proxy cursor, the proxy cursor
    positions itself at successive cursor objects in its array, and
    the proxy cursor delegates certain operations - such as
    retrieving the string value of the node, or children of the node
    - to the cursor object at which the proxy is currently
    positioned.
    The problem was that the proxy cursor delegated the count
    operation to the cursor object at which it was positioned, so it
    returned the number of nodes in the node set represented by the
    first DOM Node in the returned NodeList, which is always one in
    this case.
    The problem was resolved by changing the proxy cursor class's
    implementation of the count function to compute the sum of the
    number of nodes in each cursor in its array.
    .
    To obtain the fix:
    Install build 20110512 or later
    

Temporary fix

Comments

APAR Information

  • APAR number

    IZ97552

  • Reported component name

    XML/XSL

  • Reported component ID

    620700126

  • Reported release

    600

  • Status

    CLOSED PER

  • PE

    NoPE

  • HIPER

    NoHIPER

  • Special Attention

    NoSpecatt

  • Submitted date

    2011-04-01

  • Closed date

    2011-05-11

  • Last modified date

    2011-05-11

  • 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/XSL

  • Fixed component ID

    620700126

Applicable component levels

  • R600 PSY

       UP

[{"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSCVQ3V","label":"XML"},"Component":"","ARM Category":[],"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"6.0","Edition":"","Line of Business":{"code":"","label":""}}]

Document Information

Modified date:
11 May 2011