Julian Reschke wrote:
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
I would be happy, if it would just work with the Slide Server for now.
But even with Slide assuming that filename=displayname is a problem,
because the displayname is not updated when a client renames the
resource (MOVE method).
Edmund
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]