Commit 9640216
authored
Fix XPath self axis nodeset position (#336)
Self axis should create nodesets that each node have position=1
```ruby
Nokogiri::XML('<a><b/><c/><d/></a>').xpath('a/*/self::*[1]').map(&:name)
# => ["b", "c", "d"]
REXML::XPath.match(REXML::Document.new('<a><b/><c/><d/></a>'),'a/*/self::*[1]')
#=> [<b/>] (master, rexml-3.4.4)
#=> [<b/>, <c/>, <d/>] (this PR)
```1 parent a6aa43c commit 9640216
2 files changed
Lines changed: 7 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
199 | 199 | | |
200 | 200 | | |
201 | 201 | | |
202 | | - | |
| 202 | + | |
203 | 203 | | |
204 | 204 | | |
205 | 205 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
276 | 276 | | |
277 | 277 | | |
278 | 278 | | |
| 279 | + | |
| 280 | + | |
| 281 | + | |
| 282 | + | |
| 283 | + | |
| 284 | + | |
279 | 285 | | |
280 | 286 | | |
281 | 287 | | |
| |||
0 commit comments