Ticket #175 (new defect)
Opened 8 months ago
problem with baseparser.rb
| Reported by: | lars.wittmar | Owned by: | ser |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Other | Version: | 3.1.7 |
| Severity: | normal | Keywords: | |
| Cc: | Ruby version: | Other | |
| Operating system: | Linux |
Description
Hello,
First my versions
ruby -vrrexml/rexml -e 'p REXML::VERSION,PLATFORM' ruby 1.8.7 (2008-08-11 patchlevel 72) [i586-linux] "3.1.7.2" "i586-linux"
I tried to use wsdl2ruby (from soap4r) with a minimal wsdl file
<?xml version='1.0' encoding='utf-8'?> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xml="http://www.w3.org/XML/1998/namespace" > </wsdl:definitions>
and got the following error
F, [2010-01-16T12:15:41.554627 #4788] FATAL -- app: Detected an exception. Stopping ... The 'xml' prefix must not be bound to any other namespace (http://www.w3.org/TR/REC-xml-names/#ns-decl)
this error comes from ../rexml/parsers/baseparser.rb (line 368) there is a check if the xml prefix is set properly.
attrs.each { |a,b,c,d,e|
if b == "xmlns"
if c == "xml"
#changed for debug
puts "Value of b: "+b
puts "Value of c: "+c
puts "Value of d: "+d
puts "Value of e: "+e
#end
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 )
end
and here is the output after my changes
Value of b: xmlns Value of c: xml Value of d: " Value of e: http://www.w3.org/XML/1998/namespace F, [2010-01-16T12:29:20.223423 #4879] FATAL -- app: Detected an exception. Stopping ... The 'xml' prefix must not be bound to any other namespace (http://www.w3.org/TR/REC-xml-names/#ns-decl)
after changing the if-clause from
if d != "http://www.w3.org/XML/1998/namespace"
to
if e != "http://www.w3.org/XML/1998/namespace"
everything works perfect.
Hopefully someone can verify that bug (or tell me that I'm an idiot ;-))
Thanks in advance
Lars
Note: See
TracTickets for help on using
tickets.
