Uploaded image for project: 'Xerces2-J'
  1. Xerces2-J
  2. XERCESJ-1127

TreeWalkerImpl - getNextSibling() implementation problem

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 2.7.1
    • 2.8.0
    • None
    • OS : Windows

    Description

      Using a home-made DOM implementation, a problem has been raised while using the Xerces TreeWalker.
      One of our test consists in traversing the same XML file using Xerces alone and Xerces with our DOM implementation at the same time. Each result of the getNextSibling() method is compared to verify that the result is the same.
      In this test, we experienced a problem since we did not have the same results.

      I found the problem in the TreeWalkerImpl class at line 315. At this line two nodes are compared with the '==' operator. Though it works fine when using Xerces by itself, it does not work when another DOM implementation is used. By replacing this operator by the 'isSameNode' method, we obtain valid results.

      Attachments

        Activity

          People

            mrglavas@ca.ibm.com Michael Glavassevich
            mrjeje Jérôme Candat
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: