idnits 2.17.1 draft-reschke-webdav-search-18.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 2718. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 2729. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 2736. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 2742. 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: Typo fixed ("SHOULD not" -> "SHOULD NOT"). Fixed namespace name "http://jennicam.org" to use a RFC 2606 compliant domain. -- 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 (August 30, 2008) is 5718 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: March 3, 2009 Mitrix 6 J. Davis 8 A. Babich 9 IBM 10 August 30, 2008 12 Web Distributed Authoring and Versioning (WebDAV) SEARCH 13 draft-reschke-webdav-search-18 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 March 3, 2009. 40 Abstract 42 This document specifies a set of methods, headers and properties 43 composing WebDAV SEARCH, an application of the HTTP/1.1 protocol to 44 efficiently search for DAV resources based upon a set of client- 45 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 C.19. since draft-reschke-webdav-search-16 . . . . . . . . . . . 57 181 C.20. since draft-reschke-webdav-search-17 . . . . . . . . . . . 57 182 Appendix D. Resolved issues (to be removed by RFC Editor 183 before publication) . . . . . . . . . . . . . . . . . 58 184 D.1. safeness . . . . . . . . . . . . . . . . . . . . . . . . . 58 185 D.2. ordering-vs-limiting . . . . . . . . . . . . . . . . . . . 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 SEARCH is a safe method; it does not have any significance other than 375 executing a query and returning a query result (see [RFC2616], 376 Section 9.1.1). 378 2.2. The Request 380 The client invokes the SEARCH method on the resource named by the 381 Request-URI. 383 2.2.1. The Request-URI 385 The Request-URI identifies the search arbiter. Any HTTP resource may 386 function as search arbiter. It is not a new type of resource (in the 387 sense of DAV:resourcetype as defined in [RFC4918], Section 15.9), nor 388 does it have to be a WebDAV-compliant resource. 390 The SEARCH method defines no relationship between the arbiter and the 391 scope of the search, rather the particular query grammar used in the 392 query defines the relationship. For example, a query grammar may 393 force the Request-URI to correspond exactly to the search scope. 395 2.2.2. The Request Body 397 The server MUST process a text/xml or application/xml request body, 398 and MAY process request bodies in other formats. See [RFC3023] for 399 guidance on packaging XML in requests. 401 Marshalling: 403 If a request body with content type text/xml or application/xml is 404 included, it MUST be either a DAV:searchrequest or a DAV:query- 405 schema-discovery XML element. Its single child element identifies 406 the query grammar. 408 For DAV:searchrequest, the definition of search criteria, the 409 result record, and any other details needed to perform the search 410 depend on the individual search grammar. 412 For DAV:query-schema-discovery, the semantics is defined in 413 Section 4. 415 Preconditions: 417 (DAV:search-grammar-discovery-supported): when an XML request body 418 is present and has a DAV:query-schema-discovery document element, 419 the server MUST support the query schema discovery mechanism 420 described in Section 4. 422 (DAV:search-grammar-supported): when an XML request body is 423 present, the search grammar identified by the document element's 424 child element must be a supported search grammar. 426 (DAV:search-multiple-scope-supported): if the SEARCH request 427 specified multiple scopes, the server MUST support this optional 428 feature. 430 (DAV:search-scope-valid): the supplied search scope must be valid. 431 There can be various reasons for a search scope to be invalid, 432 including unsupported URI schemes and communication problems. 433 Servers MAY add [RFC4918] compliant DAV:response elements as 434 content to the condition element indicating the precise reason for 435 the failure. 437 2.3. The Successful 207 (Multistatus) Response 439 If the server returns 207 (Multistatus), then the search proceeded 440 successfully and the response MUST use the WebDAV multistatus format 441 ([RFC4918], Section 13). The results of this method SHOULD NOT be 442 cached. 444 There MUST be one DAV:response for each resource that matched the 445 search criteria. For each such response, the DAV:href element 446 contains the URI of the resource, and the response MUST include a 447 DAV:propstat element. 449 Note: the WebDAV multistatus format requires at least one DAV: 450 response child element. This specification relaxes that 451 restriction so that empty results can be represented. 453 Note that for each matching resource found there may be multiple URIs 454 within the search scope mapped to it. In this case, a server SHOULD 455 report only one of these URIs. Clients can use the live property 456 DAV:resource-id defined in Section 3.1 of [draft-ietf-webdav-bind] to 457 identify possible duplicates. 459 2.3.1. Result Set Truncation 461 A server MAY limit the number of resources in a reply, for example to 462 limit the amount of resources expended in processing a query. If it 463 does so, the reply MUST use status code 207, return a DAV:multistatus 464 response body and indicate a status of 507 (Insufficient Storage) for 465 the search arbiter URI. It SHOULD include the partial results. 467 When a result set is truncated, there may be many more resources that 468 satisfy the search criteria but that were not examined. 470 If partial results are included and the client requested an ordered 471 result set in the original request, then any partial results that are 472 returned MUST be ordered as the client directed. 474 Note that the partial results returned MAY be any subset of the 475 result set that would have satisfied the original query. 477 2.3.2. Extending the PROPFIND Response 479 A response MAY include more information than PROPFIND defines so long 480 as the extra information does not invalidate the PROPFIND response. 481 Query grammars SHOULD define how the response matches the PROPFIND 482 response. 484 2.3.3. Example: A Simple Request and Response 486 This example demonstrates the request and response framework. The 487 following XML document shows a simple (hypothetical) natural language 488 query. The name of the query element is natural-language-query in 489 the XML namespace "http://example.com/foo". The actual query is 490 "Find the locations of good Thai restaurants in Los Angeles". For 491 this hypothetical query, the arbiter returns two properties for each 492 selected resource. 494 >> Request: 496 SEARCH / HTTP/1.1 497 Host: example.org 498 Content-Type: application/xml; charset="utf-8" 499 Content-Length: 252 501 502 503 504 Find the locations of good Thai restaurants in Los Angeles 505 506 507 >> Response: 509 HTTP/1.1 207 Multi-Status 510 Content-Type: text/xml; charset="utf-8" 511 Content-Length: 429 513 514 516 517 http://siamiam.example/ 518 519 520 259 W. Hollywood 521 4 522 523 HTTP/1.1 200 OK 524 525 526 528 2.3.4. Example: Result Set Truncation 530 In the example below, the server returns just two results, and then 531 indicates that the result is truncated by adding a DAV:response 532 element for the search arbiter resource with 507 (Insufficient 533 Storage) status. 535 >> Request: 537 SEARCH / HTTP/1.1 538 Host: example.net 539 Content-Type: text/xml; charset="utf-8" 540 Content-Length: xxx 542 ... the query goes here ... 544 >> Response: 546 HTTP/1.1 207 Multistatus 547 Content-Type: text/xml; charset="utf-8" 548 Content-Length: 640 550 551 552 553 http://www.example.net/sounds/unbrokenchain.au 554 HTTP/1.1 200 OK 555 556 557 http://tech.mit.example/arch96/photos/Lesh1.jpg 558 HTTP/1.1 200 OK 559 560 561 http://example.net 562 HTTP/1.1 507 Insufficient Storage 563 564 Only first two matching records were returned 565 566 567 569 2.4. Unsuccessful Responses 571 If a SEARCH request could not be executed or the attempt to execute 572 it resulted in an error, the server MUST indicate the failure with an 573 appropriate status code and SHOULD add a response body as defined in 574 [RFC3253], Section 1.6. Unless otherwise stated, condition elements 575 are empty, however specific condition elements MAY include additional 576 child elements that describe the error condition in more detail. 578 2.4.1. Example of an Invalid Scope 580 In the example below, a request failed because the scope identifies a 581 HTTP resource that was not found. 583 >> Response: 585 HTTP/1.1 409 Conflict 586 Content-Type: text/xml; charset="utf-8" 587 Content-Length: 275 589 590 591 592 593 http://www.example.com/X 594 HTTP/1.1 404 Object Not Found 595 596 597 599 3. Discovery of Supported Query Grammars 601 Servers MUST support discovery of the query grammars supported by a 602 search arbiter resource. 604 Clients can determine which query grammars are supported by an 605 arbiter by invoking OPTIONS on the search arbiter. If the resource 606 supports SEARCH, then the DASL response header will appear in the 607 response. The DASL response header lists the supported grammars. 609 Servers supporting the WebDAV extensions [RFC3253] and/or [RFC3744] 610 MUST also 612 o report SEARCH in the live property DAV:supported-method-set for 613 all search arbiter resources and 615 o support the live property DAV:supported-query-grammar-set as 616 defined in Section 3.3. 618 3.1. The OPTIONS Method 620 The OPTIONS method allows the client to discover if a resource 621 supports the SEARCH method and to determine the list of search 622 grammars supported for that resource. 624 The client issues the OPTIONS method against a resource named by the 625 Request-URI. This is a normal invocation of OPTIONS as defined in 626 Section 9.2 of [RFC2616]. 628 If a resource supports the SEARCH method, then the server MUST list 629 SEARCH in the Allow header defined in Section 14.7 of [RFC2616]. 631 DASL servers MUST include the DASL header in the OPTIONS response. 632 This header identifies the search grammars supported by that 633 resource. 635 3.2. The DASL Response Header 637 DASLHeader = "DASL" ":" 1#Coded-URL 638 Coded-URL = 640 (This grammar uses the augmented BNF format defined in Section 2.1 of 641 [RFC2616]) 643 The DASL response header indicates server support for query grammars 644 in the OPTIONS method. The value is a list of URIs that indicate the 645 types of supported grammars. Note that although the URIs can be used 646 to identify each supported search grammar, there is not necessarily a 647 direct relationship between the URI and the XML element name that can 648 be used in XML based SEARCH requests (the element name itself is 649 identified by its namespace name (a URI reference) and the element's 650 local name). 652 Note: this header field value is defined as a comma-separated list 653 ([RFC2616], Section 4.2), thus grammar URIs can appear in multiple 654 header instances, separated by commas, or both. 656 For example: 658 DASL: , 659 , 660 DASL: 662 3.3. DAV:supported-query-grammar-set (protected) 664 This WebDAV property is required for any server supporting either 665 [RFC3253] and/or [RFC3744] and identifies the XML based query 666 grammars that are supported by the search arbiter resource. 668 669 670 671 673 3.4. Example: Grammar Discovery 675 This example shows that the server supports search on the /somefolder 676 resource with the query grammars: DAV:basicsearch, 677 http://foobar.example/syntax1 and http://akuma.example/syntax2. Note 678 that servers supporting WebDAV SEARCH MUST support DAV:basicsearch. 680 >> Request: 682 OPTIONS /somefolder HTTP/1.1 683 Host: example.org 685 >> Response: 687 HTTP/1.1 200 OK 688 Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE 689 Allow: MKCOL, PROPFIND, PROPPATCH, LOCK, UNLOCK, SEARCH 690 DASL: 691 DASL: , 693 This example shows the equivalent taking advantage of a server's 694 support for DAV:supported-method-set and DAV:supported-query-grammar- 695 set. 697 >> Request: 699 PROPFIND /somefolder HTTP/1.1 700 Host: example.org 701 Depth: 0 702 Content-Type: text/xml; charset="utf-8" 703 Content-Length: 165 705 706 707 708 709 710 711 712 >> Response: 714 HTTP/1.1 207 Multi-Status 715 Content-Type: text/xml; charset="utf-8" 716 Content-Length: 1349 718 719 720 721 http://example.org/somefolder 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 750 751 752 753 HTTP/1.1 200 OK 754 755 756 758 Note that the query grammar element names marshalled as part of the 759 DAV:supported-query-grammar-set can be directly used as element names 760 in an XML based query. 762 4. Query Schema Discovery: QSD 764 Servers MAY support the discovery of the schema for a query grammar. 766 The DASL response header and the DAV:supported-query-grammar-set 767 property provide means for clients to discover the set of query 768 grammars supported by a resource. This alone is not sufficient 769 information for a client to generate a query. For example, the DAV: 770 basicsearch grammar defines a set of queries consisting of a set of 771 operators applied to a set of properties and values, but the grammar 772 itself does not specify which properties may be used in the query. 773 QSD for the DAV:basicsearch grammar allows a client to discover the 774 set of properties that are searchable, selectable, and sortable. 775 Moreover, although the DAV:basicsearch grammar defines a minimal set 776 of operators, it is possible that a resource might support additional 777 operators in a query. For example, a resource might support an 778 optional operator that can be used to express content-based queries 779 in a proprietary syntax. QSD allows a client to discover these 780 operators and their syntax. The set of discoverable quantities will 781 differ from grammar to grammar, but each grammar can define a means 782 for a client to discover what can be discovered. 784 In general, the schema for a given query grammar depends on both the 785 resource (the arbiter) and the scope. A given resource might have 786 access to one set of properties for one potential scope, and another 787 set for a different scope. For example, consider a server able to 788 search two distinct collections, one holding cooking recipes, the 789 other design documents for nuclear weapons. While both collections 790 might support properties such as author, title, and date, the first 791 might also define properties such as calories and preparation time, 792 while the second defined properties such as yield and applicable 793 patents. Two distinct arbiters indexing the same collection might 794 also have access to different properties. For example, the recipe 795 collection mentioned above might also be indexed by a value-added 796 server that also stored the names of chefs who had tested the recipe. 797 Note also that the available query schema might also depend on other 798 factors, such as the identity of the principal conducting the search, 799 but these factors are not exposed in this protocol. 801 4.1. Additional SEARCH Semantics 803 Each query grammar supported by DASL defines its own syntax for 804 expressing the possible query schema. A client retrieves the schema 805 for a given query grammar on an arbiter resource with a given scope 806 by invoking the SEARCH method on that arbiter with that grammar and 807 scope and with a root element of DAV:query-schema-discovery rather 808 than DAV:searchrequest. 810 Marshalling: 812 The request body MUST be a DAV:query-schema-discovery element. 814 815 818 The response body takes the form of a DAV:multistatus element 819 ([RFC4918], Section 13), where DAV:response is extended to hold 820 the returned query grammar inside a DAV:query-schema container 821 element. 823 825 827 The content of this container is an XML element whose name and syntax 828 depend upon the grammar, and whose value may (and likely will) vary 829 depending upon the grammar, arbiter, and scope. 831 4.1.1. Example of Query Schema Discovery 833 In this example, the arbiter is recipes.example, the grammar is DAV: 834 basicsearch, the scope is also recipes.example. 836 >> Request: 838 SEARCH / HTTP/1.1 839 Host: recipes.example 840 Content-Type: application/xml; charset="utf-8" 841 Content-Length: 258 843 844 845 846 847 848 http://recipes.example 849 infinity 850 851 852 853 854 >> Response: 856 HTTP/1.1 207 Multistatus 857 Content-Type: application/xml; charset="utf-8" 858 Content-Length: xxx 860 861 862 863 http://recipes.example 864 HTTP/1.1 200 OK 865 866 867 869 870 871 872 874 The query schema for DAV:basicsearch is defined in Section 5.19. 876 5. The DAV:basicsearch Grammar 878 5.1. Introduction 880 DAV:basicsearch uses an extensible XML syntax that allows clients to 881 express search requests that are generally useful for WebDAV 882 scenarios. DASL-extended servers MUST accept this grammar, and MAY 883 accept other grammars. 885 DAV:basicsearch has several components: 887 o DAV:select provides the result record definition. 889 o DAV:from defines the scope. 891 o DAV:where defines the criteria. 893 o DAV:orderby defines the sort order of the result set. 895 o DAV:limit provides constraints on the query as a whole. 897 5.2. The DAV:basicsearch DTD 899 901 903 905 907 909 910 911 913 914 915 916 918 919 921 924 926 928 930 932 933 935 936 938 939 941 942 944 945 947 948 949 951 952 954 955 957 958 960 961 963 964 965 966 967 969 971 972 974 5.2.1. Example Query 976 This query retrieves the content length values for all resources 977 located under the server's "/container1/" URI namespace whose length 978 exceeds 10000 sorted ascending by size. 980 981 982 983 984 985 986 987 /container1/ 988 infinity 989 990 991 992 993 994 10000 995 996 997 998 999 1000 1001 1002 1003 1004 1006 5.3. DAV:select 1008 DAV:select defines the result record, which is a set of properties 1009 and values. This document defines two possible values: DAV:allprop 1010 and DAV:prop, both defined in Section 14 of [RFC4918]. 1012 5.4. DAV:from 1014 1015 1017 DAV:from defines the query scope. This contains one or more DAV: 1018 scope elements. Support for multiple scope elements is optional, 1019 however servers MUST fail a request specifying multiple DAV:scope 1020 elements if they can't support it (see Section 2.2.2, precondition 1021 DAV:search-multiple-scope-supported). The scope element contains 1022 mandatory DAV:href and DAV:depth elements. 1024 DAV:href indicates the URI reference ([RFC3986], Section 4.1) to use 1025 as a scope. 1027 When the scope is a collection, if DAV:depth is "0", the search 1028 includes only the collection. When it is "1", the search includes 1029 the collection and its immediate children. When it is "infinity", it 1030 includes the collection and all its progeny. 1032 When the scope is not a collection, the depth is ignored and the 1033 search applies just to the resource itself. 1035 If the server supports WebDAV Redirect Reference Resources 1036 ([RFC4437]) and the search scope contains a redirect reference 1037 resource, then it applies only to that resource, not to its target. 1039 When the child element DAV:include-versions is present, the search 1040 scope will include all versions (see [RFC3253], Section 2.2.1) of all 1041 version-controlled resources in scope. Servers that do support 1042 versioning but do not support the DAV:include-versions feature MUST 1043 signal an error if it is used in a query (see Section 2.2.2, 1044 precondition DAV:search-scope-valid). 1046 5.4.1. Relationship to the Request-URI 1048 If the DAV:scope element is an URI ([RFC3986], Section 3), the scope 1049 is exactly that URI. 1051 If the DAV:scope element is a relative reference ([RFC3986], Section 1052 4.2), the scope is taken to be relative to the Request-URI. 1054 5.4.2. Scope 1056 A Scope can be an arbitrary URI reference. 1058 Servers, of course, may support only particular scopes. This may 1059 include limitations for particular schemes such as "http:" or "ftp:" 1060 or certain URI namespaces. However, WebDAV compliant search arbiters 1061 minimally SHOULD support scopes that match their own URI. 1063 5.5. DAV:where 1065 The DAV:where element defines the search condition for inclusion of 1066 resources in the result set. The value of this element is an XML 1067 element that defines a search operator that evaluates to one of the 1068 Boolean truth values TRUE, FALSE, or UNKNOWN. The search operator 1069 contained by DAV:where may itself contain and evaluate additional 1070 search operators as operands, which in turn may contain and evaluate 1071 additional search operators as operands, etc. recursively. 1073 5.5.1. Use of Three-Valued Logic in Queries 1075 Each operator defined for use in the where clause that returns a 1076 Boolean value MUST evaluate to TRUE, FALSE, or UNKNOWN. The resource 1077 under scan is included as a member of the result set if and only if 1078 the search condition evaluates to TRUE. 1080 Consult Appendix A for details on the application of three-valued 1081 logic in query expressions. 1083 5.5.2. Handling Optional Operators 1085 If a query contains an operator that is not supported by the server, 1086 then the server MUST respond with a 422 (Unprocessable Entity) status 1087 code. 1089 5.5.3. Treatment of NULL Values 1091 If a PROPFIND for a property value would yield a non-2xx (see 1092 [RFC2616], Section 10.2) response for that property, then that 1093 property is considered NULL. 1095 NULL values are "less than" all other values in comparisons. 1097 Empty strings (zero length strings) are not NULL values. An empty 1098 string is "less than" a string with length greater than zero. 1100 The DAV:is-defined operator is defined to test if the value of a 1101 property is not NULL. 1103 5.5.4. Treatment of Properties with mixed/element Content 1105 Comparisons of properties that do not have simple types (text-only 1106 content) is out-of-scope for the standard operators defined for DAV: 1107 basicsearch and therefore is defined to be UNKNOWN (as per 1108 Appendix A). For querying the DAV:resourcetype property, see 1109 Section 5.13. 1111 5.5.5. Example: Testing for Equality 1113 The example shows a single operator (DAV:eq) applied in the criteria. 1115 1116 1117 1118 1119 1120 100 1121 1122 1124 5.5.6. Example: Relative Comparisons 1126 The example shows a more complex operation involving several 1127 operators (DAV:and, DAV:eq, DAV:gt) applied in the criteria. This 1128 DAV:where expression matches those resources of type "image/gif" over 1129 4K in size. 1131 1132 1133 1134 1135 1136 1137 image/gif 1138 1139 1140 1141 1142 1143 4096 1144 1145 1146 1148 5.6. DAV:orderby 1150 The DAV:orderby element specifies the ordering of the result set. It 1151 contains one or more DAV:order elements, each of which specifies a 1152 comparison between two items in the result set. Informally, a 1153 comparison specifies a test that determines whether one resource 1154 appears before another in the result set. Comparisons are applied in 1155 the order they occur in the DAV:orderby element, earlier comparisons 1156 being more significant. 1158 The comparisons defined here use only a single property from each 1159 resource, compared using the same ordering as the DAV:lt operator 1160 (ascending) or DAV:gt operator (descending). If neither direction is 1161 specified, the default is DAV:ascending. 1163 In the context of the DAV:orderby element, null values are considered 1164 to collate before any actual (i.e., non null) value, including 1165 strings of zero length (this is compatible with [SQL99]). 1167 The "caseless" attribute may be used to indicate case-sensitivity for 1168 comparisons (Section 5.18). 1170 5.6.1. Example of Sorting 1172 This sort orders first by last name of the author, and then by size, 1173 in descending order, so that for each author, the largest works 1174 appear first. 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1187 5.7. Boolean Operators: DAV:and, DAV:or, and DAV:not 1189 The DAV:and operator performs a logical AND operation on the 1190 expressions it contains. 1192 The DAV:or operator performs a logical OR operation on the values it 1193 contains. 1195 The DAV:not operator performs a logical NOT operation on the values 1196 it contains. 1198 5.8. DAV:eq 1200 The DAV:eq operator provides simple equality matching on property 1201 values. 1203 The "caseless" attribute may be used with this element 1204 (Section 5.18). 1206 5.9. DAV:lt, DAV:lte, DAV:gt, DAV:gte 1208 The DAV:lt, DAV:lte, DAV:gt, and DAV:gte operators provide 1209 comparisons on property values, using less-than, less-than or equal, 1210 greater-than, and greater-than or equal respectively. The "caseless" 1211 attribute may be used with these elements (Section 5.18). 1213 5.10. DAV:literal 1215 DAV:literal allows literal values to be placed in an expression. 1217 White space in literal values is significant in comparisons. For 1218 consistency with [RFC4918], clients SHOULD NOT specify the attribute 1219 "xml:space" (Section 2.10 of [XML]) to override this behavior. 1221 In comparisons, the contents of DAV:literal SHOULD be treated as 1222 string, with the following exceptions: 1224 o when operand for a comparison with a DAV:getcontentlength 1225 property, it SHOULD be treated as an unsigned integer value (the 1226 behavior for values not in this format is undefined), 1228 o when operand for a comparison with a DAV:creationdate or DAV: 1229 getlastmodified property, it SHOULD be treated as a date value in 1230 the ISO-8601 subset defined for the DAV:creationdate property (see 1231 [RFC4918], Section 15.1; the behavior of values not in this format 1232 is undefined), 1234 o when operand for a comparison with a property for which the type 1235 is known and when compatible with that type, it MAY be treated 1236 according to this type. 1238 5.11. DAV:typed-literal (optional) 1240 There are situations in which a client may want to force a comparison 1241 not to be string-based (as defined for DAV:literal). In these cases, 1242 a typed comparison can be enforced by using DAV:typed-literal 1243 instead. 1245 1247 The data type is specified using the xsi:type attribute defined in 1248 [XS1], Section 2.6.1. If the type is not specified, it defaults to 1249 "xs:string". 1251 A server MUST reject a request with an unknown type with a status of 1252 422 (Unprocessable Entity). It SHOULD reject a request if the value 1253 provided in DAV:typed-literal can not be cast to the specified type. 1255 The comparison evaluates to UNKNOWN if the property value can not be 1256 cast to the specified datatype (see [XPATHFUNC], Section 17). 1258 5.11.1. Example for Typed Numerical Comparison 1260 Consider a set of resources with the dead property "edits" in the 1261 namespace "http://ns.example.org": 1263 +-----+----------------+ 1264 | URI | property value | 1265 +-----+----------------+ 1266 | /a | "-1" | 1267 | /b | "01" | 1268 | /c | "3" | 1269 | /d | "test" | 1270 | /e | (undefined) | 1271 +-----+----------------+ 1273 The expression 1275 1278 1279 3 1280 1282 will evaluate to TRUE for the resources "/a" and "/b" (their property 1283 values can be parsed as type xs:integer, and the numerical comparison 1284 evaluates to true), to FALSE for "/c" (property value is compatible, 1285 but numerical comparison evaluates to false) and UNKNOWN for "/d" and 1286 "/e" (the property either is undefined, or its value can not be 1287 parsed as xs:integer). 1289 5.12. Support for Matching xml:lang Attributes on Properties 1291 The following two optional operators can be used to express 1292 conditions on the language of a property value (as expressed using 1293 the xml:lang attribute). 1295 5.12.1. DAV:language-defined (optional) 1297 1299 This operator evaluates to TRUE if the language for the value of the 1300 given property is known, FALSE if it isn't and UNKNOWN if the 1301 property itself is not defined. 1303 5.12.2. DAV:language-matches (optional) 1305 1307 This operator evaluates to TRUE if the language for the value of the 1308 given property is known and matches the language name given in the 1309 element, FALSE if it doesn't match and UNKNOWN if the 1310 property itself is not defined. 1312 Languages are considered to match if they are the same, or if the 1313 language of the property value is a sublanguage of the language 1314 specified in the element (see [XPATH], Section 4.3, "lang 1315 function"). 1317 5.12.3. Example of Language-Aware Matching 1319 The expression below will evaluate to TRUE if the property "foobar" 1320 exists and its language is either unknown, English or a sublanguage 1321 of English. 1323 1324 1325 1326 1327 1328 1329 1330 1331 en 1332 1333 1335 5.13. DAV:is-collection 1337 The DAV:is-collection operator allows clients to determine whether a 1338 resource is a collection (that is, whether its DAV:resourcetype 1339 element contains the element DAV:collection). 1341 Rationale: This operator is provided in lieu of defining generic 1342 structure queries, which would suffice for this and for many more 1343 powerful queries, but seems inappropriate to standardize at this 1344 time. 1346 5.13.1. Example of DAV:is-collection 1348 This example shows a search criterion that picks out all and only the 1349 resources in the scope that are collections. 1351 1352 1353 1355 5.14. DAV:is-defined 1357 The DAV:is-defined operator allows clients to determine whether a 1358 property is defined on a resource. The meaning of "defined on a 1359 resource" is found in Section 5.5.3. 1361 Example: 1363 1364 1365 1367 5.15. DAV:like 1369 The DAV:like is an optional operator intended to give simple 1370 wildcard-based pattern matching ability to clients. 1372 The operator takes two arguments. 1374 The first argument is a DAV:prop element identifying a single 1375 property to evaluate. 1377 The second argument is a DAV:literal element that gives the pattern 1378 matching string. 1380 5.15.1. Syntax for the Literal Pattern 1382 pattern = [wildcard] 0*( text [wildcard] ) 1384 wildcard = exactlyone / zeroormore 1385 text = 1*( character / escapeseq ) 1387 exactlyone = "_" 1388 zeroormore = "%" 1389 escapechar = "\" 1390 escapeseq = escapechar ( exactlyone / zeroormore / escapechar ) 1392 ; character: see [XML], Section 2.2, minus wildcard / escapechar 1393 character = HTAB / LF / CR ; whitespace 1394 character =/ %x20-24 / %x26-5B / %x5D-5E / %x60-D7FF 1395 character =/ %xE000-FFFD / %x10000-10FFFF 1397 (Note that the ABNF above is defined in terms of Unicode code points 1398 ([UNICODE5]); when an query is transmitted as XML document WebDAV, 1399 these characters are typically encoded in UTF-8 or UTF-16.) 1401 The value for the literal is composed of wildcards separated by 1402 segments of text. Wildcards may begin or end the literal. 1404 The "_" wildcard matches exactly one character. 1406 The "%" wildcard matches zero or more characters 1408 The "\" character is an escape sequence so that the literal can 1409 include "_" and "%". To include the "\" character in the pattern, 1410 the escape sequence "\\" is used. 1412 5.15.2. Example of DAV:like 1414 This example shows how a client might use DAV:like to identify those 1415 resources whose content type was a subtype of image. 1417 1418 1419 1420 image/% 1421 1422 1424 5.16. DAV:contains 1426 The DAV:contains operator is an optional operator that provides 1427 content-based search capability. This operator implicitly searches 1428 against the text content of a resource, not against content of 1429 properties. The DAV:contains operator is intentionally not overly 1430 constrained, in order to allow the server to do the best job it can 1431 in performing the search. 1433 The DAV:contains operator evaluates to a Boolean value. It evaluates 1434 to TRUE if the content of the resource satisfies the search. 1435 Otherwise, it evaluates to FALSE. 1437 Within the DAV:contains XML element, the client provides a phrase: a 1438 single word or whitespace delimited sequence of words. Servers MAY 1439 ignore punctuation in a phrase. Case-sensitivity is at the 1440 discretion of the server implementation. 1442 The following non-exhaustive list enumerate things that may or may 1443 not be done as part of the search: Phonetic methods such as "soundex" 1444 may or may not be used. Word stemming may or may not be performed. 1445 Thesaurus expansion of words may or may not be done. Right or left 1446 truncation may or may not be performed. The search may be case 1447 insensitive or case sensitive. The word or words may or may not be 1448 interpreted as names. Multiple words may or may not be required to 1449 be adjacent or "near" each other. Multiple words may or may not be 1450 required to occur in the same order. Multiple words may or may not 1451 be treated as a phrase. The search may or may not be interpreted as 1452 a request to find documents "similar" to the string operand. 1453 Character canonicalization such as that done by the Unicode collation 1454 algorithm may or may not be applied. 1456 5.16.1. Result Scoring (DAV:score Element) 1458 Servers SHOULD indicate scores for the DAV:contains condition by 1459 adding a DAV:score XML element to the DAV:response element. Its 1460 value is defined only in the context of a particular query result. 1461 The value is a string representing the score, an integer from zero to 1462 10000 inclusive, where a higher value indicates a higher score (e.g. 1463 more relevant). 1465 Modified DTD fragment for DAV:propstat: 1467 1469 1471 Clients should note that, in general, it is not meaningful to compare 1472 the numeric values of scores from two different query results unless 1473 both were executed by the same underlying search system on the same 1474 collection of resources. 1476 5.16.2. Ordering by Score 1478 To order search results by their score, the DAV:score element may be 1479 added as child to the DAV:orderby element (in place of a DAV:prop 1480 element). 1482 5.16.3. Examples 1484 The example below shows a search for the phrase "Peter Forsberg". 1486 Depending on its support for content-based searching, a server MAY 1487 treat this as a search for documents that contain the words "Peter" 1488 and "Forsberg". 1490 1491 Peter Forsberg 1492 1494 The example below shows a search for resources that contain "Peter" 1495 and "Forsberg". 1497 1498 1499 Peter 1500 Forsberg 1501 1502 1504 5.17. Limiting the Result Set 1506 1507 1509 The DAV:limit XML element contains requested limits from the client 1510 to limit the size of the reply or amount of effort expended by the 1511 server. The DAV:nresults XML element contains a requested maximum 1512 number of DAV:response elements to be returned in the response body. 1513 The server MAY disregard this limit. The value of this element is an 1514 unsigned integer. 1516 5.17.1. Relationship to Result Ordering 1518 If the result set is both limited by DAV:limit and ordered according 1519 to DAV:orderby, the results that are included in the response 1520 document SHOULD be those that order highest. 1522 5.18. The 'caseless' XML Attribute 1524 The "caseless" attribute allows clients to specify caseless matching 1525 behavior instead of character-by-character matching for DAV: 1526 basicsearch operators. 1528 The possible values for "caseless" are "yes" or "no". The default 1529 value is server-specified. Caseless matching SHOULD be implemented 1530 as defined in Section 5.18 of the Unicode Standard ([UNICODE5]). 1532 Support for the "caseless" attribute is optional. A server should 1533 respond with a status of 422 if it is used but cannot be supported. 1535 5.19. Query Schema for DAV:basicsearch 1537 The DAV:basicsearch grammar defines a search criteria that is a 1538 Boolean-valued expression, and allows for an arbitrary set of 1539 properties to be included in the result record. The result set may 1540 be sorted on a set of property values. Accordingly the DTD for 1541 schema discovery for this grammar allows the server to express: 1543 1. the set of properties that may be either searched, returned, or 1544 used to sort, and a hint about the data type of such properties 1546 2. the set of optional operators defined by the resource. 1548 5.19.1. DTD for DAV:basicsearch QSD 1550 1551 1552 1553 1556 1557 1558 1559 1560 1561 1563 The DAV:properties element holds a list of descriptions of 1564 properties. 1566 The DAV:operators element describes the optional operators that may 1567 be used in a DAV:where element. 1569 5.19.2. DAV:propdesc Element 1571 Each instance of a DAV:propdesc element describes the property or 1572 properties in the DAV:prop element it contains. All subsequent 1573 elements are descriptions that apply to those properties. All 1574 descriptions are optional and may appear in any order. Servers 1575 SHOULD support all the descriptions defined here, and MAY define 1576 others. 1578 DASL defines five descriptions. The first, DAV:datatype, provides a 1579 hint about the type of the property value, and may be useful to a 1580 user interface prompting for a value. The remaining four (DAV: 1581 searchable, DAV:selectable, DAV:sortable, and DAV:caseless) identify 1582 portions of the query (DAV:where, DAV:select, and DAV:orderby, 1583 respectively). If a property has a description for a section, then 1584 the server MUST allow the property to be used in that section. These 1585 descriptions are optional. If a property does not have such a 1586 description, or is not described at all, then the server MAY still 1587 allow the property to be used in the corresponding section. 1589 5.19.2.1. DAV:any-other-property 1591 This element can be used in place of DAV:prop to describe properties 1592 of WebDAV properties not mentioned in any other DAV:prop element. 1593 For instance, this can be used to indicate that all other properties 1594 are searchable and selectable without giving details about their 1595 types (a typical scenario for dead properties). 1597 5.19.3. The DAV:datatype Property Description 1599 The DAV:datatype element contains a single XML element that provides 1600 a hint about the domain of the property, which may be useful to a 1601 user interface prompting for a value to be used in a query. Data 1602 types are identified by an element name. Where appropriate, a server 1603 SHOULD use the simple data types defined in [XS2]. 1605 1607 Examples from [XS2], Section 3: 1609 +----------------+---------------------+ 1610 | Qualified name | Example | 1611 +----------------+---------------------+ 1612 | xs:boolean | true, false, 1, 0 | 1613 | xs:string | Foobar | 1614 | xs:dateTime | 1994-11-05T08:15:5Z | 1615 | xs:float | .314159265358979E+1 | 1616 | xs:integer | -259, 23 | 1617 +----------------+---------------------+ 1619 If the data type of a property is not given, then the data type 1620 defaults to xs:string. 1622 5.19.4. The DAV:searchable Property Description 1624 1626 If this element is present, then the server MUST allow this property 1627 to appear within a DAV:where element where an operator allows a 1628 property. Allowing a search does not mean that the property is 1629 guaranteed to be defined on every resource in the scope, it only 1630 indicates the server's willingness to check. 1632 5.19.5. The DAV:selectable Property Description 1634 1636 This element indicates that the property may appear in the DAV:select 1637 element. 1639 5.19.6. The DAV:sortable Property Description 1641 This element indicates that the property may appear in the DAV: 1642 orderby element. 1644 1646 5.19.7. The DAV:caseless Property Description 1648 This element only applies to properties whose data type is "xs: 1649 string" and derived data types as per the DAV:datatype property 1650 description. Its presence indicates that compares performed for 1651 searches, and the comparisons for ordering results on the string 1652 property will be caseless (the default is character-by-character). 1654 1656 5.19.8. The DAV:operators XML Element 1658 The DAV:operators element describes every optional operator supported 1659 in a query. (Mandatory operators are not listed since they are 1660 mandatory and permit no variation in syntax.). All optional 1661 operators that are supported MUST be listed in the DAV:operators 1662 element. 1664 The listing for an operator, contained in an DAV:opdesc element, 1665 consists of the operator (as an empty element), followed by one 1666 element for each operand. The operand MUST be either DAV:operand- 1667 property, DAV:operand-literal or DAV:operand-typed-literal, which 1668 indicate that the operand in the corresponding position is a 1669 property, a literal value or a typed literal value, respectively. If 1670 an operator is polymorphic (allows more than one operand syntax) then 1671 each permitted syntax MUST be listed separately. 1673 The DAV:opdesc element MAY have a "allow-pcdata" attribute 1674 (defaulting to "no"). A value of "yes" indicates that the operator 1675 can contain character data, as it is the case with DAV:contains (see 1676 Section 5.16). Definition of additional operators using this format 1677 is NOT RECOMMENDED. 1679 1680 1681 1682 1683 1685 5.19.9. Example of Query Schema for DAV:basicsearch 1687 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1718 This response lists four properties. The data type of the last three 1719 properties is not given, so it defaults to xs:string. All are 1720 selectable, and the first three may be searched. All but the last 1721 may be used in a sort. Of the optional DAV operators, DAV:contains 1722 and DAV:like are supported. 1724 Note: The schema discovery defined here does not provide for 1725 discovery of supported values of the "caseless" attribute. This 1726 may require that the reply also list the mandatory operators. 1728 6. Internationalization Considerations 1730 Properties may be language-tagged using the xml:lang attribute (see 1731 [RFC4918], Section 4.3). The optional operators DAV:language-defined 1732 (Section 5.12.1) and DAV:language-matches (Section 5.12.2) allow to 1733 express conditions on the language tagging information. 1735 7. Security Considerations 1737 This section is provided to detail issues concerning security 1738 implications of which DASL applications need to be aware. All of the 1739 security considerations of HTTP/1.1 ([RFC2616] and WebDAV ([RFC4918]) 1740 also apply to DASL. In addition, this section will include security 1741 risks inherent in searching and retrieval of resource properties and 1742 content. 1744 A query MUST NOT allow clients to retrieve information that wouldn't 1745 have been available through the GET or PROPFIND methods in the first 1746 place. In particular: 1748 o Query constraints on WebDAV properties for which the client does 1749 not have read access need to be evaluated as if the property did 1750 not exist (see Section 5.5.3). 1752 o Query constraints on content (as with DAV:contains, defined in 1753 Section 5.16) for which the client does not have read access need 1754 to be evaluated as if a GET would return a 4xx status code. 1756 A server should prepare for denial of service attacks. For example a 1757 client may issue a query for which the result set is expensive to 1758 calculate or transmit because many resources match or must be 1759 evaluated. 1761 7.1. Implications of XML External Entities 1763 XML supports a facility known as "external entities", defined in 1764 Section 4.2.2 of [XML], which instruct an XML processor to retrieve 1765 and perform an inline include of XML located at a particular URI. An 1766 external XML entity can be used to append or modify the document type 1767 declaration (DTD) associated with an XML document. An external XML 1768 entity can also be used to include XML within the content of an XML 1769 document. For non-validating XML, such as the XML used in this 1770 specification, including an external XML entity is not required by 1771 [XML]. However, [XML] does state that an XML processor may, at its 1772 discretion, include the external XML entity. 1774 External XML entities have no inherent trustworthiness and are 1775 subject to all the attacks that are endemic to any HTTP GET request. 1776 Furthermore, it is possible for an external XML entity to modify the 1777 DTD, and hence affect the final form of an XML document, in the worst 1778 case significantly modifying its semantics, or exposing the XML 1779 processor to the security risks discussed in [RFC3023]. Therefore, 1780 implementers must be aware that external XML entities should be 1781 treated as untrustworthy. 1783 There is also the scalability risk that would accompany a widely 1784 deployed application which made use of external XML entities. In 1785 this situation, it is possible that there would be significant 1786 numbers of requests for one external XML entity, potentially 1787 overloading any server which fields requests for the resource 1788 containing the external XML entity. 1790 8. Scalability 1792 Query grammars are identified by URIs. Applications SHOULD NOT 1793 attempt to retrieve these URIs even if they appear to be retrievable 1794 (for example, those that begin with "http://") 1796 9. IANA Considerations 1798 This document uses the namespace defined in Section 21 of [RFC4918] 1799 for XML elements. 1801 9.1. HTTP Headers 1803 This document specifies the HTTP header listed below, to be added to 1804 the permanent HTTP header registry defined in [RFC3864]. 1806 9.1.1. DASL 1808 Header field name: DASL 1810 Applicable protocol: http 1812 Status: standard 1814 Author/Change controller: IETF 1816 Specification document: this specification (Section 3.2) 1818 10. Contributors 1820 This document is based on prior work on the DASL protocol done by the 1821 WebDAV DASL working group until the year 2000 -- namely by Alan 1822 Babich, Jim Davis, Rick Henderson, Dale Lowry, Saveen Reddy and 1823 Surendra Reddy. 1825 11. Acknowledgements 1827 This document has benefited from thoughtful discussion by Lisa 1828 Dusseault, Javier Godoy, Sung Kim, Chris Newman, Elias Sinderson, 1829 Martin Wallmer, Keith Wannamaker, Jim Whitehead and Kevin Wiggen. 1831 12. References 1833 12.1. Normative References 1835 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1836 Requirement Levels", BCP 14, RFC 2119, March 1997. 1838 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Nielsen, H., 1839 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 1840 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 1842 [RFC3023] Makoto, M., St.Laurent, S., and D. Kohn, "XML Media 1843 Types", RFC 3023, January 2001. 1845 [RFC3253] Clemm, G., Amsden, J., Ellison, T., Kaler, C., and J. 1846 Whitehead, "Versioning Extensions to WebDAV", RFC 3253, 1847 March 2002. 1849 [RFC3744] Clemm, G., Reschke, J., Sedlar, E., and J. Whitehead, "Web 1850 Distributed Authoring and Versioning (WebDAV) Access 1851 Control Protocol", RFC 3744, May 2004. 1853 [RFC3986] Berners-Lee, T., Fielding, R., and L. Masinter, "Uniform 1854 Resource Identifier (URI): Generic Syntax", STD 66, 1855 RFC 3986, January 2005. 1857 [RFC4918] Dusseault, L., Ed., "HTTP Extensions for Web Distributed 1858 Authoring and Versioning (WebDAV)", RFC 4918, June 2007. 1860 [RFC5234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1861 Specifications: ABNF", STD 68, RFC 5234, January 2008. 1863 [XML] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E., and 1864 F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fourth 1865 Edition)", W3C REC-xml-20060816, August 2006, 1866 . 1868 [XPATH] Clark, J. and S. DeRose, "XML Path Language (XPath) 1869 Version 1.0", W3C REC-xpath-19991116, November 1999, 1870 . 1872 [XPATHFUNC] 1873 Malhotra, A., Melton, J., and N. Walsh, "XQuery 1.0 and 1874 XPath 2.0 Functions and Operators", W3C REC-xpath- 1875 functions-20070123, January 2007, 1876 . 1878 [XS1] Thompson, H., Beech, D., Maloney, M., Mendelsohn, N., and 1879 World Wide Web Consortium, "XML Schema Part 1: 1880 Structures", W3C REC-xmlschema-1-20041028, October 2004, 1881 . 1883 [XS2] Biron, P., Malhotra, A., and World Wide Web Consortium, 1884 "XML Schema Part 2: Datatypes Second Edition", W3C REC- 1885 xmlschema-2-20041028, October 2004, 1886 . 1888 12.2. Informative References 1890 [BCP47] Phillips, A. and M. Davis, "Matching of Language Tags", 1891 BCP 47, RFC 4647, September 2006. 1893 [DASL] Reddy, S., Lowry, D., Reddy, S., Henderson, R., Davis, J., 1894 and A. Babich, "DAV Searching & Locating", 1895 draft-ietf-dasl-protocol-00 (work in progress), July 1999. 1897 [DASLREQ] Davis, J., Reddy, S., and J. Slein, "Requirements for DAV 1898 Searching and Locating", February 1999, . 1902 This is an updated version of the Internet Draft 1903 "draft-ietf-dasl-requirements-00", but obviously never was 1904 submitted to the IETF. 1906 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration 1907 Procedures for Message Header Fields", BCP 90, RFC 3864, 1908 September 2004. 1910 [RFC4437] Whitehead, J., Clemm, G., and J. Reschke, Ed., "Web 1911 Distributed Authoring and Versioning (WebDAV) 1912 Redirect Reference Resources", RFC 4437, March 2006. 1914 [RFC4790] Newman, C., Duerst, M., and A. Gulbrandsen, "Internet 1915 Application Protocol Collation Registry", RFC 4790, 1916 March 2007. 1918 [SQL99] Milton, J., "Database Language SQL Part 2: Foundation 1919 (SQL/Foundation)", ISO ISO/IEC 9075-2:1999 (E), July 1999. 1921 [UNICODE5] 1922 The Unicode Consortium, "The Unicode Standard - Version 1923 5.0", Addison-Wesley , November 2006, 1924 . 1926 ISBN 0321480910 [1] 1928 [draft-ietf-webdav-bind] 1929 Clemm, G., Crawford, J., Reschke, J., Ed., and J. 1930 Whitehead, "Binding Extensions to Web Distributed 1931 Authoring and Versioning (WebDAV)", 1932 draft-ietf-webdav-bind-20 (work in progress), 1933 November 2007. 1935 URIs 1937 [1] 1939 Appendix A. Three-Valued Logic in DAV:basicsearch 1941 ANSI standard three valued logic is used when evaluating the search 1942 condition (as defined in the ANSI standard SQL specifications, for 1943 example in ANSI X3.135-1992, section 8.12, pp. 188-189, section 8.2, 1944 p. 169, General Rule 1)a), etc.). 1946 ANSI standard three valued logic is undoubtedly the most widely 1947 practiced method of dealing with the issues of properties in the 1948 search condition not having a value (e.g., being null or not defined) 1949 for the resource under scan, and with undefined expressions in the 1950 search condition (e.g., division by zero, etc.). Three valued logic 1951 works as follows. 1953 Undefined expressions are expressions for which the value of the 1954 expression is not defined. Undefined expressions are a completely 1955 separate concept from the truth value UNKNOWN, which is, in fact, 1956 well defined. Property names and literal constants are considered 1957 expressions for purposes of this section. If a property in the 1958 current resource under scan has not been set to a value, then the 1959 value of that property is undefined for the resource under scan. 1960 DASL 1.0 has no arithmetic division operator, but if it did, division 1961 by zero would be an undefined arithmetic expression. 1963 If any subpart of an arithmetic, string, or datetime subexpression is 1964 undefined, the whole arithmetic, string, or datetime subexpression is 1965 undefined. 1967 There are no manifest constants to explicitly represent undefined 1968 number, string, or datetime values. 1970 Since a Boolean value is ultimately returned by the search condition, 1971 arithmetic, string, and datetime expressions are always arguments to 1972 other operators. Examples of operators that convert arithmetic, 1973 string, and datetime expressions to Boolean values are the six 1974 relational operators ("greater than", "less than", "equals", etc.). 1975 If either or both operands of a relational operator have undefined 1976 values, then the relational operator evaluates to UNKNOWN. 1977 Otherwise, the relational operator evaluates to TRUE or FALSE, 1978 depending upon the outcome of the comparison. 1980 The Boolean operators DAV:and, DAV:or and DAV:not are evaluated 1981 according to the following rules: 1983 not UNKNOWN = UNKNOWN 1985 UNKNOWN and TRUE = UNKNOWN 1987 UNKNOWN and FALSE = FALSE 1989 UNKNOWN and UNKNOWN = UNKNOWN 1991 UNKNOWN or TRUE = TRUE 1993 UNKNOWN or FALSE = UNKNOWN 1995 UNKNOWN or UNKNOWN = UNKNOWN 1997 Appendix B. Candidates for Future Protocol Extensions 1999 This Section summarizes issues which have been raised during the 2000 development of this specification, but for which no resolution could 2001 be found with the constraints in place. Future revisions of this 2002 specification should revisit these issues, though. 2004 B.1. Collation Support 2006 Matching and sorting of textual data relies on collations. With 2007 respect to WebDAV SEARCH, a combination of various design approaches 2008 could be used: 2010 o Require server support for specific collations. 2012 o Require that the server can advertise which collations it 2013 supports. 2015 o Allow a client to select the collation to be used. 2017 In practice, the current implementations of WebDAV SEARCH usually 2018 rely on backends they do not control, and for which collation 2019 information may not be available. To make things worse, 2020 implementations of the DAV:basicsearch grammar frequently need to 2021 combine data from multiple underlying stores (such as properties and 2022 full text content), and thus collation support may vary based on the 2023 operator or property. 2025 Another open issue is what collation formalism to support. At the 2026 time of this writing, the two specifications below seem to provide 2027 the necessary framework and thus may be the base for future work on 2028 collation support in WebDAV SEARCH: 2030 1. "Internet Application Protocol Collation Registry" ([RFC4790]). 2032 2. "XQuery 1.0 and XPath 2.0 Functions and Operators" ([XPATHFUNC], 2033 Section 7.3.1). 2035 B.2. Count 2037 DAV:basicsearch does not allow a request that returns the count of 2038 matching resources. 2040 A protocol extension would need to extend DAV:select, and also modify 2041 the DAV:multistatus response format. 2043 B.3. Diagnostics for Unsupported Queries 2045 There are many reasons why a given query may not be supported by a 2046 server. Query Schema Discovery (Section 4) can be used to discover 2047 some constraints, but not all. 2049 Future revisions should consider the introduction of specific 2050 condition codes ([RFC4918], Section 16) to these situations. 2052 B.4. Language Matching 2054 Section 5.12.2 defines language matching in terms of the XPath "lang" 2055 function ([XPATH], Section 4.3). Future revisions should consider 2056 building on [BCP47] instead. 2058 B.5. Matching Media Types 2060 Matching media types using the DAV:getcontenttype property and the 2061 DAV:like operator is hard due to DAV:getcontenttype also allowing 2062 parameters. A new operator specifically designed for the purpose of 2063 matching media types probably would simplify things a lot. See 2065 for a specific proposal. 2067 B.6. Query by Name 2069 DAV:basicsearch operates on the properties (and optionally the 2070 contents) of resources, and thus doesn't really allow matching on 2071 parts of the resource's URI. See for a proposed extension 2073 covering this use case. 2075 B.7. Result Paging 2077 A frequently discussed feature is the ability to specifically request 2078 the "next" set of results, when either the server decided to truncate 2079 the result, or the client explicitly asked for a limited set (for 2080 instance, using the DAV:limit element defined in Section 5.17). 2082 In this case, it would be desirable if the server could keep the full 2083 query result, and provide a new URI identifying a separate result 2084 resource, allowing the client to retrieve additional data through GET 2085 requests, and remove the result through a DELETE request. 2087 B.8. Search Scope Discovery 2089 Given a Search Arbiter resource, there's currently no way to discover 2090 programmatically the supported sets of search scopes. Future 2091 revisions of this specification could specify a scope discovery 2092 mechanism, similar to the Query Schema Discovery defined in 2093 Section 4. 2095 Appendix C. Change Log (to be removed by RFC Editor before publication) 2097 C.1. From draft-davis-dasl-protocol-xxx 2099 Feb 14, 1998 Initial Draft 2101 Feb 28, 1998 Referring to DASL as an extension to HTTP/1.1 rather 2102 than DAV. 2103 Added new sections "Notational Conventions", "Protocol Model", 2104 "Security Considerations". 2105 Changed section 3 to "Elements of Protocol". 2106 Added some stuff to introduction. 2107 Added "result set" terminology. 2108 Added "IANA Considerations". 2110 Mar 9, 1998 Moved sub-headings of "Elements of Protocol" to first 2111 level and removed "Elements of Protocol" Heading. 2112 Added an sentence in introduction explaining that this is a 2113 "sketch" of a protocol. 2115 Mar 11, 1998 Added orderby, data typing, three valued logic, query 2116 schema property, and element definitions for schema for 2117 basicsearch. 2119 April 8, 1998 - made changes based on last week's DASL BOF. 2121 May 8, 1998 Removed most of DAV:searcherror; converted to DAV: 2122 searchredirect 2123 Altered DAV:basicsearch grammar to use avoid use of ANY in DTD 2125 June 17, 1998 -Added details on Query Schema Discovery 2126 -Shortened list of data types 2128 June 23, 1998 moved data types before change history 2129 rewrote the data types section 2130 removed the casesensitive element and replace with the 2131 casesensitive attribute 2132 added the casesensitive attribute to the DTD for all operations 2133 that might work on a string 2135 Jul 20, 1998 A series of changes. See Author's meeting minutes for 2136 details. 2138 July 28, 1998 Changes as per author's meeting. QSD uses SEARCH, not 2139 PROPFIND. 2140 Moved text around to keep concepts nearby. 2141 Boolean literals are 1 and 0, not T and F. 2142 contains changed to contentspassthrough. 2143 Renamed rank to score. 2145 July 28, 1998 Added Dale Lowry as Author 2147 September 4, 1998 Added 422 as response when query lists 2148 unimplemented operators. 2149 DAV:literal declares a default value for xml:space, 'preserve' 2150 (see XML spec, section 2.10) 2151 moved to new XML namespace syntax 2153 September 22, 1998 Changed "simplesearch" to "basicsearch" 2154 Changed isnull to isdefined 2155 Defined NULLness as having a 404 or 403 response 2156 used ENTITY syntax in DTD 2157 Added redirect 2159 October 9, 1998 Fixed a series of typographical and formatting 2160 errors. 2161 Modified the section of three-valued logic to use a table rather 2162 than a text description of the role of UNKNOWN in expressions. 2164 November 2, 1998 Added the DAV:contains operator. 2165 Removed the DAV:contentpassthrough operator. 2167 November 18, 1998 Various author comments for submission 2169 June 3, 1999 Cosmetic and minor editorial changes only. Fix nits 2170 reported by Jim Whitehead in email of April 26, 1999. Converted 2171 to HTML from Word 97, manually. 2173 April 20, 2000 Removed redirection feature, since 301/302 suffices. 2174 Removed Query Schema Discovery (former chapter 4). Everyone 2175 agrees this is a useful feature, but it is apparently too 2176 difficult to define at this time, and it is not essential for 2177 DASL. 2179 C.2. since start of draft-reschke-webdav-search 2181 October 09, 2001 Added Julian Reschke as author. 2182 Chapter about QSD re-added. 2183 Formatted into RFC2629-compliant XML document. 2184 Added first comments. 2185 ID version number kicked up to draft-dasl-protocol-03. 2187 October 17, 2001 Updated address information for Jim Davis. 2188 Added issue of datatype vocabularies. 2189 Updated issue descriptions for grammar discovery, added issues on 2190 query schema DTD. 2191 Fixed typos in XML examples. 2193 December 17, 2001 Re-introduced split between normative and non- 2194 normative references. 2196 January 05, 2002 Version bumped up to 04. Started work on resolving 2197 the issues identified in the previous version. 2199 January 14, 2002 Fixed some XML typos. 2201 January 22, 2002 Closed issues naming-of-elements. Fixed query 2202 search DTD and added option to discover properties of "other" 2203 (non-listed) properties. 2205 January 25, 2002 Changed into private submission and added reference 2206 to historic DASL draft. Marked reference to DASL requirements 2207 non-normative. 2208 Updated reference to latest deltav spec. 2210 January 29, 2002 Added feedback from and updated contact info for 2211 Alan Babich. 2212 Included open issues collected in 2213 http://www.webdav.org/dasl/protocol/issues.html. 2215 February 8, 2002 Made sure that all artwork fits into 72 characters 2216 wide text. 2218 February 18, 2002 Changed Insufficient storage handling 2219 (multistatus). Moved is-collection to operators and added to DTD. 2220 Made scope/depth mandatory. 2222 February 20, 2002 Updated reference to SQL99. 2224 February 28, 2002 "Non-normative References" -> "Informative 2225 References". Abstract updated. Consistently specify a charset 2226 when using text/xml (no change bars). Do not attempt to define 2227 PROPFIND's entity encoding (take out specific references to text/ 2228 xml). Remove irrelevant headers (Connection:) from examples (no 2229 change bars). Added issue on querying based on DAV:href. Updated 2230 introduction to indicate relationship to DASL draft. Updated HTTP 2231 reference from RFC2068 to RFC2616. Updated XML reference to XML 2232 1.0 2nd edition. 2234 March 1, 2002 Removed superfluous namespace decl in 2.4.2. Reopened 2235 JW14 and suggest to drop xml:space support. 2237 March 3, 2002 Removed "xml:space" feature on DAV:literal. Added 2238 issue about string comparison vs. collations vs. xml:lang. 2239 Updated some of the open issues with details from JimW's original 2240 mail in April 1999. Resolved scope vs relative URI references. 2241 Resolved issues about DAV:ascending (added to index) and the BNF 2242 for DAV:like (changed "octets" to "characters"). 2244 March 8, 2002 Updated reference to DeltaV (now RFC3253). Added 2245 Martin Wallmer's comments, moved JW5 into DAV:basicsearch section. 2247 March 11, 2002 Closed open issues regaring the type of search 2248 arbiters (JW3) and their discovery (JW9). Rephrased requirements 2249 on multistatus response bodies (propstat only if properties were 2250 selected, removed requirement for responsedescription). 2252 March 23, 2002 RFC2376 -> RFC3023. Added missing first names of 2253 authors. OPTIONS added to example for DAV:supported-method-set. 2255 C.3. since draft-reschke-webdav-search-00 2257 March 29, 2002 Abstract doesn't refer to DASL WG anymore. 2259 April 7, 2002 Fixed section title (wrong property name supported- 2260 search-grammar-set. Changed DAV:casesensitve to "casesensitive" 2261 (it wasn't in the DAV: namespace after all). 2263 May 28, 2002 Updated some issues with Jim Davis's comments. 2265 June 10, 2002 Added proposal for different method for query schema 2266 discovery, not using pseudo-properties. 2268 June 25, 2002 QSD marshalling rewritten. Added issue "isdefined- 2269 optional". 2271 C.4. since draft-reschke-webdav-search-01 2273 July 04, 2002 Added issue "scope-collection". 2275 July 08, 2002 Closed issue "scope-collection". 2277 August 12, 2002 Added issues "results-vs-binds" and "select- 2278 allprop". 2280 October 22, 2002 Added issue "undefined-expressions". 2282 November 18, 2002 Changed example host names (no change tracking). 2284 November 25, 2002 Updated issue "DB2/DB7". Closed issues "undefined 2285 expressions", "isdefined-optional" and "select-allprop". 2287 C.5. since draft-reschke-webdav-search-02 2289 November 27, 2002 Added issues "undefined-properties", "like- 2290 exactlyone" and "like-wildcard-adjacent". Closed issue "query-on- 2291 href". Added acknowledgments section. 2293 November 28, 2002 Closed issue "like-exactlyone". Added issue 2294 "mixed-content-properties". 2296 December 14, 2002 Closed issues "undefined-properties", "results-vs- 2297 binds", "mixed-content-properties". Updated issue "like-wildcard- 2298 adjacent". Added informative reference to BIND draft. Updated 2299 reference to ACL draft. 2301 January 9, 2003 Removed duplicate section on invalid scopes. Added 2302 comments to some open issues. Closed issues JW25/26, score- 2303 pseudo-property and null-ordering. 2305 January 10, 2003 Issue limit-vs-ordering plus resolution. Closed 2306 issue JW17/JW24b. 2308 January 14, 2003 New issue order-precedence. Started resolution of 2309 DB2/DB7. 2311 January 15, 2003 Started spec of DAV:typed-literal. 2313 January 17, 2003 Fix one DAV:like/DAV:getcontenttype example (add / 2314 to like expression, make case-insensitive). 2316 January 28, 2003 Update issue(s) result-truncation, JW24d. Fixed 2317 response headers in OPTIONS example. Added issue qsd-optional. 2318 Closed issue(s) order-precedence, case-insensitivity-name. 2320 February 07, 2003 Added issue scope-vs-versions. score-pseudo- 2321 property: allow DAV:orderby to explicitly specify DAV:score. 2323 C.6. since draft-reschke-webdav-search-03 2325 April 24, 2003 Fixed two "?" vs "_" issues (not updated in last 2326 draft). 2328 June 13, 2003 Improve index. 2330 C.7. since draft-reschke-webdav-search-04 2332 July 7, 2003 Typo fixed (propstat without status element). 2334 August 11, 2003 Remove superfluous IP and copyright sections. 2336 September 09, 2003 Added issues "2.4-multiple-uris" and "5.1-name- 2337 filtering". 2339 October 06, 2003 Fix misplaced section end in 5.11, add table 2340 formatting. Enhance table formatting in 5.18.3. Updated ACL and 2341 BIND references. Added XPATH reference. Closed issue JW24d by 2342 adding new optional operators. Updated more open issues, added 2343 issues from January meeting. Add K. Wiggen to Acknowledgements. 2344 Add Contributors section for the authors of the original draft. 2345 Close issue "scope-vs-versions" (optional feature added). Close 2346 (new) issue "1.3-import-DTD-terminology". Add issue "1.3-import- 2347 requirements-terminology". 2349 October 07, 2003 Typos fixed. Moved statement about DAV: namespace 2350 usage into separate (sub-)section. Closed "1.3-import- 2351 requirements-terminology". Update I18N Considerations with new 2352 xml:lang support info (see issue JW24d). Close issue "DB2/DB7" 2353 (remaining typing issues are now summarized in issue "typed- 2354 literal"). Fix misplaced section end in section 7. Started 2355 change to use RFC3253-style method definitions and error 2356 marshalling. 2358 October 08, 2003 Remove obsolete language that allowed reporting 2359 invalid scopes and such inside multistatus. Add new issue "5.4.2- 2360 scope-vs-redirects". 2362 C.8. since draft-reschke-webdav-search-05 2364 October 11, 2003 Separate DAV:basicsearch DTD into separate figures 2365 for better maintainability. Update DTD with language-* operators 2366 and typed-literal element (optional). 2368 October 14, 2003 Close issue "5.4.2-multiple-scope". 2370 November 04, 2003 Update reference from CaseMap to UNICODE4, section 2371 5.18. 2373 November 16, 2003 Updated issue "5.1-name-filtering". 2375 November 24, 2003 Reformatted scope description (collection vs. non- 2376 collection). 2378 November 30, 2003 Add issue "5_media_type_match". 2380 February 6, 2004 Updated all references. 2382 C.9. since draft-reschke-webdav-search-06 2384 July 05, 2004 Fix table in Appendix "Three-Valued Logic in DAV: 2385 basicsearch". 2387 September 14, 2004 Fix inconsistent DTD in section 5.2 and 5.4 for 2388 scope element. 2390 September 30, 2004 Rewrite editorial note and abstract. Update 2391 references (remove unneeded XMLNS, update ref to ACL and BIND 2392 specs). 2394 C.10. since draft-reschke-webdav-search-07 2396 October 01, 2004 Fix previous section heading (no change tracking). 2398 October 13, 2004 Fix DTD entry for is-collection. 2400 November 1, 2004 Fix DTD fragment query-schema-discovery. 2402 December 11, 2004 Update BIND reference. 2404 January 01, 2005 Fix DASL and DASLREQ references. 2406 February 06, 2005 Update XS2 reference. 2408 February 11, 2005 Rewrite "like" and "DASL" (response header) 2409 grammar in ABNF. 2411 May 5, 2005 Update references. Close issue "abnf" (only use ABNF 2412 when applicable). 2414 C.11. since draft-reschke-webdav-search-08 2416 May 06, 2005 Fix document title. 2418 September 25, 2005 Update BIND reference. 2420 October 05, 2005 Update RFC4234 reference. 2422 October 22, 2005 Author's address update. 2424 February 12, 2006 Update BIND reference. 2426 March 16, 2006 Add typed literals to QSD. 2428 August 20, 2006 Update XML reference. 2430 August 28, 2006 Add issues "5.3-select-count" (open) and "5.4- 2431 clarify-depth" (resolved). Update BIND reference (again). 2433 C.12. since draft-reschke-webdav-search-09 2435 December 1, 2006 Fix ABNF for DASL header. 2437 December 16, 2006 Close issue "qsd-optional", leave QSD optional. 2438 Close issue "2.4-multiple-uris", suggesting that servers should 2439 only return one response element per resource in case of multiple 2440 bindings. Add and resolve issues "authentication" and "cleanup- 2441 iana" (adding the header registration for "DASL"). Re-write 2442 rational for using the DAV: namespace, although this is a non-WG 2443 submission. 2445 January 4, 2007 Close issue "JW16b/JW24a", being related to 2446 "language-comparison". Add Appendix B. Close issues "language- 2447 comparison", "5_media_type_match", "5.1-name-filtering" and "5.3- 2448 select-count" as "won't fix", and add appendices accordingly. 2450 January 24, 2007 Update BIND reference. Close issue "5.4.2-scope- 2451 vs-redirects". Close issue "typed-literal": specify in terms of 2452 the XPATH 2.9 casting mechanism. Close issue "1.3-apply- 2453 condition-code-terminology" (no changes). 2455 C.13. since draft-reschke-webdav-search-10 2457 January 29, 2007 Issue "result-truncation": Add appendix describing 2458 the open issue of Result Paging. Describe the mechanism of 2459 marshalling truncated results in a new normative subsection (leave 2460 the actual example where it was). Add and resolve issues 2461 "rfc2606-compliance" and "response-format". Update contact 2462 information for Alan Babich, Jim Davis and Surendra Reddy (no 2463 change tracking). 2465 February 8, 2007 Update BIND reference. 2467 C.14. since draft-reschke-webdav-search-11 2469 Update: draft-newman-i18n-comparator-14 is RFC4790. Update: RFC2518 2470 replaced by draft-ietf-webdav-rfc2518bis. Updated BIND reference. 2471 Minor tweaks to intro (document organization and relation to DASL). 2473 C.15. since draft-reschke-webdav-search-12 2475 Update: draft-ietf-webdav-rfc2518bis replaced by RFC4918. Updated 2476 BIND reference. 2478 C.16. since draft-reschke-webdav-search-13 2480 Open and close issue "qsd-req-validity". Updated BIND reference. 2482 C.17. since draft-reschke-webdav-search-14 2484 RFC4234 obsoleted by RFC5234. 2486 Add and resolve issues "5.19.8-opdesc-vs-contains" and "dtd". 2488 Add clarifications about the behaviour when literal values are not 2489 compatible with the type of a comparison. 2491 C.18. since draft-reschke-webdav-search-15 2493 Minor editorial improvements. 2495 Fix description of DAV:scope/DAV:href to use proper URI terminology, 2496 add reference to RFC 3986. 2498 Clarify list nature of DASL header. 2500 Clarify that the DAV:like pattern ABNF is defined in terms of Unicode 2501 code points. 2503 Update to UNICODE5. 2505 Aim for standards track (affects introduction to Appendix B). Thus, 2506 make the dependency on [RFC4437] clearly optional, and make the 2507 reference informative. Also, mention BCP 47 as candidate for future 2508 changes to language matching. 2510 Mention definition of additional condition codes as candidate for 2511 future changes. 2513 Consider DAV:contains in Security Considerations. 2515 Update Surendra's and Alan's contact information. 2517 Mention search scope discovery as future extensions. Add a SHOULD 2518 level requirement for DAV:basicsearch search arbiters to support 2519 their own URI as search scope. 2521 C.19. since draft-reschke-webdav-search-16 2523 In DASL header registration tepmplate, set "Status" to "standard". 2525 Add missing bracket in DTD (Section 4.1). Fix broken and missing XML 2526 namespace declarations in examples. 2528 C.20. since draft-reschke-webdav-search-17 2530 Typo fixed ("SHOULD not" -> "SHOULD NOT"). Fixed namespace name 2531 "http://jennicam.org" to use a RFC 2606 compliant domain. 2533 State that SEARCH is a safe method. 2535 Clarify that the DASL header should be added to the permanent 2536 registry. 2538 Add and resolve issue "ordering-vs-limiting". 2540 Appendix D. Resolved issues (to be removed by RFC Editor before 2541 publication) 2543 Issues that were either rejected or resolved in this version of this 2544 document. 2546 D.1. safeness 2548 In Section 2: 2550 Type: edit 2552 2554 julian.reschke@greenbytes.de (2008-08-02): State that the SEARCH 2555 method is safe. 2557 Resolution (2008-08-03): Done. 2559 D.2. ordering-vs-limiting 2561 In Section 5.17.1: 2563 Type: change 2565 jbarone@xythos.com (2008-08-04): I read this to mean that the full 2566 results should first be ordered by the server, and then send back the 2567 requested limit. This seems to contradict what's specified in 2568 section 2.3.1, where the results are limited and then ordered (if I'm 2569 reading it correctly). I think these 2 sections should be consistent 2570 with each other. 2572 Resolution (2008-08-17): Relax requirement to SHOULD. 2574 Appendix E. Open issues (to be removed by RFC Editor prior to 2575 publication) 2577 E.1. edit 2579 Type: edit 2581 julian.reschke@greenbytes.de (2004-07-05): Umbrella issue for 2582 editorial fixes/enhancements. 2584 Index 2585 C 2586 caseless attribute 28-29, 36 2587 Condition Names 2588 DAV:search-grammar-discovery-supported (pre) 10 2589 DAV:search-grammar-supported (pre) 10 2590 DAV:search-multiple-scope-supported (pre) 10 2591 DAV:search-scope-valid (pre) 11 2592 Criteria 6 2594 D 2595 DAV:and 28 2596 DAV:ascending 28 2597 DAV:contains 33 2598 DAV:depth 25 2599 DAV:descending 28 2600 DAV:eq 29 2601 caseless attribute 29 2602 DAV:from 25 2603 DAV:gt 29 2604 DAV:gte 29 2605 DAV:include-versions 25 2606 DAV:is-collection 31 2607 DAV:is-defined 32 2608 DAV:language-defined 31 2609 DAV:language-matches 31 2610 DAV:like 32 2611 DAV:limit 35 2612 DAV:literal 29 2613 DAV:lt 29 2614 DAV:lte 29 2615 DAV:not 28 2616 DAV:nresults 35 2617 DAV:or 28 2618 DAV:orderby 28 2619 DAV:scope 25 2620 DAV:score 34 2621 relationship to DAV:orderby 35 2622 DAV:search-grammar-discovery-supported precondition 10 2623 DAV:search-grammar-supported precondition 10 2624 DAV:search-multiple-scope-supported precondition 10 2625 DAV:search-scope-valid precondition 11 2626 DAV:select 25 2627 DAV:supported-query-grammar-set property 16 2628 DAV:typed-literal 29 2629 DAV:where 26 2631 M 2632 Methods 2633 SEARCH 9 2635 O 2636 OPTIONS method 15 2637 DASL response header 16 2639 P 2640 Properties 2641 DAV:supported-query-grammar-set 16 2643 Q 2644 Query 6 2645 Query Grammar 7 2646 Query Grammar Discovery 15 2647 using live property 16 2648 using OPTIONS 15 2649 Query Schema 7 2651 R 2652 Result 7 2653 Result Record 7 2654 Result Record Definition 7 2655 Result Set 7 2656 Result Set Truncation 2657 Example 11 2659 S 2660 Scope 7 2661 Search Arbiter 7 2662 SEARCH method 9 2663 Search Modifier 7 2664 Sort Specification 8 2666 Authors' Addresses 2668 Julian F. Reschke (editor) 2669 greenbytes GmbH 2670 Hafenweg 16 2671 Muenster, NW 48155 2672 Germany 2674 Phone: +49 251 2807760 2675 Email: julian.reschke@greenbytes.de 2676 URI: http://greenbytes.de/tech/webdav/ 2677 Surendra Reddy 2678 Mitrix, Inc. 2679 303 Twin Dolphin Drive, Suite 600-37 2680 Redwood City, CA 94065 2681 U.S.A. 2683 Phone: +1 408 500 1135 2684 Email: Surendra.Reddy@mitrix.com 2686 Jim Davis 2687 27 Borden Street 2688 Toronto, Ontario M5S 2M8 2689 Canada 2691 Phone: +1 416 929 5854 2692 Email: jrd3@alum.mit.edu 2693 URI: http://www.econetwork.net/~jdavis 2695 Alan Babich 2696 IBM Corporation 2697 3565 Harbor Blvd. 2698 Costa Mesa, CA 92626 2699 U.S.A. 2701 Phone: +1 714 327 3403 2702 Email: ababich@us.ibm.com 2704 Full Copyright Statement 2706 Copyright (C) The IETF Trust (2008). 2708 This document is subject to the rights, licenses and restrictions 2709 contained in BCP 78, and except as set forth therein, the authors 2710 retain all their rights. 2712 This document and the information contained herein are provided on an 2713 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 2714 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND 2715 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS 2716 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 2717 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 2718 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 2720 Intellectual Property 2722 The IETF takes no position regarding the validity or scope of any 2723 Intellectual Property Rights or other rights that might be claimed to 2724 pertain to the implementation or use of the technology described in 2725 this document or the extent to which any license under such rights 2726 might or might not be available; nor does it represent that it has 2727 made any independent effort to identify any such rights. Information 2728 on the procedures with respect to rights in RFC documents can be 2729 found in BCP 78 and BCP 79. 2731 Copies of IPR disclosures made to the IETF Secretariat and any 2732 assurances of licenses to be made available, or the result of an 2733 attempt made to obtain a general license or permission for the use of 2734 such proprietary rights by implementers or users of this 2735 specification can be obtained from the IETF on-line IPR repository at 2736 http://www.ietf.org/ipr. 2738 The IETF invites any interested party to bring to its attention any 2739 copyrights, patents or patent applications, or other proprietary 2740 rights that may cover technology that may be required to implement 2741 this standard. Please address the information to the IETF at 2742 ietf-ipr@ietf.org.