Ticket #118 (closed defect: duplicate)

Opened 14 months ago

Last modified 12 months ago

XPath search with attribute fails after item with xmlns attribute

Reported by: AlexF Owned by: ser
Priority: normal Milestone:
Component: DOM Version: 3.1.6
Severity: normal Keywords:
Cc: Ruby version: 1.8.5
Operating system: Windows

Description

When searching using an XPath with a, @attribute or @attribute='xxx' expression, fails to find elements which are beneath a parent with an xmlns attribute. See attached test case; removing the "xmlns" attribute causes all tests to pass.

I don't understand xml namespaces in XPath well enough to understand whether one or other is correct, but I did think that namespaces applied to elements, not attributes. If this as per-spec, sorry for the noise.

This is a change between version 3.1.3 (as shipped with ruby-1.8.4) where this wasn't a problem (all would pass), and 3.1.6 (shipped with 1.8.6).

Similar to ticket #39?

Attachments

maybe_rexml_bug.rb (1.0 kB) - added by AlexF 14 months ago.
Test case for XMLNS + XPath/@attribute expression

Change History

Changed 14 months ago by AlexF

Test case for XMLNS + XPath/@attribute expression

Changed 12 months ago by rubys

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

Dupe of ticket #102

Note: See TracTickets for help on using tickets.