Ticket #60 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

XPath.each does not match numeric values

Reported by: jakub.jarvenpaa@… Owned by: ser
Priority: normal Milestone: 3.1.6
Component: XPath Version: 3.1.3
Severity: normal Keywords:
Cc: Ruby version: 1.8.0
Operating system: Linux

Description

require "rexml/document"
document = REXML::Document.new("<a><b>A</b><b>1</b></a>")
REXML::XPath.each(document, '//b[.="A"]') { |match| puts match }
REXML::XPath.each(document, '//b[.="1"]') { |match| puts match }

The first "each" line matches <b>A</b>, but the second one does not match <b>1</b>, as it should.

Change History

Changed 2 years ago by ser

  • status changed from new to closed
  • resolution set to fixed

Fixed by changeset:1199. The fix was provided by Alex LeDonne?, who also provided an excellent unit test.

Note: See TracTickets for help on using tickets.