You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Jay Freeman (saurik)" <sa...@saurik.com> on 2001/02/26 02:04:51 UTC

PATCH: DeferredAttrNSImpl fails to set xmlns's URI

I was trying to get xml-soap working yesterday, and was having extreme
difficulty with their ServiceManagerClient object being unable to resolve
the namespaces of XSI types that were passed back.  At first I thought it
was a SOAP problem, but after adding various checks to the code I finally
noticed that Xerces wasn't setting the standard URI for the xmlns prefix.  I
finally managed to track it down to this simple fix:

Index: java/src/org/apache/xerces/dom/DeferredAttrNSImpl.java
===================================================================
RCS file:
/home/cvspublic/xml-xerces/java/src/org/apache/xerces/dom/DeferredAttrNSImpl
.java,v
retrieving revision 1.11
diff -u -r1.11 DeferredAttrNSImpl.java
--- java/src/org/apache/xerces/dom/DeferredAttrNSImpl.java      2001/01/12
00:10:22     1.11
+++ java/src/org/apache/xerces/dom/DeferredAttrNSImpl.java      2001/02/26
01:00:04
@@ -157,7 +157,7 @@
        // to be bound to "http://www.w3.org/2000/xmlns/"
        // So as long as the XML parser doesn't do it, it needs to
        // done here.
-       if (namespaceURI == null) {
+       if (namespaceURI == null || namespaceURI.equals("")) {
            if (prefix != null)  {
                if (prefix.equals("xmlns")) {
                    namespaceURI = "http://www.w3.org/2000/xmlns/";

Sincerely,
Jay Freeman (saurik)
saurik@saurik.com <ma...@saurik.com>


Re: PATCH: DeferredAttrNSImpl fails to set xmlns's URI

Posted by Arnaud Le Hors <le...@us.ibm.com>.
Damn it, I wish I saw this message earlier. That's the problem when you
get too much email you inevitably miss some important messages. I
actually tracked this very same problem and fixed it right after you
sent your message.
Anyway, just so you know you didn't get ignored... The fix is in CVS.
-- 
Arnaud  Le Hors - IBM Cupertino, XML Strategy Group

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-j-dev-help@xml.apache.org