idnits 2.17.1 draft-reschke-webdav-search-16.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** It looks like you're using RFC 3978 boilerplate. You should update this to the boilerplate described in the IETF Trust License Policy document (see https://trustee.ietf.org/license-info), which is required now. -- Found old boilerplate from RFC 3978, Section 5.1 on line 20. -- Found old boilerplate from RFC 3978, Section 5.5, updated by RFC 4748 on line 2700. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 2711. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 2718. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 2724. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- No issues found here. Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the IETF Trust Copyright Line does not match the current year == The document seems to use 'NOT RECOMMENDED' as an RFC 2119 keyword, but does not include the phrase in its RFC 2119 key words list. == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'SHOULD not' in this paragraph: Query grammars are identified by URIs. Applications SHOULD not attempt to retrieve these URIs even if they appear to be retrievable (for example, those that begin with "http://") -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (July 7, 2008) is 5766 days in the past. Is this intentional? Checking references for intended status: Proposed Standard ---------------------------------------------------------------------------- (See RFCs 3967 and 4897 for information about using normative references to lower-maturity documents in RFCs) ** Obsolete normative reference: RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) ** Obsolete normative reference: RFC 3023 (Obsoleted by RFC 7303) -- Possible downref: Non-RFC (?) normative reference: ref. 'XML' -- Possible downref: Non-RFC (?) normative reference: ref. 'XPATH' -- Possible downref: Non-RFC (?) normative reference: ref. 'XPATHFUNC' -- Possible downref: Non-RFC (?) normative reference: ref. 'XS1' -- Possible downref: Non-RFC (?) normative reference: ref. 'XS2' -- No information found for draft-dasl-requirements - is the name correct? Summary: 3 errors (**), 0 flaws (~~), 3 warnings (==), 13 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group J. Reschke, Ed. 3 Internet-Draft greenbytes 4 Intended status: Standards Track S. Reddy 5 Expires: January 8, 2009 Mitrix 6 J. Davis 8 A. Babich 9 IBM 10 July 7, 2008 12 Web Distributed Authoring and Versioning (WebDAV) SEARCH 13 draft-reschke-webdav-search-16 15 Status of this Memo 17 By submitting this Internet-Draft, each author represents that any 18 applicable patent or other IPR claims of which he or she is aware 19 have been or will be disclosed, and any of which he or she becomes 20 aware will be disclosed, in accordance with Section 6 of BCP 79. 22 Internet-Drafts are working documents of the Internet Engineering 23 Task Force (IETF), its areas, and its working groups. Note that 24 other groups may also distribute working documents as Internet- 25 Drafts. 27 Internet-Drafts are draft documents valid for a maximum of six months 28 and may be updated, replaced, or obsoleted by other documents at any 29 time. It is inappropriate to use Internet-Drafts as reference 30 material or to cite them other than as "work in progress." 32 The list of current Internet-Drafts can be accessed at 33 http://www.ietf.org/ietf/1id-abstracts.txt. 35 The list of Internet-Draft Shadow Directories can be accessed at 36 http://www.ietf.org/shadow.html. 38 This Internet-Draft will expire on January 8, 2009. 40 Abstract 42 This document specifies a set of methods, headers, properties and 43 content-types composing WebDAV SEARCH, an application of the HTTP/1.1 44 protocol to efficiently search for DAV resources based upon a set of 45 client-supplied criteria. 47 Editorial Note (To be removed by RFC Editor before publication) 49 Please send comments to the Distributed Authoring and Versioning 50 (WebDAV) DASL mailing list at , which 51 may be joined by sending a message with subject "subscribe" to 52 . Discussions of the WebDAV 53 DASL mailing list are archived at 54 . 56 An issues list and XML and HTML versions of this draft are available 57 from . 59 Table of Contents 61 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 6 62 1.1. DASL . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 63 1.2. Relationship to DAV . . . . . . . . . . . . . . . . . . . 6 64 1.3. Terms . . . . . . . . . . . . . . . . . . . . . . . . . . 6 65 1.4. Notational Conventions . . . . . . . . . . . . . . . . . . 8 66 1.5. Note on Usage of 'DAV:' XML Namespace . . . . . . . . . . 9 67 1.6. An Overview of DASL at Work . . . . . . . . . . . . . . . 9 68 2. The SEARCH Method . . . . . . . . . . . . . . . . . . . . . . 9 69 2.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 9 70 2.2. The Request . . . . . . . . . . . . . . . . . . . . . . . 9 71 2.2.1. The Request-URI . . . . . . . . . . . . . . . . . . . 10 72 2.2.2. The Request Body . . . . . . . . . . . . . . . . . . . 10 73 2.3. The Successful 207 (Multistatus) Response . . . . . . . . 11 74 2.3.1. Result Set Truncation . . . . . . . . . . . . . . . . 11 75 2.3.2. Extending the PROPFIND Response . . . . . . . . . . . 12 76 2.3.3. Example: A Simple Request and Response . . . . . . . . 12 77 2.3.4. Example: Result Set Truncation . . . . . . . . . . . . 13 78 2.4. Unsuccessful Responses . . . . . . . . . . . . . . . . . . 14 79 2.4.1. Example of an Invalid Scope . . . . . . . . . . . . . 14 80 3. Discovery of Supported Query Grammars . . . . . . . . . . . . 15 81 3.1. The OPTIONS Method . . . . . . . . . . . . . . . . . . . . 15 82 3.2. The DASL Response Header . . . . . . . . . . . . . . . . . 16 83 3.3. DAV:supported-query-grammar-set (protected) . . . . . . . 16 84 3.4. Example: Grammar Discovery . . . . . . . . . . . . . . . . 16 85 4. Query Schema Discovery: QSD . . . . . . . . . . . . . . . . . 19 86 4.1. Additional SEARCH Semantics . . . . . . . . . . . . . . . 19 87 4.1.1. Example of Query Schema Discovery . . . . . . . . . . 20 88 5. The DAV:basicsearch Grammar . . . . . . . . . . . . . . . . . 21 89 5.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 21 90 5.2. The DAV:basicsearch DTD . . . . . . . . . . . . . . . . . 22 91 5.2.1. Example Query . . . . . . . . . . . . . . . . . . . . 24 92 5.3. DAV:select . . . . . . . . . . . . . . . . . . . . . . . . 25 93 5.4. DAV:from . . . . . . . . . . . . . . . . . . . . . . . . . 25 94 5.4.1. Relationship to the Request-URI . . . . . . . . . . . 25 95 5.4.2. Scope . . . . . . . . . . . . . . . . . . . . . . . . 26 96 5.5. DAV:where . . . . . . . . . . . . . . . . . . . . . . . . 26 97 5.5.1. Use of Three-Valued Logic in Queries . . . . . . . . . 26 98 5.5.2. Handling Optional Operators . . . . . . . . . . . . . 26 99 5.5.3. Treatment of NULL Values . . . . . . . . . . . . . . . 26 100 5.5.4. Treatment of Properties with mixed/element Content . . 27 101 5.5.5. Example: Testing for Equality . . . . . . . . . . . . 27 102 5.5.6. Example: Relative Comparisons . . . . . . . . . . . . 27 103 5.6. DAV:orderby . . . . . . . . . . . . . . . . . . . . . . . 28 104 5.6.1. Example of Sorting . . . . . . . . . . . . . . . . . . 28 105 5.7. Boolean Operators: DAV:and, DAV:or, and DAV:not . . . . . 28 106 5.8. DAV:eq . . . . . . . . . . . . . . . . . . . . . . . . . . 29 107 5.9. DAV:lt, DAV:lte, DAV:gt, DAV:gte . . . . . . . . . . . . . 29 108 5.10. DAV:literal . . . . . . . . . . . . . . . . . . . . . . . 29 109 5.11. DAV:typed-literal (optional) . . . . . . . . . . . . . . . 29 110 5.11.1. Example for Typed Numerical Comparison . . . . . . . . 30 111 5.12. Support for Matching xml:lang Attributes on Properties . . 30 112 5.12.1. DAV:language-defined (optional) . . . . . . . . . . . 31 113 5.12.2. DAV:language-matches (optional) . . . . . . . . . . . 31 114 5.12.3. Example of Language-Aware Matching . . . . . . . . . . 31 115 5.13. DAV:is-collection . . . . . . . . . . . . . . . . . . . . 31 116 5.13.1. Example of DAV:is-collection . . . . . . . . . . . . . 32 117 5.14. DAV:is-defined . . . . . . . . . . . . . . . . . . . . . . 32 118 5.15. DAV:like . . . . . . . . . . . . . . . . . . . . . . . . . 32 119 5.15.1. Syntax for the Literal Pattern . . . . . . . . . . . . 33 120 5.15.2. Example of DAV:like . . . . . . . . . . . . . . . . . 33 121 5.16. DAV:contains . . . . . . . . . . . . . . . . . . . . . . . 33 122 5.16.1. Result Scoring (DAV:score Element) . . . . . . . . . . 34 123 5.16.2. Ordering by Score . . . . . . . . . . . . . . . . . . 35 124 5.16.3. Examples . . . . . . . . . . . . . . . . . . . . . . . 35 125 5.17. Limiting the Result Set . . . . . . . . . . . . . . . . . 35 126 5.17.1. Relationship to Result Ordering . . . . . . . . . . . 35 127 5.18. The 'caseless' XML Attribute . . . . . . . . . . . . . . . 36 128 5.19. Query Schema for DAV:basicsearch . . . . . . . . . . . . . 36 129 5.19.1. DTD for DAV:basicsearch QSD . . . . . . . . . . . . . 36 130 5.19.2. DAV:propdesc Element . . . . . . . . . . . . . . . . . 37 131 5.19.3. The DAV:datatype Property Description . . . . . . . . 37 132 5.19.4. The DAV:searchable Property Description . . . . . . . 38 133 5.19.5. The DAV:selectable Property Description . . . . . . . 38 134 5.19.6. The DAV:sortable Property Description . . . . . . . . 38 135 5.19.7. The DAV:caseless Property Description . . . . . . . . 38 136 5.19.8. The DAV:operators XML Element . . . . . . . . . . . . 38 137 5.19.9. Example of Query Schema for DAV:basicsearch . . . . . 40 138 6. Internationalization Considerations . . . . . . . . . . . . . 40 139 7. Security Considerations . . . . . . . . . . . . . . . . . . . 41 140 7.1. Implications of XML External Entities . . . . . . . . . . 41 141 8. Scalability . . . . . . . . . . . . . . . . . . . . . . . . . 42 142 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 42 143 9.1. HTTP Headers . . . . . . . . . . . . . . . . . . . . . . . 42 144 9.1.1. DASL . . . . . . . . . . . . . . . . . . . . . . . . . 42 145 10. Contributors . . . . . . . . . . . . . . . . . . . . . . . . . 42 146 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 43 147 12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 43 148 12.1. Normative References . . . . . . . . . . . . . . . . . . . 43 149 12.2. Informative References . . . . . . . . . . . . . . . . . . 44 150 Appendix A. Three-Valued Logic in DAV:basicsearch . . . . . . . . 45 151 Appendix B. Candidates for Future Protocol Extensions . . . . . . 46 152 B.1. Collation Support . . . . . . . . . . . . . . . . . . . . 46 153 B.2. Count . . . . . . . . . . . . . . . . . . . . . . . . . . 47 154 B.3. Diagnostics for Unsupported Queries . . . . . . . . . . . 47 155 B.4. Language Matching . . . . . . . . . . . . . . . . . . . . 47 156 B.5. Matching Media Types . . . . . . . . . . . . . . . . . . . 47 157 B.6. Query by Name . . . . . . . . . . . . . . . . . . . . . . 48 158 B.7. Result Paging . . . . . . . . . . . . . . . . . . . . . . 48 159 B.8. Search Scope Discovery . . . . . . . . . . . . . . . . . . 48 160 Appendix C. Change Log (to be removed by RFC Editor before 161 publication) . . . . . . . . . . . . . . . . . . . . 48 162 C.1. From draft-davis-dasl-protocol-xxx . . . . . . . . . . . . 48 163 C.2. since start of draft-reschke-webdav-search . . . . . . . . 50 164 C.3. since draft-reschke-webdav-search-00 . . . . . . . . . . . 52 165 C.4. since draft-reschke-webdav-search-01 . . . . . . . . . . . 52 166 C.5. since draft-reschke-webdav-search-02 . . . . . . . . . . . 52 167 C.6. since draft-reschke-webdav-search-03 . . . . . . . . . . . 53 168 C.7. since draft-reschke-webdav-search-04 . . . . . . . . . . . 53 169 C.8. since draft-reschke-webdav-search-05 . . . . . . . . . . . 54 170 C.9. since draft-reschke-webdav-search-06 . . . . . . . . . . . 54 171 C.10. since draft-reschke-webdav-search-07 . . . . . . . . . . . 55 172 C.11. since draft-reschke-webdav-search-08 . . . . . . . . . . . 55 173 C.12. since draft-reschke-webdav-search-09 . . . . . . . . . . . 55 174 C.13. since draft-reschke-webdav-search-10 . . . . . . . . . . . 56 175 C.14. since draft-reschke-webdav-search-11 . . . . . . . . . . . 56 176 C.15. since draft-reschke-webdav-search-12 . . . . . . . . . . . 56 177 C.16. since draft-reschke-webdav-search-13 . . . . . . . . . . . 56 178 C.17. since draft-reschke-webdav-search-14 . . . . . . . . . . . 56 179 C.18. since draft-reschke-webdav-search-15 . . . . . . . . . . . 57 180 Appendix D. Resolved issues (to be removed by RFC Editor 181 before publication) . . . . . . . . . . . . . . . . . 57 182 D.1. standardstrack . . . . . . . . . . . . . . . . . . . . . . 57 183 D.2. acls . . . . . . . . . . . . . . . . . . . . . . . . . . . 57 184 D.3. scope-discovery . . . . . . . . . . . . . . . . . . . . . 58 185 D.4. 3.2-listsyntax . . . . . . . . . . . . . . . . . . . . . . 58 186 Appendix E. Open issues (to be removed by RFC Editor prior to 187 publication) . . . . . . . . . . . . . . . . . . . . 58 188 E.1. edit . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 189 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 190 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 60 191 Intellectual Property and Copyright Statements . . . . . . . . . . 62 193 1. Introduction 195 1.1. DASL 197 This document defines Web Distributed Authoring and Versioning 198 (WebDAV) SEARCH, an application of HTTP/1.1 forming a lightweight 199 search protocol to transport queries and result sets that allows 200 clients to make use of server-side search facilities. It is based on 201 the expired internet draft for DAV Searching & Locating [DASL]. 202 [DASLREQ] describes the motivation for DASL. In this specification, 203 the terms "WebDAV SEARCH" and "DASL" are used interchangeably. 205 DASL minimizes the complexity of clients so as to facilitate 206 widespread deployment of applications capable of utilizing the DASL 207 search mechanisms. 209 DASL consists of: 211 o the SEARCH method and the request/response formats defined for it 212 (Section 2), 214 o feature discovery through the "DASL" response header and the 215 optional DAV:supported-grammar-set property (Section 3), 217 o optional grammar schema discovery (Section 4) and 219 o one mandatory grammar: DAV:basicsearch (Section 5). 221 1.2. Relationship to DAV 223 DASL relies on the resource and property model defined by [RFC4918]. 224 DASL does not alter this model. Instead, DASL allows clients to 225 access DAV-modeled resources through server-side search. 227 1.3. Terms 229 This document uses the terms defined in [RFC2616], in [RFC4918], in 230 [RFC3253] and in this section. 232 Criteria 234 An expression against which each resource in the search scope is 235 evaluated. 237 Query 239 A query is a combination of a search scope, search criteria, 240 result record definition, sort specification, and a search 241 modifier. 243 Query Grammar 245 A set of definitions of XML elements, attributes, and constraints 246 on their relations and values that defines a set of queries and 247 the intended semantics. 249 Query Schema 251 A listing, for any given grammar and scope, of the properties and 252 operators that may be used in a query with that grammar and scope. 254 Result 256 A result is a result set, optionally augmented with other 257 information describing the search as a whole. 259 Result Record 261 A description of a resource. A result record is a set of 262 properties, and possibly other descriptive information. 264 Result Record Definition 266 A specification of the set of properties to be returned in the 267 result record. 269 Result Set 271 A set of records, one for each resource for which the search 272 criteria evaluated to True. 274 Scope 276 A set of resources to be searched. 278 Search Arbiter 280 A resource that supports the SEARCH method. 282 Search Modifier 284 An instruction that governs the execution of the query but is not 285 part of the search scope, result record definition, the search 286 criteria, or the sort specification. An example of a search 287 modifier is one that controls how much time the server can spend 288 on the query before giving a response. 290 Sort Specification 292 A specification of an ordering on the result records in the result 293 set. 295 1.4. Notational Conventions 297 This specification uses the Augmented Backus-Naur Form (ABNF) 298 notation of [RFC5234], unless explicitly stated otherwise. 300 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", 301 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 302 document are to be interpreted as described in [RFC2119]. 304 This document uses XML DTD fragments ([XML], Section 3.2) as a purely 305 notational convention. WebDAV request and response bodies can not be 306 validated by a DTD due to the specific extensibility rules defined in 307 Section 17 of [RFC4918] and due to the fact that all XML elements 308 defined by this specification use the XML namespace name "DAV:". In 309 particular: 311 1. element names use the "DAV:" namespace, 313 2. element ordering is irrelevant unless explicitly stated, 315 3. extension elements (elements not already defined as valid child 316 elements) may be added anywhere, except when explicitly stated 317 otherwise, 319 4. extension attributes (attributes not already defined as valid for 320 this element) may be added anywhere, except when explicitly 321 stated otherwise. 323 When an XML element type in the "DAV:" namespace is referenced in 324 this document outside of the context of an XML fragment, the string 325 "DAV:" will be prefixed to the element type. 327 Similarly, when an XML element type in the namespace 328 "http://www.w3.org/2001/XMLSchema" is referenced in this document 329 outside of the context of an XML fragment, the string "xs:" will be 330 prefixed to the element type. 332 This document inherits, and sometimes extends, DTD productions from 333 Section 14 of [RFC4918]. 335 1.5. Note on Usage of 'DAV:' XML Namespace 337 This specification defines elements, properties and condition names 338 in the XML namespace "DAV:". In general, only specifications 339 authored by IETF working groups are supposed to do this. In this 340 case an exception was made, because WebDAV SEARCH started its life in 341 the IETF DASL working group (, and at 342 the time the working group closed down there was already significant 343 deployment of this specification. 345 1.6. An Overview of DASL at Work 347 One can express the basic usage of DASL in the following steps: 349 o The client constructs a query using the DAV:basicsearch grammar. 351 o The client invokes the SEARCH method on a resource that will 352 perform the search (the search arbiter) and includes a text/xml or 353 application/xml request entity that contains the query. 355 o The search arbiter performs the query. 357 o The search arbiter sends the results of the query back to the 358 client in the response. The server MUST send an entity that 359 matches the WebDAV multistatus format ([RFC4918], Section 13). 361 2. The SEARCH Method 363 2.1. Overview 365 The client invokes the SEARCH method to initiate a server-side 366 search. The body of the request defines the query. The server MUST 367 emit an entity matching the WebDAV multistatus format ([RFC4918], 368 Section 13). 370 The SEARCH method plays the role of transport mechanism for the query 371 and the result set. It does not define the semantics of the query. 372 The type of the query defines the semantics. 374 2.2. The Request 376 The client invokes the SEARCH method on the resource named by the 377 Request-URI. 379 2.2.1. The Request-URI 381 The Request-URI identifies the search arbiter. Any HTTP resource may 382 function as search arbiter. It is not a new type of resource (in the 383 sense of DAV:resourcetype as defined in [RFC4918], Section 15.9), nor 384 does it have to be a WebDAV-compliant resource. 386 The SEARCH method defines no relationship between the arbiter and the 387 scope of the search, rather the particular query grammar used in the 388 query defines the relationship. For example, a query grammar may 389 force the Request-URI to correspond exactly to the search scope. 391 2.2.2. The Request Body 393 The server MUST process a text/xml or application/xml request body, 394 and MAY process request bodies in other formats. See [RFC3023] for 395 guidance on packaging XML in requests. 397 Marshalling: 399 If a request body with content type text/xml or application/xml is 400 included, it MUST be either a DAV:searchrequest or a DAV:query- 401 schema-discovery XML element. Its single child element identifies 402 the query grammar. 404 For DAV:searchrequest, the definition of search criteria, the 405 result record, and any other details needed to perform the search 406 depend on the individual search grammar. 408 For DAV:query-schema-discovery, the semantics is defined in 409 Section 4. 411 Preconditions: 413 (DAV:search-grammar-discovery-supported): when an XML request body 414 is present and has a DAV:query-schema-discovery document element, 415 the server MUST support the query schema discovery mechanism 416 described in Section 4. 418 (DAV:search-grammar-supported): when an XML request body is 419 present, the search grammar identified by the document element's 420 child element must be a supported search grammar. 422 (DAV:search-multiple-scope-supported): if the SEARCH request 423 specified multiple scopes, the server MUST support this optional 424 feature. 426 (DAV:search-scope-valid): the supplied search scope must be valid. 427 There can be various reasons for a search scope to be invalid, 428 including unsupported URI schemes and communication problems. 429 Servers MAY add [RFC4918] compliant DAV:response elements as 430 content to the condition element indicating the precise reason for 431 the failure. 433 2.3. The Successful 207 (Multistatus) Response 435 If the server returns 207 (Multistatus), then the search proceeded 436 successfully and the response MUST use the WebDAV multistatus format 437 ([RFC4918], Section 13). The results of this method SHOULD NOT be 438 cached. 440 There MUST be one DAV:response for each resource that matched the 441 search criteria. For each such response, the DAV:href element 442 contains the URI of the resource, and the response MUST include a 443 DAV:propstat element. 445 Note: the WebDAV multistatus format requires at least one DAV: 446 response child element. This specification relaxes that 447 restriction so that empty results can be represented. 449 Note that for each matching resource found there may be multiple URIs 450 within the search scope mapped to it. In this case, a server SHOULD 451 report only one of these URIs. Clients can use the live property 452 DAV:resource-id defined in Section 3.1 of [draft-ietf-webdav-bind] to 453 identify possible duplicates. 455 2.3.1. Result Set Truncation 457 A server MAY limit the number of resources in a reply, for example to 458 limit the amount of resources expended in processing a query. If it 459 does so, the reply MUST use status code 207, return a DAV:multistatus 460 response body and indicate a status of 507 (Insufficient Storage) for 461 the search arbiter URI. It SHOULD include the partial results. 463 When a result set is truncated, there may be many more resources that 464 satisfy the search criteria but that were not examined. 466 If partial results are included and the client requested an ordered 467 result set in the original request, then any partial results that are 468 returned MUST be ordered as the client directed. 470 Note that the partial results returned MAY be any subset of the 471 result set that would have satisfied the original query. 473 2.3.2. Extending the PROPFIND Response 475 A response MAY include more information than PROPFIND defines so long 476 as the extra information does not invalidate the PROPFIND response. 477 Query grammars SHOULD define how the response matches the PROPFIND 478 response. 480 2.3.3. Example: A Simple Request and Response 482 This example demonstrates the request and response framework. The 483 following XML document shows a simple (hypothetical) natural language 484 query. The name of the query element is natural-language-query in 485 the XML namespace "http://example.com/foo". The actual query is 486 "Find the locations of good Thai restaurants in Los Angeles". For 487 this hypothetical query, the arbiter returns two properties for each 488 selected resource. 490 >> Request: 492 SEARCH / HTTP/1.1 493 Host: example.org 494 Content-Type: application/xml; charset="utf-8" 495 Content-Length: 252 497 498 499 500 Find the locations of good Thai restaurants in Los Angeles 501 502 503 >> Response: 505 HTTP/1.1 207 Multi-Status 506 Content-Type: text/xml; charset="utf-8" 507 Content-Length: 429 509 510 512 513 http://siamiam.example/ 514 515 516 259 W. Hollywood 517 4 518 519 HTTP/1.1 200 OK 520 521 522 524 2.3.4. Example: Result Set Truncation 526 In the example below, the server returns just two results, and then 527 indicates that the result is truncated by adding a DAV:response 528 element for the search arbiter resource with 507 (Insufficient 529 Storage) status. 531 >> Request: 533 SEARCH / HTTP/1.1 534 Host: example.net 535 Content-Type: text/xml; charset="utf-8" 536 Content-Length: xxx 538 ... the query goes here ... 540 >> Response: 542 HTTP/1.1 207 Multistatus 543 Content-Type: text/xml; charset="utf-8" 544 Content-Length: 640 546 547 548 549 http://www.example.net/sounds/unbrokenchain.au 550 HTTP/1.1 200 OK 551 552 553 http://tech.mit.example/arch96/photos/Lesh1.jpg 554 HTTP/1.1 200 OK 555 556 557 http://example.net 558 HTTP/1.1 507 Insufficient Storage 559 560 Only first two matching records were returned 561 562 563 565 2.4. Unsuccessful Responses 567 If a SEARCH request could not be executed or the attempt to execute 568 it resulted in an error, the server MUST indicate the failure with an 569 appropriate status code and SHOULD add a response body as defined in 570 [RFC3253], Section 1.6. Unless otherwise stated, condition elements 571 are empty, however specific condition elements MAY include additional 572 child elements that describe the error condition in more detail. 574 2.4.1. Example of an Invalid Scope 576 In the example below, a request failed because the scope identifies a 577 HTTP resource that was not found. 579 >> Response: 581 HTTP/1.1 409 Conflict 582 Content-Type: text/xml; charset="utf-8" 583 Content-Length: 275 585 586 587 588 589 http://www.example.com/X 590 HTTP/1.1 404 Object Not Found 591 592 593 595 3. Discovery of Supported Query Grammars 597 Servers MUST support discovery of the query grammars supported by a 598 search arbiter resource. 600 Clients can determine which query grammars are supported by an 601 arbiter by invoking OPTIONS on the search arbiter. If the resource 602 supports SEARCH, then the DASL response header will appear in the 603 response. The DASL response header lists the supported grammars. 605 Servers supporting the WebDAV extensions [RFC3253] and/or [RFC3744] 606 MUST also 608 o report SEARCH in the live property DAV:supported-method-set for 609 all search arbiter resources and 611 o support the live property DAV:supported-query-grammar-set as 612 defined in Section 3.3. 614 3.1. The OPTIONS Method 616 The OPTIONS method allows the client to discover if a resource 617 supports the SEARCH method and to determine the list of search 618 grammars supported for that resource. 620 The client issues the OPTIONS method against a resource named by the 621 Request-URI. This is a normal invocation of OPTIONS as defined in 622 Section 9.2 of [RFC2616]. 624 If a resource supports the SEARCH method, then the server MUST list 625 SEARCH in the Allow header defined in Section 14.7 of [RFC2616]. 627 DASL servers MUST include the DASL header in the OPTIONS response. 628 This header identifies the search grammars supported by that 629 resource. 631 3.2. The DASL Response Header 633 DASLHeader = "DASL" ":" 1#Coded-URL 634 Coded-URL = 636 (This grammar uses the augmented BNF format defined in Section 2.1 of 637 [RFC2616]) 639 The DASL response header indicates server support for query grammars 640 in the OPTIONS method. The value is a list of URIs that indicate the 641 types of supported grammars. Note that although the URIs can be used 642 to identify each supported search grammar, there is not necessarily a 643 direct relationship between the URI and the XML element name that can 644 be used in XML based SEARCH requests (the element name itself is 645 identified by its namespace name (a URI reference) and the element's 646 local name). 648 Note: this header field value is defined as a comma-separated list 649 ([RFC2616], Section 4.2), thus grammar URIs can appear in multiple 650 header instances, separated by commas, or both. 652 For example: 654 DASL: , 655 , 656 DASL: 658 3.3. DAV:supported-query-grammar-set (protected) 660 This WebDAV property is required for any server supporting either 661 [RFC3253] and/or [RFC3744] and identifies the XML based query 662 grammars that are supported by the search arbiter resource. 664 665 666 667 669 3.4. Example: Grammar Discovery 671 This example shows that the server supports search on the /somefolder 672 resource with the query grammars: DAV:basicsearch, 673 http://foobar.example/syntax1 and http://akuma.example/syntax2. Note 674 that servers supporting WebDAV SEARCH MUST support DAV:basicsearch. 676 >> Request: 678 OPTIONS /somefolder HTTP/1.1 679 Host: example.org 681 >> Response: 683 HTTP/1.1 200 OK 684 Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE 685 Allow: MKCOL, PROPFIND, PROPPATCH, LOCK, UNLOCK, SEARCH 686 DASL: 687 DASL: , 689 This example shows the equivalent taking advantage of a server's 690 support for DAV:supported-method-set and DAV:supported-query-grammar- 691 set. 693 >> Request: 695 PROPFIND /somefolder HTTP/1.1 696 Host: example.org 697 Depth: 0 698 Content-Type: text/xml; charset="utf-8" 699 Content-Length: 165 701 702 703 704 705 706 707 708 >> Response: 710 HTTP/1.1 207 Multi-Status 711 Content-Type: text/xml; charset="utf-8" 712 Content-Length: 1349 714 715 716 717 http://example.org/somefolder 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 HTTP/1.1 200 OK 750 751 752 754 Note that the query grammar element names marshalled as part of the 755 DAV:supported-query-grammar-set can be directly used as element names 756 in an XML based query. 758 4. Query Schema Discovery: QSD 760 Servers MAY support the discovery of the schema for a query grammar. 762 The DASL response header and the DAV:supported-query-grammar-set 763 property provide means for clients to discover the set of query 764 grammars supported by a resource. This alone is not sufficient 765 information for a client to generate a query. For example, the DAV: 766 basicsearch grammar defines a set of queries consisting of a set of 767 operators applied to a set of properties and values, but the grammar 768 itself does not specify which properties may be used in the query. 769 QSD for the DAV:basicsearch grammar allows a client to discover the 770 set of properties that are searchable, selectable, and sortable. 771 Moreover, although the DAV:basicsearch grammar defines a minimal set 772 of operators, it is possible that a resource might support additional 773 operators in a query. For example, a resource might support an 774 optional operator that can be used to express content-based queries 775 in a proprietary syntax. QSD allows a client to discover these 776 operators and their syntax. The set of discoverable quantities will 777 differ from grammar to grammar, but each grammar can define a means 778 for a client to discover what can be discovered. 780 In general, the schema for a given query grammar depends on both the 781 resource (the arbiter) and the scope. A given resource might have 782 access to one set of properties for one potential scope, and another 783 set for a different scope. For example, consider a server able to 784 search two distinct collections, one holding cooking recipes, the 785 other design documents for nuclear weapons. While both collections 786 might support properties such as author, title, and date, the first 787 might also define properties such as calories and preparation time, 788 while the second defined properties such as yield and applicable 789 patents. Two distinct arbiters indexing the same collection might 790 also have access to different properties. For example, the recipe 791 collection mentioned above might also be indexed by a value-added 792 server that also stored the names of chefs who had tested the recipe. 793 Note also that the available query schema might also depend on other 794 factors, such as the identity of the principal conducting the search, 795 but these factors are not exposed in this protocol. 797 4.1. Additional SEARCH Semantics 799 Each query grammar supported by DASL defines its own syntax for 800 expressing the possible query schema. A client retrieves the schema 801 for a given query grammar on an arbiter resource with a given scope 802 by invoking the SEARCH method on that arbiter with that grammar and 803 scope and with a root element of DAV:query-schema-discovery rather 804 than DAV:searchrequest. 806 Marshalling: 808 The request body MUST be a DAV:query-schema-discovery element. 810 811 814 The response body takes the form of a DAV:multistatus element 815 ([RFC4918], Section 13), where DAV:response is extended to hold 816 the returned query grammar inside a DAV:query-schema container 817 element. 819 821 823 The content of this container is an XML element whose name and syntax 824 depend upon the grammar, and whose value may (and likely will) vary 825 depending upon the grammar, arbiter, and scope. 827 4.1.1. Example of Query Schema Discovery 829 In this example, the arbiter is recipes.example, the grammar is DAV: 830 basicsearch, the scope is also recipes.example. 832 >> Request: 834 SEARCH / HTTP/1.1 835 Host: recipes.example 836 Content-Type: application/xml; charset="utf-8" 837 Content-Length: 258 839 840 841 842 843 844 http://recipes.example 845 infinity 846 847 848 849 850 >> Response: 852 HTTP/1.1 207 Multistatus 853 Content-Type: application/xml; charset="utf-8" 854 Content-Length: xxx 856 857 858 859 http://recipes.example 860 HTTP/1.1 200 OK 861 862 863 865 866 867 868 870 The query schema for DAV:basicsearch is defined in Section 5.19. 872 5. The DAV:basicsearch Grammar 874 5.1. Introduction 876 DAV:basicsearch uses an extensible XML syntax that allows clients to 877 express search requests that are generally useful for WebDAV 878 scenarios. DASL-extended servers MUST accept this grammar, and MAY 879 accept other grammars. 881 DAV:basicsearch has several components: 883 o DAV:select provides the result record definition. 885 o DAV:from defines the scope. 887 o DAV:where defines the criteria. 889 o DAV:orderby defines the sort order of the result set. 891 o DAV:limit provides constraints on the query as a whole. 893 5.2. The DAV:basicsearch DTD 895 897 899 901 903 905 906 907 909 910 911 912 914 915 917 920 922 924 926 928 929 931 932 934 935 937 938 940 941 943 944 945 947 948 950 951 953 954 956 957 959 960 961 962 963 965 967 968 970 5.2.1. Example Query 972 This query retrieves the content length values for all resources 973 located under the server's "/container1/" URI namespace whose length 974 exceeds 10000 sorted ascending by size. 976 977 978 979 980 981 982 983 /container1/ 984 infinity 985 986 987 988 989 990 10000 991 992 993 994 995 996 997 998 999 1000 1002 5.3. DAV:select 1004 DAV:select defines the result record, which is a set of properties 1005 and values. This document defines two possible values: DAV:allprop 1006 and DAV:prop, both defined in Section 14 of [RFC4918]. 1008 5.4. DAV:from 1010 1011 1013 DAV:from defines the query scope. This contains one or more DAV: 1014 scope elements. Support for multiple scope elements is optional, 1015 however servers MUST fail a request specifying multiple DAV:scope 1016 elements if they can't support it (see Section 2.2.2, precondition 1017 DAV:search-multiple-scope-supported). The scope element contains 1018 mandatory DAV:href and DAV:depth elements. 1020 DAV:href indicates the URI reference ([RFC3986], Section 4.1) to use 1021 as a scope. 1023 When the scope is a collection, if DAV:depth is "0", the search 1024 includes only the collection. When it is "1", the search includes 1025 the collection and its immediate children. When it is "infinity", it 1026 includes the collection and all its progeny. 1028 When the scope is not a collection, the depth is ignored and the 1029 search applies just to the resource itself. 1031 If the server supports WebDAV Redirect Reference Resources 1032 ([RFC4437]) and the search scope contains a redirect reference 1033 resource, then it applies only to that resource, not to its target. 1035 When the child element DAV:include-versions is present, the search 1036 scope will include all versions (see [RFC3253], Section 2.2.1) of all 1037 version-controlled resources in scope. Servers that do support 1038 versioning but do not support the DAV:include-versions feature MUST 1039 signal an error if it is used in a query (see Section 2.2.2, 1040 precondition DAV:search-scope-valid). 1042 5.4.1. Relationship to the Request-URI 1044 If the DAV:scope element is an URI ([RFC3986], Section 3), the scope 1045 is exactly that URI. 1047 If the DAV:scope element is a relative reference ([RFC3986], Section 1048 4.2), the scope is taken to be relative to the Request-URI. 1050 5.4.2. Scope 1052 A Scope can be an arbitrary URI reference. 1054 Servers, of course, may support only particular scopes. This may 1055 include limitations for particular schemes such as "http:" or "ftp:" 1056 or certain URI namespaces. However, WebDAV compliant search arbiters 1057 minimally SHOULD support scopes that match their own URI. 1059 5.5. DAV:where 1061 The DAV:where element defines the search condition for inclusion of 1062 resources in the result set. The value of this element is an XML 1063 element that defines a search operator that evaluates to one of the 1064 Boolean truth values TRUE, FALSE, or UNKNOWN. The search operator 1065 contained by DAV:where may itself contain and evaluate additional 1066 search operators as operands, which in turn may contain and evaluate 1067 additional search operators as operands, etc. recursively. 1069 5.5.1. Use of Three-Valued Logic in Queries 1071 Each operator defined for use in the where clause that returns a 1072 Boolean value MUST evaluate to TRUE, FALSE, or UNKNOWN. The resource 1073 under scan is included as a member of the result set if and only if 1074 the search condition evaluates to TRUE. 1076 Consult Appendix A for details on the application of three-valued 1077 logic in query expressions. 1079 5.5.2. Handling Optional Operators 1081 If a query contains an operator that is not supported by the server, 1082 then the server MUST respond with a 422 (Unprocessable Entity) status 1083 code. 1085 5.5.3. Treatment of NULL Values 1087 If a PROPFIND for a property value would yield a non-2xx (see 1088 [RFC2616], Section 10.2) response for that property, then that 1089 property is considered NULL. 1091 NULL values are "less than" all other values in comparisons. 1093 Empty strings (zero length strings) are not NULL values. An empty 1094 string is "less than" a string with length greater than zero. 1096 The DAV:is-defined operator is defined to test if the value of a 1097 property is not NULL. 1099 5.5.4. Treatment of Properties with mixed/element Content 1101 Comparisons of properties that do not have simple types (text-only 1102 content) is out-of-scope for the standard operators defined for DAV: 1103 basicsearch and therefore is defined to be UNKNOWN (as per 1104 Appendix A). For querying the DAV:resourcetype property, see 1105 Section 5.13. 1107 5.5.5. Example: Testing for Equality 1109 The example shows a single operator (DAV:eq) applied in the criteria. 1111 1112 1113 1114 1115 1116 100 1117 1118 1120 5.5.6. Example: Relative Comparisons 1122 The example shows a more complex operation involving several 1123 operators (DAV:and, DAV:eq, DAV:gt) applied in the criteria. This 1124 DAV:where expression matches those resources of type "image/gif" over 1125 4K in size. 1127 1128 1129 1130 1131 1132 1133 image/gif 1134 1135 1136 1137 1138 1139 4096 1140 1141 1142 1144 5.6. DAV:orderby 1146 The DAV:orderby element specifies the ordering of the result set. It 1147 contains one or more DAV:order elements, each of which specifies a 1148 comparison between two items in the result set. Informally, a 1149 comparison specifies a test that determines whether one resource 1150 appears before another in the result set. Comparisons are applied in 1151 the order they occur in the DAV:orderby element, earlier comparisons 1152 being more significant. 1154 The comparisons defined here use only a single property from each 1155 resource, compared using the same ordering as the DAV:lt operator 1156 (ascending) or DAV:gt operator (descending). If neither direction is 1157 specified, the default is DAV:ascending. 1159 In the context of the DAV:orderby element, null values are considered 1160 to collate before any actual (i.e., non null) value, including 1161 strings of zero length (this is compatible with [SQL99]). 1163 The "caseless" attribute may be used to indicate case-sensitivity for 1164 comparisons (Section 5.18). 1166 5.6.1. Example of Sorting 1168 This sort orders first by last name of the author, and then by size, 1169 in descending order, so that for each author, the largest works 1170 appear first. 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1183 5.7. Boolean Operators: DAV:and, DAV:or, and DAV:not 1185 The DAV:and operator performs a logical AND operation on the 1186 expressions it contains. 1188 The DAV:or operator performs a logical OR operation on the values it 1189 contains. 1191 The DAV:not operator performs a logical NOT operation on the values 1192 it contains. 1194 5.8. DAV:eq 1196 The DAV:eq operator provides simple equality matching on property 1197 values. 1199 The "caseless" attribute may be used with this element 1200 (Section 5.18). 1202 5.9. DAV:lt, DAV:lte, DAV:gt, DAV:gte 1204 The DAV:lt, DAV:lte, DAV:gt, and DAV:gte operators provide 1205 comparisons on property values, using less-than, less-than or equal, 1206 greater-than, and greater-than or equal respectively. The "caseless" 1207 attribute may be used with these elements (Section 5.18). 1209 5.10. DAV:literal 1211 DAV:literal allows literal values to be placed in an expression. 1213 White space in literal values is significant in comparisons. For 1214 consistency with [RFC4918], clients SHOULD NOT specify the attribute 1215 "xml:space" (Section 2.10 of [XML]) to override this behavior. 1217 In comparisons, the contents of DAV:literal SHOULD be treated as 1218 string, with the following exceptions: 1220 o when operand for a comparison with a DAV:getcontentlength 1221 property, it SHOULD be treated as an unsigned integer value (the 1222 behavior for values not in this format is undefined), 1224 o when operand for a comparison with a DAV:creationdate or DAV: 1225 getlastmodified property, it SHOULD be treated as a date value in 1226 the ISO-8601 subset defined for the DAV:creationdate property (see 1227 [RFC4918], Section 15.1; the behavior of values not in this format 1228 is undefined), 1230 o when operand for a comparison with a property for which the type 1231 is known and when compatible with that type, it MAY be treated 1232 according to this type. 1234 5.11. DAV:typed-literal (optional) 1236 There are situations in which a client may want to force a comparison 1237 not to be string-based (as defined for DAV:literal). In these cases, 1238 a typed comparison can be enforced by using DAV:typed-literal 1239 instead. 1241 1243 The data type is specified using the xsi:type attribute defined in 1244 [XS1], Section 2.6.1. If the type is not specified, it defaults to 1245 "xs:string". 1247 A server MUST reject a request with an unknown type with a status of 1248 422 (Unprocessable Entity). It SHOULD reject a request if the value 1249 provided in DAV:typed-literal can not be cast to the specified type. 1251 The comparison evaluates to UNKNOWN if the property value can not be 1252 cast to the specified datatype (see [XPATHFUNC], Section 17). 1254 5.11.1. Example for Typed Numerical Comparison 1256 Consider a set of resources with the dead property "edits" in the 1257 namespace "http://ns.example.org": 1259 +-----+----------------+ 1260 | URI | property value | 1261 +-----+----------------+ 1262 | /a | "-1" | 1263 | /b | "01" | 1264 | /c | "3" | 1265 | /d | "test" | 1266 | /e | (undefined) | 1267 +-----+----------------+ 1269 The expression 1271 1274 1275 3 1276 1278 will evaluate to TRUE for the resources "/a" and "/b" (their property 1279 values can be parsed as type xs:integer, and the numerical comparison 1280 evaluates to true), to FALSE for "/c" (property value is compatible, 1281 but numerical comparison evaluates to false) and UNKNOWN for "/d" and 1282 "/e" (the property either is undefined, or its value can not be 1283 parsed as xs:integer). 1285 5.12. Support for Matching xml:lang Attributes on Properties 1287 The following two optional operators can be used to express 1288 conditions on the language of a property value (as expressed using 1289 the xml:lang attribute). 1291 5.12.1. DAV:language-defined (optional) 1293 1295 This operator evaluates to TRUE if the language for the value of the 1296 given property is known, FALSE if it isn't and UNKNOWN if the 1297 property itself is not defined. 1299 5.12.2. DAV:language-matches (optional) 1301 1303 This operator evaluates to TRUE if the language for the value of the 1304 given property is known and matches the language name given in the 1305 element, FALSE if it doesn't match and UNKNOWN if the 1306 property itself is not defined. 1308 Languages are considered to match if they are the same, or if the 1309 language of the property value is a sublanguage of the language 1310 specified in the element (see [XPATH], Section 4.3, "lang 1311 function"). 1313 5.12.3. Example of Language-Aware Matching 1315 The expression below will evaluate to TRUE if the property "foobar" 1316 exists and its language is either unknown, English or a sublanguage 1317 of English. 1319 1320 1321 1322 1323 1324 1325 1326 1327 en 1328 1329 1331 5.13. DAV:is-collection 1333 The DAV:is-collection operator allows clients to determine whether a 1334 resource is a collection (that is, whether its DAV:resourcetype 1335 element contains the element DAV:collection). 1337 Rationale: This operator is provided in lieu of defining generic 1338 structure queries, which would suffice for this and for many more 1339 powerful queries, but seems inappropriate to standardize at this 1340 time. 1342 5.13.1. Example of DAV:is-collection 1344 This example shows a search criterion that picks out all and only the 1345 resources in the scope that are collections. 1347 1348 1349 1351 5.14. DAV:is-defined 1353 The DAV:is-defined operator allows clients to determine whether a 1354 property is defined on a resource. The meaning of "defined on a 1355 resource" is found in Section 5.5.3. 1357 Example: 1359 1360 1361 1363 5.15. DAV:like 1365 The DAV:like is an optional operator intended to give simple 1366 wildcard-based pattern matching ability to clients. 1368 The operator takes two arguments. 1370 The first argument is a DAV:prop element identifying a single 1371 property to evaluate. 1373 The second argument is a DAV:literal element that gives the pattern 1374 matching string. 1376 5.15.1. Syntax for the Literal Pattern 1378 pattern = [wildcard] 0*( text [wildcard] ) 1380 wildcard = exactlyone / zeroormore 1381 text = 1*( character / escapeseq ) 1383 exactlyone = "_" 1384 zeroormore = "%" 1385 escapechar = "\" 1386 escapeseq = escapechar ( exactlyone / zeroormore / escapechar ) 1388 ; character: see [XML], Section 2.2, minus wildcard / escapechar 1389 character = HTAB / LF / CR ; whitespace 1390 character =/ %x20-24 / %x26-5B / %x5D-5E / %x60-D7FF 1391 character =/ %xE000-FFFD / %x10000-10FFFF 1393 (Note that the ABNF above is defined in terms of Unicode code points 1394 ([UNICODE5]); when an query is transmitted as XML document WebDAV, 1395 these characters are typically encoded in UTF-8 or UTF-16.) 1397 The value for the literal is composed of wildcards separated by 1398 segments of text. Wildcards may begin or end the literal. 1400 The "_" wildcard matches exactly one character. 1402 The "%" wildcard matches zero or more characters 1404 The "\" character is an escape sequence so that the literal can 1405 include "_" and "%". To include the "\" character in the pattern, 1406 the escape sequence "\\" is used. 1408 5.15.2. Example of DAV:like 1410 This example shows how a client might use DAV:like to identify those 1411 resources whose content type was a subtype of image. 1413 1414 1415 1416 image/% 1417 1418 1420 5.16. DAV:contains 1422 The DAV:contains operator is an optional operator that provides 1423 content-based search capability. This operator implicitly searches 1424 against the text content of a resource, not against content of 1425 properties. The DAV:contains operator is intentionally not overly 1426 constrained, in order to allow the server to do the best job it can 1427 in performing the search. 1429 The DAV:contains operator evaluates to a Boolean value. It evaluates 1430 to TRUE if the content of the resource satisfies the search. 1431 Otherwise, it evaluates to FALSE. 1433 Within the DAV:contains XML element, the client provides a phrase: a 1434 single word or whitespace delimited sequence of words. Servers MAY 1435 ignore punctuation in a phrase. Case-sensitivity is at the 1436 discretion of the server implementation. 1438 The following non-exhaustive list enumerate things that may or may 1439 not be done as part of the search: Phonetic methods such as "soundex" 1440 may or may not be used. Word stemming may or may not be performed. 1441 Thesaurus expansion of words may or may not be done. Right or left 1442 truncation may or may not be performed. The search may be case 1443 insensitive or case sensitive. The word or words may or may not be 1444 interpreted as names. Multiple words may or may not be required to 1445 be adjacent or "near" each other. Multiple words may or may not be 1446 required to occur in the same order. Multiple words may or may not 1447 be treated as a phrase. The search may or may not be interpreted as 1448 a request to find documents "similar" to the string operand. 1449 Character canonicalization such as that done by the Unicode collation 1450 algorithm may or may not be applied. 1452 5.16.1. Result Scoring (DAV:score Element) 1454 Servers SHOULD indicate scores for the DAV:contains condition by 1455 adding a DAV:score XML element to the DAV:response element. Its 1456 value is defined only in the context of a particular query result. 1457 The value is a string representing the score, an integer from zero to 1458 10000 inclusive, where a higher value indicates a higher score (e.g. 1459 more relevant). 1461 Modified DTD fragment for DAV:propstat: 1463 1465 1467 Clients should note that, in general, it is not meaningful to compare 1468 the numeric values of scores from two different query results unless 1469 both were executed by the same underlying search system on the same 1470 collection of resources. 1472 5.16.2. Ordering by Score 1474 To order search results by their score, the DAV:score element may be 1475 added as child to the DAV:orderby element (in place of a DAV:prop 1476 element). 1478 5.16.3. Examples 1480 The example below shows a search for the phrase "Peter Forsberg". 1482 Depending on its support for content-based searching, a server MAY 1483 treat this as a search for documents that contain the words "Peter" 1484 and "Forsberg". 1486 1487 Peter Forsberg 1488 1490 The example below shows a search for resources that contain "Peter" 1491 and "Forsberg". 1493 1494 1495 Peter 1496 Forsberg 1497 1498 1500 5.17. Limiting the Result Set 1502 1503 1505 The DAV:limit XML element contains requested limits from the client 1506 to limit the size of the reply or amount of effort expended by the 1507 server. The DAV:nresults XML element contains a requested maximum 1508 number of DAV:response elements to be returned in the response body. 1509 The server MAY disregard this limit. The value of this element is an 1510 unsigned integer. 1512 5.17.1. Relationship to Result Ordering 1514 If the result set is both limited by DAV:limit and ordered according 1515 to DAV:orderby, the results that are included in the response 1516 document must be those that order highest. 1518 5.18. The 'caseless' XML Attribute 1520 The "caseless" attribute allows clients to specify caseless matching 1521 behavior instead of character-by-character matching for DAV: 1522 basicsearch operators. 1524 The possible values for "caseless" are "yes" or "no". The default 1525 value is server-specified. Caseless matching SHOULD be implemented 1526 as defined in Section 5.18 of the Unicode Standard ([UNICODE5]). 1528 Support for the "caseless" attribute is optional. A server should 1529 respond with a status of 422 if it is used but cannot be supported. 1531 5.19. Query Schema for DAV:basicsearch 1533 The DAV:basicsearch grammar defines a search criteria that is a 1534 Boolean-valued expression, and allows for an arbitrary set of 1535 properties to be included in the result record. The result set may 1536 be sorted on a set of property values. Accordingly the DTD for 1537 schema discovery for this grammar allows the server to express: 1539 1. the set of properties that may be either searched, returned, or 1540 used to sort, and a hint about the data type of such properties 1542 2. the set of optional operators defined by the resource. 1544 5.19.1. DTD for DAV:basicsearch QSD 1546 1547 1548 1549 1552 1553 1554 1555 1556 1557 1559 The DAV:properties element holds a list of descriptions of 1560 properties. 1562 The DAV:operators element describes the optional operators that may 1563 be used in a DAV:where element. 1565 5.19.2. DAV:propdesc Element 1567 Each instance of a DAV:propdesc element describes the property or 1568 properties in the DAV:prop element it contains. All subsequent 1569 elements are descriptions that apply to those properties. All 1570 descriptions are optional and may appear in any order. Servers 1571 SHOULD support all the descriptions defined here, and MAY define 1572 others. 1574 DASL defines five descriptions. The first, DAV:datatype, provides a 1575 hint about the type of the property value, and may be useful to a 1576 user interface prompting for a value. The remaining four (DAV: 1577 searchable, DAV:selectable, DAV:sortable, and DAV:caseless) identify 1578 portions of the query (DAV:where, DAV:select, and DAV:orderby, 1579 respectively). If a property has a description for a section, then 1580 the server MUST allow the property to be used in that section. These 1581 descriptions are optional. If a property does not have such a 1582 description, or is not described at all, then the server MAY still 1583 allow the property to be used in the corresponding section. 1585 5.19.2.1. DAV:any-other-property 1587 This element can be used in place of DAV:prop to describe properties 1588 of WebDAV properties not mentioned in any other DAV:prop element. 1589 For instance, this can be used to indicate that all other properties 1590 are searchable and selectable without giving details about their 1591 types (a typical scenario for dead properties). 1593 5.19.3. The DAV:datatype Property Description 1595 The DAV:datatype element contains a single XML element that provides 1596 a hint about the domain of the property, which may be useful to a 1597 user interface prompting for a value to be used in a query. Data 1598 types are identified by an element name. Where appropriate, a server 1599 SHOULD use the simple data types defined in [XS2]. 1601 1603 Examples from [XS2], Section 3: 1605 +----------------+---------------------+ 1606 | Qualified name | Example | 1607 +----------------+---------------------+ 1608 | xs:boolean | true, false, 1, 0 | 1609 | xs:string | Foobar | 1610 | xs:dateTime | 1994-11-05T08:15:5Z | 1611 | xs:float | .314159265358979E+1 | 1612 | xs:integer | -259, 23 | 1613 +----------------+---------------------+ 1615 If the data type of a property is not given, then the data type 1616 defaults to xs:string. 1618 5.19.4. The DAV:searchable Property Description 1620 1622 If this element is present, then the server MUST allow this property 1623 to appear within a DAV:where element where an operator allows a 1624 property. Allowing a search does not mean that the property is 1625 guaranteed to be defined on every resource in the scope, it only 1626 indicates the server's willingness to check. 1628 5.19.5. The DAV:selectable Property Description 1630 1632 This element indicates that the property may appear in the DAV:select 1633 element. 1635 5.19.6. The DAV:sortable Property Description 1637 This element indicates that the property may appear in the DAV: 1638 orderby element. 1640 1642 5.19.7. The DAV:caseless Property Description 1644 This element only applies to properties whose data type is "xs: 1645 string" and derived data types as per the DAV:datatype property 1646 description. Its presence indicates that compares performed for 1647 searches, and the comparisons for ordering results on the string 1648 property will be caseless (the default is character-by-character). 1650 1652 5.19.8. The DAV:operators XML Element 1654 The DAV:operators element describes every optional operator supported 1655 in a query. (Mandatory operators are not listed since they are 1656 mandatory and permit no variation in syntax.). All optional 1657 operators that are supported MUST be listed in the DAV:operators 1658 element. 1660 The listing for an operator, contained in an DAV:opdesc element, 1661 consists of the operator (as an empty element), followed by one 1662 element for each operand. The operand MUST be either DAV:operand- 1663 property, DAV:operand-literal or DAV:operand-typed-literal, which 1664 indicate that the operand in the corresponding position is a 1665 property, a literal value or a typed literal value, respectively. If 1666 an operator is polymorphic (allows more than one operand syntax) then 1667 each permitted syntax MUST be listed separately. 1669 The DAV:opdesc element MAY have a "allow-pcdata" attribute 1670 (defaulting to "no"). A value of "yes" indicates that the operator 1671 can contain character data, as it is the case with DAV:contains (see 1672 Section 5.16). Definition of additional operators using this format 1673 is NOT RECOMMENDED. 1675 1676 1677 1678 1679 1681 5.19.9. Example of Query Schema for DAV:basicsearch 1683 1685 1686 1687 1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1714 This response lists four properties. The data type of the last three 1715 properties is not given, so it defaults to xs:string. All are 1716 selectable, and the first three may be searched. All but the last 1717 may be used in a sort. Of the optional DAV operators, DAV:contains 1718 and DAV:like are supported. 1720 Note: The schema discovery defined here does not provide for 1721 discovery of supported values of the "caseless" attribute. This may 1722 require that the reply also list the mandatory operators. 1724 6. Internationalization Considerations 1726 Properties may be language-tagged using the xml:lang attribute (see 1727 [RFC4918], Section 4.3). The optional operators DAV:language-defined 1728 (Section 5.12.1) and DAV:language-matches (Section 5.12.2) allow to 1729 express conditions on the language tagging information. 1731 7. Security Considerations 1733 This section is provided to detail issues concerning security 1734 implications of which DASL applications need to be aware. All of the 1735 security considerations of HTTP/1.1 ([RFC2616] and WebDAV ([RFC4918]) 1736 also apply to DASL. In addition, this section will include security 1737 risks inherent in searching and retrieval of resource properties and 1738 content. 1740 A query MUST NOT allow clients to retrieve information that wouldn't 1741 have been available through the GET or PROPFIND methods in the first 1742 place. In particular: 1744 o Query constraints on WebDAV properties for which the client does 1745 not have read access need to be evaluated as if the property did 1746 not exist (see Section 5.5.3). 1748 o Query constraints on content (as with DAV:contains, defined in 1749 Section 5.16) for which the client does not have read access need 1750 to be evaluated as if a GET would return a 4xx status code. 1752 A server should prepare for denial of service attacks. For example a 1753 client may issue a query for which the result set is expensive to 1754 calculate or transmit because many resources match or must be 1755 evaluated. 1757 7.1. Implications of XML External Entities 1759 XML supports a facility known as "external entities", defined in 1760 Section 4.2.2 of [XML], which instruct an XML processor to retrieve 1761 and perform an inline include of XML located at a particular URI. An 1762 external XML entity can be used to append or modify the document type 1763 declaration (DTD) associated with an XML document. An external XML 1764 entity can also be used to include XML within the content of an XML 1765 document. For non-validating XML, such as the XML used in this 1766 specification, including an external XML entity is not required by 1767 [XML]. However, [XML] does state that an XML processor may, at its 1768 discretion, include the external XML entity. 1770 External XML entities have no inherent trustworthiness and are 1771 subject to all the attacks that are endemic to any HTTP GET request. 1772 Furthermore, it is possible for an external XML entity to modify the 1773 DTD, and hence affect the final form of an XML document, in the worst 1774 case significantly modifying its semantics, or exposing the XML 1775 processor to the security risks discussed in [RFC3023]. Therefore, 1776 implementers must be aware that external XML entities should be 1777 treated as untrustworthy. 1779 There is also the scalability risk that would accompany a widely 1780 deployed application which made use of external XML entities. In 1781 this situation, it is possible that there would be significant 1782 numbers of requests for one external XML entity, potentially 1783 overloading any server which fields requests for the resource 1784 containing the external XML entity. 1786 8. Scalability 1788 Query grammars are identified by URIs. Applications SHOULD not 1789 attempt to retrieve these URIs even if they appear to be retrievable 1790 (for example, those that begin with "http://") 1792 9. IANA Considerations 1794 This document uses the namespace defined in Section 21 of [RFC4918] 1795 for XML elements. 1797 9.1. HTTP Headers 1799 This document specifies the HTTP header listed below, to be added to 1800 the HTTP header registry defined in [RFC3864]. 1802 9.1.1. DASL 1804 Header field name: DASL 1806 Applicable protocol: http 1808 Status: Experimental 1810 Author/Change controller: IETF 1812 Specification document: this specification (Section 3.2) 1814 10. Contributors 1816 This document is based on prior work on the DASL protocol done by the 1817 WebDAV DASL working group until the year 2000 -- namely by Alan 1818 Babich, Jim Davis, Rick Henderson, Dale Lowry, Saveen Reddy and 1819 Surendra Reddy. 1821 11. Acknowledgements 1823 This document has benefited from thoughtful discussion by Lisa 1824 Dusseault, Javier Godoy, Sung Kim, Chris Newman, Elias Sinderson, 1825 Martin Wallmer, Keith Wannamaker, Jim Whitehead and Kevin Wiggen. 1827 12. References 1829 12.1. Normative References 1831 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1832 Requirement Levels", BCP 14, RFC 2119, March 1997. 1834 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Nielsen, H., 1835 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 1836 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 1838 [RFC3023] Makoto, M., St.Laurent, S., and D. Kohn, "XML Media 1839 Types", RFC 3023, January 2001. 1841 [RFC3253] Clemm, G., Amsden, J., Ellison, T., Kaler, C., and J. 1842 Whitehead, "Versioning Extensions to WebDAV", RFC 3253, 1843 March 2002. 1845 [RFC3744] Clemm, G., Reschke, J., Sedlar, E., and J. Whitehead, "Web 1846 Distributed Authoring and Versioning (WebDAV) Access 1847 Control Protocol", RFC 3744, May 2004. 1849 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1850 Resource Identifier (URI): Generic Syntax", STD 66, 1851 RFC 3986, January 2005. 1853 [RFC4918] Dusseault, L., Ed., "HTTP Extensions for Web Distributed 1854 Authoring and Versioning (WebDAV)", RFC 4918, June 2007. 1856 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1857 Specifications: ABNF", STD 68, RFC 5234, January 2008. 1859 [XML] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E., and 1860 F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fourth 1861 Edition)", W3C REC-xml-20060816, August 2006, 1862 . 1864 [XPATH] Clark, J. and S. DeRose, "XML Path Language (XPath) 1865 Version 1.0", W3C REC-xpath-19991116, November 1999, 1866 . 1868 [XPATHFUNC] 1869 Malhotra, A., Melton, J., and N. Walsh, "XQuery 1.0 and 1870 XPath 2.0 Functions and Operators", W3C REC-xpath- 1871 functions-20070123, January 2007, 1872 . 1874 [XS1] Thompson, H., Beech, D., Maloney, M., Mendelsohn, N., and 1875 World Wide Web Consortium, "XML Schema Part 1: 1876 Structures", W3C REC-xmlschema-1-20041028, October 2004, 1877 . 1879 [XS2] Biron, P., Malhotra, A., and World Wide Web Consortium, 1880 "XML Schema Part 2: Datatypes Second Edition", W3C REC- 1881 xmlschema-2-20041028, October 2004, 1882 . 1884 12.2. Informative References 1886 [BCP47] Phillips, A. and M. Davis, "Matching of Language Tags", 1887 BCP 47, RFC 4647, September 2006. 1889 [DASL] Reddy, S., Lowry, D., Reddy, S., Henderson, R., Davis, J., 1890 and A. Babich, "DAV Searching & Locating", 1891 draft-ietf-dasl-protocol-00 (work in progress), July 1999. 1893 [DASLREQ] Davis, J., Reddy, S., and J. Slein, "Requirements for DAV 1894 Searching and Locating", February 1999, . 1898 This is an updated version of the Internet Draft 1899 "draft-ietf-dasl-requirements-00", but obviously never was 1900 submitted to the IETF. 1902 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration 1903 Procedures for Message Header Fields", BCP 90, RFC 3864, 1904 September 2004. 1906 [RFC4437] Whitehead, J., Clemm, G., and J. Reschke, Ed., "Web 1907 Distributed Authoring and Versioning (WebDAV) 1908 Redirect Reference Resources", RFC 4437, March 2006. 1910 [RFC4790] Newman, C., Duerst, M., and A. Gulbrandsen, "Internet 1911 Application Protocol Collation Registry", RFC 4790, 1912 March 2007. 1914 [SQL99] Milton, J., "Database Language SQL Part 2: Foundation 1915 (SQL/Foundation)", ISO ISO/IEC 9075-2:1999 (E), July 1999. 1917 [UNICODE5] 1918 The Unicode Consortium, "The Unicode Standard - Version 1919 5.0", Addison-Wesley , November 2006, 1920 . 1922 ISBN 0321480910 [1] 1924 [draft-ietf-webdav-bind] 1925 Clemm, G., Crawford, J., Reschke, J., Ed., and J. 1926 Whitehead, "Binding Extensions to Web Distributed 1927 Authoring and Versioning (WebDAV)", 1928 draft-ietf-webdav-bind-20 (work in progress), 1929 November 2007. 1931 URIs 1933 [1] 1935 Appendix A. Three-Valued Logic in DAV:basicsearch 1937 ANSI standard three valued logic is used when evaluating the search 1938 condition (as defined in the ANSI standard SQL specifications, for 1939 example in ANSI X3.135-1992, section 8.12, pp. 188-189, section 8.2, 1940 p. 169, General Rule 1)a), etc.). 1942 ANSI standard three valued logic is undoubtedly the most widely 1943 practiced method of dealing with the issues of properties in the 1944 search condition not having a value (e.g., being null or not defined) 1945 for the resource under scan, and with undefined expressions in the 1946 search condition (e.g., division by zero, etc.). Three valued logic 1947 works as follows. 1949 Undefined expressions are expressions for which the value of the 1950 expression is not defined. Undefined expressions are a completely 1951 separate concept from the truth value UNKNOWN, which is, in fact, 1952 well defined. Property names and literal constants are considered 1953 expressions for purposes of this section. If a property in the 1954 current resource under scan has not been set to a value, then the 1955 value of that property is undefined for the resource under scan. 1956 DASL 1.0 has no arithmetic division operator, but if it did, division 1957 by zero would be an undefined arithmetic expression. 1959 If any subpart of an arithmetic, string, or datetime subexpression is 1960 undefined, the whole arithmetic, string, or datetime subexpression is 1961 undefined. 1963 There are no manifest constants to explicitly represent undefined 1964 number, string, or datetime values. 1966 Since a Boolean value is ultimately returned by the search condition, 1967 arithmetic, string, and datetime expressions are always arguments to 1968 other operators. Examples of operators that convert arithmetic, 1969 string, and datetime expressions to Boolean values are the six 1970 relational operators ("greater than", "less than", "equals", etc.). 1971 If either or both operands of a relational operator have undefined 1972 values, then the relational operator evaluates to UNKNOWN. 1973 Otherwise, the relational operator evaluates to TRUE or FALSE, 1974 depending upon the outcome of the comparison. 1976 The Boolean operators DAV:and, DAV:or and DAV:not are evaluated 1977 according to the following rules: 1979 not UNKNOWN = UNKNOWN 1981 UNKNOWN and TRUE = UNKNOWN 1983 UNKNOWN and FALSE = FALSE 1985 UNKNOWN and UNKNOWN = UNKNOWN 1987 UNKNOWN or TRUE = TRUE 1989 UNKNOWN or FALSE = UNKNOWN 1991 UNKNOWN or UNKNOWN = UNKNOWN 1993 Appendix B. Candidates for Future Protocol Extensions 1995 This Section summarizes issues which have been raised during the 1996 development of this specification, but for which no resolution could 1997 be found with the constraints in place. Future revisions of this 1998 specification should revisit these issues, though. 2000 B.1. Collation Support 2002 Matching and sorting of textual data relies on collations. With 2003 respect to WebDAV SEARCH, a combination of various design approaches 2004 could be used: 2006 o Require server support for specific collations. 2008 o Require that the server can advertise which collations it 2009 supports. 2011 o Allow a client to select the collation to be used. 2013 In practice, the current implementations of WebDAV SEARCH usually 2014 rely on backends they do not control, and for which collation 2015 information may not be available. To make things worse, 2016 implementations of the DAV:basicsearch grammar frequently need to 2017 combine data from multiple underlying stores (such as properties and 2018 full text content), and thus collation support may vary based on the 2019 operator or property. 2021 Another open issue is what collation formalism to support. At the 2022 time of this writing, the two specifications below seem to provide 2023 the necessary framework and thus may be the base for future work on 2024 collation support in WebDAV SEARCH: 2026 1. "Internet Application Protocol Collation Registry" ([RFC4790]). 2028 2. "XQuery 1.0 and XPath 2.0 Functions and Operators" ([XPATHFUNC], 2029 Section 7.3.1). 2031 B.2. Count 2033 DAV:basicsearch does not allow a request that returns the count of 2034 matching resources. 2036 A protocol extension would need to extend DAV:select, and also modify 2037 the DAV:multistatus response format. 2039 B.3. Diagnostics for Unsupported Queries 2041 There are many reasons why a given query may not be supported by a 2042 server. Query Schema Discovery (Section 4) can be used to discover 2043 some constraints, but not all. 2045 Future revisions should consider the introduction of specific 2046 condition codes ([RFC4918], Section 16) to these situations. 2048 B.4. Language Matching 2050 Section 5.12.2 defines language matching in terms of the XPath "lang" 2051 function ([XPATH], Section 4.3). Future revisions should consider 2052 building on [BCP47] instead. 2054 B.5. Matching Media Types 2056 Matching media types using the DAV:getcontenttype property and the 2057 DAV:like operator is hard due to DAV:getcontenttype also allowing 2058 parameters. A new operator specifically designed for the purpose of 2059 matching media types probably would simplify things a lot. See 2061 for a specific proposal. 2063 B.6. Query by Name 2065 DAV:basicsearch operates on the properties (and optionally the 2066 contents) of resources, and thus doesn't really allow matching on 2067 parts of the resource's URI. See for a proposed extension 2069 covering this use case. 2071 B.7. Result Paging 2073 A frequently discussed feature is the ability to specifically request 2074 the "next" set of results, when either the server decided to truncate 2075 the result, or the client explicitly asked for a limited set (for 2076 instance, using the DAV:limit element defined in Section 5.17). 2078 In this case, it would be desirable if the server could keep the full 2079 query result, and provide a new URI identifying a separate result 2080 resource, allowing the client to retrieve additional data through GET 2081 requests, and remove the result through a DELETE request. 2083 B.8. Search Scope Discovery 2085 Given a Search Arbiter resource, there's currently no way to discover 2086 programmatically the supported sets of search scopes. Future 2087 revisions of this specification could specify a scope discovery 2088 mechanism, similar to the Query Schema Discovery defined in 2089 Section 4. 2091 Appendix C. Change Log (to be removed by RFC Editor before publication) 2093 C.1. From draft-davis-dasl-protocol-xxx 2095 Feb 14, 1998 Initial Draft 2097 Feb 28, 1998 Referring to DASL as an extension to HTTP/1.1 rather 2098 than DAV. 2099 Added new sections "Notational Conventions", "Protocol Model", 2100 "Security Considerations". 2101 Changed section 3 to "Elements of Protocol". 2102 Added some stuff to introduction. 2103 Added "result set" terminology. 2104 Added "IANA Considerations". 2106 Mar 9, 1998 Moved sub-headings of "Elements of Protocol" to first 2107 level and removed "Elements of Protocol" Heading. 2108 Added an sentence in introduction explaining that this is a 2109 "sketch" of a protocol. 2111 Mar 11, 1998 Added orderby, data typing, three valued logic, query 2112 schema property, and element definitions for schema for 2113 basicsearch. 2115 April 8, 1998 - made changes based on last week's DASL BOF. 2117 May 8, 1998 Removed most of DAV:searcherror; converted to DAV: 2118 searchredirect 2119 Altered DAV:basicsearch grammar to use avoid use of ANY in DTD 2121 June 17, 1998 -Added details on Query Schema Discovery 2122 -Shortened list of data types 2124 June 23, 1998 moved data types before change history 2125 rewrote the data types section 2126 removed the casesensitive element and replace with the 2127 casesensitive attribute 2128 added the casesensitive attribute to the DTD for all operations 2129 that might work on a string 2131 Jul 20, 1998 A series of changes. See Author's meeting minutes for 2132 details. 2134 July 28, 1998 Changes as per author's meeting. QSD uses SEARCH, not 2135 PROPFIND. 2136 Moved text around to keep concepts nearby. 2137 Boolean literals are 1 and 0, not T and F. 2138 contains changed to contentspassthrough. 2139 Renamed rank to score. 2141 July 28, 1998 Added Dale Lowry as Author 2143 September 4, 1998 Added 422 as response when query lists 2144 unimplemented operators. 2145 DAV:literal declares a default value for xml:space, 'preserve' 2146 (see XML spec, section 2.10) 2147 moved to new XML namespace syntax 2149 September 22, 1998 Changed "simplesearch" to "basicsearch" 2150 Changed isnull to isdefined 2151 Defined NULLness as having a 404 or 403 response 2152 used ENTITY syntax in DTD 2153 Added redirect 2155 October 9, 1998 Fixed a series of typographical and formatting 2156 errors. 2157 Modified the section of three-valued logic to use a table rather 2158 than a text description of the role of UNKNOWN in expressions. 2160 November 2, 1998 Added the DAV:contains operator. 2161 Removed the DAV:contentpassthrough operator. 2163 November 18, 1998 Various author comments for submission 2165 June 3, 1999 Cosmetic and minor editorial changes only. Fix nits 2166 reported by Jim Whitehead in email of April 26, 1999. Converted 2167 to HTML from Word 97, manually. 2169 April 20, 2000 Removed redirection feature, since 301/302 suffices. 2170 Removed Query Schema Discovery (former chapter 4). Everyone 2171 agrees this is a useful feature, but it is apparently too 2172 difficult to define at this time, and it is not essential for 2173 DASL. 2175 C.2. since start of draft-reschke-webdav-search 2177 October 09, 2001 Added Julian Reschke as author. 2178 Chapter about QSD re-added. 2179 Formatted into RFC2629-compliant XML document. 2180 Added first comments. 2181 ID version number kicked up to draft-dasl-protocol-03. 2183 October 17, 2001 Updated address information for Jim Davis. 2184 Added issue of datatype vocabularies. 2185 Updated issue descriptions for grammar discovery, added issues on 2186 query schema DTD. 2187 Fixed typos in XML examples. 2189 December 17, 2001 Re-introduced split between normative and non- 2190 normative references. 2192 January 05, 2002 Version bumped up to 04. Started work on resolving 2193 the issues identified in the previous version. 2195 January 14, 2002 Fixed some XML typos. 2197 January 22, 2002 Closed issues naming-of-elements. Fixed query 2198 search DTD and added option to discover properties of "other" 2199 (non-listed) properties. 2201 January 25, 2002 Changed into private submission and added reference 2202 to historic DASL draft. Marked reference to DASL requirements 2203 non-normative. 2204 Updated reference to latest deltav spec. 2206 January 29, 2002 Added feedback from and updated contact info for 2207 Alan Babich. 2208 Included open issues collected in 2209 http://www.webdav.org/dasl/protocol/issues.html. 2211 February 8, 2002 Made sure that all artwork fits into 72 characters 2212 wide text. 2214 February 18, 2002 Changed Insufficient storage handling 2215 (multistatus). Moved is-collection to operators and added to DTD. 2216 Made scope/depth mandatory. 2218 February 20, 2002 Updated reference to SQL99. 2220 February 28, 2002 "Non-normative References" -> "Informative 2221 References". Abstract updated. Consistently specify a charset 2222 when using text/xml (no change bars). Do not attempt to define 2223 PROPFIND's entity encoding (take out specific references to text/ 2224 xml). Remove irrelevant headers (Connection:) from examples (no 2225 change bars). Added issue on querying based on DAV:href. Updated 2226 introduction to indicate relationship to DASL draft. Updated HTTP 2227 reference from RFC2068 to RFC2616. Updated XML reference to XML 2228 1.0 2nd edition. 2230 March 1, 2002 Removed superfluous namespace decl in 2.4.2. Reopened 2231 JW14 and suggest to drop xml:space support. 2233 March 3, 2002 Removed "xml:space" feature on DAV:literal. Added 2234 issue about string comparison vs. collations vs. xml:lang. 2235 Updated some of the open issues with details from JimW's original 2236 mail in April 1999. Resolved scope vs relative URI references. 2237 Resolved issues about DAV:ascending (added to index) and the BNF 2238 for DAV:like (changed "octets" to "characters"). 2240 March 8, 2002 Updated reference to DeltaV (now RFC3253). Added 2241 Martin Wallmer's comments, moved JW5 into DAV:basicsearch section. 2243 March 11, 2002 Closed open issues regaring the type of search 2244 arbiters (JW3) and their discovery (JW9). Rephrased requirements 2245 on multistatus response bodies (propstat only if properties were 2246 selected, removed requirement for responsedescription). 2248 March 23, 2002 RFC2376 -> RFC3023. Added missing first names of 2249 authors. OPTIONS added to example for DAV:supported-method-set. 2251 C.3. since draft-reschke-webdav-search-00 2253 March 29, 2002 Abstract doesn't refer to DASL WG anymore. 2255 April 7, 2002 Fixed section title (wrong property name supported- 2256 search-grammar-set. Changed DAV:casesensitve to "casesensitive" 2257 (it wasn't in the DAV: namespace after all). 2259 May 28, 2002 Updated some issues with Jim Davis's comments. 2261 June 10, 2002 Added proposal for different method for query schema 2262 discovery, not using pseudo-properties. 2264 June 25, 2002 QSD marshalling rewritten. Added issue "isdefined- 2265 optional". 2267 C.4. since draft-reschke-webdav-search-01 2269 July 04, 2002 Added issue "scope-collection". 2271 July 08, 2002 Closed issue "scope-collection". 2273 August 12, 2002 Added issues "results-vs-binds" and "select- 2274 allprop". 2276 October 22, 2002 Added issue "undefined-expressions". 2278 November 18, 2002 Changed example host names (no change tracking). 2280 November 25, 2002 Updated issue "DB2/DB7". Closed issues "undefined 2281 expressions", "isdefined-optional" and "select-allprop". 2283 C.5. since draft-reschke-webdav-search-02 2285 November 27, 2002 Added issues "undefined-properties", "like- 2286 exactlyone" and "like-wildcard-adjacent". Closed issue "query-on- 2287 href". Added acknowledgments section. 2289 November 28, 2002 Closed issue "like-exactlyone". Added issue 2290 "mixed-content-properties". 2292 December 14, 2002 Closed issues "undefined-properties", "results-vs- 2293 binds", "mixed-content-properties". Updated issue "like-wildcard- 2294 adjacent". Added informative reference to BIND draft. Updated 2295 reference to ACL draft. 2297 January 9, 2003 Removed duplicate section on invalid scopes. Added 2298 comments to some open issues. Closed issues JW25/26, score- 2299 pseudo-property and null-ordering. 2301 January 10, 2003 Issue limit-vs-ordering plus resolution. Closed 2302 issue JW17/JW24b. 2304 January 14, 2003 New issue order-precedence. Started resolution of 2305 DB2/DB7. 2307 January 15, 2003 Started spec of DAV:typed-literal. 2309 January 17, 2003 Fix one DAV:like/DAV:getcontenttype example (add / 2310 to like expression, make case-insensitive). 2312 January 28, 2003 Update issue(s) result-truncation, JW24d. Fixed 2313 response headers in OPTIONS example. Added issue qsd-optional. 2314 Closed issue(s) order-precedence, case-insensitivity-name. 2316 February 07, 2003 Added issue scope-vs-versions. score-pseudo- 2317 property: allow DAV:orderby to explicitly specify DAV:score. 2319 C.6. since draft-reschke-webdav-search-03 2321 April 24, 2003 Fixed two "?" vs "_" issues (not updated in last 2322 draft). 2324 June 13, 2003 Improve index. 2326 C.7. since draft-reschke-webdav-search-04 2328 July 7, 2003 Typo fixed (propstat without status element). 2330 August 11, 2003 Remove superfluous IP and copyright sections. 2332 September 09, 2003 Added issues "2.4-multiple-uris" and "5.1-name- 2333 filtering". 2335 October 06, 2003 Fix misplaced section end in 5.11, add table 2336 formatting. Enhance table formatting in 5.18.3. Updated ACL and 2337 BIND references. Added XPATH reference. Closed issue JW24d by 2338 adding new optional operators. Updated more open issues, added 2339 issues from January meeting. Add K. Wiggen to Acknowledgements. 2340 Add Contributors section for the authors of the original draft. 2341 Close issue "scope-vs-versions" (optional feature added). Close 2342 (new) issue "1.3-import-DTD-terminology". Add issue "1.3-import- 2343 requirements-terminology". 2345 October 07, 2003 Typos fixed. Moved statement about DAV: namespace 2346 usage into separate (sub-)section. Closed "1.3-import- 2347 requirements-terminology". Update I18N Considerations with new 2348 xml:lang support info (see issue JW24d). Close issue "DB2/DB7" 2349 (remaining typing issues are now summarized in issue "typed- 2350 literal"). Fix misplaced section end in section 7. Started 2351 change to use RFC3253-style method definitions and error 2352 marshalling. 2354 October 08, 2003 Remove obsolete language that allowed reporting 2355 invalid scopes and such inside multistatus. Add new issue "5.4.2- 2356 scope-vs-redirects". 2358 C.8. since draft-reschke-webdav-search-05 2360 October 11, 2003 Separate DAV:basicsearch DTD into separate figures 2361 for better maintainability. Update DTD with language-* operators 2362 and typed-literal element (optional). 2364 October 14, 2003 Close issue "5.4.2-multiple-scope". 2366 November 04, 2003 Update reference from CaseMap to UNICODE4, section 2367 5.18. 2369 November 16, 2003 Updated issue "5.1-name-filtering". 2371 November 24, 2003 Reformatted scope description (collection vs. non- 2372 collection). 2374 November 30, 2003 Add issue "5_media_type_match". 2376 February 6, 2004 Updated all references. 2378 C.9. since draft-reschke-webdav-search-06 2380 July 05, 2004 Fix table in Appendix "Three-Valued Logic in DAV: 2381 basicsearch". 2383 September 14, 2004 Fix inconsistent DTD in section 5.2 and 5.4 for 2384 scope element. 2386 September 30, 2004 Rewrite editorial note and abstract. Update 2387 references (remove unneeded XMLNS, update ref to ACL and BIND 2388 specs). 2390 C.10. since draft-reschke-webdav-search-07 2392 October 01, 2004 Fix previous section heading (no change tracking). 2394 October 13, 2004 Fix DTD entry for is-collection. 2396 November 1, 2004 Fix DTD fragment query-schema-discovery. 2398 December 11, 2004 Update BIND reference. 2400 January 01, 2005 Fix DASL and DASLREQ references. 2402 February 06, 2005 Update XS2 reference. 2404 February 11, 2005 Rewrite "like" and "DASL" (response header) 2405 grammar in ABNF. 2407 May 5, 2005 Update references. Close issue "abnf" (only use ABNF 2408 when applicable). 2410 C.11. since draft-reschke-webdav-search-08 2412 May 06, 2005 Fix document title. 2414 September 25, 2005 Update BIND reference. 2416 October 05, 2005 Update RFC4234 reference. 2418 October 22, 2005 Author's address update. 2420 February 12, 2006 Update BIND reference. 2422 March 16, 2006 Add typed literals to QSD. 2424 August 20, 2006 Update XML reference. 2426 August 28, 2006 Add issues "5.3-select-count" (open) and "5.4- 2427 clarify-depth" (resolved). Update BIND reference (again). 2429 C.12. since draft-reschke-webdav-search-09 2431 December 1, 2006 Fix ABNF for DASL header. 2433 December 16, 2006 Close issue "qsd-optional", leave QSD optional. 2434 Close issue "2.4-multiple-uris", suggesting that servers should 2435 only return one response element per resource in case of multiple 2436 bindings. Add and resolve issues "authentication" and "cleanup- 2437 iana" (adding the header registration for "DASL"). Re-write 2438 rational for using the DAV: namespace, although this is a non-WG 2439 submission. 2441 January 4, 2007 Close issue "JW16b/JW24a", being related to 2442 "language-comparison". Add Appendix B. Close issues "language- 2443 comparison", "5_media_type_match", "5.1-name-filtering" and "5.3- 2444 select-count" as "won't fix", and add appendices accordingly. 2446 January 24, 2007 Update BIND reference. Close issue "5.4.2-scope- 2447 vs-redirects". Close issue "typed-literal": specify in terms of 2448 the XPATH 2.9 casting mechanism. Close issue "1.3-apply- 2449 condition-code-terminology" (no changes). 2451 C.13. since draft-reschke-webdav-search-10 2453 January 29, 2007 Issue "result-truncation": Add appendix describing 2454 the open issue of Result Paging. Describe the mechanism of 2455 marshalling truncated results in a new normative subsection (leave 2456 the actual example where it was). Add and resolve issues 2457 "rfc2606-compliance" and "response-format". Update contact 2458 information for Alan Babich, Jim Davis and Surendra Reddy (no 2459 change tracking). 2461 February 8, 2007 Update BIND reference. 2463 C.14. since draft-reschke-webdav-search-11 2465 Update: draft-newman-i18n-comparator-14 is RFC4790. Update: RFC2518 2466 replaced by draft-ietf-webdav-rfc2518bis. Updated BIND reference. 2467 Minor tweaks to intro (document organization and relation to DASL). 2469 C.15. since draft-reschke-webdav-search-12 2471 Update: draft-ietf-webdav-rfc2518bis replaced by RFC4918. Updated 2472 BIND reference. 2474 C.16. since draft-reschke-webdav-search-13 2476 Open and close issue "qsd-req-validity". Updated BIND reference. 2478 C.17. since draft-reschke-webdav-search-14 2480 RFC4234 obsoleted by RFC5234. 2482 Add and resolve issues "5.19.8-opdesc-vs-contains" and "dtd". 2484 Add clarifications about the behaviour when literal values are not 2485 compatible with the type of a comparison. 2487 C.18. since draft-reschke-webdav-search-15 2489 Minor editorial improvements. 2491 Fix description of DAV:scope/DAV:href to use proper URI terminology, 2492 add reference to RFC 3986. 2494 Clarify list nature of DASL header. 2496 Clarify that the DAV:like pattern ABNF is defined in terms of Unicode 2497 code points. 2499 Update to UNICODE5. 2501 Aim for standards track (affects introduction to Appendix B). Thus, 2502 make the dependency on [RFC4437] clearly optional, and make the 2503 reference informative. Also, mention BCP 47 as candidate for future 2504 changes to language matching. 2506 Mention definition of additional condition codes as candidate for 2507 future changes. 2509 Consider DAV:contains in Security Considerations. 2511 Update Surendra's and Alan's contact information. 2513 Mention search scope discovery as future extensions. Add a SHOULD 2514 level requirement for DAV:basicsearch search arbiters to support 2515 their own URI as search scope. 2517 Appendix D. Resolved issues (to be removed by RFC Editor before 2518 publication) 2520 Issues that were either rejected or resolved in this version of this 2521 document. 2523 D.1. standardstrack 2525 Type: change 2527 julian.reschke@greenbytes.de (2008-06-27): Umbrella issue for changes 2528 making this a candidate for the Standards Track. 2530 D.2. acls 2532 Type: edit 2533 julian.reschke@greenbytes.de (2008-06-29): Clarify security 2534 considerations with respect to access rights. 2536 D.3. scope-discovery 2538 Type: change 2540 julian.reschke@greenbytes.de (2008-07-02): State that there's no way 2541 to discover supported scopes, but also add a SHOULD requirement for a 2542 scope to be supported by DAV:basicsearch. 2544 D.4. 3.2-listsyntax 2546 In Section 3.2: 2548 Type: edit 2550 julian.reschke@greenbytes.de (2008-06-25): Clarify what HTTP-style 2551 list syntax in headers means; adjust examples. 2553 Resolution: Done. 2555 Appendix E. Open issues (to be removed by RFC Editor prior to 2556 publication) 2558 E.1. edit 2560 Type: edit 2562 julian.reschke@greenbytes.de (2004-07-05): Umbrella issue for 2563 editorial fixes/enhancements. 2565 Index 2567 C 2568 caseless attribute 28-29, 36 2569 Condition Names 2570 DAV:search-grammar-discovery-supported (pre) 10 2571 DAV:search-grammar-supported (pre) 10 2572 DAV:search-multiple-scope-supported (pre) 10 2573 DAV:search-scope-valid (pre) 11 2574 Criteria 6 2576 D 2577 DAV:and 28 2578 DAV:ascending 28 2579 DAV:contains 33 2580 DAV:depth 25 2581 DAV:descending 28 2582 DAV:eq 29 2583 caseless attribute 29 2584 DAV:from 25 2585 DAV:gt 29 2586 DAV:gte 29 2587 DAV:include-versions 25 2588 DAV:is-collection 31 2589 DAV:is-defined 32 2590 DAV:language-defined 31 2591 DAV:language-matches 31 2592 DAV:like 32 2593 DAV:limit 35 2594 DAV:literal 29 2595 DAV:lt 29 2596 DAV:lte 29 2597 DAV:not 28 2598 DAV:nresults 35 2599 DAV:or 28 2600 DAV:orderby 28 2601 DAV:scope 25 2602 DAV:score 34 2603 relationship to DAV:orderby 35 2604 DAV:search-grammar-discovery-supported precondition 10 2605 DAV:search-grammar-supported precondition 10 2606 DAV:search-multiple-scope-supported precondition 10 2607 DAV:search-scope-valid precondition 11 2608 DAV:select 25 2609 DAV:supported-query-grammar-set property 16 2610 DAV:typed-literal 29 2611 DAV:where 26 2613 M 2614 Methods 2615 SEARCH 9 2617 O 2618 OPTIONS method 15 2619 DASL response header 16 2621 P 2622 Properties 2623 DAV:supported-query-grammar-set 16 2625 Q 2626 Query 6 2627 Query Grammar 7 2628 Query Grammar Discovery 15 2629 using live property 16 2630 using OPTIONS 15 2631 Query Schema 7 2633 R 2634 Result 7 2635 Result Record 7 2636 Result Record Definition 7 2637 Result Set 7 2638 Result Set Truncation 2639 Example 11 2641 S 2642 Scope 7 2643 Search Arbiter 7 2644 SEARCH method 9 2645 Search Modifier 7 2646 Sort Specification 8 2648 Authors' Addresses 2650 Julian F. Reschke (editor) 2651 greenbytes GmbH 2652 Hafenweg 16 2653 Muenster, NW 48155 2654 Germany 2656 Phone: +49 251 2807760 2657 Email: julian.reschke@greenbytes.de 2658 URI: http://greenbytes.de/tech/webdav/ 2660 Surendra Reddy 2661 Mitrix, Inc. 2662 303 Twin Dolphin Drive, Suite 600-37 2663 Redwood City, CA 94065 2664 U.S.A. 2666 Phone: +1 408 500 1135 2667 Email: Surendra.Reddy@mitrix.com 2668 Jim Davis 2669 27 Borden Street 2670 Toronto, Ontario M5S 2M8 2671 Canada 2673 Phone: +1 416 929 5854 2674 Email: jrd3@alum.mit.edu 2675 URI: http://www.econetwork.net/~jdavis 2677 Alan Babich 2678 IBM Corporation 2679 3565 Harbor Blvd. 2680 Costa Mesa, CA 92626 2681 U.S.A. 2683 Phone: +1 714 327 3403 2684 Email: ababich@us.ibm.com 2686 Full Copyright Statement 2688 Copyright (C) The IETF Trust (2008). 2690 This document is subject to the rights, licenses and restrictions 2691 contained in BCP 78, and except as set forth therein, the authors 2692 retain all their rights. 2694 This document and the information contained herein are provided on an 2695 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 2696 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND 2697 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS 2698 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 2699 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 2700 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 2702 Intellectual Property 2704 The IETF takes no position regarding the validity or scope of any 2705 Intellectual Property Rights or other rights that might be claimed to 2706 pertain to the implementation or use of the technology described in 2707 this document or the extent to which any license under such rights 2708 might or might not be available; nor does it represent that it has 2709 made any independent effort to identify any such rights. Information 2710 on the procedures with respect to rights in RFC documents can be 2711 found in BCP 78 and BCP 79. 2713 Copies of IPR disclosures made to the IETF Secretariat and any 2714 assurances of licenses to be made available, or the result of an 2715 attempt made to obtain a general license or permission for the use of 2716 such proprietary rights by implementers or users of this 2717 specification can be obtained from the IETF on-line IPR repository at 2718 http://www.ietf.org/ipr. 2720 The IETF invites any interested party to bring to its attention any 2721 copyrights, patents or patent applications, or other proprietary 2722 rights that may cover technology that may be required to implement 2723 this standard. Please address the information to the IETF at 2724 ietf-ipr@ietf.org.