[prev in list] [next in list] [prev in thread] [next in thread]
List: slide-user
Subject: RE: DASL Search for files with a particular file extension
From: "Martin, Tammy \(US SSA\)" <tammy.martin () baesystems ! com>
Date: 2005-07-22 22:12:23
Message-ID: 436A69503F99214D9EBC27415F66C40C054DFC8A () blums0008 ! sd ! gd ! com
[Download RAW message or body]
Thanks. :-)
-----Original Message-----
From: Guido Casper [mailto:gcasper@s-und-n.de]
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 gcasper@s-und-n.de
Web http://www.s-und-n.de
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic