draft-reddy-dasl-protocol-02.txt

 

 

 

Aug 25, 1998

Saveen Reddy

SEARCH Request

SEARCH / HTTP/1.1

Host: ryu.com

Content-Type: text/xml

Connection: Close

Content-Length: xxx

<?xml version="1.0"?>

<?xml:namespace ns="DAV:" prefix="D"?>

<?xml:namespace ns="FOO:" prefix="F"?>

<D:searchrequest>

<F:bar>

yadda yadda yadda

</F:bar>

</D:searchrequest>

DAV:simplesearch Grammar

Example Query : Request

retrieves DAV:getcontentlength for everthing in "/container1/" that is bigger than 10K.

<d:searchrequest>

<d:simplesearch>

<d:select><d:prop><d:getcontentlength/></d:prop></d:select>

<d:from>

<d:scope><d:href>/container1/</d:href><d:depth>infinity</d:depth></d:scope>

</d:from>

<d:where>

<d:gt>

<d:prop><d:getcontentlength/></d:prop><d:literal>10000</d:literal>

</d:gt>

</d:where>

<d:sortby>

<d:order><d:prop><d:getcontentlength/><d:prop><d:ascending/>

</d:order>

</d:sortby>

</d:simplesearch>

</d:searchrequest>

Example: Testing for Equality

The example shows a single operator (DAV:eq) applied in the criteria.

<d:where>

<d:eq>

<d:prop> <d:getcontentlength/> </d:prop>

<d:literal> 100 </d:literal>

</d:eq>

</d:where>

Relative Comparisons

... For those resources that are "image/gifs" over 4K in size.

<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>

Sorting

first by last name of the author, and then by size, in descending order, so that the briefest works appear first.

<d:sortby>

<d:order>

<d:prop><r:lastname/></d:prop>

<d:ascending/>

</d:order>

<d:order>

<d:prop><d:getcontentlength/></d:prop>

<d:descending/>

</d:order>

</d:sortby>

DAV:iscollection

This example shows a search criterion that picks out all and only the resources in the scope that are collections.

<D:where>

<D:eq>

<D:prop><D:iscollection></D:prop>

<D:literal>1<D:literal>

</D:eq>

</D:where>

Query Grammar Discover Request

OPTIONS /somefolder HTTP/1.1

Connection: Close

Host: ryu.com

Query Grammar Support Response

HTTP/1.1 200 OK

Date: Tue, 20 Jan 1998 20:52:29 GMT

Connection: close

Accept-Ranges: none

Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE, MKCOL, PROPFIND, PROPPATCH, LOCK, UNLOCK, SEARCH

Public: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE, MKCOL, PROPFIND, PROPPATCH, LOCK, UNLOCK, SEARCH

DASL: <http://foo.bar.com/syntax1>

DASL: <http://akuma.com/syntax2>

Query Schema Discovery Request

SEARCH / HTTP/1.1

Host: recipes.com

Content-Type: application/xml

Connection: Close

Content-Length: 257

<?xml version="1.0"?>

<?xml:namespace ns="DAV:" prefix="D"?>

<D:searchrequest>

<D:simplesearch>

<D:select>

<D:queryschema/>

</D:select>

<D:from><D:scope><D:href>http://recipes.com</d:href></D:scope></D:from>

</D:simplesearch>

</D:searchrequest>

 

Query Schema Discovery Response

...Inside a Multistatus response...

<D:simplesearchschema>

<D:properties>

<D:propdesc>

<D:prop><D:getcontentlength/></D:prop>

<D:datatype><t:int></D:datatype>

<D:searchable/><D:selectable/><D:sortable/>

</D:propdesc>

<D:propdesc>

<D:prop><J:fstop/></D:prop>

<D:selectable/>

</D:propdesc>

</D:properties>

<D:operators>

<D:opdesc><D:isnull/><D:operand_property/></D:opdesc> <D:opdesc><D:like/><D:operand_property/><D:operand_literal/></D:opdesc>

</D:operators>

</D:simplesearchschema>