idnits 2.17.1 draft-reschke-webdav-search-10.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 2753. -- Found old boilerplate from RFC 3979, Section 5, paragraph 1 on line 2764. -- Found old boilerplate from RFC 3979, Section 5, paragraph 2 on line 2771. -- Found old boilerplate from RFC 3979, Section 5, paragraph 3 on line 2777. 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 lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords -- however, there's a paragraph with a matching beginning. Boilerplate error? (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'SHOULD not' in this paragraph: Query grammars are identified by URIs. Applications SHOULD not attempt to retrieve these URIs even if they appear to be retrievable (for example, those that begin with "http://") -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (January 24, 2007) is 6295 days in the past. Is this intentional? Checking references for intended status: Experimental ---------------------------------------------------------------------------- ** Obsolete normative reference: RFC 2518 (Obsoleted by RFC 4918) ** 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) ** Obsolete normative reference: RFC 4234 (Obsoleted by RFC 5234) == Outdated reference: A later version (-27) exists of draft-ietf-webdav-bind-16 -- No information found for draft-dasl-requirements - is the name correct? Summary: 5 errors (**), 0 flaws (~~), 4 warnings (==), 8 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: Experimental S. Reddy 5 Expires: July 28, 2007 Oracle 6 J. Davis 7 Intelligent Markets 8 A. Babich 9 Filenet 10 January 24, 2007 12 Web Distributed Authoring and Versioning (WebDAV) SEARCH 13 draft-reschke-webdav-search-10 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 July 28, 2007. 40 Copyright Notice 42 Copyright (C) The IETF Trust (2007). 44 Abstract 46 This document specifies a set of methods, headers, properties and 47 content-types composing WebDAV SEARCH, an application of the HTTP/1.1 48 protocol to efficiently search for DAV resources based upon a set of 49 client-supplied criteria. 51 Editorial Note (To be removed by RFC Editor before publication) 53 Please send comments to the Distributed Authoring and Versioning 54 (WebDAV) DASL mailing list at , which 55 may be joined by sending a message with subject "subscribe" to 56 . Discussions of the WebDAV 57 DASL mailing list are archived at 58 . 60 An issues list and XML and HTML versions of this draft are available 61 from . 63 Table of Contents 65 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . 6 66 1.1. DASL . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 67 1.2. Relationship to DAV . . . . . . . . . . . . . . . . . . . 6 68 1.3. Terms . . . . . . . . . . . . . . . . . . . . . . . . . . 6 69 1.4. Notational Conventions . . . . . . . . . . . . . . . . . . 8 70 1.5. Note on usage of 'DAV:' XML namespace . . . . . . . . . . 8 71 1.6. An Overview of DASL at Work . . . . . . . . . . . . . . . 9 72 2. The SEARCH Method . . . . . . . . . . . . . . . . . . . . . . 9 73 2.1. Overview . . . . . . . . . . . . . . . . . . . . . . . . . 9 74 2.2. The Request . . . . . . . . . . . . . . . . . . . . . . . 9 75 2.2.1. The Request-URI . . . . . . . . . . . . . . . . . . . 9 76 2.2.2. The Request Body . . . . . . . . . . . . . . . . . . . 10 77 2.3. The Successful 207 (Multistatus) Response . . . . . . . . 11 78 2.3.1. Extending the PROPFIND Response . . . . . . . . . . . 11 79 2.3.2. Example: A Simple Request and Response . . . . . . . . 11 80 2.3.3. Example: Result Set Truncation . . . . . . . . . . . . 12 81 2.4. Unsuccessful Responses . . . . . . . . . . . . . . . . . . 14 82 2.4.1. Example of an Invalid Scope . . . . . . . . . . . . . 14 83 3. Discovery of Supported Query Grammars . . . . . . . . . . . . 14 84 3.1. The OPTIONS Method . . . . . . . . . . . . . . . . . . . . 15 85 3.2. The DASL Response Header . . . . . . . . . . . . . . . . . 15 86 3.3. DAV:supported-query-grammar-set (protected) . . . . . . . 16 87 3.4. Example: Grammar Discovery . . . . . . . . . . . . . . . . 16 88 4. Query Schema Discovery: QSD . . . . . . . . . . . . . . . . . 19 89 4.1. Additional SEARCH semantics . . . . . . . . . . . . . . . 19 90 4.1.1. Example of query schema discovery . . . . . . . . . . 20 91 5. The DAV:basicsearch Grammar . . . . . . . . . . . . . . . . . 21 92 5.1. Introduction . . . . . . . . . . . . . . . . . . . . . . . 21 93 5.2. The DAV:basicsearch DTD . . . . . . . . . . . . . . . . . 22 94 5.2.1. Example Query . . . . . . . . . . . . . . . . . . . . 24 95 5.3. DAV:select . . . . . . . . . . . . . . . . . . . . . . . . 25 96 5.4. DAV:from . . . . . . . . . . . . . . . . . . . . . . . . . 25 97 5.4.1. Relationship to the Request-URI . . . . . . . . . . . 25 98 5.4.2. Scope . . . . . . . . . . . . . . . . . . . . . . . . 26 99 5.5. DAV:where . . . . . . . . . . . . . . . . . . . . . . . . 26 100 5.5.1. Use of Three-Valued Logic in Queries . . . . . . . . . 26 101 5.5.2. Handling Optional operators . . . . . . . . . . . . . 26 102 5.5.3. Treatment of NULL Values . . . . . . . . . . . . . . . 26 103 5.5.4. Treatment of properties with mixed/element content . . 27 104 5.5.5. Example: Testing for Equality . . . . . . . . . . . . 27 105 5.5.6. Example: Relative Comparisons . . . . . . . . . . . . 27 106 5.6. DAV:orderby . . . . . . . . . . . . . . . . . . . . . . . 28 107 5.6.1. Example of Sorting . . . . . . . . . . . . . . . . . . 28 108 5.7. Boolean Operators: DAV:and, DAV:or, and DAV:not . . . . . 28 109 5.8. DAV:eq . . . . . . . . . . . . . . . . . . . . . . . . . . 29 110 5.9. DAV:lt, DAV:lte, DAV:gt, DAV:gte . . . . . . . . . . . . . 29 111 5.10. DAV:literal . . . . . . . . . . . . . . . . . . . . . . . 29 112 5.11. DAV:typed-literal (optional) . . . . . . . . . . . . . . . 29 113 5.11.1. Example for typed numerical comparison . . . . . . . . 30 114 5.12. Support for matching xml:lang attributes on properties . . 30 115 5.12.1. DAV:language-defined (optional) . . . . . . . . . . . 31 116 5.12.2. DAV:language-matches (optional) . . . . . . . . . . . 31 117 5.12.3. Example of language-aware matching . . . . . . . . . . 31 118 5.13. DAV:is-collection . . . . . . . . . . . . . . . . . . . . 31 119 5.13.1. Example of DAV:is-collection . . . . . . . . . . . . . 32 120 5.14. DAV:is-defined . . . . . . . . . . . . . . . . . . . . . . 32 121 5.15. DAV:like . . . . . . . . . . . . . . . . . . . . . . . . . 32 122 5.15.1. Syntax for the Literal Pattern . . . . . . . . . . . . 33 123 5.15.2. Example of DAV:like . . . . . . . . . . . . . . . . . 33 124 5.16. DAV:contains . . . . . . . . . . . . . . . . . . . . . . . 33 125 5.16.1. Result scoring (DAV:score element) . . . . . . . . . . 34 126 5.16.2. Ordering by score . . . . . . . . . . . . . . . . . . 34 127 5.16.3. Examples . . . . . . . . . . . . . . . . . . . . . . . 35 128 5.17. Limiting the result set . . . . . . . . . . . . . . . . . 35 129 5.17.1. Relationship to result ordering . . . . . . . . . . . 35 130 5.18. The 'caseless' XML attribute . . . . . . . . . . . . . . . 35 131 5.19. Query schema for DAV:basicsearch . . . . . . . . . . . . . 36 132 5.19.1. DTD for DAV:basicsearch QSD . . . . . . . . . . . . . 36 133 5.19.2. DAV:propdesc Element . . . . . . . . . . . . . . . . . 36 134 5.19.3. The DAV:datatype Property Description . . . . . . . . 37 135 5.19.4. The DAV:searchable Property Description . . . . . . . 37 136 5.19.5. The DAV:selectable Property Description . . . . . . . 38 137 5.19.6. The DAV:sortable Property Description . . . . . . . . 38 138 5.19.7. The DAV:caseless Property Description . . . . . . . . 38 139 5.19.8. The DAV:operators XML Element . . . . . . . . . . . . 38 140 5.19.9. Example of Query Schema for DAV:basicsearch . . . . . 39 141 6. Internationalization Considerations . . . . . . . . . . . . . 39 142 7. Security Considerations . . . . . . . . . . . . . . . . . . . 40 143 7.1. Implications of XML External Entities . . . . . . . . . . 40 145 8. Scalability . . . . . . . . . . . . . . . . . . . . . . . . . 41 146 9. IANA Considerations . . . . . . . . . . . . . . . . . . . . . 41 147 9.1. HTTP headers . . . . . . . . . . . . . . . . . . . . . . . 41 148 9.1.1. DASL . . . . . . . . . . . . . . . . . . . . . . . . . 41 149 10. Contributors . . . . . . . . . . . . . . . . . . . . . . . . . 41 150 11. Acknowledgements . . . . . . . . . . . . . . . . . . . . . . . 41 151 12. References . . . . . . . . . . . . . . . . . . . . . . . . . . 42 152 12.1. Normative References . . . . . . . . . . . . . . . . . . . 42 153 12.2. Informative References . . . . . . . . . . . . . . . . . . 43 154 Appendix A. Three-Valued Logic in DAV:basicsearch . . . . . . . . 44 155 Appendix B. Unresolved Issues . . . . . . . . . . . . . . . . . . 45 156 B.1. Collation Support . . . . . . . . . . . . . . . . . . . . 45 157 B.2. Count . . . . . . . . . . . . . . . . . . . . . . . . . . 46 158 B.3. Matching Media Types . . . . . . . . . . . . . . . . . . . 46 159 B.4. Query by Name . . . . . . . . . . . . . . . . . . . . . . 46 160 Appendix C. Change Log (to be removed by RFC Editor before 161 publication) . . . . . . . . . . . . . . . . . . . . 46 162 C.1. From draft-davis-dasl-protocol-xxx . . . . . . . . . . . . 46 163 C.2. since start of draft-reschke-webdav-search . . . . . . . . 48 164 C.3. since draft-reschke-webdav-search-00 . . . . . . . . . . . 50 165 C.4. since draft-reschke-webdav-search-01 . . . . . . . . . . . 50 166 C.5. since draft-reschke-webdav-search-02 . . . . . . . . . . . 50 167 C.6. since draft-reschke-webdav-search-03 . . . . . . . . . . . 51 168 C.7. since draft-reschke-webdav-search-04 . . . . . . . . . . . 51 169 C.8. since draft-reschke-webdav-search-05 . . . . . . . . . . . 52 170 C.9. since draft-reschke-webdav-search-06 . . . . . . . . . . . 52 171 C.10. since draft-reschke-webdav-search-07 . . . . . . . . . . . 53 172 C.11. since draft-reschke-webdav-search-08 . . . . . . . . . . . 53 173 C.12. since draft-reschke-webdav-search-09 . . . . . . . . . . . 53 174 Appendix D. Resolved issues (to be removed by RFC Editor 175 before publication) . . . . . . . . . . . . . . . . . 54 176 D.1. 1.3-apply-condition-code-terminology . . . . . . . . . . . 54 177 D.2. 2.4-multiple-uris . . . . . . . . . . . . . . . . . . . . 54 178 D.3. qsd-optional . . . . . . . . . . . . . . . . . . . . . . . 54 179 D.4. 5.1-name-filtering . . . . . . . . . . . . . . . . . . . . 55 180 D.5. 5_media_type_match . . . . . . . . . . . . . . . . . . . . 55 181 D.6. 5.3-select-count . . . . . . . . . . . . . . . . . . . . . 55 182 D.7. 5.4.2-scope-vs-redirects . . . . . . . . . . . . . . . . . 56 183 D.8. language-comparison . . . . . . . . . . . . . . . . . . . 56 184 D.9. JW16b/JW24a . . . . . . . . . . . . . . . . . . . . . . . 56 185 D.10. typed-literal . . . . . . . . . . . . . . . . . . . . . . 57 186 D.11. authentication . . . . . . . . . . . . . . . . . . . . . . 57 187 D.12. cleanup-iana . . . . . . . . . . . . . . . . . . . . . . . 58 188 Appendix E. Open issues (to be removed by RFC Editor prior to 189 publication) . . . . . . . . . . . . . . . . . . . . 58 190 E.1. edit . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 191 E.2. result-truncation . . . . . . . . . . . . . . . . . . . . 58 192 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 59 193 Authors' Addresses . . . . . . . . . . . . . . . . . . . . . . . . 61 194 Intellectual Property and Copyright Statements . . . . . . . . . . 63 196 1. Introduction 198 1.1. DASL 200 This document defines Web Distributed Authoring and Versioning 201 (WebDAV) SEARCH, an application of HTTP/1.1 forming a lightweight 202 search protocol to transport queries and result sets that allows 203 clients to make use of server-side search facilities. It is based on 204 the expired draft for DAV Searching & Locating [DASL]. [DASLREQ] 205 describes the motivation for DASL. 207 DASL will minimize the complexity of clients so as to facilitate 208 widespread deployment of applications capable of utilizing the DASL 209 search mechanisms. 211 DASL consists of: 213 o the SEARCH method, 215 o the DASL response header, 217 o the DAV:searchrequest XML element, 219 o the DAV:query-schema-discovery XML element, 221 o the DAV:basicsearch XML element and query grammar, and 223 o the DAV:basicsearchschema XML element. 225 For WebDAV-compliant servers, it also defines a new live property 226 DAV:supported-query-grammar-set. 228 1.2. Relationship to DAV 230 DASL relies on the resource and property model defined by [RFC2518]. 231 DASL does not alter this model. Instead, DASL allows clients to 232 access DAV-modeled resources through server-side search. 234 1.3. Terms 236 This document uses the terms defined in [RFC2616], in [RFC2518], in 237 [RFC3253] and in this section. 239 Criteria 241 An expression against which each resource in the search scope is 242 evaluated. 244 Query 246 A query is a combination of a search scope, search criteria, 247 result record definition, sort specification, and a search 248 modifier. 250 Query Grammar 252 A set of definitions of XML elements, attributes, and constraints 253 on their relations and values that defines a set of queries and 254 the intended semantics. 256 Query Schema 258 A listing, for any given grammar and scope, of the properties and 259 operators that may be used in a query with that grammar and scope. 261 Result 263 A result is a result set, optionally augmented with other 264 information describing the search as a whole. 266 Result Record 268 A description of a resource. A result record is a set of 269 properties, and possibly other descriptive information. 271 Result Record Definition 273 A specification of the set of properties to be returned in the 274 result record. 276 Result Set 278 A set of records, one for each resource for which the search 279 criteria evaluated to True. 281 Scope 283 A set of resources to be searched. 285 Search Modifier 287 An instruction that governs the execution of the query but is not 288 part of the search scope, result record definition, the search 289 criteria, or the sort specification. An example of a search 290 modifier is one that controls how much time the server can spend 291 on the query before giving a response. 293 Sort Specification 295 A specification of an ordering on the result records in the result 296 set. 298 1.4. Notational Conventions 300 This specification uses the Augmented Backus-Naur Form (ABNF) 301 notation of [RFC4234], unless explicitly stated otherwise. 303 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT" 304 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 305 document are to be interpreted as described in [RFC2119]. 307 This document uses XML DTD fragments as a purely notational 308 convention. WebDAV request and response bodies can not be validated 309 due to the specific extensibility rules defined in Section 23 of 310 [RFC2518] and due to the fact that all XML elements defined by this 311 specification use the XML namespace name "DAV:". In particular: 313 1. element names use the "DAV:" namespace, 315 2. element ordering is irrelevant unless explicitly stated, 317 3. extension elements (elements not already defined as valid child 318 elements) may be added anywhere, except when explicitly stated 319 otherwise, 321 4. extension attributes (attributes not already defined as valid for 322 this element) may be added anywhere, except when explicitly 323 stated otherwise. 325 When an XML element type in the "DAV:" namespace is referenced in 326 this document outside of the context of an XML fragment, the string 327 "DAV:" will be prefixed to the element type. 329 Similarily, when an XML element type in the namespace 330 "http://www.w3.org/2001/XMLSchema" is referenced in this document 331 outside of the context of an XML fragment, the string "xs:" will be 332 prefixed to the element type. 334 1.5. Note on usage of 'DAV:' XML namespace 336 This spefication defines elements, properties and condition names in 337 the XML namespace "DAV:". In general, only specifications authored 338 by IETF working groups are supposed to do this. In this case an 339 exception was made, because WebDAV SEARCH started it's life in the 340 IETF DASL working group (, and at the 341 time the working group closed down there was already significant 342 deployment of this specification. 344 1.6. An Overview of DASL at Work 346 One can express the basic usage of DASL in the following steps: 348 o The client constructs a query using the DAV:basicsearch grammar. 350 o The client invokes the SEARCH method on a resource that will 351 perform the search (the search arbiter) and includes a text/xml or 352 application/xml request entity that contains the query. 354 o The search arbiter performs the query. 356 o The search arbiter sends the results of the query back to the 357 client in the response. The server MUST send an entity that 358 matches the WebDAV multistatus format ([RFC2518], Section 11). 360 2. The SEARCH Method 362 2.1. Overview 364 The client invokes the SEARCH method to initiate a server-side 365 search. The body of the request defines the query. The server MUST 366 emit an entity matching the WebDAV multistatus format ([RFC2518], 367 Section 11). 369 The SEARCH method plays the role of transport mechanism for the query 370 and the result set. It does not define the semantics of the query. 371 The type of the query defines the semantics. 373 2.2. The Request 375 The client invokes the SEARCH method on the resource named by the 376 Request-URI. 378 2.2.1. The Request-URI 380 The Request-URI identifies the search arbiter. Any HTTP resource may 381 function as search arbiter. It is not a new type of resource (in the 382 sense of DAV:resourcetype as defined in Section 13.19 of [RFC2518]), 383 nor does it have to be a WebDAV-compliant resource. 385 The SEARCH method defines no relationship between the arbiter and the 386 scope of the search, rather the particular query grammar used in the 387 query defines the relationship. For example, a query grammar may 388 force the Request-URI to correspond exactly to the search scope. 390 2.2.2. The Request Body 392 The server MUST process a text/xml or application/xml request body, 393 and MAY process request bodies in other formats. See [RFC3023] for 394 guidance on packaging XML in requests. 396 Marshalling: 398 If a request body with content type text/xml or application/xml is 399 included, it MUST be either a DAV:searchrequest or a DAV:query- 400 schema-discovery XML element. It's single child element 401 identifies the query grammar. 403 For DAV:searchrequest, the definition of search criteria, the 404 result record, and any other details needed to perform the search 405 depend on the individual search grammar. 407 For DAV:query-schema-discovery, the semantics is defined in 408 Section 4. 410 Preconditions: 412 (DAV:search-grammar-discovery-supported): when an XML request body 413 is present and has a DAV:query-schema-discovery document element, 414 the server MUST support the query schema discovery mechanism 415 described in Section 4. 417 (DAV:search-grammar-supported): when an XML request body is 418 present, the search grammar identified by the document element's 419 child element must be a supported search grammar. 421 (DAV:search-multiple-scope-supported): if the SEARCH request 422 specified multiple scopes, the server MUST support this optional 423 feature. 425 (DAV:search-scope-valid): the supplied search scope must be valid. 426 There can be various reasons for a search scope to be invalid, 427 including unsupported URI schemes and communication problems. 428 Servers MAY add [RFC2518] compliant DAV:response elements as 429 content to the condition element indicating the precise reason for 430 the failure. 432 2.3. The Successful 207 (Multistatus) Response 434 If the server returns 207 (Multistatus), then the search proceeded 435 successfully and the response MUST use the WebDAV multistatus format 436 ([RFC2518], Section 11). The results of this method SHOULD NOT be 437 cached. 439 There MUST be one DAV:response for each resource that matched the 440 search criteria. For each such response, the DAV:href element 441 contains the URI of the resource, and the response MUST include a 442 DAV:propstat element. 444 Note: the WebDAV multistatus format requires at least one DAV: 445 response child element. This specification relaxes that 446 restriction so that empty results can be represented. 448 Note that for each matching resource found there may be multiple URIs 449 within the search scope mapped to it. In this case, a server SHOULD 450 report only one of these URIs. Clients can use the live property 451 DAV:resource-id defined in Section 3.1 of [BIND] to identify possible 452 duplicates. 454 2.3.1. Extending the PROPFIND Response 456 A response MAY include more information than PROPFIND defines so long 457 as the extra information does not invalidate the PROPFIND response. 458 Query grammars SHOULD define how the response matches the PROPFIND 459 response. 461 2.3.2. Example: A Simple Request and Response 463 This example demonstrates the request and response framework. The 464 following XML document shows a simple (hypothetical) natural language 465 query. The name of the query element is natural-language-query in 466 the XML namespace "http://example.com/foo". The actual query is 467 "Find the locations of good Thai restaurants in Los Angeles". For 468 this hypothetical query, the arbiter returns two properties for each 469 selected resource. 471 >> Request: 473 SEARCH / HTTP/1.1 474 Host: example.org 475 Content-Type: application/xml 476 Content-Length: xxx 478 479 480 481 Find the locations of good Thai restaurants in Los Angeles 482 483 485 >> Response: 487 HTTP/1.1 207 Multi-Status 488 Content-Type: text/xml; charset="utf-8" 489 Content-Length: xxx 491 492 494 495 http://siamiam.test/ 496 497 498 259 W. Hollywood 499 4 500 501 HTTP/1.1 200 OK 502 503 504 506 2.3.3. Example: Result Set Truncation 508 A server MAY limit the number of resources in a reply, for example to 509 limit the amount of resources expended in processing a query. If it 510 does so, the reply MUST use status code 207, return a DAV:multistatus 511 response body and indicate a status of 507 (Insufficient Storage) for 512 the search arbiter URI. It SHOULD include the partial results. 514 When a result set is truncated, there may be many more resources that 515 satisfy the search criteria but that were not examined. 517 If partial results are included and the client requested an ordered 518 result set in the original request, then any partial results that are 519 returned MUST be ordered as the client directed. 521 Note that the partial results returned MAY be any subset of the 522 result set that would have satisfied the original query. 524 >> Request: 526 SEARCH / HTTP/1.1 527 Host: example.net 528 Content-Type: text/xml; charset="utf-8" 529 Content-Length: xxx 531 ... the query goes here ... 533 >> Response: 535 HTTP/1.1 207 Multistatus 536 Content-Type: text/xml; charset="utf-8" 537 Content-Length: xxx 539 540 541 542 http://www.example.net/sounds/unbrokenchain.au 543 544 545 HTTP/1.1 200 OK 546 547 548 549 http://tech.mit.test/archive96/photos/Lesh1.jpg 550 551 552 HTTP/1.1 200 OK 553 554 555 556 http://example.net 557 HTTP/1.1 507 Insufficient Storage 558 559 Only first two matching records were returned 560 561 562 564 2.4. Unsuccessful Responses 566 If a SEARCH request could not be executed or the attempt to execute 567 it resulted in an error, the server MUST indicate the failure with an 568 appropriate status code and SHOULD add a response body as defined in 569 [RFC3253], Section 1.6. Unless otherwise stated, condition elements 570 are empty, however specific conditions element MAY include additional 571 child elements that describe the error condition in more detail. 573 2.4.1. Example of an Invalid Scope 575 In the example below, a request failed because the scope identifies a 576 HTTP resource that was not found. 578 >> Response: 580 HTTP/1.1 409 Conflict 581 Content-Type: text/xml; charset="utf-8" 582 Content-Length: xxx 584 585 586 587 588 http://www.example.com/X 589 HTTP/1.1 404 Object Not Found 590 591 592 594 3. Discovery of Supported Query Grammars 596 Servers MUST support discovery of the query grammars supported by a 597 search arbiter resource. 599 Clients can determine which query grammars are supported by an 600 arbiter by invoking OPTIONS on the search arbiter. If the resource 601 supports SEARCH, then the DASL response header will appear in the 602 response. The DASL response header lists the supported grammars. 604 Servers supporting the WebDAV extensions [RFC3253] and/or [RFC3744] 605 MUST also 607 o report SEARCH in the live property DAV:supported-method-set for 608 all search arbiter resources and 610 o support the live property DAV:supported-query-grammar-set as 611 defined in Section 3.3. 613 3.1. The OPTIONS Method 615 The OPTIONS method allows the client to discover if a resource 616 supports the SEARCH method and to determine the list of search 617 grammars supported for that resource. 619 The client issues the OPTIONS method against a resource named by the 620 Request-URI. This is a normal invocation of OPTIONS as defined in 621 Section 9.2 of [RFC2616]. 623 If a resource supports the SEARCH method, then the server MUST list 624 SEARCH in the Allow header defined in Section 14.7 of [RFC2616]. 626 DASL servers MUST include the DASL header in the OPTIONS response. 627 This header identifies the search grammars supported by that 628 resource. 630 3.2. The DASL Response Header 632 DASLHeader = "DASL" ":" 1#Coded-URL 633 Coded-URL = 634 (This grammar uses the augmented BNF format defined in Section 2.1 of 635 [RFC2616]) 637 The DASL response header indicates server support for a query grammar 638 in the OPTIONS method. The value is a URI that indicates the type of 639 grammar. Note that although the URI can be used to identify each 640 supported search grammar, there is not necessarily a direct 641 relationship between the URI and the XML element name that can be 642 used in XML based SEARCH requests (the element name itself is 643 identified by it's namespace name (a URI reference) and the element's 644 local name). 646 This header MAY be repeated. 648 For example: 650 DASL: 651 DASL: 652 DASL: 653 DASL: 655 3.3. DAV:supported-query-grammar-set (protected) 657 This WebDAV property is required for any server supporting either 658 [RFC3253] and/or [RFC3744] and identifies the XML based query 659 grammars that are supported by the search arbiter resource. 661 662 663 665 ANY value: a query grammar element type 667 3.4. Example: Grammar Discovery 669 This example shows that the server supports search on the /somefolder 670 resource with the query grammars: DAV:basicsearch, 671 http://foobar.test/syntax1 and http://akuma.test/syntax2. Note that 672 every server MUST support DAV:basicsearch. 674 >> Request: 676 OPTIONS /somefolder HTTP/1.1 677 Host: example.org 679 >> Response: 681 HTTP/1.1 200 OK 682 Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE 683 Allow: MKCOL, PROPFIND, PROPPATCH, LOCK, UNLOCK, SEARCH 684 DASL: 685 DASL: 686 DASL: 688 This example shows the equivalent taking advantage of a server's 689 support for DAV:supported-method-set and DAV:supported-query-grammar- 690 set. 692 >> Request: 694 PROPFIND /somefolder HTTP/1.1 695 Host: example.org 696 Depth: 0 697 Content-Type: text/xml; charset="utf-8" 698 Content-Length: xxx 700 701 702 703 704 705 706 707 >> Response: 709 HTTP/1.1 207 Multi-Status 710 Content-Type: text/xml; charset="utf-8" 711 Content-Length: xxx 713 714 715 716 http://example.org/somefolder 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 HTTP/1.1 200 OK 749 750 751 753 Note that the query grammar element names marshalled as part of the 754 DAV:supported-query-grammar-set can be directly used as element names 755 in an XML based query. 757 4. Query Schema Discovery: QSD 759 Servers MAY support the discovery of the schema for a query grammar. 761 The DASL response header and the DAV:supported-query-grammar-set 762 property provide means for clients to discover the set of query 763 grammars supported by a resource. This alone is not sufficient 764 information for a client to generate a query. For example, the DAV: 765 basicsearch grammar defines a set of queries consisting of a set of 766 operators applied to a set of properties and values, but the grammar 767 itself does not specify which properties may be used in the query. 768 QSD for the DAV:basicsearch grammar allows a client to discover the 769 set of properties that are searchable, selectable, and sortable. 770 Moreover, although the DAV:basicsearch grammar defines a minimal set 771 of operators, it is possible that a resource might support additional 772 operators in a query. For example, a resource might support a 773 optional operator that can be used to express content-based queries 774 in a proprietary syntax. QSD allows a client to discover these 775 operators and their syntax. The set of discoverable quantities will 776 differ from grammar to grammar, but each grammar can define a means 777 for a client to discover what can be discovered. 779 In general, the schema for a given query grammar depends on both the 780 resource (the arbiter) and the scope. A given resource might have 781 access to one set of properties for one potential scope, and another 782 set for a different scope. For example, consider a server able to 783 search two distinct collections, one holding cooking recipes, the 784 other design documents for nuclear weapons. While both collections 785 might support properties such as author, title, and date, the first 786 might also define properties such as calories and preparation time, 787 while the second defined properties such as yield and applicable 788 patents. Two distinct arbiters indexing the same collection might 789 also have access to different properties. For example, the recipe 790 collection mentioned above might also indexed by a value-added server 791 that also stored the names of chefs who had tested the recipe. Note 792 also that the available query schema might also depend on other 793 factors, such as the identity of the principal conducting the search, 794 but these factors are not exposed in this protocol. 796 4.1. Additional SEARCH semantics 798 Each query grammar supported by DASL defines its own syntax for 799 expressing the possible query schema. A client retrieves the schema 800 for a given query grammar on an arbiter resource with a given scope 801 by invoking the SEARCH method on that arbiter with that grammar and 802 scope and with a root element of DAV:query-schema-discovery rather 803 than DAV:searchrequest. 805 Marshalling: 807 The request body MUST be DAV:query-schema-discovery element. 809 810 812 The response body takes the form of a RFC2518 DAV:multistatus 813 element, where DAV:response is extended to hold the returned query 814 grammar inside a DAV:query-schema container element. 816 818 820 The content of this container is an XML element whose name and syntax 821 depend upon the grammar, and whose value may (and likely will) vary 822 depending upon the grammar, arbiter, and scope. 824 4.1.1. Example of query schema discovery 826 In this example, the arbiter is recipes.test, the grammar is DAV: 827 basicsearch, the scope is also recipes.test. 829 >> Request: 831 SEARCH / HTTP/1.1 832 Host: recipes.test 833 Content-Type: application/xml 834 Content-Length: xxx 836 837 838 839 840 841 http://recipes.test 842 infinity 843 844 845 846 847 >> Response: 849 HTTP/1.1 207 Multistatus 850 Content-Type: application/xml 851 Content-Length: xxx 853 854 855 856 http://recipes.test 857 HTTP/1.1 200 OK 858 859 860 862 863 864 865 867 The query schema for DAV:basicsearch is defined in Section 5.19. 869 5. The DAV:basicsearch Grammar 871 5.1. Introduction 873 DAV:basicsearch uses an extensible XML syntax that allows clients to 874 express search requests that are generally useful for WebDAV 875 scenarios. DASL-extended servers MUST accept this grammar, and MAY 876 accept other grammars. 878 DAV:basicsearch has several components: 880 o DAV:select provides the result record definition. 882 o DAV:from defines the scope. 884 o DAV:where defines the criteria. 886 o DAV:orderby defines the sort order of the result set. 888 o DAV:limit provides constraints on the query as a whole. 890 5.2. The DAV:basicsearch DTD 892 894 896 898 900 902 903 904 906 907 908 909 911 912 914 917 919 921 923 925 926 928 929 931 932 934 935 937 938 940 941 942 944 945 947 948 950 951 953 954 956 957 959 960 962 964 965 967 5.2.1. Example Query 969 This query retrieves the content length values for all resources 970 located under the server's "/container1/" URI namespace whose length 971 exceeds 10000. 973 974 975 976 977 978 979 980 /container1/ 981 infinity 982 983 984 985 986 987 10000 988 989 990 991 992 993 994 995 996 997 999 5.3. DAV:select 1001 DAV:select defines the result record, which is a set of properties 1002 and values. This document defines two possible values: DAV:allprop 1003 and DAV:prop, both defined in [RFC2518] and revised in [RFC3253]. 1005 5.4. DAV:from 1007 1008 1010 DAV:from defines the query scope. This contains one or more DAV: 1011 scope elements. Support for multiple scope elements is optional, 1012 however servers MUST fail a request specifying multiple DAV:scope 1013 elements if they can't support it (see Section 2.2.2, precondition 1014 DAV:search-multiple-scope-supported). The scope element contains 1015 mandatory DAV:href and DAV:depth elements. 1017 DAV:href indicates the URI to use as a scope. 1019 When the scope is a collection, if DAV:depth is "0", the search 1020 includes only the collection. When it is "1", the search includes 1021 the collection and its immediate children. When it is "infinity", it 1022 includes the collection and all its progeny. 1024 When the scope is not a collection, the depth is ignored and the 1025 search applies just to the resource itself. 1027 If the search includes a redirect reference resource (see [RFC4437]), 1028 it applies only to that resource, not to its target. 1030 When the child element DAV:include-versions is present, the search 1031 scope will include all versions (see [RFC3253], Section 2.2.1) of all 1032 version-controlled resources in scope. Servers that do support 1033 versioning but do not support the DAV:include-versions feature MUST 1034 signal an error if it is used in a query. 1036 5.4.1. Relationship to the Request-URI 1038 If the DAV:scope element is an absolute URI, the scope is exactly 1039 that URI. 1041 If the DAV:scope element is is an absolute URI reference, the scope 1042 is taken to be relative to the Request-URI. 1044 5.4.2. Scope 1046 A Scope can be an arbitrary URI. 1048 Servers, of course, may support only particular scopes. This may 1049 include limitations for particular schemes such as "http:" or "ftp:" 1050 or certain URI namespaces. 1052 5.5. DAV:where 1054 The DAV:where element defines the search condition for inclusion of 1055 resources in the result set. The value of this element is an XML 1056 element that defines a search operator that evaluates to one of the 1057 Boolean truth values TRUE, FALSE, or UNKNOWN. The search operator 1058 contained by DAV:where may itself contain and evaluate additional 1059 search operators as operands, which in turn may contain and evaluate 1060 additional search operators as operands, etc. recursively. 1062 5.5.1. Use of Three-Valued Logic in Queries 1064 Each operator defined for use in the where clause that returns a 1065 Boolean value MUST evaluate to TRUE, FALSE, or UNKNOWN. The resource 1066 under scan is included as a member of the result set if and only if 1067 the search condition evaluates to TRUE. 1069 Consult Appendix A for details on the application of three-valued 1070 logic in query expressions. 1072 5.5.2. Handling Optional operators 1074 If a query contains an operator that is not supported by the server, 1075 then the server MUST respond with a 422 (Unprocessable Entity) status 1076 code. 1078 5.5.3. Treatment of NULL Values 1080 If a PROPFIND for a property value would yield a non-2xx (see 1081 [RFC2616], Section 10.2) response for that property, then that 1082 property is considered NULL. 1084 NULL values are "less than" all other values in comparisons. 1086 Empty strings (zero length strings) are not NULL values. An empty 1087 string is "less than" a string with length greater than zero. 1089 The DAV:is-defined operator is defined to test if the value of a 1090 property is NULL. 1092 5.5.4. Treatment of properties with mixed/element content 1094 Comparisons of properties that do not have simple types (text-only 1095 content) is out-of-scope for the standard operators defined for DAV: 1096 basicsearch and therefore is defined to be UNKNOWN (as per 1097 Appendix A). For querying the DAV:resourcetype property, see 1098 Section 5.13. 1100 5.5.5. Example: Testing for Equality 1102 The example shows a single operator (DAV:eq) applied in the criteria. 1104 1105 1106 1107 1108 1109 100 1110 1111 1113 5.5.6. Example: Relative Comparisons 1115 The example shows a more complex operation involving several 1116 operators (DAV:and, DAV:eq, DAV:gt) applied in the criteria. This 1117 DAV:where expression matches those resources that are "image/gifs" 1118 over 4K in size. 1120 1121 1122 1123 1124 1125 1126 image/gif 1127 1128 1129 1130 1131 1132 4096 1133 1134 1135 1137 5.6. DAV:orderby 1139 The DAV:orderby element specifies the ordering of the result set. It 1140 contains one or more DAV:order elements, each of which specifies a 1141 comparison between two items in the result set. Informally, a 1142 comparison specifies a test that determines whether one resource 1143 appears before another in the result set. Comparisons are applied in 1144 the order they occur in the DAV:orderby element, earlier comparisons 1145 being more significant. 1147 The comparisons defined here use only a single property from each 1148 resource, compared using the same ordering as the DAV:lt operator 1149 (ascending) or DAV:gt operator (descending). If neither direction is 1150 specified, the default is DAV:ascending. 1152 In the context of the DAV:orderby element, null values are considered 1153 to collate before any actual (i.e., non null) value, including 1154 strings of zero length (this is compatible with [SQL99]). 1156 The "caseless" attribute may be used to indicate case-sensitivity for 1157 comparisons. 1159 5.6.1. Example of Sorting 1161 This sort orders first by last name of the author, and then by size, 1162 in descending order, so that for each author, the largest works 1163 appear first. 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1176 5.7. Boolean Operators: DAV:and, DAV:or, and DAV:not 1178 The DAV:and operator performs a logical AND operation on the 1179 expressions it contains. 1181 The DAV:or operator performs a logical OR operation on the values it 1182 contains. 1184 The DAV:not operator performs a logical NOT operation on the values 1185 it contains. 1187 5.8. DAV:eq 1189 The DAV:eq operator provides simple equality matching on property 1190 values. 1192 The "caseless" attribute may be used with this element. 1194 5.9. DAV:lt, DAV:lte, DAV:gt, DAV:gte 1196 The DAV:lt, DAV:lte, DAV:gt, and DAV:gte operators provide 1197 comparisons on property values, using less-than, less-than or equal, 1198 greater-than, and greater-than or equal respectively. The "caseless" 1199 attribute may be used with these elements. 1201 5.10. DAV:literal 1203 DAV:literal allows literal values to be placed in an expression. 1205 White space in literal values is significant in comparisons. For 1206 consistency with [RFC2518], clients SHOULD NOT specify the attribute 1207 "xml:space" (Section 2.10 of [XML]) to override this behaviour. 1209 In comparisons, the contents of DAV:literal SHOULD be treated as 1210 string, with the following exceptions: 1212 o when operand for a comparison with a DAV:getcontentlength 1213 property, it SHOULD be treated as an integer value (the behaviour 1214 for non-integer values is undefined), 1216 o when operand for a comparison with a DAV:creationdate or DAV: 1217 getlastmodified property, it SHOULD be treated as a date value in 1218 the ISO-8601 subset defined for the DAV:creationdate property 1219 ([RFC2518], Section 13.1). 1221 o when operand for a comparison with a property for which the type 1222 is known, it MAY be treated according to this type. 1224 5.11. DAV:typed-literal (optional) 1226 There are situations in which a client may want to force a comparison 1227 not to be string-based (as defined for DAV:literal). In these cases, 1228 a typed comparison can be enforced by using DAV:typed-literal 1229 instead. 1231 1232 The data type is specified using the xsi:type attribute defined in 1233 [XS1], Section 2.6.1. If the type is not specified, it defaults to 1234 "xs:string". 1236 A server MUST reject a request with an unknown type. 1238 The comparison evaluates to UNDEFINED if the property value can not 1239 be cast to the specified datatype (see [XPATHFUNC], Section 17). 1241 5.11.1. Example for typed numerical comparison 1243 Consider a set of resources with the dead property "edits" in the 1244 namespace "http://ns.example.org": 1246 +-----+----------------+ 1247 | URI | property value | 1248 +-----+----------------+ 1249 | /a | "-1" | 1250 | /b | "01" | 1251 | /c | "3" | 1252 | /d | "test" | 1253 | /e | (undefined) | 1254 +-----+----------------+ 1256 The expression 1258 1261 1262 3 1263 1265 will evaluate to TRUE for the resources "/a" and "/b" (their property 1266 values can be parsed as type xs:number, and the numerical comparison 1267 evaluates to true), to FALSE for "/c" (property value is compatible, 1268 but numerical comparison evaluates to false) and UNKNOWN for "/d" and 1269 "/e" (the property either is undefined, or its value can not be 1270 parsed as xs:number). 1272 5.12. Support for matching xml:lang attributes on properties 1274 The following two optional operators can be used to express 1275 conditions on the language of a property value (as expressed using 1276 the xml:lang attribute). 1278 5.12.1. DAV:language-defined (optional) 1280 1282 This operator evaluates to TRUE if the language for the value of the 1283 given property is known, FALSE if it isn't and UNKNOWN if the 1284 property itself is not defined. 1286 5.12.2. DAV:language-matches (optional) 1288 1290 This operator evaluates to TRUE if the language for the value of the 1291 given property is known and matches the language name given in the 1292 element, FALSE if it doesn't match and UNKNOWN if the 1293 property itself is not defined. 1295 Languages are considered to match if they are the same, or if the 1296 language of the property value is a sublanguage of the language 1297 specified in the element (see [XPATH], Section 4.3, "lang 1298 function"). 1300 5.12.3. Example of language-aware matching 1302 The expression below will evaluate to TRUE if the property "foobar" 1303 exists and it's language is either unknown, English or a sublanguage 1304 of English. 1306 1307 1308 1309 1310 1311 1312 1313 1314 en 1315 1316 1318 5.13. DAV:is-collection 1320 The DAV:is-collection operator allows clients to determine whether a 1321 resource is a collection (that is, whether it's DAV:resourcetype 1322 element contains the element DAV:collection). 1324 Rationale: This operator is provided in lieu of defining generic 1325 structure queries, which would suffice for this and for many more 1326 powerful queries, but seems inappropriate to standardize at this 1327 time. 1329 5.13.1. Example of DAV:is-collection 1331 This example shows a search criterion that picks out all and only the 1332 resources in the scope that are collections. 1334 1335 1336 1338 5.14. DAV:is-defined 1340 The DAV:is-defined operator allows clients to determine whether a 1341 property is defined on a resource. The meaning of "defined on a 1342 resource" is found in Section 5.5.3. 1344 Example: 1346 1347 1348 1350 5.15. DAV:like 1352 The DAV:like is an optional operator intended to give simple 1353 wildcard-based pattern matching ability to clients. 1355 The operator takes two arguments. 1357 The first argument is a DAV:prop element identifying a single 1358 property to evaluate. 1360 The second argument is a DAV:literal element that gives the pattern 1361 matching string. 1363 5.15.1. Syntax for the Literal Pattern 1365 pattern = [wildcard] 0*( text [wildcard] ) 1367 wildcard = exactlyone / zeroormore 1368 text = 1*( character / escapeseq ) 1370 exactlyone = "_" 1371 zeroormore = "%" 1372 escapechar = "\" 1373 escapeseq = "\" ( exactlyone / zeroormore / escapechar ) 1375 ; character: see [XML], Section 2.2, minus wildcard / escapechar 1376 character = HTAB / LF / CR ; whitespace 1377 character =/ %x20-24 / %x26-5B / %x5D-5E / %x60-D7FF 1378 character =/ %xE000-FFFD / %x10000-10FFFF 1380 The value for the literal is composed of wildcards separated by 1381 segments of text. Wildcards may begin or end the literal. 1383 The "_" wildcard matches exactly one character. 1385 The "%" wildcard matches zero or more characters 1387 The "\" character is an escape sequence so that the literal can 1388 include "_" and "%". To include the "\" character in the pattern, 1389 the escape sequence "\\" is used. 1391 5.15.2. Example of DAV:like 1393 This example shows how a client might use DAV:like to identify those 1394 resources whose content type was a subtype of image. 1396 1397 1398 1399 image/% 1400 1401 1403 5.16. DAV:contains 1405 The DAV:contains operator is an optional operator that provides 1406 content-based search capability. This operator implicitly searches 1407 against the text content of a resource, not against content of 1408 properties. The DAV:contains operator is intentionally not overly 1409 constrained, in order to allow the server to do the best job it can 1410 in performing the search. 1412 The DAV:contains operator evaluates to a Boolean value. It evaluates 1413 to TRUE if the content of the resource satisfies the search. 1414 Otherwise, It evaluates to FALSE. 1416 Within the DAV:contains XML element, the client provides a phrase: a 1417 single word or whitespace delimited sequence of words. Servers MAY 1418 ignore punctuation in a phrase. Case-sensitivity is left to the 1419 server. 1421 The following things may or may not be done as part of the search: 1422 Phonetic methods such as "soundex" may or may not be used. Word 1423 stemming may or may not be performed. Thesaurus expansion of words 1424 may or may not be done. Right or left truncation may or may not be 1425 performed. The search may be case insensitive or case sensitive. 1426 The word or words may or may not be interpreted as names. Multiple 1427 words may or may not be required to be adjacent or "near" each other. 1428 Multiple words may or may not be required to occur in the same order. 1429 Multiple words may or may not be treated as a phrase. The search may 1430 or may not be interpreted as a request to find documents "similar" to 1431 the string operand. 1433 5.16.1. Result scoring (DAV:score element) 1435 Servers SHOULD indicate scores for the DAV:contains condition by 1436 adding a DAV:score XML element to the DAV:response element. It's 1437 value is defined only in the context of a particular query result. 1438 The value is a string representing the score, an integer from zero to 1439 10000 inclusive, where a higher value indicates a higher score (e.g. 1440 more relevant). 1442 Modified DTD fragment for DAV:propstat: 1444 1446 1448 Clients should note that, in general, it is not meaningful to compare 1449 the numeric values of scores from two different query results unless 1450 both were executed by the same underlying search system on the same 1451 collection of resources. 1453 5.16.2. Ordering by score 1455 To order search results by their score, the DAV:score element may be 1456 added as child to the DAV:orderby element (in place of a DAV:prop 1457 element). 1459 5.16.3. Examples 1461 The example below shows a search for the phrase "Peter Forsberg". 1463 Depending on its support for content-based searching, a server MAY 1464 treat this as a search for documents that contain the words "Peter" 1465 and "Forsberg". 1467 1468 Peter Forsberg 1469 1471 The example below shows a search for resources that contain "Peter" 1472 and "Forsberg". 1474 1475 1476 Peter 1477 Forsberg 1478 1479 1481 5.17. Limiting the result set 1483 1484 ;only digits 1486 The DAV:limit XML element contains requested limits from the client 1487 to limit the size of the reply or amount of effort expended by the 1488 server. The DAV:nresults XML element contains a requested maximum 1489 number of DAV:response elements to be returned in the response body. 1490 The server MAY disregard this limit. The value of this element is an 1491 integer. 1493 5.17.1. Relationship to result ordering 1495 If the result set is both limited by DAV:limit and ordered according 1496 to DAV:orderby, the results that are included in the response 1497 document must be those that order highest. 1499 5.18. The 'caseless' XML attribute 1501 The "caseless" attribute allows clients to specify caseless matching 1502 behaviour instead of character-by-character matching for DAV: 1503 basicsearch operators. 1505 The possible values for "caseless" are "yes" or "no". The default 1506 value is server-specified. Caseless matching SHOULD be implemented 1507 as defined in section 5.18 of the Unicode Standard ([UNICODE4]). 1509 Support for the "caseless" attribute is optional. A server should 1510 respond with a status of 422 if it is used but cannot be supported. 1512 5.19. Query schema for DAV:basicsearch 1514 The DAV:basicsearch grammar defines a search criteria that is a 1515 Boolean-valued expression, and allows for an arbitrary set of 1516 properties to be included in the result record. The result set may 1517 be sorted on a set of property values. Accordingly the DTD for 1518 schema discovery for this grammar allows the server to express: 1520 1. the set of properties that may be either searched, returned, or 1521 used to sort, and a hint about the data type of such properties 1523 2. the set of optional operators defined by the resource. 1525 5.19.1. DTD for DAV:basicsearch QSD 1527 1528 1529 1530 1533 1534 1535 1536 1537 1539 The DAV:properties element holds a list of descriptions of 1540 properties. 1542 The DAV:operators element describes the optional operators that may 1543 be used in a DAV:where element. 1545 5.19.2. DAV:propdesc Element 1547 Each instance of a DAV:propdesc element describes the property or 1548 properties in the DAV:prop element it contains. All subsequent 1549 elements are descriptions that apply to those properties. All 1550 descriptions are optional and may appear in any order. Servers 1551 SHOULD support all the descriptions defined here, and MAY define 1552 others. 1554 DASL defines five descriptions. The first, DAV:datatype, provides a 1555 hint about the type of the property value, and may be useful to a 1556 user interface prompting for a value. The remaining four (DAV: 1557 searchable, DAV:selectable, DAV:sortable, and DAV:caseless) identify 1558 portions of the query (DAV:where, DAV:select, and DAV:orderby, 1559 respectively). If a property has a description for a section, then 1560 the server MUST allow the property to be used in that section. These 1561 descriptions are optional. If a property does not have such a 1562 description, or is not described at all, then the server MAY still 1563 allow the property to be used in the corresponding section. 1565 5.19.2.1. DAV:any-other-property 1567 This element can be used in place of DAV:prop to describe properties 1568 of WebDAV properties not mentioned in any other DAV:prop element. 1569 For instance, this can be used to indicate that all other properties 1570 are searchable and selectable without giving details about their 1571 types (a typical scenario for dead properties). 1573 5.19.3. The DAV:datatype Property Description 1575 The DAV:datatype element contains a single XML element that provides 1576 a hint about the domain of the property, which may be useful to a 1577 user interface prompting for a value to be used in a query. 1578 Datatypes are identified by an element name. Where appropriate, a 1579 server SHOULD use the simple datatypes defined in [XS2]. 1581 1583 Examples from [XS2], Section 3: 1585 +----------------+---------------------+ 1586 | Qualified name | Example | 1587 +----------------+---------------------+ 1588 | xs:boolean | true, false, 1, 0 | 1589 | xs:string | Foobar | 1590 | xs:dateTime | 1994-11-05T08:15:5Z | 1591 | xs:float | .314159265358979E+1 | 1592 | xs:integer | -259, 23 | 1593 +----------------+---------------------+ 1595 If the data type of a property is not given, then the data type 1596 defaults to xs:string. 1598 5.19.4. The DAV:searchable Property Description 1600 1602 If this element is present, then the server MUST allow this property 1603 to appear within a DAV:where element where an operator allows a 1604 property. Allowing a search does not mean that the property is 1605 guaranteed to be defined on every resource in the scope, it only 1606 indicates the server's willingness to check. 1608 5.19.5. The DAV:selectable Property Description 1610 1612 This element indicates that the property may appear in the DAV:select 1613 element. 1615 5.19.6. The DAV:sortable Property Description 1617 This element indicates that the property may appear in the DAV: 1618 orderby element. 1620 1622 5.19.7. The DAV:caseless Property Description 1624 This element only applies to properties whose data type is "xs: 1625 string" and derived data types as per the DAV:datatype property 1626 description. Its presence indicates that compares performed for 1627 searches, and the comparisons for ordering results on the string 1628 property will be caseless (the default is character-by-character). 1630 1632 5.19.8. The DAV:operators XML Element 1634 The DAV:operators element describes every optional operator supported 1635 in a query. (Mandatory operators are not listed since they are 1636 mandatory and permit no variation in syntax.). All optional 1637 operators that are supported MUST be listed in the DAV:operators 1638 element. The listing for an operator consists of the operator (as an 1639 empty element), followed by one element for each operand. The 1640 operand MUST be either DAV:operand-property, DAV:operand-literal or 1641 DAV:operand-typed-literal, which indicate that the operand in the 1642 corresponding position is a property, a literal value or a typed 1643 literal value, respectively. If an operator is polymorphic (allows 1644 more than one operand syntax) then each permitted syntax MUST be 1645 listed separately. 1647 1648 1649 1650 1652 1654 5.19.9. Example of Query Schema for DAV:basicsearch 1656 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1684 This response lists four properties. The datatype of the last three 1685 properties is not given, so it defaults to xs:string. All are 1686 selectable, and the first three may be searched. All but the last 1687 may be used in a sort. Of the optional DAV operators, DAV:is-defined 1688 and DAV:like are supported. 1690 Note: The schema discovery defined here does not provide for 1691 discovery of supported values of the "caseless" attribute. This may 1692 require that the reply also list the mandatory operators. 1694 6. Internationalization Considerations 1696 Properties may be language-tagged using the xml:lang attribute (see 1697 [RFC2518], Section 4.4). The optional operators DAV:language-defined 1698 (Section 5.12.1) and DAV:language-matches (Section 5.12.2) allow to 1699 express conditions on the language tagging information. 1701 7. Security Considerations 1703 This section is provided to detail issues concerning security 1704 implications of which DASL applications need to be aware. All of the 1705 security considerations of HTTP/1.1 also apply to DASL. In addition, 1706 this section will include security risks inherent in searching and 1707 retrieval of resource properties and content. 1709 A query must not allow one to retrieve information about values or 1710 existence of properties that one could not obtain via PROPFIND. (e.g. 1711 by use in DAV:orderby, or in expressions on properties.) 1713 A server should prepare for denial of service attacks. For example a 1714 client may issue a query for which the result set is expensive to 1715 calculate or transmit because many resources match or must be 1716 evaluated. 1718 7.1. Implications of XML External Entities 1720 XML supports a facility known as "external entities", defined in 1721 Section 4.2.2 of [XML], which instruct an XML processor to retrieve 1722 and perform an inline include of XML located at a particular URI. An 1723 external XML entity can be used to append or modify the document type 1724 declaration (DTD) associated with an XML document. An external XML 1725 entity can also be used to include XML within the content of an XML 1726 document. For non-validating XML, such as the XML used in this 1727 specification, including an external XML entity is not required by 1728 [XML]. However, [XML] does state that an XML processor may, at its 1729 discretion, include the external XML entity. 1731 External XML entities have no inherent trustworthiness and are 1732 subject to all the attacks that are endemic to any HTTP GET request. 1733 Furthermore, it is possible for an external XML entity to modify the 1734 DTD, and hence affect the final form of an XML document, in the worst 1735 case significantly modifying its semantics, or exposing the XML 1736 processor to the security risks discussed in [RFC3023]. Therefore, 1737 implementers must be aware that external XML entities should be 1738 treated as untrustworthy. 1740 There is also the scalability risk that would accompany a widely 1741 deployed application which made use of external XML entities. In 1742 this situation, it is possible that there would be significant 1743 numbers of requests for one external XML entity, potentially 1744 overloading any server which fields requests for the resource 1745 containing the external XML entity. 1747 8. Scalability 1749 Query grammars are identified by URIs. Applications SHOULD not 1750 attempt to retrieve these URIs even if they appear to be retrievable 1751 (for example, those that begin with "http://") 1753 9. IANA Considerations 1755 This document uses the namespace defined in Section 18 of [RFC2518] 1756 for XML elements. 1758 9.1. HTTP headers 1760 This document specifies the HTTP header listed below, to be added to 1761 the HTTP header registry defined in [RFC3864]. 1763 9.1.1. DASL 1765 Header field name: DASL 1767 Applicable protocol: http 1769 Status: Experimental 1771 Author/Change controller: IETF 1773 Specification document: this specification (Section 3.2) 1775 10. Contributors 1777 This document is based on prior work on the DASL protocol done by the 1778 WebDAV DASL working group until the year 2000 -- namely by Alan 1779 Babich, Jim Davis, Rick Henderson, Dale Lowry, Saveen Reddy and 1780 Surendra Reddy. 1782 11. Acknowledgements 1784 This document has benefited from thoughtful discussion by Lisa 1785 Dusseault, Sung Kim, Elias Sinderson, Martin Wallmer, Keith 1786 Wannamaker, Jim Whitehead and Kevin Wiggen. 1788 12. References 1789 12.1. Normative References 1791 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1792 Requirement Levels", BCP 14, RFC 2119, March 1997. 1794 [RFC2518] Goland, Y., Whitehead, E., Faizi, A., Carter, S., and D. 1795 Jensen, "HTTP Extensions for Distributed Authoring -- 1796 WEBDAV", RFC 2518, February 1999. 1798 [RFC2616] Fielding, R., Gettys, J., Mogul, J., Nielsen, H., 1799 Masinter, L., Leach, P., and T. Berners-Lee, "Hypertext 1800 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 1802 [RFC3023] Makoto, M., St.Laurent, S., and D. Kohn, "XML Media 1803 Types", RFC 3023, January 2001. 1805 [RFC3253] Clemm, G., Amsden, J., Ellison, T., Kaler, C., and J. 1806 Whitehead, "Versioning Extensions to WebDAV", RFC 3253, 1807 March 2002. 1809 [RFC3744] Clemm, G., Reschke, J., Sedlar, E., and J. Whitehead, "Web 1810 Distributed Authoring and Versioning (WebDAV) Access 1811 Control Protocol", RFC 3744, May 2004. 1813 [RFC4234] Crocker, D., Ed. and P. Overell, "Augmented BNF for Syntax 1814 Specifications: ABNF", RFC 4234, October 2005. 1816 [RFC4437] Whitehead, J., Clemm, G., and J. Reschke, Ed., "Web 1817 Distributed Authoring and Versioning (WebDAV) 1818 Redirect Reference Resources", RFC 4437, March 2006. 1820 [XML] Bray, T., Paoli, J., Sperberg-McQueen, C., Maler, E., and 1821 F. Yergeau, "Extensible Markup Language (XML) 1.0 (Fourth 1822 Edition)", W3C REC-xml-20060816, August 2006, 1823 . 1825 [XPATH] Clark, J. and S. DeRose, "XML Path Language (XPath) 1826 Version 1.0", W3C REC-xpath-19991116, November 1999, 1827 . 1829 [XPATHFUNC] 1830 Malhotra, A., Melton, J., and N. Walsh, "XQuery 1.0 and 1831 XPath 2.0 Functions and Operators", W3C REC-xpath- 1832 functions-20070123, January 2007, 1833 . 1835 [XS1] Thompson, H., Beech, D., Maloney, M., Mendelsohn, N., and 1836 World Wide Web Consortium, "XML Schema Part 1: 1838 Structures", W3C REC-xmlschema-1-20041028, October 2004, 1839 . 1841 [XS2] Biron, P., Malhotra, A., and World Wide Web Consortium, 1842 "XML Schema Part 2: Datatypes Second Edition", W3C REC- 1843 xmlschema-2-20041028, October 2004, 1844 . 1846 12.2. Informative References 1848 [BIND] Clemm, G., Crawford, J., Reschke, J., Slein, J., and J. 1849 Whitehead, "Binding Extensions to WebDAV", 1850 draft-ietf-webdav-bind-16 (work in progress), 1851 January 2007, . 1854 [DASL] Reddy, S., Lowry, D., Reddy, S., Henderson, R., Davis, J., 1855 and A. Babich, "DAV Searching & Locating", 1856 draft-ietf-dasl-protocol-00 (work in progress), July 1999. 1858 [DASLREQ] Davis, J., Reddy, S., and J. Slein, "Requirements for DAV 1859 Searching and Locating", February 1999, . 1863 This is an updated version of the Internet Draft 1864 "draft-ietf-dasl-requirements-00", but obviously never was 1865 submitted to the IETF. 1867 [RFC3864] Klyne, G., Nottingham, M., and J. Mogul, "Registration 1868 Procedures for Message Header Fields", BCP 90, RFC 3864, 1869 September 2004. 1871 [SQL99] Milton, J., "Database Language SQL Part 2: Foundation 1872 (SQL/Foundation)", ISO ISO/IEC 9075-2:1999 (E), July 1999. 1874 [UNICODE4] 1875 The Unicode Consortium, "The Unicode Standard - Version 1876 4.0", Addison-Wesley , August 2003, 1877 . 1879 ISBN 0321185781 [1] 1881 URIs 1883 [1] 1885 Appendix A. Three-Valued Logic in DAV:basicsearch 1887 ANSI standard three valued logic is used when evaluating the search 1888 condition (as defined in the ANSI standard SQL specifications, for 1889 example in ANSI X3.135-1992, section 8.12, pp. 188-189, section 8.2, 1890 p. 169, General Rule 1)a), etc.). 1892 ANSI standard three valued logic is undoubtedly the most widely 1893 practiced method of dealing with the issues of properties in the 1894 search condition not having a value (e.g., being null or not defined) 1895 for the resource under scan, and with undefined expressions in the 1896 search condition (e.g., division by zero, etc.). Three valued logic 1897 works as follows. 1899 Undefined expressions are expressions for which the value of the 1900 expression is not defined. Undefined expressions are a completely 1901 separate concept from the truth value UNKNOWN, which is, in fact, 1902 well defined. Property names and literal constants are considered 1903 expressions for purposes of this section. If a property in the 1904 current resource under scan has not been set to a value, then the 1905 value of that property is undefined for the resource under scan. 1906 DASL 1.0 has no arithmetic division operator, but if it did, division 1907 by zero would be an undefined arithmetic expression. 1909 If any subpart of an arithmetic, string, or datetime subexpression is 1910 undefined, the whole arithmetic, string, or datetime subexpression is 1911 undefined. 1913 There are no manifest constants to explicitly represent undefined 1914 number, string, or datetime values. 1916 Since a Boolean value is ultimately returned by the search condition, 1917 arithmetic, string, and datetime expressions are always arguments to 1918 other operators. Examples of operators that convert arithmetic, 1919 string, and datetime expressions to Boolean values are the six 1920 relational operators ("greater than", "less than", "equals", etc.). 1921 If either or both operands of a relational operator have undefined 1922 values, then the relational operator evaluates to UNKNOWN. 1923 Otherwise, the relational operator evaluates to TRUE or FALSE, 1924 depending upon the outcome of the comparison. 1926 The Boolean operators DAV:and, DAV:or and DAV:not are evaluated 1927 according to the following rules: 1929 not UNKNOWN = UNKNOWN 1931 UNKNOWN and TRUE = UNKNOWN 1932 UNKNOWN and FALSE = FALSE 1934 UNKNOWN and UNKNOWN = UNKNOWN 1936 UNKNOWN or TRUE = TRUE 1938 UNKNOWN or FALSE = UNKNOWN 1940 UNKNOWN or UNKNOWN = UNKNOWN 1942 Appendix B. Unresolved Issues 1944 This Section summarizes issues which have been raised during the 1945 development of this specification, but for which no resolution could 1946 be found with the constraints in place. At the time of this writing, 1947 not resolving these issues and publishing as "Experimental" seemed to 1948 make more sense than not publishing at all. Future revisions of this 1949 specification should revisit these issues, though. 1951 B.1. Collation Support 1953 Matching and sorting of textual data relies on collations. With 1954 respect to WebDAV SEARCH, a combination of various design approaches 1955 could be used: 1957 o Require server support for specific collations. 1959 o Require that the server can advertise which collations it 1960 supports. 1962 o Allow a client to select the collation to be used. 1964 In practice, the current implementations of WebDAV SEARCH usually 1965 rely on backends they do not control, and for which collation 1966 information may not be available. To make things worse, 1967 implementations of the DAV:basicsearch grammar frequently need to 1968 combine data from multiple underlying stores (such as properties and 1969 full text content), and thus collation support may vary based on the 1970 operator or property. 1972 Another open issue is what collation formalism to support. At the 1973 time of this writing, the two specifications below seem to provide 1974 the necessary framework and thus may be the base for future work on 1975 collation support in WebDAV SEARCH: 1977 1. "Internet Application Protocol Collation Registry" (). 1981 2. "XQuery 1.0 and XPath 2.0 Functions and Operators" 1982 (). 1984 B.2. Count 1986 DAV:basicsearch does not allow to request just the count of matching 1987 resources. 1989 A protocol extension would need to extend DAV:select, and also modify 1990 the DAV:multistatus response format. 1992 B.3. Matching Media Types 1994 Matching media types using the DAV:getcontenttype property and the 1995 DAV:like operator is hard due to DAV:getcontenttype also allowing 1996 parameters. A new operator specifically designed for the purpose of 1997 matching media types probably would simplify things a lot. See 1999 for a specific proposal. 2001 B.4. Query by Name 2003 DAV:basicsearch operates on the properties (and optionally the 2004 contents) of resources, and thus doesn't really allow matching on 2005 parts of the resource's URI. See for a proposed extension 2007 covering this use case. 2009 Appendix C. Change Log (to be removed by RFC Editor before publication) 2011 C.1. From draft-davis-dasl-protocol-xxx 2013 Feb 14, 1998 Initial Draft 2015 Feb 28, 1998 Referring to DASL as an extension to HTTP/1.1 rather 2016 than DAV. 2017 Added new sections "Notational Conventions", "Protocol Model", 2018 "Security Considerations". 2019 Changed section 3 to "Elements of Protocol". 2020 Added some stuff to introduction. 2021 Added "result set" terminology. 2022 Added "IANA Considerations". 2024 Mar 9, 1998 Moved sub-headings of "Elements of Protocol" to first 2025 level and removed "Elements of Protocol" Heading. 2026 Added an sentence in introduction explaining that this is a 2027 "sketch" of a protocol. 2029 Mar 11, 1998 Added orderby, data typing, three valued logic, query 2030 schema property, and element definitions for schema for 2031 basicsearch. 2033 April 8, 1998 - made changes based on last week's DASL BOF. 2035 May 8, 1998 Removed most of DAV:searcherror; converted to DAV: 2036 searchredirect 2037 Altered DAV:basicsearch grammar to use avoid use of ANY in DTD 2039 June 17, 1998 -Added details on Query Schema Discovery 2040 -Shortened list of data types 2042 June 23, 1998 moved data types before change history 2043 rewrote the data types section 2044 removed the casesensitive element and replace with the 2045 casesensitive attribute 2046 added the casesensitive attribute to the DTD for all operations 2047 that might work on a string 2049 Jul 20, 1998 A series of changes. See Author's meeting minutes for 2050 details. 2052 July 28, 1998 Changes as per author's meeting. QSD uses SEARCH, not 2053 PROPFIND. 2054 Moved text around to keep concepts nearby. 2055 Boolean literals are 1 and 0, not T and F. 2056 contains changed to contentspassthrough. 2057 Renamed rank to score. 2059 July 28, 1998 Added Dale Lowry as Author 2061 September 4, 1998 Added 422 as response when query lists 2062 unimplemented operators. 2063 DAV:literal declares a default value for xml:space, 'preserve' 2064 (see XML spec, section 2.10) 2065 moved to new XML namespace syntax 2067 September 22, 1998 Changed "simplesearch" to "basicsearch" 2068 Changed isnull to isdefined 2069 Defined NULLness as having a 404 or 403 response 2070 used ENTITY syntax in DTD 2071 Added redirect 2073 October 9, 1998 Fixed a series of typographical and formatting 2074 errors. 2075 Modified the section of three-valued logic to use a table rather 2076 than a text description of the role of UNKNOWN in expressions. 2078 November 2, 1998 Added the DAV:contains operator. 2079 Removed the DAV:contentpassthrough operator. 2081 November 18, 1998 Various author comments for submission 2083 June 3, 1999 Cosmetic and minor editorial changes only. Fix nits 2084 reported by Jim Whitehead in email of April 26, 1999. Converted 2085 to HTML from Word 97, manually. 2087 April 20, 2000 Removed redirection feature, since 301/302 suffices. 2088 Removed Query Schema Discovery (former chapter 4). Everyone 2089 agrees this is a useful feature, but it is apparently too 2090 difficult to define at this time, and it is not essential for 2091 DASL. 2093 C.2. since start of draft-reschke-webdav-search 2095 October 09, 2001 Added Julian Reschke as author. 2096 Chapter about QSD re-added. 2097 Formatted into RFC2629-compliant XML document. 2098 Added first comments. 2099 ID version number kicked up to draft-dasl-protocol-03. 2101 October 17, 2001 Updated address information for Jim Davis. 2102 Added issue of datatype vocabularies. 2103 Updated issue descriptions for grammar discovery, added issues on 2104 query schema DTD. 2105 Fixed typos in XML examples. 2107 December 17, 2001 Re-introduced split between normative and non- 2108 normative references. 2110 January 05, 2002 Version bumbed up to 04. Started work on resolving 2111 the issues identified in the previous version. 2113 January 14, 2002 Fixed some XML typos. 2115 January 22, 2002 Closed issues naming-of-elements. Fixed query 2116 search DTD and added option to discover properties of "other" 2117 (non-listed) properties. 2119 January 25, 2002 Changed into private submission and added reference 2120 to historic DASL draft. Marked reference to DASL requirements 2121 non-normative. 2122 Updated reference to latest deltav spec. 2124 January 29, 2002 Added feedback from and updated contact info for 2125 Alan Babich. 2126 Included open issues collected in 2127 http://www.webdav.org/dasl/protocol/issues.html. 2129 February 8, 2002 Made sure that all artwork fits into 72 characters 2130 wide text. 2132 February 18, 2002 Changed Insufficient storage handling 2133 (multistatus). Moved is-collection to operators and added to DTD. 2134 Made scope/depth mandatory. 2136 February 20, 2002 Updated reference to SQL99. 2138 February 28, 2002 "Non-normative References" -> "Informative 2139 References". Abstract updated. Consistently specify a charset 2140 when using text/xml (no change bars). Do not attempt to define 2141 PROPFIND's entity encoding (take out specific references to text/ 2142 xml). Remove irrelevant headers (Connection:) from examples (no 2143 change bars). Added issue on querying based on DAV:href. Updated 2144 introduction to indicate relationship to DASL draft. Updated HTTP 2145 reference from RFC2068 to RFC2616. Updated XML reference to XML 2146 1.0 2nd edition. 2148 March 1, 2002 Removed superfluous namespace decl in 2.4.2. Reopened 2149 JW14 and suggest to drop xml:space support. 2151 March 3, 2002 Removed "xml:space" feature on DAV:literal. Added 2152 issue about string comparison vs. collations vs. xml:lang. 2153 Updated some of the open issues with details from JimW's original 2154 mail in April 1999. Resolved scope vs relative URI references. 2155 Resolved issues about DAV:ascending (added to index) and the BNF 2156 for DAV:like (changed "octets" to "characters"). 2158 March 8, 2002 Updated reference to DeltaV (now RFC3253). Added 2159 Martin Wallmer's comments, moved JW5 into DAV:basicsearch section. 2161 March 11, 2002 Closed open issues regaring the type of search 2162 arbiters (JW3) and their discovery (JW9). Rephrased requirements 2163 on multistatus response bodies (propstat only if properties were 2164 selected, removed requirement for responsedescription). 2166 March 23, 2002 RFC2376 -> RFC3023. Added missing first names of 2167 authors. OPTIONS added to example for DAV:supported-method-set. 2169 C.3. since draft-reschke-webdav-search-00 2171 March 29, 2002 Abstract doesn't refer to DASL WG anymore. 2173 April 7, 2002 Fixed section title (wrong property name supported- 2174 search-grammar-set. Changed DAV:casesensitve to "casesensitive" 2175 (it wasn't in the DAV: namespace after all). 2177 May 28, 2002 Updated some issues with Jim Davis's comments. 2179 June 10, 2002 Added proposal for different method for query schema 2180 discovery, not using pseudo-properties. 2182 June 25, 2002 QSD marshalling rewritten. Added issue "isdefined- 2183 optional". 2185 C.4. since draft-reschke-webdav-search-01 2187 July 04, 2002 Added issue "scope-collection". 2189 July 08, 2002 Closed issue "scope-collection". 2191 August 12, 2002 Added issues "results-vs-binds" and "select- 2192 allprop". 2194 October 22, 2002 Added issue "undefined-expressions". 2196 November 18, 2002 Changed example host names (no change tracking). 2198 November 25, 2002 Updated issue "DB2/DB7". Closed issues "undefined 2199 expressions", "isdefined-optional" and "select-allprop". 2201 C.5. since draft-reschke-webdav-search-02 2203 November 27, 2002 Added issues "undefined-properties", "like- 2204 exactlyone" and "like-wildcard-adjacent". Closed issue "query-on- 2205 href". Added acknowledgments section. 2207 November 28, 2002 Closed issue "like-exactlyone". Added issue 2208 "mixed-content-properties". 2210 December 14, 2002 Closed issues "undefined-properties", "results-vs- 2211 binds", "mixed-content-properties". Updated issue "like-wildcard- 2212 adjacent". Added informative reference to BIND draft. Updated 2213 reference to ACL draft. 2215 January 9, 2003 Removed duplicate section on invalid scopes. Added 2216 comments to some open issues. Closed issues JW25/26, score- 2217 pseudo-property and null-ordering. 2219 January 10, 2003 Issue limit-vs-ordering plus resolution. Closed 2220 issue JW17/JW24b. 2222 January 14, 2003 New issue order-precedence. Started resolution of 2223 DB2/DB7. 2225 January 15, 2003 Started spec of DAV:typed-literal. 2227 January 17, 2003 Fix one DAV:like/DAV:getcontenttype example (add / 2228 to like expression, make case-insensitive). 2230 January 28, 2003 Update issue(s) result-truncation, JW24d. Fixed 2231 response headers in OPTIONS example. Added issue qsd-optional. 2232 Closed issue(s) order-precedence, case-insensitivity-name. 2234 February 07, 2003 Added issue scope-vs-versions. score-pseudo- 2235 property: allow DAV:orderby to explicitly specify DAV:score. 2237 C.6. since draft-reschke-webdav-search-03 2239 April 24, 2003 Fixed two "?" vs "_" issues (not updated in last 2240 draft). 2242 June 13, 2003 Improve index. 2244 C.7. since draft-reschke-webdav-search-04 2246 July 7, 2003 Typo fixed (propstat without status element). 2248 August 11, 2003 Remove superfluous IP and copyright sections. 2250 September 09, 2003 Added issues "2.4-multiple-uris" and "5.1-name- 2251 filtering". 2253 October 06, 2003 Fix misplaced section end in 5.11, add table 2254 formatting. Enhance table formatting in 5.18.3. Updated ACL and 2255 BIND references. Added XPATH reference. Closed issue JW24d by 2256 adding new optional operators. Updated more open issues, added 2257 issues from January meeting. Add K. Wiggen to Acknowledgements. 2258 Add Contributors section for the authors of the original draft. 2259 Close issue "scope-vs-versions" (optional feature added). Close 2260 (new) issue "1.3-import-DTD-terminology". Add issue "1.3-import- 2261 requirements-terminology". 2263 October 07, 2003 Typos fixed. Moved statement about DAV: namespace 2264 usage into separate (sub-)section. Closed "1.3-import- 2265 requirements-terminology". Update I18N Considerations with new 2266 xml:lang support info (see issue JW24d). Close issue "DB2/DB7" 2267 (remaining typing issues are now summarized in issue "typed- 2268 literal"). Fix misplaced section end in section 7. Started 2269 change to use RFC3253-style method definitions and error 2270 marshalling. 2272 October 08, 2003 Remove obsolete language that allowed reporting 2273 invalid scopes and such inside multistatus. Add new issue "5.4.2- 2274 scope-vs-redirects". 2276 C.8. since draft-reschke-webdav-search-05 2278 October 11, 2003 Separate DAV:basicsearch DTD into separate figures 2279 for better maintainability. Update DTD with language-* operators 2280 and typed-literal element (optional). 2282 October 14, 2003 Close issue "5.4.2-multiple-scope". 2284 November 04, 2003 Update reference from CaseMap to UNICODE4, section 2285 5.18. 2287 November 16, 2003 Updated issue "5.1-name-filtering". 2289 November 24, 2003 Reformatted scope description (collection vs. non- 2290 collection). 2292 November 30, 2003 Add issue "5_media_type_match". 2294 February 6, 2004 Updated all references. 2296 C.9. since draft-reschke-webdav-search-06 2298 July 05, 2004 Fix table in Appendix "Three-Valued Logic in DAV: 2299 basicsearch". 2301 September 14, 2004 Fix inconsistent DTD in section 5.2 and 5.4 for 2302 scope element. 2304 September 30, 2004 Rewrite editorial note and abstract. Update 2305 references (remove unneeded XMLNS, update ref to ACL and BIND 2306 specs). 2308 C.10. since draft-reschke-webdav-search-07 2310 October 01, 2004 Fix previous section heading (no change tracking). 2312 October 13, 2004 Fix DTD entry for is-collection. 2314 November 1, 2004 Fix DTD fragment query-schema-discovery. 2316 December 11, 2004 Update BIND reference. 2318 January 01, 2005 Fix DASL and DASLREQ references. 2320 February 06, 2005 Update XS2 reference. 2322 February 11, 2005 Rewrite "like" and "DASL" (response header) 2323 grammar in ABNF. 2325 May 5, 2005 Update references. Close issue "abnf" (only use ABNF 2326 when applicable). 2328 C.11. since draft-reschke-webdav-search-08 2330 May 06, 2005 Fix document title. 2332 September 25, 2005 Update BIND reference. 2334 October 05, 2005 Update RFC4234 reference. 2336 October 22, 2005 Author's address update. 2338 February 12, 2006 Update BIND reference. 2340 March 16, 2006 Add typed literals to QSD. 2342 August 20, 2006 Update XML reference. 2344 August 28, 2006 Add issues "5.3-select-count" (open) and "5.4- 2345 clarify-depth" (resolved). Update BIND reference (again). 2347 C.12. since draft-reschke-webdav-search-09 2349 December 1, 2006 Fix ABNF for DASL header. 2351 December 16, 2006 Close issue "qsd-optional", leave QSD optional. 2352 Close issue "2.4-multiple-uris", suggesting that servers should 2353 only return one response element per resource in case of multiple 2354 bindings. Add and resolve issues "authentication" and "cleanup- 2355 iana" (adding the header registration for "DASL"). Re-write 2356 rational for using the DAV: namespace, although this is a non-WG 2357 submission. 2359 January 4, 2007 Close issue "JW16b/JW24a", being related to 2360 "language-comparison". Add Appendix B. Close issues "language- 2361 comparison", "5_media_type_match", "5.1-name-filtering" and "5.3- 2362 select-count" as "won't fix", and add appendices accordingly. 2364 January 24, 2007 Update BIND reference. Close issue "5.4.2-scope- 2365 vs-redirects". Close issue "typed-literal": specify in terms of 2366 the XPATH 2.9 casting mechanism. Close issue "1.3-apply- 2367 condition-code-terminology" (no changes). 2369 Appendix D. Resolved issues (to be removed by RFC Editor before 2370 publication) 2372 Issues that were either rejected or resolved in this version of this 2373 document. 2375 D.1. 1.3-apply-condition-code-terminology 2377 Type: change 2379 julian.reschke@greenbytes.de (2003-10-07): (Umbrella issue that will 2380 be left open until RFC3253 condition terminlogy is used throughout 2381 the document) 2383 Resolution (2007-01-24): Closed for now (avoid major editorial 2384 changes for now). 2386 D.2. 2.4-multiple-uris 2388 Type: change 2390 julian.reschke@greenbytes.de (2003-09-09): However, the set of URIs 2391 for a given resource may be unlimited due to possible bind loops. 2392 Therefore consider to report just one URI per resource. 2394 Resolution (2006-12-16): Allow servers which can do that to report 2395 just one. 2397 D.3. qsd-optional 2399 Type: change 2401 julian.reschke@greenbytes.de (2003-01-28): WG January meeting 2402 feedback: QSD should be made required. 2404 kwiggen@xythos.com (2003-10-03): (significant pushback, see mailing 2405 list thread at http://lists.w3.org/Archives/Public/www-webdav-dasl/ 2406 2003OctDec/0003.html). 2408 Resolution (2006-12-16): Leave it optional. 2410 D.4. 5.1-name-filtering 2412 Type: change 2414 2417 julian.reschke@greenbytes.de (2003-09-08): This query grammar 2418 supports properties and content, but not conditions on URL elements 2419 (such as the last segment that many WebDAV implementations treat as 2420 "file name"). Discuss possible extension such as adding name filters 2421 to the scope, or adding a specific operator. 2423 Martin.Wallmer@softwareag.com (2003-11-11): Specific proposal to add 2424 this feature as scope restriction, see . 2427 Martin.Wallmer@softwareag.com (2003-11-25): Updated proposal: . 2430 Resolution (2007-01-04): No feedback from the mailing list; no 2431 change. 2433 D.5. 5_media_type_match 2435 Type: change 2437 julian.reschke@greenbytes.de (2003-11-30): Putting conditions on DAV: 2438 getcontenttype is hard (see is (too?) hard. Proposal for a 2440 specific operator for expressing conditions on the media type: . 2443 Resolution (2007-01-04): No feedback from the mailing list; no 2444 change. 2446 D.6. 5.3-select-count 2448 Type: change 2450 2452 julian.reschke@greenbytes.de (2006-08-28): Feature request: ability 2453 just to retrieve the number of search results, see 2455 for details. 2457 Resolution (2006-12-30): No feedback from the mailing list; no 2458 change. 2460 D.7. 5.4.2-scope-vs-redirects 2462 Type: change 2464 2467 julian.reschke@greenbytes.de (2003-10-08): Clarify the relation of 2468 scope and redirect (3xx) resources. 2470 Resolution (2007-01-24): State that the search operation doesn't 2471 follow redirects automatically. 2473 D.8. language-comparison 2475 Type: change 2477 2480 julian.reschke@greenbytes.de (2002-03-03): XPath/XQuery (see draft, 2481 and open issue) specify string comparisons based on collations, not 2482 languages. I think we should adopt this. This would mean that "xml: 2483 lang" would be removed, and an optional attribute specifying the name 2484 of the collation is added. 2486 julian.reschke@greenbytes.de (2003-01-09): Proposal: adopt "lang" and 2487 "collation" attribute from XSLT 2.0's xsl:sort. 2489 Resolution (2006-12-30): Won't fix: no indication that implementors 2490 currently want this feature, or would be able to implement it. 2492 D.9. JW16b/JW24a 2494 Type: change 2496 2499 ejw@ics.uci.edu (2000-04-20): Define how comparisons on strings work, 2500 esp for i18n. 2501 Need policy statement about sort order in various national languages. 2502 (JW said "non-Latin" but it's an issue even in languages that use the 2503 latin char set.) 2505 julian.reschke@greenbytes.de (2003-01-28): This issue not only 2506 applies to the comparison operators, but also to ordering! 2508 Resolution (2006-12-20): Related to issue language-comparison. Close 2509 this one. 2511 D.10. typed-literal 2513 Type: change 2515 julian.reschke@greenbytes.de (2003-01-15): 1. (insert language 2516 defining the comparison following the rules defined in 2517 http://www.w3.org/TR/xpath20/#id-comparisons). 2518 2. Extend Basicsearch QSD grammar to support discovery of typed- 2519 literal 2520 3. Update DTD. 2521 4. Discuss behaviour of DAV:literal when the property's type is 2522 known for the complete search scope (is the server allowed to be 2523 "smart"?) 2525 julian.reschke@greenbytes.de (2003-10-11): 3.: done 2527 julian.reschke@greenbytes.de (2006-03-16): 2.: done 2529 julian.reschke@greenbytes.de (2007-01-24): 1.: done (note that the 2530 relevant section is in XPATHFUNC). 2532 julian.reschke@greenbytes.de (2007-01-24): 4.: this was already 2533 stated for DAV:literal since draft 03. 2535 Resolution (2007-01-24): Done. 2537 D.11. authentication 2539 Type: change 2541 julian.reschke@greenbytes.de (2006-12-16): The section 2542 "Authentication" is completely useless. Remove it. 2544 Resolution (2006-12-16): Done. 2546 D.12. cleanup-iana 2548 Type: change 2550 julian.reschke@greenbytes.de (2006-12-16): Cleanup the IANA 2551 considerations. Add HTTP header registration for DASL header. 2553 Resolution (2006-12-16): Done. 2555 Appendix E. Open issues (to be removed by RFC Editor prior to 2556 publication) 2558 E.1. edit 2560 Type: edit 2562 julian.reschke@greenbytes.de (2004-07-05): Umbrella issue for 2563 editorial fixes/enhancements. 2565 E.2. result-truncation 2567 Type: change 2569 2572 ldusseault@xythos.com (2002-03-29): I believe the same response body 2573 that contains the first N elements should also contain 2574 a *different* element stating that the results were incomplete and 2575 the result set was truncated by the server. There may also be a need 2576 to report that the results were incomplete and the result set was 2577 truncated at the choice of the client (isn't there a limit set in the 2578 client request?) That's important so the client knows the difference 2579 between receiving 10 results because there were >10 but only 10 were 2580 asked for, and receiving 10 results because there were only exactly 2581 10 results and it just happens that 10 were asked for. 2583 jrd3@alum.mit.edu (2002-05-28): I agree that this could be useful, 2584 but I think this issue should be consolidated with issue JW5 (see 2585 below), which proposes that DASL basicsearch ought to have a way for 2586 client to request additional result sets. It should be moved because 2587 there is little or no value in allowing a client to distinguish 2588 between the case where "N results were requested, and there are 2589 exactly N available" and "N results were requested, and there are 2590 more than N available" if there is no way for client to get the next 2591 batch of results. 2593 julian.reschke@greenbytes.de (2003-01-28): Feedback from interim WG 2594 meeting: agreement that marshalling should be rewritten and backwards 2595 compatibility is not important. Proposal: extend DAV:multistatus by 2596 a new child element that indicates (1) the range that was returned, 2597 (2) the total number of results and (3) a URI identifying the result 2598 (for resubmission when getting the "next" results). Such as 2599 ...identifier for 2600 result set... <-- number of results --> 2601 <-- 1-based index of 1st result --> <-- size 2602 of result set returned --> <-- indicates 2603 that this is a partial result --> ...response 2604 elements for search results... The example below would 2605 then translate to: HTTP/1.1 207 Multistatus Content-Type: text/xml; 2606 charset="utf-8" Content-Length: xxx 2608 2609 http://www.example.net/sounds/unbrokenchain.au 2610 HTTP/1.1 200 OK 2611 2612 http://tech.mit.test/archive96/photos/Lesh1.jpg 2613 HTTP/1.1 200 OK 2614 Q: do we need all 2615 elements, in particular start and length? 2617 julian.reschke@greenbytes.de (2003-10-07): Related: if this is 2618 supposed to be normative to DAV:basicsearch, it can't stay in an 2619 "example" sub-section. 2621 Index 2623 C 2624 caseless attribute 29, 35 2625 Condition Names 2626 DAV:search-grammar-discovery-supported (pre) 10 2627 DAV:search-grammar-supported (pre) 10 2628 DAV:search-multiple-scope-supported (pre) 10 2629 DAV:search-scope-valid (pre) 10 2630 Criteria 6 2632 D 2633 DAV:and 28 2634 DAV:ascending 28 2635 DAV:contains 33 2636 DAV:depth 25 2637 DAV:descending 28 2638 DAV:eq 29 2639 caseless attribute 29 2641 DAV:from 25 2642 DAV:gt 29 2643 DAV:gte 29 2644 DAV:include-versions 25 2645 DAV:is-collection 31 2646 DAV:is-defined 32 2647 DAV:language-defined 31 2648 DAV:language-matches 31 2649 DAV:like 32 2650 DAV:limit 35 2651 DAV:literal 29 2652 DAV:lt 29 2653 DAV:lte 29 2654 DAV:not 28 2655 DAV:nresults 35 2656 DAV:or 28 2657 DAV:orderby 28 2658 DAV:scope 25 2659 DAV:score 34 2660 relationship to DAV:orderby 35 2661 DAV:search-grammar-discovery-supported precondition 10 2662 DAV:search-grammar-supported precondition 10 2663 DAV:search-multiple-scope-supported precondition 10 2664 DAV:search-scope-valid precondition 10 2665 DAV:select 25 2666 DAV:supported-query-grammar-set property 16 2667 DAV:typed-literal 29 2668 DAV:where 26 2670 M 2671 Methods 2672 SEARCH 9 2674 O 2675 OPTIONS method 15 2676 DASL response header 15 2678 P 2679 Properties 2680 DAV:supported-query-grammar-set 16 2682 Q 2683 Query Grammar Discovery 14 2684 using live property 16 2685 using OPTIONS 15 2686 Query Grammar 7 2687 Query Schema 7 2688 Query 7 2690 R 2691 Result Record Definition 7 2692 Result Record 7 2693 Result Set Truncation 2694 Example 12 2695 Result Set 7 2696 Result 7 2698 S 2699 Scope 7 2700 SEARCH method 9 2701 Search Modifier 7 2702 Sort Specification 8 2704 Authors' Addresses 2706 Julian F. Reschke (editor) 2707 greenbytes GmbH 2708 Hafenweg 16 2709 Muenster, NW 48155 2710 Germany 2712 Phone: +49 251 2807760 2713 Fax: +49 251 2807761 2714 Email: julian.reschke@greenbytes.de 2715 URI: http://greenbytes.de/tech/webdav/ 2717 Surendra Reddy 2718 Oracle Corporation 2719 600 Oracle Parkway, M/S 6op3 2720 Redwoodshores, CA 94065 2722 Phone: +1 650 506 5441 2723 Email: Surendra.Reddy@oracle.com 2725 Jim Davis 2726 Intelligent Markets 2727 410 Jessie Street 6th floor 2728 San Francisco, CA 94103 2730 Email: jrd3@alum.mit.edu 2731 Alan Babich 2732 FileNET Corp. 2733 3565 Harbor Blvd. 2734 Costa Mesa, CA 92626 2736 Phone: +1 714 327 3403 2737 Email: ababich@filenet.com 2739 Full Copyright Statement 2741 Copyright (C) The IETF Trust (2007). 2743 This document is subject to the rights, licenses and restrictions 2744 contained in BCP 78, and except as set forth therein, the authors 2745 retain all their rights. 2747 This document and the information contained herein are provided on an 2748 "AS IS" basis and THE CONTRIBUTOR, THE ORGANIZATION HE/SHE REPRESENTS 2749 OR IS SPONSORED BY (IF ANY), THE INTERNET SOCIETY, THE IETF TRUST AND 2750 THE INTERNET ENGINEERING TASK FORCE DISCLAIM ALL WARRANTIES, EXPRESS 2751 OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 2752 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 2753 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 2755 Intellectual Property 2757 The IETF takes no position regarding the validity or scope of any 2758 Intellectual Property Rights or other rights that might be claimed to 2759 pertain to the implementation or use of the technology described in 2760 this document or the extent to which any license under such rights 2761 might or might not be available; nor does it represent that it has 2762 made any independent effort to identify any such rights. Information 2763 on the procedures with respect to rights in RFC documents can be 2764 found in BCP 78 and BCP 79. 2766 Copies of IPR disclosures made to the IETF Secretariat and any 2767 assurances of licenses to be made available, or the result of an 2768 attempt made to obtain a general license or permission for the use of 2769 such proprietary rights by implementers or users of this 2770 specification can be obtained from the IETF on-line IPR repository at 2771 http://www.ietf.org/ipr. 2773 The IETF invites any interested party to bring to its attention any 2774 copyrights, patents or patent applications, or other proprietary 2775 rights that may cover technology that may be required to implement 2776 this standard. Please address the information to the IETF at 2777 ietf-ipr@ietf.org. 2779 Acknowledgment 2781 Funding for the RFC Editor function is provided by the IETF 2782 Administrative Support Activity (IASA).