Ticket #103 (closed defect: fixed)

Opened 16 months ago

Last modified 13 months ago

XPath query on attribute value fails when namespaces are present

Reported by: phallix Owned by: ser
Priority: normal Milestone: 3.1.8
Component: XPath Version: 3.1.6
Severity: normal Keywords:
Cc: Ruby version: Other
Operating system: MacOS

Description

I'm new to REXML (and Ruby) so I hope I haven't simply done something stupid.

When I use an XPath expression that looks for specific attribute values, ie. "link[@rel='alternate']" I don't get any results. I found that if I strip the namespaces from the root element, then it works. Unit test attached.

Attachments

rexml_xpath_attribute_query.rb (2.8 kB) - added by phallix 16 months ago.
Demonstrates the bug - one test passes and the other fails

Change History

Changed 16 months ago by phallix

Demonstrates the bug - one test passes and the other fails

Changed 13 months ago by ser

  • milestone set to 3.1.8

Changed 13 months ago by ser

  • status changed from new to assigned

Changed 13 months ago by ser

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

This appears to have been fixed by another ticket. The supplied unit test has been added, by changeset:1279.

Note: See TracTickets for help on using tickets.