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