[ruby-trunk - Bug #5956][Open] rexml - パース時のnamespaceチェックでのエラーについて

Issue #5956 has been reported by Miho Hiramatsu.


Bug #5956: rexml - パース時のnamespaceチェックでのエラーについて
https://bugs.ruby-lang.org/issues/5956

Author: Miho Hiramatsu
Status: Open
Priority: Normal
Assignee:
Category: lib
Target version: 1.9.3
ruby -v: ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]

添付のプログラムを実行すると以下のエラーとなります。
(実行環境:CentOS6)

The ‘xml’ prefix must not be bound to any other namespace
(http://www.w3.org/TR/REC-xml-names/#ns-decl)
Line: 7
Position: 477

XMLデータ内の以下の記述に対して、
xmlns:xml=“http://www.w3.org/XML/1998/namespace
「属性"xmlns:xml"のnamespaceが"http://www.w3.org/XML/1998/namespace"でなければエラーとする」というチェックを
/rexml/parsers/baseparser.rb line:386付近
で実行しているようですが、以下は誤りではないでしょうか。

[baseparser.rbのline:386付近を抜粋]
…略
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 )
end
…略

if d != “http://www.w3.org/XML/1998/namespace

本来"d"ではなく"e"と比較すべきではないでしょうか。

Issue #5956 has been updated by Kouhei S…

Status changed from Assigned to Closed
% Done changed from 0 to 100

r34419 で修正しました!

再現コードがあってとても助かりました!
ありがとうございます!

Bug #5956: rexml - パース時のnamespaceチェックでのエラーについて
https://bugs.ruby-lang.org/issues/5956

Author: Miho Hiramatsu
Status: Closed
Priority: Normal
Assignee: Kouhei S.
Category: lib
Target version: 1.9.3
ruby -v: ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]

添付のプログラムを実行すると以下のエラーとなります。
(実行環境:CentOS6)

The ‘xml’ prefix must not be bound to any other namespace
(http://www.w3.org/TR/REC-xml-names/#ns-decl)
Line: 7
Position: 477

XMLデータ内の以下の記述に対して、
xmlns:xml=“http://www.w3.org/XML/1998/namespace
「属性"xmlns:xml"のnamespaceが"http://www.w3.org/XML/1998/namespace"でなければエラーとする」というチェックを
/rexml/parsers/baseparser.rb line:386付近
で実行しているようですが、以下は誤りではないでしょうか。

[baseparser.rbのline:386付近を抜粋]
…略
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 )
end
…略

if d != “http://www.w3.org/XML/1998/namespace

本来"d"ではなく"e"と比較すべきではないでしょうか。

Issue #5956 has been updated by Kouhei S…

Status changed from Open to Assigned
Assignee set to Kouhei S.


Bug #5956: rexml - パース時のnamespaceチェックでのエラーについて
https://bugs.ruby-lang.org/issues/5956

Author: Miho Hiramatsu
Status: Assigned
Priority: Normal
Assignee: Kouhei S.
Category: lib
Target version: 1.9.3
ruby -v: ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]

添付のプログラムを実行すると以下のエラーとなります。
(実行環境:CentOS6)

The ‘xml’ prefix must not be bound to any other namespace
(http://www.w3.org/TR/REC-xml-names/#ns-decl)
Line: 7
Position: 477

XMLデータ内の以下の記述に対して、
xmlns:xml=“http://www.w3.org/XML/1998/namespace
「属性"xmlns:xml"のnamespaceが"http://www.w3.org/XML/1998/namespace"でなければエラーとする」というチェックを
/rexml/parsers/baseparser.rb line:386付近
で実行しているようですが、以下は誤りではないでしょうか。

[baseparser.rbのline:386付近を抜粋]
…略
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 )
end
…略

if d != “http://www.w3.org/XML/1998/namespace

本来"d"ではなく"e"と比較すべきではないでしょうか。

Issue #5956 has been updated by Miho Hiramatsu.

了解です。
最新のスナップショットで問題が発生しないことを確認しました。
すぐの対応ありがとうございました。

Bug #5956: rexml - パース時のnamespaceチェックでのエラーについて
https://bugs.ruby-lang.org/issues/5956

Author: Miho Hiramatsu
Status: Closed
Priority: Normal
Assignee: Kouhei S.
Category: lib
Target version: 1.9.3
ruby -v: ruby 1.9.3p0 (2011-10-30 revision 33570) [i686-linux]

添付のプログラムを実行すると以下のエラーとなります。
(実行環境:CentOS6)

The ‘xml’ prefix must not be bound to any other namespace
(http://www.w3.org/TR/REC-xml-names/#ns-decl)
Line: 7
Position: 477

XMLデータ内の以下の記述に対して、
xmlns:xml=“http://www.w3.org/XML/1998/namespace
「属性"xmlns:xml"のnamespaceが"http://www.w3.org/XML/1998/namespace"でなければエラーとする」というチェックを
/rexml/parsers/baseparser.rb line:386付近
で実行しているようですが、以下は誤りではないでしょうか。

[baseparser.rbのline:386付近を抜粋]
…略
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 )
end
…略

if d != “http://www.w3.org/XML/1998/namespace

本来"d"ではなく"e"と比較すべきではないでしょうか。