From dce607fed7dedb720157ef767f92e390aaf960af Mon Sep 17 00:00:00 2001 From: Rasmus Erik Voel Jensen Date: Fri, 17 Jun 2011 10:40:59 +0200 Subject: [PATCH 1/2] updated library dependency from xmlbeans-2.2.0 to xmlbeans-2.5.0, such that it compiles out-of-the-box (xmlbeans-2.5.0 was no longer at apache.org) --- xmlimplsrc/build.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xmlimplsrc/build.xml b/xmlimplsrc/build.xml index 15535b85e9..8f9276ef12 100644 --- a/xmlimplsrc/build.xml +++ b/xmlimplsrc/build.xml @@ -147,7 +147,7 @@ @@ -157,8 +157,8 @@ - - + + From d522956171853fc2d7ca106d9c8d2b93e82df9d3 Mon Sep 17 00:00:00 2001 From: Rasmus Erik Voel Jensen Date: Fri, 17 Jun 2011 10:55:50 +0200 Subject: [PATCH 2/2] bug#577141 "Exception is thrown when setting a named namespace on an XML-object" - added testcase and solution from bug-report --- testsrc/jstests/577141.jstest | 4 ++++ xmlimplsrc/org/mozilla/javascript/xmlimpl/QName.java | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 testsrc/jstests/577141.jstest diff --git a/testsrc/jstests/577141.jstest b/testsrc/jstests/577141.jstest new file mode 100644 index 0000000000..b3fc843597 --- /dev/null +++ b/testsrc/jstests/577141.jstest @@ -0,0 +1,4 @@ +var ns = new Namespace( "dc", "http://purl.org/dc/elements/1.1" ); +var x = new XML( "" ); +x.setNamespace( ns ); +"success"; diff --git a/xmlimplsrc/org/mozilla/javascript/xmlimpl/QName.java b/xmlimplsrc/org/mozilla/javascript/xmlimpl/QName.java index d4cb149451..7c124c8b87 100644 --- a/xmlimplsrc/org/mozilla/javascript/xmlimpl/QName.java +++ b/xmlimplsrc/org/mozilla/javascript/xmlimpl/QName.java @@ -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 {