Actions
Backport #6307
closedREXML parser does not parse valid XML (The 'xml' prefix must not be bound to any other namespace)
Status:
Closed
Assignee:
Description
Attached is an example file which is not parsed by REXML parser, generating an error:
The 'xml' prefix must not be bound to any other namespace (http://www.w3.org/TR/REC-xml-names/#ns-decl)
The problem is in these following lines:
attrs.each { |a,b,c,d,e|
if b == "xmlns"
if c == "xml"
if d != "http://www.w3.org/XML/1998/namespace"
msg = "The 'xml' prefix must not be bound to any other namespace "+
"(http://www.w3.org/TR/REC-xml-names/#ns-decl)"
raise REXML::ParseException.new( msg, @source, self )
There is a description of this problem also in: https://rails.lighthouseapp.com/projects/8994/tickets/3701-bug-in-baseparserrb
Files
Updated by mame (Yusuke Endoh) about 12 years ago
- Tracker changed from Bug to Backport
- Project changed from Ruby master to Backport193
- Status changed from Open to Assigned
- Assignee set to naruse (Yui NARUSE)
This is already fixed at r34419 in trunk.
Moving to backport tracker.
Thanks,
--
Yusuke Endoh mame@tsg.ne.jp
Updated by naruse (Yui NARUSE) about 12 years ago
- Status changed from Assigned to Closed
- % Done changed from 0 to 100
This issue was solved with changeset r35365.
Aleksey, thank you for reporting this issue.
Your contribution to Ruby is greatly appreciated.
May Ruby be with you.
merge revision(s) 34419: [Backport #6307]
* lib/rexml/parsers/baseparser.rb, test/rexml/test_namespace.rb:
fix the default xml namespace URI validation.
[ruby-dev:45169] [Bug #5956]
Reported by Miho Hiramatsu. Thanks!!!
Actions
Like0
Like0Like0