Project

General

Profile

This project is closed and read-only.

Actions

Backport #6307

closed

REXML parser does not parse valid XML (The 'xml' prefix must not be bound to any other namespace)

Backport #6307: REXML parser does not parse valid XML (The 'xml' prefix must not be bound to any other namespace)

Added by studnev (Aleksey Studnev) over 14 years ago. Updated over 14 years ago.

Status:
Closed
[ruby-core:44397]

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

publisher.owl (1.03 KB) publisher.owl studnev (Aleksey Studnev), 04/17/2012 06:39 AM
Actions

Also available in: PDF Atom