Skip to content

Commit

Permalink
bug#577141 "Exception is thrown when setting a named namespace on an …
Browse files Browse the repository at this point in the history
…XML-object" - added testcase and solution from bug-report
  • Loading branch information
Rasmus Erik Voel Jensen committed Jun 17, 2011
1 parent dce607f commit d522956
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions testsrc/jstests/577141.jstest
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
var ns = new Namespace( "dc", "http://purl.org/dc/elements/1.1" );
var x = new XML( "<something/>" );
x.setNamespace( ns );
"success";
2 changes: 1 addition & 1 deletion xmlimplsrc/org/mozilla/javascript/xmlimpl/QName.java
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@ QName newQName(XMLLibImpl lib, String q_uri, String q_localName, String q_prefix
}
XmlNode.Namespace ns = null;
if (q_prefix != null) {
ns = XmlNode.Namespace.create(q_uri, q_prefix);
ns = XmlNode.Namespace.create(q_prefix, q_uri);
} else if (q_uri != null) {
ns = XmlNode.Namespace.create(q_uri);
} else {
Expand Down

0 comments on commit d522956

Please sign in to comment.