Uploaded image for project: 'XalanJ2'
  1. XalanJ2
  2. XALANJ-2294

XSLTC does not handle the key or id functions correctly when multiple input documents are involved

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7
    • 2.7.1
    • DTM, XSLTC
    • None

    Description

      The implementation of the key and id functions in XSLTC assumes that there is only one input document. When more than one input document is involved, the functions should return nodes only in the same document as the context node. However, XSLTC ends up to put all the matching nodes with a particular key value or all the nodes with the same ID value in the same table, regardless of the source document. The table entries are DTM node identifiers, rather than node handles, so it's not possible to tell which document they actually came from. When either function is evaluated, it will treat all the node identifiers as if they represented nodes in the same document as the context node, so they might return seemingly random nodes or even produce an ArrayIndexOutOfBoundsException.

      Attachments

        1. j2294.out
          2 kB
          Henry Zongaro
        2. j2294.xml
          0.8 kB
          Henry Zongaro
        3. j2294.xsl
          2 kB
          Henry Zongaro
        4. j2294a.xml
          0.9 kB
          Henry Zongaro
        5. j2294b.xml
          1 kB
          Henry Zongaro

        Activity

          People

            zongaro@ca.ibm.com Henry Zongaro
            zongaro@ca.ibm.com Henry Zongaro
            Christine Li Christine Li
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: