7Network Working Group J. Reschke, Ed.
8Request for Comments: 5323 greenbytes
9Category: Standards Track S. Reddy
18 Web Distributed Authoring and Versioning (WebDAV) SEARCH
22 This document specifies an Internet standards track protocol for the
23 Internet community, and requests discussion and suggestions for
24 improvements. Please refer to the current edition of the "Internet
25 Official Protocol Standards" (STD 1) for the standardization state
26 and status of this protocol. Distribution of this memo is unlimited.
30 Copyright (c) 2008 IETF Trust and the persons identified as the
31 document authors. All rights reserved.
33 This document is subject to BCP 78 and the IETF Trust's Legal
34 Provisions Relating to IETF Documents (http://trustee.ietf.org/
35 license-info) in effect on the date of publication of this document.
36 Please review these documents carefully, as they describe your rights
37 and restrictions with respect to this document.
41 This document specifies a set of methods, headers, and properties
42 composing Web Distributed Authoring and Versioning (WebDAV) SEARCH,
43 an application of the HTTP/1.1 protocol to efficiently search for DAV
44 resources based upon a set of client-supplied criteria.
58Reschke, et al. Standards Track [Page 1]
60RFC 5323 WebDAV SEARCH November 2008
65 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 4
66 1.1. DASL . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
67 1.2. Relationship to DAV . . . . . . . . . . . . . . . . . . . 4
68 1.3. Terms . . . . . . . . . . . . . . . . . . . . . . . . . . 5
69 1.4. Notational Conventions . . . . . . . . . . . . . . . . . . 6
70 1.5. Note on Usage of 'DAV:' XML Namespace . . . . . . . . . . 7
71 1.6. An Overview of DASL at Work . . . . . . . . . . . . . . . 7
72 2. The SEARCH Method . . . . . . . . . . . . . . . . . . . . . . 7
73 2.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 7
74 2.2. The Request . . . . . . . . . . . . . . . . . . . . . . . 8
75 2.2.1. The Request-URI . . . . . . . . . . . . . . . . . . . 8
76 2.2.2. The Request Body . . . . . . . . . . . . . . . . . . . 8
77 2.3. The Successful 207 (Multistatus) Response . . . . . . . . 9
78 2.3.1. Result Set Truncation . . . . . . . . . . . . . . . . 9
79 2.3.2. Extending the PROPFIND Response . . . . . . . . . . . 10
80 2.3.3. Example: A Simple Request and Response . . . . . . . . 10
81 2.3.4. Example: Result Set Truncation . . . . . . . . . . . . 11
82 2.4. Unsuccessful Responses . . . . . . . . . . . . . . . . . . 12
83 2.4.1. Example of an Invalid Scope . . . . . . . . . . . . . 12
84 3. Discovery of Supported Query Grammars . . . . . . . . . . . . 13
85 3.1. The OPTIONS Method . . . . . . . . . . . . . . . . . . . . 13
86 3.2. The DASL Response Header . . . . . . . . . . . . . . . . . 14
87 3.3. DAV:supported-query-grammar-set (Protected) . . . . . . . 14
88 3.4. Example: Grammar Discovery . . . . . . . . . . . . . . . . 15
89 4. Query Schema Discovery: QSD . . . . . . . . . . . . . . . . . 17
90 4.1. Additional SEARCH Semantics . . . . . . . . . . . . . . . 17
91 4.1.1. Example of Query Schema Discovery . . . . . . . . . . 18
92 5. The DAV:basicsearch Grammar . . . . . . . . . . . . . . . . . 19
93 5.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 19
94 5.2. The DAV:basicsearch DTD . . . . . . . . . . . . . . . . . 20
95 5.2.1. Example Query . . . . . . . . . . . . . . . . . . . . 22
96 5.3. DAV:select . . . . . . . . . . . . . . . . . . . . . . . . 23
97 5.4. DAV:from . . . . . . . . . . . . . . . . . . . . . . . . . 23
98 5.4.1. Relationship to the Request-URI . . . . . . . . . . . 23
99 5.4.2. Scope . . . . . . . . . . . . . . . . . . . . . . . . 24
100 5.5. DAV:where . . . . . . . . . . . . . . . . . . . . . . . . 24
101 5.5.1. Use of Three-Valued Logic in Queries . . . . . . . . . 24
102 5.5.2. Handling Optional Operators . . . . . . . . . . . . . 24
103 5.5.3. Treatment of NULL Values . . . . . . . . . . . . . . . 24
104 5.5.4. Treatment of Properties with Mixed/Element Content . . 25
105 5.5.5. Example: Testing for Equality . . . . . . . . . . . . 25
106 5.5.6. Example: Relative Comparisons . . . . . . . . . . . . 25
107 5.6. DAV:orderby . . . . . . . . . . . . . . . . . . . . . . . 26
108 5.6.1. Example of Sorting . . . . . . . . . . . . . . . . . . 26
109 5.7. Boolean Operators: DAV:and, DAV:or, and DAV:not . . . . . 26
110 5.8. DAV:eq . . . . . . . . . . . . . . . . . . . . . . . . . . 27
114Reschke, et al. Standards Track [Page 2]
116RFC 5323 WebDAV SEARCH November 2008
119 5.9. DAV:lt, DAV:lte, DAV:gt, DAV:gte . . . . . . . . . . . . . 27
120 5.10. DAV:literal . . . . . . . . . . . . . . . . . . . . . . . 27
121 5.11. DAV:typed-literal (Optional) . . . . . . . . . . . . . . . 28
122 5.11.1. Example for Typed Numerical Comparison . . . . . . . . 28
123 5.12. Support for Matching xml:lang Attributes on Properties . . 29
124 5.12.1. DAV:language-defined (Optional) . . . . . . . . . . . 29
125 5.12.2. DAV:language-matches (Optional) . . . . . . . . . . . 29
126 5.12.3. Example of Language-Aware Matching . . . . . . . . . . 29
127 5.13. DAV:is-collection . . . . . . . . . . . . . . . . . . . . 30
128 5.13.1. Example of DAV:is-collection . . . . . . . . . . . . . 30
129 5.14. DAV:is-defined . . . . . . . . . . . . . . . . . . . . . . 30
130 5.15. DAV:like . . . . . . . . . . . . . . . . . . . . . . . . . 30
131 5.15.1. Syntax for the Literal Pattern . . . . . . . . . . . . 31
132 5.15.2. Example of DAV:like . . . . . . . . . . . . . . . . . 31
133 5.16. DAV:contains . . . . . . . . . . . . . . . . . . . . . . . 31
134 5.16.1. Result Scoring (DAV:score Element) . . . . . . . . . . 32
135 5.16.2. Ordering by Score . . . . . . . . . . . . . . . . . . 33
136 5.16.3. Examples . . . . . . . . . . . . . . . . . . . . . . . 33
137 5.17. Limiting the Result Set . . . . . . . . . . . . . . . . . 33
138 5.17.1. Relationship to Result Ordering . . . . . . . . . . . 33
139 5.18. The 'caseless' XML Attribute . . . . . . . . . . . . . . . 34
140 5.19. Query Schema for DAV:basicsearch . . . . . . . . . . . . . 34
141 5.19.1. DTD for DAV:basicsearch QSD . . . . . . . . . . . . . 34
142 5.19.2. DAV:propdesc Element . . . . . . . . . . . . . . . . . 35
143 5.19.3. The DAV:datatype Property Description . . . . . . . . 35
144 5.19.4. The DAV:searchable Property Description . . . . . . . 36
145 5.19.5. The DAV:selectable Property Description . . . . . . . 36
146 5.19.6. The DAV:sortable Property Description . . . . . . . . 36
147 5.19.7. The DAV:caseless Property Description . . . . . . . . 36
148 5.19.8. The DAV:operators XML Element . . . . . . . . . . . . 37
149 5.19.9. Example of Query Schema for DAV:basicsearch . . . . . 38
150 6. Internationalization Considerations . . . . . . . . . . . . . 39
151 7. Security Considerations . . . . . . . . . . . . . . . . . . . 39
152 7.1. Implications of XML External Entities . . . . . . . . . . 39
153 8. Scalability . . . . . . . . . . . . . . . . . . . . . . . . . 40
154 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 40
155 9.1. HTTP Headers . . . . . . . . . . . . . . . . . . . . . . . 40
156 9.1.1. DASL . . . . . . . . . . . . . . . . . . . . . . . . . 40
157 10. Contributors . . . . . . . . . . . . . . . . . . . . . . . . . 41
158 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 41
159 12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 41
160 12.1. Normative References . . . . . . . . . . . . . . . . . . . 41
161 12.2. Informative References . . . . . . . . . . . . . . . . . . 42
162 Appendix A. Three-Valued Logic in DAV:basicsearch . . . . . . . . 44
163 Appendix B. Candidates for Future Protocol Extensions . . . . . . 45
164 B.1. Collation Support . . . . . . . . . . . . . . . . . . . . 45
165 B.2. Count . . . . . . . . . . . . . . . . . . . . . . . . . . 46
166 B.3. Diagnostics for Unsupported Queries . . . . . . . . . . . 46
170Reschke, et al. Standards Track [Page 3]
172RFC 5323 WebDAV SEARCH November 2008
175 B.4. Language Matching . . . . . . . . . . . . . . . . . . . . 46
176 B.5. Matching Media Types . . . . . . . . . . . . . . . . . . . 46
177 B.6. Query by Name . . . . . . . . . . . . . . . . . . . . . . 46
178 B.7. Result Paging . . . . . . . . . . . . . . . . . . . . . . 46
179 B.8. Search Scope Discovery . . . . . . . . . . . . . . . . . . 47
180 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 47
186 This document defines Web Distributed Authoring and Versioning
187 (WebDAV) SEARCH, an application of HTTP/1.1 forming a lightweight
188 search protocol to transport queries and result sets that allows
189 clients to make use of server-side search facilities. It is based on
190 earlier work done in the IETF DASL Working Group (see Section 10).
191 In this specification, the terms "WebDAV SEARCH" and "DASL" are used
194 DASL minimizes the complexity of clients so as to facilitate
195 widespread deployment of applications capable of utilizing the DASL
200 o the SEARCH method and the request/response formats defined for it
203 o feature discovery through the "DASL" response header and the
204 optional DAV:supported-grammar-set property (Section 3),
206 o optional grammar schema discovery (Section 4), and
208 o one mandatory grammar: DAV:basicsearch (Section 5).
2101.2. Relationship to DAV
212 DASL relies on the resource and property model defined by [RFC4918].
213 DASL does not alter this model. Instead, DASL allows clients to
214 access DAV-modeled resources through server-side search.
226Reschke, et al. Standards Track [Page 4]
228RFC 5323 WebDAV SEARCH November 2008
233 This document uses the terms defined in [RFC2616], [RFC4918],
234 [RFC3253], and in this section.
238 An expression against which each resource in the search scope is
243 A query is a combination of a search scope, search criteria,
244 result record definition, sort specification, and a search
249 A set of definitions of XML elements, attributes, and constraints
250 on their relations and values that defines a set of queries and
251 the intended semantics.
255 A listing, for any given grammar and scope, of the properties and
256 operators that may be used in a query with that grammar and scope.
260 A result is a result set, optionally augmented with other
261 information describing the search as a whole.
265 A description of a resource. A result record is a set of
266 properties, and possibly other descriptive information.
268 Result Record Definition
270 A specification of the set of properties to be returned in the
275 A set of records, one for each resource for which the search
276 criteria evaluated to True.
282Reschke, et al. Standards Track [Page 5]
284RFC 5323 WebDAV SEARCH November 2008
289 A set of resources to be searched.
293 A resource that supports the SEARCH method.
297 An instruction that governs the execution of the query but is not
298 part of the search scope, result record definition, the search
299 criteria, or the sort specification. An example of a search
300 modifier is one that controls how much time the server can spend
301 on the query before giving a response.
305 A specification of an ordering on the result records in the result
3081.4. Notational Conventions
310 This specification uses the Augmented Backus-Naur Form (ABNF)
311 notation of [RFC5234], unless explicitly stated otherwise.
313 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT",
314 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this
315 document are to be interpreted as described in [RFC2119].
317 This document uses XML DTD fragments ([XML], Section 3.2) as a purely
318 notational convention. WebDAV request and response bodies cannot be
319 validated by a DTD due to the specific extensibility rules defined in
320 Section 17 of [RFC4918] and due to the fact that all XML elements
321 defined by this specification use the XML namespace name "DAV:". In
324 1. element names use the "DAV:" namespace,
326 2. element ordering is irrelevant unless explicitly stated,
328 3. extension elements (elements not already defined as valid child
329 elements) may be added anywhere, except when explicitly stated
332 4. extension attributes (attributes not already defined as valid for
333 this element) may be added anywhere, except when explicitly
338Reschke, et al. Standards Track [Page 6]
340RFC 5323 WebDAV SEARCH November 2008
343 When an XML element type in the "DAV:" namespace is referenced in
344 this document outside of the context of an XML fragment, the string
345 "DAV:" will be prefixed to the element type.
347 Similarly, when an XML element type in the namespace
348 "http://www.w3.org/2001/XMLSchema" is referenced in this document
349 outside of the context of an XML fragment, the string "xs:" will be
350 prefixed to the element type.
352 This document inherits, and sometimes extends, DTD productions from
353 Section 14 of [RFC4918].
3551.5. Note on Usage of 'DAV:' XML Namespace
357 This specification defines elements, properties, and condition names
358 in the XML namespace "DAV:". In general, only specifications
359 authored by IETF working groups are supposed to do this. In this
360 case an exception was made, because WebDAV SEARCH started its life in
361 the IETF DASL working group (<http://www.webdav.org/dasl/>, and at
362 the time the working group closed down there was already significant
363 deployment of this specification.
3651.6. An Overview of DASL at Work
367 One can express the basic usage of DASL in the following steps:
369 o The client constructs a query using the DAV:basicsearch grammar.
371 o The client invokes the SEARCH method on a resource that will
372 perform the search (the search arbiter) and includes a text/xml or
373 application/xml request entity that contains the query.
375 o The search arbiter performs the query.
377 o The search arbiter sends the results of the query back to the
378 client in the response. The server MUST send an entity that
379 matches the WebDAV multistatus format ([RFC4918], Section 13).
385 The client invokes the SEARCH method to initiate a server-side
386 search. The body of the request defines the query. The server MUST
387 emit an entity matching the WebDAV multistatus format ([RFC4918],
394Reschke, et al. Standards Track [Page 7]
396RFC 5323 WebDAV SEARCH November 2008
399 The SEARCH method plays the role of transport mechanism for the query
400 and the result set. It does not define the semantics of the query.
401 The type of the query defines the semantics.
403 SEARCH is a safe method; it does not have any significance other than
404 executing a query and returning a query result (see [RFC2616],
409 The client invokes the SEARCH method on the resource named by the
4122.2.1. The Request-URI
414 The Request-URI identifies the search arbiter. Any HTTP resource may
415 function as search arbiter. It is not a new type of resource (in the
416 sense of DAV:resourcetype as defined in [RFC4918], Section 15.9), nor
417 does it have to be a WebDAV-compliant resource.
419 The SEARCH method defines no relationship between the arbiter and the
420 scope of the search; rather, the particular query grammar used in the
421 query defines the relationship. For example, a query grammar may
422 force the Request-URI to correspond exactly to the search scope.
4242.2.2. The Request Body
426 The server MUST process a text/xml or application/xml request body,
427 and MAY process request bodies in other formats. See [RFC3023] for
428 guidance on packaging XML in requests.
432 If a request body with content type text/xml or application/xml is
433 included, it MUST be either a DAV:searchrequest or a DAV:query-
434 schema-discovery XML element. Its single child element identifies
437 For DAV:searchrequest, the definition of search criteria, the
438 result record, and any other details needed to perform the search
439 depend on the individual search grammar.
441 For DAV:query-schema-discovery, the semantics is defined in
450Reschke, et al. Standards Track [Page 8]
452RFC 5323 WebDAV SEARCH November 2008
457 (DAV:search-grammar-discovery-supported): when an XML request body
458 is present and has a DAV:query-schema-discovery document element,
459 the server MUST support the query schema discovery mechanism
460 described in Section 4.
462 (DAV:search-grammar-supported): when an XML request body is
463 present, the search grammar identified by the document element's
464 child element must be a supported search grammar.
466 (DAV:search-multiple-scope-supported): if the SEARCH request
467 specified multiple scopes, the server MUST support this optional
470 (DAV:search-scope-valid): the supplied search scope must be valid.
471 There can be various reasons for a search scope to be invalid,
472 including unsupported URI schemes and communication problems.
473 Servers MAY add [RFC4918] compliant DAV:response elements as
474 content to the condition element indicating the precise reason for
4772.3. The Successful 207 (Multistatus) Response
479 If the server returns 207 (Multistatus), then the search proceeded
480 successfully, and the response MUST use the WebDAV multistatus format
481 ([RFC4918], Section 13). The results of this method SHOULD NOT be
484 There MUST be one DAV:response for each resource that matched the
485 search criteria. For each such response, the DAV:href element
486 contains the URI of the resource, and the response MUST include a
487 DAV:propstat element.
489 Note: the WebDAV multistatus format requires at least one DAV:
490 response child element. This specification relaxes that
491 restriction so that empty results can be represented.
493 Note that for each matching resource found, there may be multiple
494 URIs within the search scope mapped to it. In this case, a server
495 SHOULD report only one of these URIs. Clients can use the live
496 property DAV:resource-id, defined in Section 3.1 of [WEBDAV-BIND] to
497 identify possible duplicates.
4992.3.1. Result Set Truncation
501 A server MAY limit the number of resources in a reply, for example,
502 to limit the amount of resources expended in processing a query. If
506Reschke, et al. Standards Track [Page 9]
508RFC 5323 WebDAV SEARCH November 2008
511 it does so, the reply MUST use status code 207, return a DAV:
512 multistatus response body, and indicate a status of 507 (Insufficient
513 Storage) for the search arbiter URI. It SHOULD include the partial
516 When a result set is truncated, there may be many more resources that
517 satisfy the search criteria but that were not examined.
519 If partial results are included and the client requested an ordered
520 result set in the original request, then any partial results that are
521 returned MUST be ordered as the client directed.
523 Note that the partial results returned MAY be any subset of the
524 result set that would have satisfied the original query.
5262.3.2. Extending the PROPFIND Response
528 A response MAY include more information than PROPFIND defines, so
529 long as the extra information does not invalidate the PROPFIND
530 response. Query grammars SHOULD define how the response matches the
5332.3.3. Example: A Simple Request and Response
535 This example demonstrates the request and response framework. The
536 following XML document shows a simple (hypothetical) natural language
537 query. The name of the query element is natural-language-query in
538 the XML namespace "http://example.com/foo". The actual query is
539 "Find the locations of good Thai restaurants in Los Angeles". For
540 this hypothetical query, the arbiter returns two properties for each
547 Content-Type: application/xml; charset="utf-8"
550 <?xml version="1.0" encoding="UTF-8"?>
551 <D:searchrequest xmlns:D="DAV:" xmlns:F="http://example.com/foo">
552 <F:natural-language-query>
553 Find the locations of good Thai restaurants in Los Angeles
554 </F:natural-language-query>
562Reschke, et al. Standards Track [Page 10]
564RFC 5323 WebDAV SEARCH November 2008
569 HTTP/1.1 207 Multi-Status
570 Content-Type: text/xml; charset="utf-8"
573 <?xml version="1.0" encoding="UTF-8"?>
574 <D:multistatus xmlns:D="DAV:"
575 xmlns:R="http://example.org/propschema">
577 <D:href>http://siamiam.example/</D:href>
580 <R:location>259 W. Hollywood</R:location>
581 <R:rating><R:stars>4</R:stars></R:rating>
583 <D:status>HTTP/1.1 200 OK</D:status>
5882.3.4. Example: Result Set Truncation
590 In the example below, the server returns just two results, and then
591 indicates that the result is truncated by adding a DAV:response
592 element for the search arbiter resource with 507 (Insufficient
599 Content-Type: text/xml; charset="utf-8"
602 ... the query goes here ...
618Reschke, et al. Standards Track [Page 11]
620RFC 5323 WebDAV SEARCH November 2008
625 HTTP/1.1 207 Multistatus
626 Content-Type: text/xml; charset="utf-8"
629 <?xml version="1.0" encoding="utf-8"?>
630 <D:multistatus xmlns:D="DAV:">
632 <D:href>http://www.example.net/sounds/unbrokenchain.au</D:href>
633 <D:status>HTTP/1.1 200 OK</D:status>
636 <D:href>http://tech.mit.example/arch96/photos/Lesh1.jpg</D:href>
637 <D:status>HTTP/1.1 200 OK</D:status>
640 <D:href>http://example.net</D:href>
641 <D:status>HTTP/1.1 507 Insufficient Storage</D:status>
642 <D:responsedescription xml:lang="en">
643 Only first two matching records were returned
644 </D:responsedescription>
6482.4. Unsuccessful Responses
650 If a SEARCH request could not be executed or the attempt to execute
651 it resulted in an error, the server MUST indicate the failure with an
652 appropriate status code and SHOULD add a response body as defined in
653 Section 1.6 of [RFC3253]. Unless otherwise stated, condition
654 elements are empty; however, specific condition elements MAY include
655 additional child elements that describe the error condition in more
6582.4.1. Example of an Invalid Scope
660 In the example below, a request failed because the scope identifies a
661 HTTP resource that was not found.
674Reschke, et al. Standards Track [Page 12]
676RFC 5323 WebDAV SEARCH November 2008
681 HTTP/1.1 409 Conflict
682 Content-Type: text/xml; charset="utf-8"
685 <?xml version="1.0" encoding="UTF-8"?>
686 <d:error xmlns:d="DAV:">
687 <d:search-scope-valid>
689 <d:href>http://www.example.com/X</d:href>
690 <d:status>HTTP/1.1 404 Object Not Found</d:status>
692 </d:search-scope-valid>
6953. Discovery of Supported Query Grammars
697 Servers MUST support discovery of the query grammars supported by a
698 search arbiter resource.
700 Clients can determine which query grammars are supported by an
701 arbiter by invoking OPTIONS on the search arbiter. If the resource
702 supports SEARCH, then the DASL response header will appear in the
703 response. The DASL response header lists the supported grammars.
705 Servers supporting the WebDAV extensions [RFC3253] and/or [RFC3744]
708 o report SEARCH in the live property DAV:supported-method-set for
709 all search arbiter resources, and
711 o support the live property DAV:supported-query-grammar-set as
712 defined in Section 3.3.
7143.1. The OPTIONS Method
716 The OPTIONS method allows the client to discover if a resource
717 supports the SEARCH method and to determine the list of search
718 grammars supported for that resource.
720 The client issues the OPTIONS method against a resource named by the
721 Request-URI. This is a normal invocation of OPTIONS as defined in
722 Section 9.2 of [RFC2616].
730Reschke, et al. Standards Track [Page 13]
732RFC 5323 WebDAV SEARCH November 2008
735 If a resource supports the SEARCH method, then the server MUST list
736 SEARCH in the Allow header defined in Section 14.7 of [RFC2616].
738 DASL servers MUST include the DASL header in the OPTIONS response.
739 This header identifies the search grammars supported by that
7423.2. The DASL Response Header
744 DASLHeader = "DASL" ":" 1#Coded-URL
745 Coded-URL = <defined in Section 10.1 of [RFC4918]>
747 (This grammar uses the augmented BNF format defined in Section 2.1 of
750 The DASL response header indicates server support for query grammars
751 in the OPTIONS method. The value is a list of URIs that indicate the
752 types of supported grammars. Note that although the URIs can be used
753 to identify each supported search grammar, there is not necessarily a
754 direct relationship between the URI and the XML element name that can
755 be used in XML based SEARCH requests (the element name itself is
756 identified by its namespace name (a URI reference) and the element's
759 Note: this header field value is defined as a comma-separated list
760 ([RFC2616], Section 4.2); thus, grammar URIs can appear in
761 multiple header instances, separated by commas, or both.
765 DASL: <http://foobar.example/syntax1>,
766 <http://akuma.example/syntax2>, <DAV:basicsearch>
767 DASL: <http://example.com/foo/natural-language-query>
7693.3. DAV:supported-query-grammar-set (Protected)
771 This WebDAV property is required for any server supporting either
772 [RFC3253] and/or [RFC3744] and identifies the XML-based query
773 grammars that are supported by the search arbiter resource.
775 <!ELEMENT supported-query-grammar-set (supported-query-grammar*)>
776 <!ELEMENT supported-query-grammar (grammar)>
777 <!ELEMENT grammar ANY>
778 <!-- ANY value: a query grammar element type -->
786Reschke, et al. Standards Track [Page 14]
788RFC 5323 WebDAV SEARCH November 2008
7913.4. Example: Grammar Discovery
793 This example shows that the server supports search on the /somefolder
794 resource with the query grammars: DAV:basicsearch,
795 http://foobar.example/syntax1 and http://akuma.example/syntax2. Note
796 that servers supporting WebDAV SEARCH MUST support DAV:basicsearch.
800 OPTIONS /somefolder HTTP/1.1
806 Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE
807 Allow: MKCOL, PROPFIND, PROPPATCH, LOCK, UNLOCK, SEARCH
808 DASL: <DAV:basicsearch>
809 DASL: <http://foobar.example/syntax1>, <http://akuma.example/syntax2>
811 This example shows the equivalent taking advantage of a server's
812 support for DAV:supported-method-set and DAV:supported-query-grammar-
817 PROPFIND /somefolder HTTP/1.1
820 Content-Type: text/xml; charset="utf-8"
823 <?xml version="1.0" encoding="UTF-8" ?>
824 <propfind xmlns="DAV:">
826 <supported-query-grammar-set/>
827 <supported-method-set/>
842Reschke, et al. Standards Track [Page 15]
844RFC 5323 WebDAV SEARCH November 2008
849 HTTP/1.1 207 Multi-Status
850 Content-Type: text/xml; charset="utf-8"
853 <?xml version="1.0" encoding="utf-8" ?>
854 <multistatus xmlns="DAV:">
856 <href>http://example.org/somefolder</href>
859 <supported-query-grammar-set>
860 <supported-query-grammar>
861 <grammar><basicsearch/></grammar>
862 </supported-query-grammar>
863 <supported-query-grammar>
864 <grammar><syntax1 xmlns="http://foobar.example/"/></grammar>
865 </supported-query-grammar>
866 <supported-query-grammar>
867 <grammar><syntax2 xmlns="http://akuma.example/"/></grammar>
868 </supported-query-grammar>
869 </supported-query-grammar-set>
870 <supported-method-set>
871 <supported-method name="COPY" />
872 <supported-method name="DELETE" />
873 <supported-method name="GET" />
874 <supported-method name="HEAD" />
875 <supported-method name="LOCK" />
876 <supported-method name="MKCOL" />
877 <supported-method name="MOVE" />
878 <supported-method name="OPTIONS" />
879 <supported-method name="POST" />
880 <supported-method name="PROPFIND" />
881 <supported-method name="PROPPATCH" />
882 <supported-method name="PUT" />
883 <supported-method name="SEARCH" />
884 <supported-method name="TRACE" />
885 <supported-method name="UNLOCK" />
886 </supported-method-set>
888 <status>HTTP/1.1 200 OK</status>
898Reschke, et al. Standards Track [Page 16]
900RFC 5323 WebDAV SEARCH November 2008
903 Note that the query grammar element names marshalled as part of the
904 DAV:supported-query-grammar-set can be directly used as element names
905 in an XML-based query.
9074. Query Schema Discovery: QSD
909 Servers MAY support the discovery of the schema for a query grammar.
911 The DASL response header and the DAV:supported-query-grammar-set
912 property provide means for clients to discover the set of query
913 grammars supported by a resource. This alone is not sufficient
914 information for a client to generate a query. For example, the DAV:
915 basicsearch grammar defines a set of queries consisting of a set of
916 operators applied to a set of properties and values, but the grammar
917 itself does not specify which properties may be used in the query.
918 QSD for the DAV:basicsearch grammar allows a client to discover the
919 set of properties that are searchable, selectable, and sortable.
920 Moreover, although the DAV:basicsearch grammar defines a minimal set
921 of operators, it is possible that a resource might support additional
922 operators in a query. For example, a resource might support an
923 optional operator that can be used to express content-based queries
924 in a proprietary syntax. QSD allows a client to discover these
925 operators and their syntax. The set of discoverable quantities will
926 differ from grammar to grammar, but each grammar can define a means
927 for a client to discover what can be discovered.
929 In general, the schema for a given query grammar depends on both the
930 resource (the arbiter) and the scope. A given resource might have
931 access to one set of properties for one potential scope, and another
932 set for a different scope. For example, consider a server able to
933 search two distinct collections: one holding cooking recipes, the
934 other design documents for nuclear weapons. While both collections
935 might support properties such as author, title, and date, the first
936 might also define properties such as calories and preparation time,
937 while the second defined properties such as yield and applicable
938 patents. Two distinct arbiters indexing the same collection might
939 also have access to different properties. For example, the recipe
940 collection mentioned above might also be indexed by a value-added
941 server that also stored the names of chefs who had tested the recipe.
942 Note also that the available query schema might also depend on other
943 factors, such as the identity of the principal conducting the search,
944 but these factors are not exposed in this protocol.
9464.1. Additional SEARCH Semantics
948 Each query grammar supported by DASL defines its own syntax for
949 expressing the possible query schema. A client retrieves the schema
950 for a given query grammar on an arbiter resource with a given scope
954Reschke, et al. Standards Track [Page 17]
956RFC 5323 WebDAV SEARCH November 2008
959 by invoking the SEARCH method on that arbiter with that grammar and
960 scope and with a root element of DAV:query-schema-discovery rather
961 than DAV:searchrequest.
965 The request body MUST be a DAV:query-schema-discovery element.
967 <!ELEMENT query-schema-discovery ANY>
968 <!-- ANY value: XML element specifying the query grammar
971 The response body takes the form of a DAV:multistatus element
972 ([RFC4918], Section 13), where DAV:response is extended to hold
973 the returned query grammar inside a DAV:query-schema container
976 <!ELEMENT response (href, status, query-schema?,
977 responsedescription?) >
978 <!ELEMENT query-schema ANY>
980 The content of this container is an XML element whose name and syntax
981 depend upon the grammar, and whose value may (and likely will) vary
982 depending upon the grammar, arbiter, and scope.
9844.1.1. Example of Query Schema Discovery
986 In this example, the arbiter is recipes.example, the grammar is DAV:
987 basicsearch, the scope is also recipes.example.
992 Host: recipes.example
993 Content-Type: application/xml; charset="utf-8"
996 <?xml version="1.0"?>
997 <query-schema-discovery xmlns="DAV:">
1001 <href>http://recipes.example</href>
1002 <depth>infinity</depth>
1006 </query-schema-discovery>
1010Reschke, et al. Standards Track [Page 18]
1012RFC 5323 WebDAV SEARCH November 2008
1017 HTTP/1.1 207 Multistatus
1018 Content-Type: application/xml; charset="utf-8"
1021 <?xml version="1.0"?>
1022 <multistatus xmlns="DAV:">
1024 <href>http://recipes.example</href>
1025 <status>HTTP/1.1 200 OK</status>
1028 <!-- (See Section 5.19 for
1029 the actual contents) -->
1030 </basicsearchschema>
1035 The query schema for DAV:basicsearch is defined in Section 5.19.
10375. The DAV:basicsearch Grammar
1041 DAV:basicsearch uses an extensible XML syntax that allows clients to
1042 express search requests that are generally useful for WebDAV
1043 scenarios. DASL-extended servers MUST accept this grammar, and MAY
1044 accept other grammars.
1046 DAV:basicsearch has several components:
1048 o DAV:select provides the result record definition.
1050 o DAV:from defines the scope.
1052 o DAV:where defines the criteria.
1054 o DAV:orderby defines the sort order of the result set.
1056 o DAV:limit provides constraints on the query as a whole.
1066Reschke, et al. Standards Track [Page 19]
1068RFC 5323 WebDAV SEARCH November 2008
10715.2. The DAV:basicsearch DTD
1073 <!-- "basicsearch" element -->
1075 <!ELEMENT basicsearch (select, from, where?, orderby?, limit?) >
1077 <!-- "select" element -->
1079 <!ELEMENT select (allprop | prop) >
1081 <!-- "from" element -->
1083 <!ELEMENT from (scope+) >
1084 <!ELEMENT scope (href, depth, include-versions?) >
1085 <!ELEMENT include-versions EMPTY >
1087 <!-- "where" element -->
1122Reschke, et al. Standards Track [Page 20]
1124RFC 5323 WebDAV SEARCH November 2008
1127 <!ENTITY % comp_ops "eq | lt | gt| lte | gte">
1128 <!ENTITY % log_ops "and | or | not">
1129 <!ENTITY % special_ops "is-collection | is-defined |
1130 language-defined | language-matches">
1131 <!ENTITY % string_ops "like">
1132 <!ENTITY % content_ops "contains">
1134 <!ENTITY % all_ops "%comp_ops; | %log_ops; | %special_ops; |
1135 %string_ops; | %content_ops;">
1137 <!ELEMENT where ( %all_ops; ) >
1139 <!ELEMENT and ( %all_ops; )+ >
1141 <!ELEMENT or ( %all_ops; )+ >
1143 <!ELEMENT not ( %all_ops; ) >
1145 <!ELEMENT lt (prop, (literal|typed-literal)) >
1146 <!ATTLIST lt caseless (yes|no) #IMPLIED>
1148 <!ELEMENT lte (prop, (literal|typed-literal)) >
1149 <!ATTLIST lte caseless (yes|no) #IMPLIED>
1151 <!ELEMENT gt (prop, (literal|typed-literal)) >
1152 <!ATTLIST gt caseless (yes|no) #IMPLIED>
1154 <!ELEMENT gte (prop, (literal|typed-literal)) >
1155 <!ATTLIST gte caseless (yes|no) #IMPLIED>
1157 <!ELEMENT eq (prop, (literal|typed-literal)) >
1158 <!ATTLIST eq caseless (yes|no) #IMPLIED>
1160 <!ELEMENT literal (#PCDATA)>
1161 <!ELEMENT typed-literal (#PCDATA)>
1162 <!ATTLIST typed-literal xsi:type CDATA #IMPLIED>
1164 <!ELEMENT is-collection EMPTY >
1165 <!ELEMENT is-defined (prop) >
1167 <!ELEMENT language-defined (prop) >
1168 <!ELEMENT language-matches (prop, literal) >
1170 <!ELEMENT like (prop, literal) >
1171 <!ATTLIST like caseless (yes|no) #IMPLIED>
1173 <!ELEMENT contains (#PCDATA)>
1178Reschke, et al. Standards Track [Page 21]
1180RFC 5323 WebDAV SEARCH November 2008
1183 <!-- "orderby" element -->
1185 <!ELEMENT orderby (order+) >
1186 <!ELEMENT order ((prop | score), (ascending | descending)?)>
1187 <!ATTLIST order caseless (yes|no) #IMPLIED>
1188 <!ELEMENT ascending EMPTY>
1189 <!ELEMENT descending EMPTY>
1191 <!-- "limit" element -->
1193 <!ELEMENT limit (nresults) >
1194 <!ELEMENT nresults (#PCDATA) >
1198 This query retrieves the content length values for all resources
1199 located under the server's "/container1/" URI namespace whose length
1200 exceeds 10000 sorted ascending by size.
1202 <d:searchrequest xmlns:d="DAV:">
1205 <d:prop><d:getcontentlength/></d:prop>
1209 <d:href>/container1/</d:href>
1210 <d:depth>infinity</d:depth>
1215 <d:prop><d:getcontentlength/></d:prop>
1216 <d:literal>10000</d:literal>
1221 <d:prop><d:getcontentlength/></d:prop>
1234Reschke, et al. Standards Track [Page 22]
1236RFC 5323 WebDAV SEARCH November 2008
1241 DAV:select defines the result record, which is a set of properties
1242 and values. This document defines two possible values: DAV:allprop
1243 and DAV:prop, both defined in Section 14 of [RFC4918].
1247 <!ELEMENT scope (href, depth, include-versions?) >
1248 <!ELEMENT include-versions EMPTY >
1250 DAV:from defines the query scope. This contains one or more DAV:
1251 scope elements. Support for multiple scope elements is optional,
1252 however servers MUST fail a request specifying multiple DAV:scope
1253 elements if they can't support it (see Section 2.2.2, precondition
1254 DAV:search-multiple-scope-supported). The scope element contains
1255 mandatory DAV:href and DAV:depth elements.
1257 DAV:href indicates the URI reference ([RFC3986], Section 4.1) to use
1260 When the scope is a collection, if DAV:depth is "0", the search
1261 includes only the collection. When it is "1", the search includes
1262 the collection and its immediate children. When it is "infinity", it
1263 includes the collection and all its progeny.
1265 When the scope is not a collection, the depth is ignored and the
1266 search applies just to the resource itself.
1268 If the server supports WebDAV Redirect Reference Resources
1269 ([RFC4437]) and the search scope contains a redirect reference
1270 resource, then it applies only to that resource, not to its target.
1272 When the child element DAV:include-versions is present, the search
1273 scope will include all versions (see [RFC3253], Section 2.2.1) of all
1274 version-controlled resources in scope. Servers that do support
1275 versioning but do not support the DAV:include-versions feature MUST
1276 signal an error if it is used in a query (see Section 2.2.2,
1277 precondition DAV:search-scope-valid).
12795.4.1. Relationship to the Request-URI
1281 If the DAV:scope element is a URI ([RFC3986], Section 3), the scope
1282 is exactly that URI.
1284 If the DAV:scope element is a relative reference ([RFC3986], Section
1285 4.2), the scope is taken to be relative to the Request-URI.
1290Reschke, et al. Standards Track [Page 23]
1292RFC 5323 WebDAV SEARCH November 2008
1297 A Scope can be an arbitrary URI reference.
1299 Servers, of course, may support only particular scopes. This may
1300 include limitations for particular schemes such as "http:" or "ftp:"
1301 or certain URI namespaces. However, WebDAV-compliant search arbiters
1302 minimally SHOULD support scopes that match their own URI.
1306 The DAV:where element defines the search condition for inclusion of
1307 resources in the result set. The value of this element is an XML
1308 element that defines a search operator that evaluates to one of the
1309 Boolean truth values TRUE, FALSE, or UNKNOWN. The search operator
1310 contained by DAV:where may itself contain and evaluate additional
1311 search operators as operands, which in turn may contain and evaluate
1312 additional search operators as operands, etc., recursively.
13145.5.1. Use of Three-Valued Logic in Queries
1316 Each operator defined for use in the where clause that returns a
1317 Boolean value MUST evaluate to TRUE, FALSE, or UNKNOWN. The resource
1318 under scan is included as a member of the result set if and only if
1319 the search condition evaluates to TRUE.
1321 Consult Appendix A for details on the application of three-valued
1322 logic in query expressions.
13245.5.2. Handling Optional Operators
1326 If a query contains an operator that is not supported by the server,
1327 then the server MUST respond with a 422 (Unprocessable Entity) status
13305.5.3. Treatment of NULL Values
1332 If a PROPFIND for a property value would yield a non-2xx (see Section
1333 10.2 of [RFC2616]) response for that property, then that property is
1336 NULL values are "less than" all other values in comparisons.
1338 Empty strings (zero length strings) are not NULL values. An empty
1339 string is "less than" a string with length greater than zero.
1341 The DAV:is-defined operator is defined to test if the value of a
1342 property is not NULL.
1346Reschke, et al. Standards Track [Page 24]
1348RFC 5323 WebDAV SEARCH November 2008
13515.5.4. Treatment of Properties with Mixed/Element Content
1353 Comparisons of properties that do not have simple types (text-only
1354 content) is out of scope for the standard operators defined for DAV:
1355 basicsearch and therefore is defined to be UNKNOWN (as per
1356 Appendix A). For querying the DAV:resourcetype property, see
13595.5.5. Example: Testing for Equality
1361 The example shows a single operator (DAV:eq) applied in the criteria.
1363 <d:where xmlns:d='DAV:'>
1366 <d:getcontentlength/>
1368 <d:literal>100</d:literal>
13725.5.6. Example: Relative Comparisons
1374 The example shows a more complex operation involving several
1375 operators (DAV:and, DAV:eq, DAV:gt) applied in the criteria. This
1376 DAV:where expression matches those resources of type "image/gif" over
1379 <D:where xmlns:D='DAV:'>
1385 <D:literal>image/gif</D:literal>
1389 <D:getcontentlength/>
1391 <D:literal>4096</D:literal>
1402Reschke, et al. Standards Track [Page 25]
1404RFC 5323 WebDAV SEARCH November 2008
1409 The DAV:orderby element specifies the ordering of the result set. It
1410 contains one or more DAV:order elements, each of which specifies a
1411 comparison between two items in the result set. Informally, a
1412 comparison specifies a test that determines whether one resource
1413 appears before another in the result set. Comparisons are applied in
1414 the order they occur in the DAV:orderby element, earlier comparisons
1415 being more significant.
1417 The comparisons defined here use only a single property from each
1418 resource, compared using the same ordering as the DAV:lt operator
1419 (ascending) or DAV:gt operator (descending). If neither direction is
1420 specified, the default is DAV:ascending.
1422 In the context of the DAV:orderby element, null values are considered
1423 to collate before any actual (i.e., non-null) value, including
1424 strings of zero length (this is compatible with [SQL99]).
1426 The "caseless" attribute may be used to indicate case-sensitivity for
1427 comparisons (Section 5.18).
14295.6.1. Example of Sorting
1431 This sort orders first by last name of the author and then by size,
1432 in descending order, so that for each author, the largest works
1435 <d:orderby xmlns:d='DAV:' xmlns:r='http://example.com/ns'>
1437 <d:prop><r:lastname/></d:prop>
1441 <d:prop><d:getcontentlength/></d:prop>
14465.7. Boolean Operators: DAV:and, DAV:or, and DAV:not
1448 The DAV:and operator performs a logical AND operation on the
1449 expressions it contains.
1451 The DAV:or operator performs a logical OR operation on the values it
1458Reschke, et al. Standards Track [Page 26]
1460RFC 5323 WebDAV SEARCH November 2008
1463 The DAV:not operator performs a logical NOT operation on the values
1468 The DAV:eq operator provides simple equality matching on property
1471 The "caseless" attribute may be used with this element
14745.9. DAV:lt, DAV:lte, DAV:gt, DAV:gte
1476 The DAV:lt, DAV:lte, DAV:gt, and DAV:gte operators provide
1477 comparisons on property values, using less-than, less-than or equal,
1478 greater-than, and greater-than or equal, respectively. The
1479 "caseless" attribute may be used with these elements (Section 5.18).
1483 DAV:literal allows literal values to be placed in an expression.
1485 White space in literal values is significant in comparisons. For
1486 consistency with [RFC4918], clients SHOULD NOT specify the attribute
1487 "xml:space" (Section 2.10 of [XML]) to override this behavior.
1489 In comparisons, the contents of DAV:literal SHOULD be treated as
1490 string, with the following exceptions:
1492 o when operand for a comparison with a DAV:getcontentlength
1493 property, it SHOULD be treated as an unsigned integer value (the
1494 behavior for values not in this format is undefined),
1496 o when operand for a comparison with a DAV:creationdate or DAV:
1497 getlastmodified property, it SHOULD be treated as a date value in
1498 the ISO-8601 subset defined for the DAV:creationdate property (see
1499 Section 15.1 of [RFC4918]; the behavior of values not in this
1500 format is undefined),
1502 o when operand for a comparison with a property for which the type
1503 is known and when compatible with that type, it MAY be treated
1504 according to this type.
1514Reschke, et al. Standards Track [Page 27]
1516RFC 5323 WebDAV SEARCH November 2008
15195.11. DAV:typed-literal (Optional)
1521 There are situations in which a client may want to force a comparison
1522 not to be string-based (as defined for DAV:literal). In these cases,
1523 a typed comparison can be enforced by using DAV:typed-literal
1526 <!ELEMENT typed-literal (#PCDATA)>
1528 The data type is specified using the xsi:type attribute defined in
1529 Section 2.6.1 of [XS1]. If the type is not specified, it defaults to
1532 A server MUST reject a request using an unknown type with a status of
1533 422 (Unprocessable Entity). It SHOULD reject a request if the value
1534 provided in DAV:typed-literal cannot be cast to the specified type.
1536 The comparison evaluates to UNKNOWN if the property value cannot be
1537 cast to the specified datatype (see [XPATHFUNC], Section 17).
15395.11.1. Example for Typed Numerical Comparison
1541 Consider a set of resources with the dead property "edits" in the
1542 namespace "http://ns.example.org":
1544 +-----+----------------+
1545 | URI | property value |
1546 +-----+----------------+
1551 | /e | (undefined) |
1552 +-----+----------------+
1557 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1558 xmlns:xs="http://www.w3.org/2001/XMLSchema">
1559 <prop><edits xmlns="http://ns.example.org"/></prop>
1560 <typed-literal xsi:type="xs:integer">3</typed-literal>
1563 will evaluate to TRUE for the resources "/a" and "/b" (their property
1564 values can be parsed as type xs:integer, and the numerical comparison
1565 evaluates to true), to FALSE for "/c" (property value is compatible,
1566 but numerical comparison evaluates to false), and UNKNOWN for "/d"
1570Reschke, et al. Standards Track [Page 28]
1572RFC 5323 WebDAV SEARCH November 2008
1575 and "/e" (the property either is undefined, or its value cannot be
1576 parsed as xs:integer).
15785.12. Support for Matching xml:lang Attributes on Properties
1580 The following two optional operators can be used to express
1581 conditions on the language of a property value (as expressed using
1582 the xml:lang attribute).
15845.12.1. DAV:language-defined (Optional)
1586 <!ELEMENT language-defined (prop)>
1588 This operator evaluates to TRUE if the language for the value of the
1589 given property is known, FALSE if it isn't, and UNKNOWN if the
1590 property itself is not defined.
15925.12.2. DAV:language-matches (Optional)
1594 <!ELEMENT language-matches (prop, literal)>
1596 This operator evaluates to TRUE if the language for the value of the
1597 given property is known and matches the language name given in the
1598 <literal> element, FALSE if it doesn't match, and UNKNOWN if the
1599 property itself is not defined.
1601 Languages are considered to match if they are the same, or if the
1602 language of the property value is a sublanguage of the language
1603 specified in the <literal> element (see Section 4.3 of [XPATH], "lang
16065.12.3. Example of Language-Aware Matching
1608 The expression below will evaluate to TRUE if the property "foobar"
1609 exists and its language is either unknown, English, or a sublanguage
1615 <prop><foobar/></prop>
1619 <prop><foobar/></prop>
1620 <literal>en</literal>
1626Reschke, et al. Standards Track [Page 29]
1628RFC 5323 WebDAV SEARCH November 2008
16315.13. DAV:is-collection
1633 The DAV:is-collection operator allows clients to determine whether a
1634 resource is a collection (that is, whether its DAV:resourcetype
1635 element contains the element DAV:collection).
1637 Rationale: This operator is provided in lieu of defining generic
1638 structure queries, which would suffice for this and for many more
1639 powerful queries, but seems inappropriate to standardize at this
16425.13.1. Example of DAV:is-collection
1644 This example shows a search criterion that picks out all, and only,
1645 the resources in the scope that are collections.
1647 <where xmlns="DAV:">
1653 The DAV:is-defined operator allows clients to determine whether a
1654 property is defined on a resource. The meaning of "defined on a
1655 resource" is found in Section 5.5.3.
1659 <d:is-defined xmlns:d='DAV:' xmlns:x='http://example.com/ns'>
1660 <d:prop><x:someprop/></d:prop>
1665 The DAV:like is an optional operator intended to give simple
1666 wildcard-based pattern matching ability to clients.
1668 The operator takes two arguments.
1670 The first argument is a DAV:prop element identifying a single
1671 property to evaluate.
1673 The second argument is a DAV:literal element that gives the pattern
1682Reschke, et al. Standards Track [Page 30]
1684RFC 5323 WebDAV SEARCH November 2008
16875.15.1. Syntax for the Literal Pattern
1689 pattern = [wildcard] 0*( text [wildcard] )
1691 wildcard = exactlyone / zeroormore
1692 text = 1*( character / escapeseq )
1697 escapeseq = escapechar ( exactlyone / zeroormore / escapechar )
1699 ; character: see [XML], Section 2.2, minus wildcard / escapechar
1700 character = HTAB / LF / CR ; whitespace
1701 character =/ %x20-24 / %x26-5B / %x5D-5E / %x60-D7FF
1702 character =/ %xE000-FFFD / %x10000-10FFFF
1704 (Note that the ABNF above is defined in terms of Unicode code points
1705 ([UNICODE5]); when a query is transmitted as an XML document over
1706 WebDAV, these characters are typically encoded in UTF-8 or UTF-16.)
1708 The value for the literal is composed of wildcards separated by
1709 segments of text. Wildcards may begin or end the literal.
1711 The "_" wildcard matches exactly one character.
1713 The "%" wildcard matches zero or more characters.
1715 The "\" character is an escape sequence so that the literal can
1716 include "_" and "%". To include the "\" character in the pattern,
1717 the escape sequence "\\" is used.
17195.15.2. Example of DAV:like
1721 This example shows how a client might use DAV:like to identify those
1722 resources whose content type was a subtype of image.
1724 <D:where xmlns:D='DAV:'>
1725 <D:like caseless="yes">
1726 <D:prop><D:getcontenttype/></D:prop>
1727 <D:literal>image/%</D:literal>
1733 The DAV:contains operator is an optional operator that provides
1734 content-based search capability. This operator implicitly searches
1738Reschke, et al. Standards Track [Page 31]
1740RFC 5323 WebDAV SEARCH November 2008
1743 against the text content of a resource, not against the content of
1744 properties. The DAV:contains operator is intentionally not overly
1745 constrained, in order to allow the server to do the best job it can
1746 in performing the search.
1748 The DAV:contains operator evaluates to a Boolean value. It evaluates
1749 to TRUE if the content of the resource satisfies the search.
1750 Otherwise, it evaluates to FALSE.
1752 Within the DAV:contains XML element, the client provides a phrase: a
1753 single word or whitespace delimited sequence of words. Servers MAY
1754 ignore punctuation in a phrase. Case-sensitivity is at the
1755 discretion of the server implementation.
1757 The following non-exhaustive list enumerates things that may or may
1758 not be done as part of the search: Phonetic methods such as "soundex"
1759 may or may not be used. Word stemming may or may not be performed.
1760 Thesaurus expansion of words may or may not be done. Right or left
1761 truncation may or may not be performed. The search may be case
1762 insensitive or case sensitive. The word or words may or may not be
1763 interpreted as names. Multiple words may or may not be required to
1764 be adjacent or "near" each other. Multiple words may or may not be
1765 required to occur in the same order. Multiple words may or may not
1766 be treated as a phrase. The search may or may not be interpreted as
1767 a request to find documents "similar" to the string operand.
1768 Character canonicalization such as that done by the Unicode collation
1769 algorithm may or may not be applied.
17715.16.1. Result Scoring (DAV:score Element)
1773 Servers SHOULD indicate scores for the DAV:contains condition by
1774 adding a DAV:score XML element to the DAV:response element. Its
1775 value is defined only in the context of a particular query result.
1776 The value is a string representing the score, an integer from zero to
1777 10000 inclusive, where a higher value indicates a higher score (e.g.,
1780 Modified DTD fragment for DAV:propstat:
1782 <!ELEMENT response (href, ((href*, status)|(propstat+)),
1783 responsedescription?, score?) >
1784 <!ELEMENT score (#PCDATA) >
1786 Clients should note that, in general, it is not meaningful to compare
1787 the numeric values of scores from two different query results unless
1788 both were executed by the same underlying search system on the same
1789 collection of resources.
1794Reschke, et al. Standards Track [Page 32]
1796RFC 5323 WebDAV SEARCH November 2008
17995.16.2. Ordering by Score
1801 To order search results by their score, the DAV:score element may be
1802 added as child to the DAV:orderby element (in place of a DAV:prop
1807 The example below shows a search for the phrase "Peter Forsberg".
1809 Depending on its support for content-based searching, a server MAY
1810 treat this as a search for documents that contain the words "Peter"
1813 <D:where xmlns:D='DAV:'>
1814 <D:contains>Peter Forsberg</D:contains>
1817 The example below shows a search for resources that contain "Peter"
1820 <D:where xmlns:D='DAV:'>
1822 <D:contains>Peter</D:contains>
1823 <D:contains>Forsberg</D:contains>
18275.17. Limiting the Result Set
1829 <!ELEMENT limit (nresults) >
1830 <!ELEMENT nresults (#PCDATA)> <!-- only digits -->
1832 The DAV:limit XML element contains requested limits from the client
1833 to limit the size of the reply or amount of effort expended by the
1834 server. The DAV:nresults XML element contains a requested maximum
1835 number of DAV:response elements to be returned in the response body.
1836 The server MAY disregard this limit. The value of this element is an
18395.17.1. Relationship to Result Ordering
1841 If the result set is both limited by DAV:limit and ordered according
1842 to DAV:orderby, the results that are included in the response
1843 document SHOULD be those that order highest.
1850Reschke, et al. Standards Track [Page 33]
1852RFC 5323 WebDAV SEARCH November 2008
18555.18. The 'caseless' XML Attribute
1857 The "caseless" attribute allows clients to specify caseless matching
1858 behavior instead of character-by-character matching for DAV:
1859 basicsearch operators.
1861 The possible values for "caseless" are "yes" or "no". The default
1862 value is server-specified. Caseless matching SHOULD be implemented
1863 as defined in Section 5.18 of the Unicode Standard ([UNICODE5]).
1865 Support for the "caseless" attribute is optional. A server should
1866 respond with a status of 422 if it is used but cannot be supported.
18685.19. Query Schema for DAV:basicsearch
1870 The DAV:basicsearch grammar defines a search criteria that is a
1871 Boolean-valued expression, and allows for an arbitrary set of
1872 properties to be included in the result record. The result set may
1873 be sorted on a set of property values. Accordingly, the DTD for
1874 schema discovery for this grammar allows the server to express:
1876 1. the set of properties that may be either searched, returned, or
1877 used to sort, and a hint about the data type of such properties.
1879 2. the set of optional operators defined by the resource.
18815.19.1. DTD for DAV:basicsearch QSD
1883 <!ELEMENT basicsearchschema (properties, operators)>
1884 <!ELEMENT any-other-property EMPTY>
1885 <!ELEMENT properties (propdesc*)>
1886 <!ELEMENT propdesc ((prop|any-other-property), datatype?,
1887 searchable?, selectable?, sortable?,
1889 <!ELEMENT operators (opdesc*)>
1890 <!ELEMENT opdesc ANY>
1891 <!ATTLIST opdesc allow-pcdata (yes|no) #IMPLIED>
1892 <!ELEMENT operand-literal EMPTY>
1893 <!ELEMENT operand-typed-literal EMPTY>
1894 <!ELEMENT operand-property EMPTY>
1896 The DAV:properties element holds a list of descriptions of
1899 The DAV:operators element describes the optional operators that may
1900 be used in a DAV:where element.
1906Reschke, et al. Standards Track [Page 34]
1908RFC 5323 WebDAV SEARCH November 2008
19115.19.2. DAV:propdesc Element
1913 Each instance of a DAV:propdesc element describes the property or
1914 properties in the DAV:prop element it contains. All subsequent
1915 elements are descriptions that apply to those properties. All
1916 descriptions are optional and may appear in any order. Servers
1917 SHOULD support all the descriptions defined here, and MAY define
1920 DASL defines five descriptions. The first, DAV:datatype, provides a
1921 hint about the type of the property value, and may be useful to a
1922 user interface prompting for a value. The remaining four (DAV:
1923 searchable, DAV:selectable, DAV:sortable, and DAV:caseless) identify
1924 portions of the query (DAV:where, DAV:select, and DAV:orderby,
1925 respectively). If a property has a description for a section, then
1926 the server MUST allow the property to be used in that section. These
1927 descriptions are optional. If a property does not have such a
1928 description, or is not described at all, then the server MAY still
1929 allow the property to be used in the corresponding section.
19315.19.2.1. DAV:any-other-property
1933 This element can be used in place of DAV:prop to describe properties
1934 of WebDAV properties not mentioned in any other DAV:prop element.
1935 For instance, this can be used to indicate that all other properties
1936 are searchable and selectable without giving details about their
1937 types (a typical scenario for dead properties).
19395.19.3. The DAV:datatype Property Description
1941 The DAV:datatype element contains a single XML element that provides
1942 a hint about the domain of the property, which may be useful to a
1943 user interface prompting for a value to be used in a query. Data
1944 types are identified by an element name. Where appropriate, a server
1945 SHOULD use the simple data types defined in [XS2].
1947 <!ELEMENT datatype ANY >
1962Reschke, et al. Standards Track [Page 35]
1964RFC 5323 WebDAV SEARCH November 2008
1967 Examples from [XS2], Section 3:
1969 +----------------+---------------------+
1970 | Qualified name | Example |
1971 +----------------+---------------------+
1972 | xs:boolean | true, false, 1, 0 |
1973 | xs:string | Foobar |
1974 | xs:dateTime | 1994-11-05T08:15:5Z |
1975 | xs:float | .314159265358979E+1 |
1976 | xs:integer | -259, 23 |
1977 +----------------+---------------------+
1979 If the data type of a property is not given, then the data type
1980 defaults to xs:string.
19825.19.4. The DAV:searchable Property Description
1984 <!ELEMENT searchable EMPTY>
1986 If this element is present, then the server MUST allow this property
1987 to appear within a DAV:where element where an operator allows a
1988 property. Allowing a search does not mean that the property is
1989 guaranteed to be defined on every resource in the scope, it only
1990 indicates the server's willingness to check.
19925.19.5. The DAV:selectable Property Description
1994 <!ELEMENT selectable EMPTY>
1996 This element indicates that the property may appear in the DAV:select
19995.19.6. The DAV:sortable Property Description
2001 This element indicates that the property may appear in the DAV:
2004 <!ELEMENT sortable EMPTY>
20065.19.7. The DAV:caseless Property Description
2008 This element only applies to properties whose data type is "xs:
2009 string" and derived data types as per the DAV:datatype property
2010 description. Its presence indicates that comparisons performed for
2011 searches, and the comparisons for ordering results on the string
2012 property will be caseless (the default is character by character).
2014 <!ELEMENT caseless EMPTY>
2018Reschke, et al. Standards Track [Page 36]
2020RFC 5323 WebDAV SEARCH November 2008
20235.19.8. The DAV:operators XML Element
2025 The DAV:operators element describes every optional operator supported
2026 in a query. (Mandatory operators are not listed since they are
2027 mandatory and permit no variation in syntax.) All optional operators
2028 that are supported MUST be listed in the DAV:operators element.
2030 The listing for an operator, contained in an DAV:opdesc element,
2031 consists of the operator (as an empty element), followed by one
2032 element for each operand. The operand MUST be either DAV:operand-
2033 property, DAV:operand-literal, or DAV:operand-typed-literal, which
2034 indicate that the operand in the corresponding position is a
2035 property, a literal value, or a typed literal value, respectively.
2036 If an operator is polymorphic (allows more than one operand syntax)
2037 then each permitted syntax MUST be listed separately.
2039 The DAV:opdesc element MAY have a "allow-pcdata" attribute
2040 (defaulting to "no"). A value of "yes" indicates that the operator
2041 can contain character data, as it is the case with DAV:contains (see
2042 Section 5.16). Definition of additional operators using this format
2045 <operators xmlns='DAV:'>
2047 <like/><operand-property/><operand-literal/>
2074Reschke, et al. Standards Track [Page 37]
2076RFC 5323 WebDAV SEARCH November 2008
20795.19.9. Example of Query Schema for DAV:basicsearch
2081 <D:basicsearchschema xmlns:D="DAV:"
2082 xmlns:xs="http://www.w3.org/2001/XMLSchema">
2085 <D:prop><D:getcontentlength/></D:prop>
2086 <D:datatype><xs:nonNegativeInteger/></D:datatype>
2087 <D:searchable/><D:selectable/><D:sortable/>
2090 <D:prop><D:getcontenttype/><D:displayname/></D:prop>
2091 <D:searchable/><D:selectable/><D:sortable/>
2094 <D:prop><fstop xmlns="http://ns.example.org"/></D:prop>
2098 <D:any-other-property/>
2099 <D:searchable/><D:selectable/>
2104 <D:like/><D:operand-property/><D:operand-literal/>
2106 <D:opdesc allow-pcdata="yes">
2110 </D:basicsearchschema>
2112 This response lists four properties. The data type of the last three
2113 properties is not given, so it defaults to xs:string. All are
2114 selectable, and the first three may be searched. All but the last
2115 may be used in a sort. Of the optional DAV operators, DAV:contains
2116 and DAV:like are supported.
2118 Note: The schema discovery defined here does not provide for
2119 discovery of supported values of the "caseless" attribute. This
2120 may require that the reply also list the mandatory operators.
2130Reschke, et al. Standards Track [Page 38]
2132RFC 5323 WebDAV SEARCH November 2008
21356. Internationalization Considerations
2137 Properties may be language-tagged using the xml:lang attribute (see
2138 [RFC4918], Section 4.3). The optional operators DAV:language-defined
2139 (Section 5.12.1) and DAV:language-matches (Section 5.12.2) allow the
2140 expression of conditions on the language tagging information.
21427. Security Considerations
2144 This section is provided to detail issues concerning security
2145 implications of which DASL applications need to be aware. All of the
2146 security considerations of HTTP/1.1 ([RFC2616] and WebDAV ([RFC4918])
2147 also apply to DASL. In addition, this section will include security
2148 risks inherent in the search and retrieval of resource properties and
2151 A query MUST NOT allow clients to retrieve information that wouldn't
2152 have been available through the GET or PROPFIND methods in the first
2153 place. In particular:
2155 o Query constraints on WebDAV properties for which the client does
2156 not have read access need to be evaluated as if the property did
2157 not exist (see Section 5.5.3).
2159 o Query constraints on content (as with DAV:contains, defined in
2160 Section 5.16) for which the client does not have read access need
2161 to be evaluated as if a GET would return a 4xx status code.
2163 A server should prepare for denial-of-service attacks. For example a
2164 client may issue a query for which the result set is expensive to
2165 calculate or transmit because many resources match or must be
21687.1. Implications of XML External Entities
2170 XML supports a facility known as "external entities", defined in
2171 Section 4.2.2 of [XML], which instruct an XML processor to retrieve
2172 and perform an inline include of XML located at a particular URI. An
2173 external XML entity can be used to append or modify the document type
2174 declaration (DTD) associated with an XML document. An external XML
2175 entity can also be used to include XML within the content of an XML
2176 document. For non-validating XML, such as the XML used in this
2177 specification, including an external XML entity is not required by
2178 [XML]. However, [XML] does state that an XML processor may, at its
2179 discretion, include the external XML entity.
2181 External XML entities have no inherent trustworthiness and are
2182 subject to all the attacks that are endemic to any HTTP GET request.
2186Reschke, et al. Standards Track [Page 39]
2188RFC 5323 WebDAV SEARCH November 2008
2191 Furthermore, it is possible for an external XML entity to modify the
2192 DTD, and hence affect the final form of an XML document, in the worst
2193 case significantly modifying its semantics, or exposing the XML
2194 processor to the security risks discussed in [RFC3023]. Therefore,
2195 implementers must be aware that external XML entities should be
2196 treated as untrustworthy.
2198 There is also the scalability risk that would accompany a widely
2199 deployed application that made use of external XML entities. In this
2200 situation, it is possible that there would be significant numbers of
2201 requests for one external XML entity, potentially overloading any
2202 server that fields requests for the resource containing the external
2207 Query grammars are identified by URIs. Applications SHOULD NOT
2208 attempt to retrieve these URIs even if they appear to be retrievable
2209 (for example, those that begin with "http://").
22119. IANA Considerations
2213 This document uses the namespace defined in Section 21 of [RFC4918]
2218 This document specifies the HTTP header listed below, which has been
2219 added to the permanent HTTP header registry defined in [RFC3864].
2223 Header field name: DASL
2225 Applicable protocol: http
2229 Author/Change controller: IETF
2231 Specification document: this specification (Section 3.2)
2242Reschke, et al. Standards Track [Page 40]
2244RFC 5323 WebDAV SEARCH November 2008
2249 This document is based on prior work on the DASL protocol done by the
2250 WebDAV DASL working group until the year 2000 -- namely by Alan
2251 Babich, Jim Davis, Rick Henderson, Dale Lowry, Saveen Reddy, Surendra
2252 Reddy, and Judith Slein (see <http://www.webdav.org/dasl/> for the
2253 working group's web site,
2254 <http://purl.org/NET/webdav/dasl-references/reqs> for a requirements
2256 <http://purl.org/NET/webdav/dasl-references/dasl-protocol-00> for an
2257 early version of the specification).
2261 This document has benefited from thoughtful discussion by Lisa
2262 Dusseault, Javier Godoy, Sung Kim, Chris Newman, Elias Sinderson,
2263 Martin Wallmer, Keith Wannamaker, Jim Whitehead, and Kevin Wiggen.
226712.1. Normative References
2269 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate
2270 Requirement Levels", BCP 14, RFC 2119, March 1997.
2272 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Frystyk, H.,
2273 Masinter, L., Leach, P., and T. Berners-Lee,
2274 "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616,
2277 [RFC3023] Murata, M., St. Laurent, S., and D. Kohn, "XML Media
2278 Types", RFC 3023, January 2001.
2280 [RFC3253] Clemm, G., Amsden, J., Ellison, T., Kaler, C., and J.
2281 Whitehead, "Versioning Extensions to WebDAV (Web
2282 Distributed Authoring and Versioning)", RFC 3253,
2285 [RFC3744] Clemm, G., Reschke, J., Sedlar, E., and J. Whitehead,
2286 "Web Distributed Authoring and Versioning (WebDAV)
2287 Access Control Protocol", RFC 3744, May 2004.
2289 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter,
2290 "Uniform Resource Identifier (URI): Generic Syntax",
2291 STD 66, RFC 3986, January 2005.
2298Reschke, et al. Standards Track [Page 41]
2300RFC 5323 WebDAV SEARCH November 2008
2303 [RFC4918] Dusseault, L., Ed., "HTTP Extensions for Web
2304 Distributed Authoring and Versioning (WebDAV)",
2305 RFC 4918, June 2007.
2307 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for
2308 Syntax Specifications: ABNF", STD 68, RFC 5234,
2311 [XML] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E.,
2312 and F. Yergeau, "Extensible Markup Language (XML) 1.0
2313 (Fourth Edition)", W3C REC-xml-20060816, August 2006,
2314 <http://www.w3.org/TR/2006/REC-xml-20060816>.
2316 [XPATH] Clark, J. and S. DeRose, "XML Path Language (XPath)
2317 Version 1.0", W3C REC-xpath-19991116, November 1999,
2318 <http://www.w3.org/TR/1999/REC-xpath-19991116>.
2320 [XPATHFUNC] Malhotra, A., Melton, J., and N. Walsh, "XQuery 1.0
2321 and XPath 2.0 Functions and Operators", W3C REC-xpath-
2322 functions-20070123, January 2007, <http://www.w3.org/
2323 TR/2007/REC-xpath-functions-20070123/>.
2325 [XS1] Thompson, H., Beech, D., Maloney, M., Mendelsohn, N.,
2326 and World Wide Web Consortium, "XML Schema Part 1:
2327 Structures", W3C REC-xmlschema-1-20041028,
2329 <http://www.w3.org/TR/2004/REC-xmlschema-1-20041028/>.
2331 [XS2] Biron, P., Malhotra, A., and World Wide Web
2332 Consortium, "XML Schema Part 2: Datatypes Second
2333 Edition", W3C REC-xmlschema-2-20041028, October 2004,
2334 <http://www.w3.org/TR/2004/REC-xmlschema-2-20041028/>.
233612.2. Informative References
2338 [BCP47] Phillips, A. and M. Davis, "Matching of Language
2339 Tags", BCP 47, RFC 4647, September 2006.
2341 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration
2342 Procedures for Message Header Fields", BCP 90,
2343 RFC 3864, September 2004.
2345 [RFC4437] Whitehead, J., Clemm, G., and J. Reschke, Ed., "Web
2346 Distributed Authoring and Versioning (WebDAV) Redirect
2347 Reference Resources", RFC 4437, March 2006.
2354Reschke, et al. Standards Track [Page 42]
2356RFC 5323 WebDAV SEARCH November 2008
2359 [RFC4790] Newman, C., Duerst, M., and A. Gulbrandsen, "Internet
2360 Application Protocol Collation Registry", RFC 4790,
2363 [SQL99] Milton, J., "Database Language SQL Part 2: Foundation
2364 (SQL/Foundation)", ISO ISO/IEC 9075-2:1999 (E),
2367 [UNICODE5] The Unicode Consortium, "The Unicode Standard -
2368 Version 5.0", Addison-Wesley , November 2006,
2369 <http://www.unicode.org/versions/Unicode5.0.0/>.
2373 [WEBDAV-BIND] Clemm, G., Crawford, J., Reschke, J., Ed., and J.
2374 Whitehead, "Binding Extensions to Web Distributed
2375 Authoring and Versioning (WebDAV)", October 2008.
2379 [1] <urn:isbn:0321480910>
2410Reschke, et al. Standards Track [Page 43]
2412RFC 5323 WebDAV SEARCH November 2008
2415Appendix A. Three-Valued Logic in DAV:basicsearch
2417 ANSI standard three-valued logic is used when evaluating the search
2418 condition (as defined in the ANSI standard SQL specifications, for
2419 example, in ANSI X3.135-1992, Section 8.12, pp. 188-189, Section 8.2,
2420 p. 169, General Rule 1)a), etc.).
2422 ANSI standard three-valued logic is undoubtedly the most widely
2423 practiced method of dealing with the issues of properties in the
2424 search condition not having a value (e.g., being null or not defined)
2425 for the resource under scan, and with undefined expressions in the
2426 search condition (e.g., division by zero, etc.). Three valued logic
2429 Undefined expressions are expressions for which the value of the
2430 expression is not defined. Undefined expressions are a completely
2431 separate concept from the truth value UNKNOWN, which is, in fact,
2432 well defined. Property names and literal constants are considered
2433 expressions for purposes of this section. If a property in the
2434 current resource under scan has not been set to a value, then the
2435 value of that property is undefined for the resource under scan.
2436 DASL 1.0 has no arithmetic division operator, but if it did, division
2437 by zero would be an undefined arithmetic expression.
2439 If any subpart of an arithmetic, string, or datetime subexpression is
2440 undefined, the whole arithmetic, string, or datetime subexpression is
2443 There are no manifest constants to explicitly represent undefined
2444 number, string, or datetime values.
2446 Since a Boolean value is ultimately returned by the search condition,
2447 arithmetic, string, and datetime expressions are always arguments to
2448 other operators. Examples of operators that convert arithmetic,
2449 string, and datetime expressions to Boolean values are the six
2450 relational operators ("greater than", "less than", "equals", etc.).
2451 If either or both operands of a relational operator have undefined
2452 values, then the relational operator evaluates to UNKNOWN.
2453 Otherwise, the relational operator evaluates to TRUE or FALSE,
2454 depending upon the outcome of the comparison.
2456 The Boolean operators DAV:and, DAV:or, and DAV:not are evaluated
2457 according to the following rules:
2459 not UNKNOWN = UNKNOWN
2461 UNKNOWN and TRUE = UNKNOWN
2466Reschke, et al. Standards Track [Page 44]
2468RFC 5323 WebDAV SEARCH November 2008
2471 UNKNOWN and FALSE = FALSE
2473 UNKNOWN and UNKNOWN = UNKNOWN
2475 UNKNOWN or TRUE = TRUE
2477 UNKNOWN or FALSE = UNKNOWN
2479 UNKNOWN or UNKNOWN = UNKNOWN
2481Appendix B. Candidates for Future Protocol Extensions
2483 This section summarizes issues that have been raised during the
2484 development of this specification, but for which no resolution could
2485 be found with the constraints in place. Future revisions of this
2486 specification should revisit these issues, though.
2488B.1. Collation Support
2490 Matching and sorting of textual data relies on collations. With
2491 respect to WebDAV SEARCH, a combination of various design approaches
2494 o Require server support for specific collations.
2496 o Require that the server can advertise which collations it
2499 o Allow a client to select the collation to be used.
2501 In practice, the current implementations of WebDAV SEARCH usually
2502 rely on backends they do not control, and for which collation
2503 information may not be available. To make things worse,
2504 implementations of the DAV:basicsearch grammar frequently need to
2505 combine data from multiple underlying stores (such as properties and
2506 full text content), and thus collation support may vary based on the
2507 operator or property.
2509 Another open issue is what collation formalism to support. At the
2510 time of this writing, the two specifications below seem to provide
2511 the necessary framework and thus may be the base for future work on
2512 collation support in WebDAV SEARCH:
2514 1. "Internet Application Protocol Collation Registry" ([RFC4790]).
2516 2. "XQuery 1.0 and XPath 2.0 Functions and Operators" ([XPATHFUNC],
2522Reschke, et al. Standards Track [Page 45]
2524RFC 5323 WebDAV SEARCH November 2008
2529 DAV:basicsearch does not allow a request that returns the count of
2532 A protocol extension would need to extend DAV:select, and also modify
2533 the DAV:multistatus response format.
2535B.3. Diagnostics for Unsupported Queries
2537 There are many reasons why a given query may not be supported by a
2538 server. Query Schema Discovery (Section 4) can be used to discover
2539 some constraints, but not all.
2541 Future revisions should consider the introduction of specific
2542 condition codes ([RFC4918], Section 16) to these situations.
2544B.4. Language Matching
2546 Section 5.12.2 defines language matching in terms of the XPath "lang"
2547 function ([XPATH], Section 4.3). Future revisions should consider
2548 building on [BCP47] instead.
2550B.5. Matching Media Types
2552 Matching media types using the DAV:getcontenttype property and the
2553 DAV:like operator is hard due to DAV:getcontenttype also allowing
2554 parameters. A new operator specifically designed for the purpose of
2555 matching media types probably would simplify things a lot. See <http
2556 ://lists.w3.org/Archives/Public/www-webdav-dasl/2003OctDec/0109.html>
2557 for a specific proposal.
2561 DAV:basicsearch operates on the properties (and optionally the
2562 contents) of resources, and thus doesn't really allow matching on
2563 parts of the resource's URI. See <http://lists.w3.org/Archives/
2564 Public/www-webdav-dasl/2003OctDec/0100.html> for a proposed extension
2565 covering this use case.
2569 A frequently discussed feature is the ability to specifically request
2570 the "next" set of results, when either the server decided to truncate
2571 the result, or the client explicitly asked for a limited set (for
2572 instance, using the DAV:limit element defined in Section 5.17).
2578Reschke, et al. Standards Track [Page 46]
2580RFC 5323 WebDAV SEARCH November 2008
2583 In this case, it would be desirable if the server could keep the full
2584 query result, and provide a new URI identifying a separate result
2585 resource, allowing the client to retrieve additional data through GET
2586 requests, and remove the result through a DELETE request.
2588B.8. Search Scope Discovery
2590 Given a Search Arbiter resource, there's currently no way to discover
2591 programmatically the supported sets of search scopes. Future
2592 revisions of this specification could specify a scope discovery
2593 mechanism, similar to the Query Schema Discovery defined in
2599 caseless attribute 26-27, 34
2601 DAV:search-grammar-discovery-supported (pre) 9
2602 DAV:search-grammar-supported (pre) 9
2603 DAV:search-multiple-scope-supported (pre) 9
2604 DAV:search-scope-valid (pre) 9
2614 caseless attribute 27
2618 DAV:include-versions 23
2619 DAV:is-collection 30
2621 DAV:language-defined 29
2622 DAV:language-matches 29
2634Reschke, et al. Standards Track [Page 47]
2636RFC 5323 WebDAV SEARCH November 2008
2642 relationship to DAV:orderby 33
2643 DAV:search-grammar-discovery-supported precondition 9
2644 DAV:search-grammar-supported precondition 9
2645 DAV:search-multiple-scope-supported precondition 9
2646 DAV:search-scope-valid precondition 9
2648 DAV:supported-query-grammar-set property 14
2649 DAV:typed-literal 28
2658 DASL response header 14
2662 DAV:supported-query-grammar-set 14
2667 Query Grammar Discovery 13
2668 using live property 13
2675 Result Record Definition 5
2677 Result Set Truncation
2685 Sort Specification 6
2690Reschke, et al. Standards Track [Page 48]
2692RFC 5323 WebDAV SEARCH November 2008
2697 Julian F. Reschke (editor)
2703 Phone: +49 251 2807760
2704 EMail: julian.reschke@greenbytes.de
2705 URI: http://greenbytes.de/tech/webdav/
2710 303 Twin Dolphin Drive, Suite 600-37
2711 Redwood City, CA 94065
2714 Phone: +1 408 500 1135
2715 EMail: Surendra.Reddy@mitrix.com
2720 Toronto, Ontario M5S 2M8
2723 Phone: +1 416 929 5854
2724 EMail: jrd3@alum.mit.edu
2725 URI: http://www.econetwork.net/~jdavis
2730 Costa Mesa, CA 92626
2733 Phone: +1 714 327 3403
2734 EMail: ababich@us.ibm.com
2746Reschke, et al. Standards Track [Page 49]