Thanks. :-) -----Original Message----- From: Guido Casper [mailto:[EMAIL PROTECTED] Sent: Wednesday, July 20, 2005 11:20 PM To: Slide Users Mailing List Subject: Re: DASL Search for files with a particular file extension
Martin, Tammy (US SSA) wrote: > Hi all, > > I am trying to write a DASL Search query to search for files on the > server with a particular file extension. I am able to search for content > like the example at http://wiki.apache.org/jakarta-slide/DASLSearch . > > However, when I try to modify this query to find a file extension the > query does not work. Here is one of the versions of the query: > > String path = webdavStorageAreaPath; > String fileExtQuery = > "<D:searchrequest xmlns:D =\"DAV:\">" + > "<D:basicsearch>" + > "<D:select>" + > "<D:prop>" + > "<D:getcontentlength/>" + > "</D:prop>" + > "</D:select>" + > "<D:from>" + > "<D:scope>" + > "<D:href>" + path + "</D:href>" + > "<D:depth>infinity</D:depth>" + > "</D:scope>" + > "</D:from>" + > "<D:where>" + > "<D:eq>" + "<D:prop>" + "<D:displayname/>" + > "</D:prop>" + > "<D:literal>" + "*.txt" + "</D:literal>" + "</D:eq>" + > "</D:where>" + > "</D:basicsearch>" + > "</D:searchrequest>"; > > Does anyone know how to set up a query for all files with a certain > extension? Also where is the documentation for what properties are > available and how or can wildcards be used? Any help that you could > provide would be greatly appreciated. The DASL spec defines a like operator: http://greenbytes.de/tech/webdav/draft-reschke-webdav-search-07.html#rfc.section.5.15 which however is not supported by Slide. You may want to use Slide's proprietary: <D:where> <SLIDE:propcontains xmlns:SLIDE="http://jakarta.apache.org/slide/"> <D:prop><D:displayname/></D:prop> <D:literal>.txt</D:literal> </SLIDE:propcontains> </D:where> HTH Guido -- Freundliche Grüße / With kind regards Guido Casper S&N AG Competence Center Open Source Klingenderstr. 5 D 33100 Paderborn voice +49 5251/1581-87 fax +49 5251/1581-71 eMail [EMAIL PROTECTED] Web http://www.s-und-n.de --------------------------------------------------------------------- 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]