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. -----Original Message----- From: Edmund Urbani [mailto:[EMAIL PROTECTED] Sent: Thursday, February 24, 2005 9:51 AM To: slide-user@jakarta.apache.org Subject: howto search by filename? with DASL?? Hi all! I'm new to this list and I wanted to search the archive first, but all I get is: "VelocityServlet: Error processing the template" "null: Got error 127 from table handler" followed by a stack trace. Ok. Now my actual question: I'm currently working trying to add some Slide WebDAV repository search features to an application. I found DASL, the search method and basicsearch grammar. searching for content (DAV:contains) seems to work, but... how do I search for resources simply by their name? preferably with wildcards? there seems to be no property for the filename (only displayname) and the DAV:like operator is not implemented - at least not in slide 2.1. so, is there a way to do this on the server side? searching through the whole repository on the client side seems like a REALLY bad idea as far as performance is concerned. Edmund --------------------------------------------------------------------- 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]