DASL Protocol (rev 00)
April 1, 1998
Saveen Reddy
Introduction
- This is a straw-man
- The protocol elements are not endorsed, but only serve as a target for discussion
- The protocol involves a new method, a new header, and some XML
Relationship to HTTP and DAV
- DASL is an application of HTTP/1.1
- DASL depends on DAV resource and property model
- The HTTP/1.1 protocol is not altered
- DAV functionality is not altered
The Basic Client-Server Interaction
- A client invokes the SEARCH method; includes a text/xml query.
- The server responds with a text/xml result set.
The SEARCH Method
- SEARCH initiates a server-side search.
- The text/xml body of the request defines the query.
- A successful response is a text/xml entity matching the PROPFIND response.
- Semantics are in the query not in the SEARCH method
The Request-URI as Search Arbiter
- The Request-URI is the Arbiter: a resource that searches on behalf of the client
- No implicit relation to scope (relationship, if any, explicitly defined by grammar)
- Allows for multiple, unrelated scopes in one invocation
The Response : PROPFIND
- If successful, the server responds with a 217 Multistatus matching the PROPFIND response
- Queries may add to the PROPFIND response but not remove elements or alter it structure
Example: the basic form
- SEARCH / HTTP/1.1
Host: ryu.com
Content-Type: text/xml
Content-Length: xxxxx
<?xml version="1.0"?>
<?xml:namespace name="DAV:" as="D"?>
<D:searchrequest>
<D:type>DAV:simplesearch</D:type>
<D:query> … </D:query>
</D:searchrequest>
The searchrequest XML Elements
- dav:searchrequest contains a dav:type and dav:query
- dav:type - identifies the kind of query
- dav:query - the actual query
Search Grammar Discovery : OPTIONS
- The OPTIONS method allows the client to discover if a resource supports the SEARCH method.
- Response includes the DASL header … identifies the search grammars supported by that resource.
OPTIONS Request Example
- OPTIONS /somefolder HTTP/1.1
Connection: Close
Host: ryu.com
OPTIONS Response Example
- HTTP/1.1 200 OK
Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE, MKCOL, PROPFIND, PROPPATCH, LOCK, UNLOCK, SEARCH
DASL: <http://foo.bar.com/syntax1> <http://akuma.com/syntax2>
The dav:simplesearch grammar
- The dav:simplesearch is an XML-based syntax
- has several components, each an XML element, that defines the query.
- Dav:select defines the result record.
- Dav:from defines the scope of the query.
- Dav: where defines the criteria for a resource to contribute to the search result.
Example
This query will recursively retrieve the content length values for all resources located under the server's "/container1/" URI namespace whose length exceeds 10000.
<d:searchrequest>
<d:select> <d:props> <d:getcontentlength/></d:props>
</d:select>
<d:from>
<d:scopelist> <d:scope> <d:uri>/container1/</d:uri>
<d:depth>infinite</d:depth> </d:scope> </d:scopelist>
</d:from>
<d:where> <d:expr> <d:term> <d:gt>
<d:value> <d:prop><d:getcontentlength/></d:prop>
</d:value>
<d:value><d:literal>10000</d:literal></d:value>
</d:gt> </d:term> </d:expr>
</d:where>
</d:searchrequest>
low-fat Example
This query will recursively retrieve the content length values for all resources located under the server's "/container1/" URI namespace whose length exceeds 10000.
<d:searchrequest>
<d:select> <d:props> <d:getcontentlength/></d:props>
</d:select>
<d:from>
<d:scope> <d:uri>/container1/</d:uri>
<d:depth>infinite</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:searchrequest>
The dav:select XML Element
- either dav:props or dav:allprops
- (Just like PROPFIND)
The dav:from XML element
- The from element defines the scope of the search.
- Cotnains dav:scopelist a list of dav:scope elements
- Each dav:scope contains a dav:depth and dav:uri elements
The where XML Element
- The where element defines the search criteria
- Contains dav:expr elements
- dav:expr elements can be combined with dav:and dav:or and dav:not
- each dav:expr contains dav:term (an assertion)
Assertions for dav:term
dav:contains - contains an optional dav:prop and a dav:phrase
dav:lt, dav:lte, dav:gt, dav:gte
dav:eq , dav:neq
Each argument to an assertion is a dav:value: one of dav:prop or dav:literal
dav:contains example
- Targets text resources that contain the phrase "telecommunications industry".
<term>
<contains>
<value>
<literal>telecommunications industry</literal>
</value>
</contains>
</term>
another dav:contains example
- Targets documents where the foo:author property contains the word "Smith".
<term>
<contains>
<prop><foo:author/></prop>
<value><literal>Smith</literal></value>
</contains>
</term>
Issues not covered
- Typing
- Versioning
- Security Considerations
- Authentication
- Internationalized Content