I think your patch is ok. :)  Thank you for your patch...    
( I think we have had the exactly same bug report like you though... ^^; 
http://www.mail-archive.com/[email protected]/msg03806.html )
I think I will do this weekend... I'm sorry for my laziness...  always...  :(


BTW,
the slide client doesn't handle the multiple namespaces right now.
We have had this issue couple weeks ago... 
I've found some information talked about namspaces on the server and
client side with the keyword, "muliple namespace".
I think we have one aleady... in org.apache.util.XMLPrinter2?
It seems to be a proper common part to handle the multiple namespaces
(They are with QName, NSStack and NSDecl(?)...)
Have you, or anyone tested to adapt it through DAV methods?
(I haven't... even though there is a testsuite src/tests/client --; )
Or JDOM supports this behavior totally? ( I dunno --; )  I wonder it...


----- Original Message ----- 
From: "Lars Thielemann" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, July 09, 2002 10:54 PM
Subject: Fix for PropfindMethod.java (Webdav Client Lib)


Hi,

Slide cannot handle empty namspaces in propfindMethod. This is a fix for
the problem.


Fix based on version slide 1.0.16:

    public String generateQuery() {
    [...]

        case BY_NAME:
            printer.writeElement("D", "prop", XMLPrinter.OPENING);
            for (int i=3D0 ; i<propertyNames.length ; i++)
            {
                String namespace =3D propertyNames[i].getNamespaceURI();
                String localname =3D propertyNames[i].getLocalName();
                if ("DAV:".equals(namespace)) {
                    printer.writeElement("D", localname,
XMLPrinter.NO_CONTENT);
                } else if (namespace.length() =3D=3D 0) {
                    printer.writeElement(null, null, localname,
XMLPrinter.NO_CONTENT); =20
                }=20
                else {
                    printer.writeElement("ZZ", namespace, localname ,
XMLPrinter.NO_CONTENT);
                }
            }
            printer.writeElement("D", "prop", XMLPrinter.CLOSING);
            break;
        }


Regards,

Lars

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>



Reply via email to