hi remy,
In order for us to build an xml search string of the format
<D:where>
<D:and>
<D:eq>
<D:prop> <D:getcontenttype/> </D:prop>
<D:literal> image/gif </D:literal>
</D:eq>
<D:gt>
<D:prop> <D:getcontentlength/> </D:prop>
<D:literal> 4096 </D:literal>
</D:gt>
</D:and>
</D:where>
for DAV:basicsearch ,in what format would a client need to specify the query
criteria
which we could use to build a xml string like above. Do you have any ideas
on this?
thanks,
rajkumar
-----Original Message-----
From: Remy Maucherat [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 04, 2001 11:01 AM
To: [EMAIL PROTECTED]
Subject: Re: multiple PUT operations
> hi remy,
> Following is the piece of code
> from the class org.apache.slide.webdav.method.PropFindMethod
>
> revisionDescriptor = content.retrieve(slideToken,
>
revisionDescriptors);
> isCollection = isCollection(revisionDescriptor);
> String path = object.getUri();
> String absoluteUri = URLDecode(req.getRequestURI());
> String relativePath = requestUri;
>
> String toAppend = "";
> if (relativePath.length() <= path.length()) {
> toAppend = path.substring(relativePath.length());
> if ((!absoluteUri.endsWith("/")) &&
> (!toAppend.startsWith("/"))) {
> toAppend = "/" + toAppend;
> }
> if (toAppend.equals("/")) {
> toAppend = "";
> }
> }
>
> What is the need for the if condition "relativePath.length() <=
> path.length()" .
> Under what circumstances does the relative path's length lesser than the
> path's length.
> Can you please give me an example of when this condition would become
true.
The path generation code is bit messy, but appears to be working ok. It
could use some cleanup, though :)
Here, I think it's to avoid some case involving trailing '/' ...
Remy