Ticket #79 (closed defect: fixed)
name selection does not work with numbers
| Reported by: | kkalmbach | Owned by: | ser |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1.7 |
| Component: | XPath | Version: | 3.1.3 |
| Severity: | normal | Keywords: | |
| Cc: | Ruby version: | 1.8.2 | |
| Operating system: | Windows |
Description
In this test, I the first test case (select using a "c" named test) works fine.
In the second case, I can not select using a "c" named 3. I tried with and without the quotes around c.
class MyTester < Test::Unit::TestCase
def testNumberNames
source = "<a><b><c>test</c></b><b><c>3</c></b></a>"
d = REXML::Document.new( source )
r = REXML::XPath.match( d, %q{/a/b[c='test']} )
assert_equal(1, r.size())
r = REXML::XPath.match( d, %q{/a/b[c='3']} )
assert_equal(1, r.size())
end
end
Here are my version #'s
["3.1.4", "1.8.4", "2006-04-14"] REXML version = 3.1.4 Loaded suite REXML
Change History
Note: See
TracTickets for help on using
tickets.
