Issue #14093 has been updated by kou (Kouhei Sutou).

Status changed from Assigned to Rejected

`/a/b/name()` is an invalid [`LocationPath`](https://www.w3.org/TR/xpath/#NT-LocationPath). `LocationPath` is consists of [`Step`](https://www.w3.org/TR/xpath/#NT-Step)s. You can't use `name()` as `Step`. Because `name()` isn't [`NodeTest`](https://www.w3.org/TR/xpath/#NT-NodeTest).


----------------------------------------
Bug #14093: REXML doesn't implement name() and interprets nam() as an element path.
https://bugs.ruby-lang.org/issues/14093#change-67777

* Author: jcavalieri (John Cavalieri)
* Status: Rejected
* Priority: Normal
* Assignee: kou (Kouhei Sutou)
* Target version: 
* ruby -v: 2.4.2
* Backport: 2.3: UNKNOWN, 2.4: UNKNOWN
----------------------------------------
Please see the attached script.

Considering this xml:
<a><b><name/></b></a>

The xpath '/a/b/name()' xpath should return the name of element 'a'. Instead it returns the child element 'name'.

Output:
<name/>

---Files--------------------------------
bug_script.rb (371 Bytes)


-- 
https://bugs.ruby-lang.org/

Unsubscribe: <mailto:ruby-core-request / ruby-lang.org?subject=unsubscribe>
<http://lists.ruby-lang.org/cgi-bin/mailman/options/ruby-core>