Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: antchfx/xpath
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v1.3.5
Choose a base ref
...
head repository: antchfx/xpath
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v1.3.6
Choose a head ref
  • 5 commits
  • 5 files changed
  • 3 contributors

Commits on Nov 9, 2025

  1. Fix chained predicates on ancestor axis

    The XPath expression with chained predicates on the ancestor axis was not
    working correctly. For example:
      //*[@itemprop="author"][ancestor::*[@itemscope][1][@itemtype="Comment"]]
    
    This expression should find all elements with @itemprop="author" whose first
    @itemscope ancestor has @itemtype="Comment". However, it was returning 0
    results instead of the expected elements.
    
    Root cause:
    1. ancestorQuery.table (deduplication table) was persisting across Evaluate()
       calls, preventing ancestors from being found for subsequent input contexts.
    2. filterQuery.positmap (position map) was not being reset during Evaluate(),
       causing position tracking to be incorrect when the same predicate query was
       reused for multiple input nodes.
    
    Fix:
    - Reset ancestorQuery.table to nil in Evaluate() to ensure clean state for
      each evaluation
    - Reset filterQuery.positmap to nil in Evaluate() to ensure clean state for
      each evaluation
    
    These changes ensure that when a predicate query is evaluated multiple times
    (once for each candidate node), the internal state is properly reset, allowing
    the query to work correctly for each evaluation.
    
    💁 Unit test by Mislav
    🤖 Implementation by [Claude Code](https://claude.com/claude-code)
    
    Co-Authored-By: Claude <noreply@anthropic.com>
    mislav and claude committed Nov 9, 2025
    Configuration menu
    Copy the full SHA
    02c01b0 View commit details
    Browse the repository at this point in the history

Commits on Nov 10, 2025

  1. Merge PR #119

    zhengchun committed Nov 10, 2025
    Configuration menu
    Copy the full SHA
    3cbab97 View commit details
    Browse the repository at this point in the history

Commits on Feb 13, 2026

  1. Fix last() predicate on grouped expressions

    When evaluating expressions like (//author)[last()], the last() function
    was counting sibling nodes per-parent instead of counting the total nodes
    in the grouped result set. This caused incorrect matches when group
    members came from different parent nodes.
    
    The fix ensures that b.firstInput is always set to the groupQuery in the
    nodeGroup case, and adds handling for *groupQuery in the lastFuncQuery
    conversion, using a cloned query to avoid consuming the shared input.
    
    Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
    mislav and claude committed Feb 13, 2026
    Configuration menu
    Copy the full SHA
    c92c3eb View commit details
    Browse the repository at this point in the history

Commits on Feb 14, 2026

  1. Merge PR #120

    zhengchun committed Feb 14, 2026
    Configuration menu
    Copy the full SHA
    a8ced8f View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2026

  1. fix #121

    zhengchun committed Feb 21, 2026
    Configuration menu
    Copy the full SHA
    afd4762 View commit details
    Browse the repository at this point in the history
Loading