Ticket #61 (closed defect: fixed)

Opened 3 years ago

Last modified 2 years ago

problem with xpath

Reported by: anonymous Owned by: ser
Priority: normal Milestone: 3.1.6
Component: XPath Version: 3.1.3
Severity: normal Keywords:
Cc: Ruby version: 1.8.2
Operating system: All

Description

xpath queries are getting invalid hits. i have a unit test and sample data file. where can i attach them?

using 3.1.4

Attachments

rexml_unit_test.rb (0.6 kB) - added by bret@… 3 years ago.
unit test
xpath_bug.xml (33.7 kB) - added by bret@… 3 years ago.
sample data file

Change History

Changed 3 years ago by bret@…

unit test

Changed 3 years ago by bret@…

sample data file

Changed 3 years ago by bret@…

files are attached

Changed 3 years ago by tobiaslidskog@…

  • os changed from Windows to All

A partial fix is to change starts_with and contains in functions.rb to the following:

def Functions::starts_with( string, test )
  string(string).index(string(test)) == 0 rescue false
end

def Functions::contains( string, test )
  string(string).include? string(test) rescue false
end

string(string) may return nil, that's why we need the rescue

Changed 2 years ago by ser

  • status changed from new to assigned

In progress.

Changed 2 years ago by ser

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

Fixed by the changes to xpath_parser in changeset:1235.

Note: See TracTickets for help on using tickets.