Thanks for the heads up! I'll keep an eye on it. BTW, I'm using WebLogic. -----Original Message----- From: Julian Reschke [mailto:[EMAIL PROTECTED] Sent: Thursday, February 24, 2005 10:45 AM To: Slide Users Mailing List Subject: Re: howto search by filename? with DASL??
John Gilbert wrote: > I just did this last week. Here is the xml. > > public List find(String name) { > String thepath = "/slide/files"; > String query2 = "<D:searchrequest xmlns:D =\"DAV:\">" > + "<D:basicsearch>" + "<D:select>" + > "<D:prop>" > + "<D:displayname/>" + > "<D:path/>" > + "</D:prop>" + "</D:select>" > + "<D:from>" + "<D:scope>" + "<D:href>" > + thepath > + "</D:href>" + > "<D:depth>infinity</D:depth>" > + "</D:scope>" + "</D:from>" > + "<D:where>" > + "<D:eq>" > + "<D:prop>" > + "<D:displayname/>" > + "</D:prop>" > + "<D:literal>" + name + "</D:literal>" > + "</D:eq>" > + "</D:where>" > + "</D:basicsearch>" + > "</D:searchrequest>"; > return searchMethod(query2, thepath); > } > > The key was using <D:eq> with property <D:displayname>. > The search method is pretty much straight from the example on the wiki. > ... Hm. DAV:displayname is not the "filename" (or the last URI segment); it's just a property that may or may not be present. The assumption that it's the same as the last URI segment is very fragile and will not work with many servers. Julian -- <green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]