Migrate from GitHub to SourceForge with this tool. Check out all of SourceForge's recent improvements.
Close

#21 XPathNodeTracker sometimes loses nodes

closed-fixed
nobody
None
5
2006-11-10
2004-10-14
Erik Wright
No

Given the document:

<partner_manager>
<error code="..."/>
</partner_manager>

If you try to get the XPath string after visiting the
<error/> tag, it is /error[1] instead of
'/partner_manager[1]/error[1]'

This is due to an off-by-one in XpathNodeTracker. I
have attached a patch to XpathNodeTracker and a new
Unit Test to detect regression.

To illustrate the bug, first just patch the unit tests,
verify that mine fails, then patch XpathNodeTracker and
verify that the unit test succeeds.

The patch is done against the 1.0 distribution.

Thanks for a great tool!

Discussion

  • Erik Wright

    Erik Wright - 2004-10-14

    patch against 1.0 distribution

     
  • Stefan Bodewig

    Stefan Bodewig - 2006-11-10
    • status: open --> closed-fixed
     
  • Stefan Bodewig

    Stefan Bodewig - 2006-11-10

    Logged In: YES
    user_id=113148

    fixed in CVS, thanks.

     

Log in to post a comment.