Ticket #1 (closed defect: wontfix)
REXML::Document.new() raises REXML::ParseException
| Reported by: | Agt | Owned by: | ser |
|---|---|---|---|
| Priority: | normal | Milestone: | 3.1.4 |
| Component: | DOM | Version: | 3.1 |
| Severity: | normal | Keywords: | |
| Cc: | Ruby version: | 1.8.2 | |
| Operating system: | Linux |
Description (last modified by ser) (diff)
REXML::Document.new doesn't accept "<a x:foo='1' y:foo='2'/>" for some reason :(
$ irb
irb(main):001:0> require 'rexml/document'
=> true
irb(main):002:0> REXML::Document.new "<a foo='3' x:foo='1'
y:foo='2'/>"
=> <UNDEFINED> ... </>
irb(main):003:0> REXML::Document.new "<a foo='3'/>"
=> <UNDEFINED> ... </>
irb(main):004:0> REXML::Document.new "<a x:foo='1' y:foo='2'/>"
REXML::ParseException: #<REXML::ParseException: Namespace
conflict in adding attribute "foo": Prefix "x" = "" and prefix "y" = "">
/usr/local/lib/ruby/1.8/rexml/element.rb:1094:in `[]='
/usr/local/lib/ruby/1.8/rexml/element.rb:280:in `add_element'
/usr/local/lib/ruby/1.8/rexml/element.rb:279:in `each'
/usr/local/lib/ruby/1.8/rexml/element.rb:279:in `add_element'
/usr/local/lib/ruby/1.8/rexml/document.rb:88:in `add_element'
/usr/local/lib/ruby/1.8/rexml/parsers/treeparser.rb:28:in `parse'
/usr/local/lib/ruby/1.8/rexml/document.rb:176:in `build'
/usr/local/lib/ruby/1.8/rexml/document.rb:45:in `initialize'
(irb):4:in `new'
(irb):4:in `irb_binding'
/usr/local/lib/ruby/1.8/irb/workspace.rb:52:in `irb_binding'
/usr/local/lib/ruby/1.8/irb/workspace.rb:52
...
Namespace conflict in adding attribute "foo": Prefix "x" =
"" and prefix "y" = "
"
Line:
Position:
Last 80 unconsumed characters:
from
/usr/local/lib/ruby/1.8/rexml/parsers/treeparser.rb:85:in `parse'
from
/usr/local/lib/ruby/1.8/rexml/document.rb:176:in `build'
from /usr/local/lib/ruby/1.8/rexml/document.rb:45:in `initialize'
from (irb):4:in `new'
from (irb):4
Change History
Note: See
TracTickets for help on using
tickets.
