idnits 2.17.1 draft-reschke-webdav-search-02.txt: Checking boilerplate required by RFC 5378 and the IETF Trust (see https://trustee.ietf.org/license-info): ---------------------------------------------------------------------------- ** Looks like you're using RFC 2026 boilerplate. This must be updated to follow RFC 3978/3979, as updated by RFC 4748. Checking nits according to https://www.ietf.org/id-info/1id-guidelines.txt: ---------------------------------------------------------------------------- ** The document seems to lack a 1id_guidelines paragraph about Internet-Drafts being working documents. == No 'Intended status' indicated for this document; assuming Proposed Standard Checking nits according to https://www.ietf.org/id-info/checklist : ---------------------------------------------------------------------------- No issues found here. Miscellaneous warnings: ---------------------------------------------------------------------------- == The copyright year in the RFC 3978 Section 5.4 Copyright Line does not match the current year == Line 787 has weird spacing: '...LIST lt cas...' == Line 790 has weird spacing: '...IST lte case...' == Line 793 has weird spacing: '...LIST gt cas...' == Line 796 has weird spacing: '...IST gte case...' == Line 799 has weird spacing: '...LIST eq cas...' == (1 more instance...) == The document seems to lack the recommended RFC 2119 boilerplate, even if it appears to use RFC 2119 keywords -- however, there's a paragraph with a matching beginning. Boilerplate error? (The document does seem to have the reference to RFC 2119 which the ID-Checklist requires). == Using lowercase 'not' together with uppercase 'MUST', 'SHALL', 'SHOULD', or 'RECOMMENDED' is not an accepted usage according to RFC 2119. Please use uppercase 'NOT' together with RFC 2119 keywords (if that is what you mean). Found 'SHOULD not' in this paragraph: Query grammars are identified by URIs. Applications SHOULD not attempt to retrieve these URIs even if they appear to be retrievable (for example, those that begin with "http://") -- The document seems to lack a disclaimer for pre-RFC5378 work, but may have content which was first submitted before 10 November 2008. If you have contacted all the original authors and they are all willing to grant the BCP78 rights to the IETF Trust, then this is fine, and you can ignore this comment. If not, you may need to add the pre-RFC5378 disclaimer. (See the Legal Provisions document at https://trustee.ietf.org/license-info for more information.) -- The document date (November 2002) is 7831 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) == Unused Reference: 'XMLNS' is defined on line 1539, but no explicit reference was found in the text == Outdated reference: A later version (-13) exists of draft-ietf-webdav-acl-07 ** Obsolete normative reference: RFC 2518 (Obsoleted by RFC 4918) ** Obsolete normative reference: RFC 2616 (Obsoleted by RFC 7230, RFC 7231, RFC 7232, RFC 7233, RFC 7234, RFC 7235) ** Obsolete normative reference: RFC 3023 (Obsoleted by RFC 7303) -- Possible downref: Non-RFC (?) normative reference: ref. 'XML' -- Possible downref: Non-RFC (?) normative reference: ref. 'XMLNS' -- Possible downref: Non-RFC (?) normative reference: ref. 'XS2' -- No information found for draft-dasl-protocol - is the name correct? -- No information found for draft-dasl-requirements - is the name correct? Summary: 5 errors (**), 0 flaws (~~), 12 warnings (==), 7 comments (--). Run idnits with the --verbose option for more detailed information about the items above. -------------------------------------------------------------------------------- 2 Network Working Group J. F. Reschke 3 Internet Draft greenbytes 4 Expires: May 2003 S. Reddy 5 Oracle 6 J. Davis 7 Intelligent Markets 8 A. Babich 9 Filenet 10 November 2002 12 WebDAV SEARCH 13 draft-reschke-webdav-search-02 15 Status of this Memo 17 This document is an Internet-Draft and is in full conformance with 18 all provisions of Section 10 of RFC2026. Internet-Drafts are working 19 documents of the Internet Engineering Task Force (IETF), its areas, 20 and its working groups. Note that other groups may also distribute 21 working documents as Internet-Drafts. 23 Internet-Drafts are draft documents valid for a maximum of six months 24 and may be updated, replaced, or obsoleted by other documents at any 25 time. It is inappropriate to use Internet-Drafts as reference 26 material or to cite them other than as "work in progress". 28 The list of current Internet-Drafts can be accessed at 29 http://www.ietf.org/ietf/1id-abstracts.txt. 31 The list of Internet-Draft Shadow Directories can be accessed at 32 http://www.ietf.org/shadow.html. 34 This Internet-Draft will expire in May 2003. 36 Copyright Notice 38 Copyright (C) The Internet Society (2002). All Rights Reserved. 40 Abstract 42 This document specifies a set of methods, headers, properties and 43 content-types composing WebDAV SEARCH, an application of the HTTP/1.1 44 protocol to efficiently search for DAV resources based upon a set of 45 client-supplied criteria. 47 Distribution of this document is unlimited. Please send comments to 48 the Distributed Authoring and Versioning (WebDAV) DASL mailing list 49 at www-webdav-dasl@w3.org, which may be joined by sending a message 50 with subject "subscribe" to www-webdav-dasl-request@w3.org. 51 Discussions of the WebDAV DASL mailing list are archived at URL: 52 http://www.w3.org/pub/WWW/Archives/Public/www-webdav-dasl/. 54 Table of Contents 56 Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 57 Table of Contents . . . . . . . . . . . . . . . . . . . . . . 3 58 1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . 5 59 1.1 DASL . . . . . . . . . . . . . . . . . . . . . . . . . . 5 60 1.2 Relationship to DAV . . . . . . . . . . . . . . . . . . 5 61 1.3 Terms . . . . . . . . . . . . . . . . . . . . . . . . . 5 62 1.4 Notational Conventions . . . . . . . . . . . . . . . . . 6 63 1.5 An Overview of DASL at Work . . . . . . . . . . . . . . 6 64 2 The SEARCH Method . . . . . . . . . . . . . . . . . . . . . 7 65 2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . . 7 66 2.2 The Request . . . . . . . . . . . . . . . . . . . . . . 7 67 2.2.1 The Request-URI . . . . . . . . . . . . . . . . . . 7 68 2.2.2 The Request Body . . . . . . . . . . . . . . . . . . 7 69 2.3 The DAV:searchrequest XML Element . . . . . . . . . . . 8 70 2.4 The Successful 207 (Multistatus) Response . . . . . . . 8 71 2.4.1 Extending the PROPFIND Response . . . . . . . . . . 8 72 2.4.2 Example: A Simple Request and Response . . . . . . . 8 73 2.4.3 Example: Result Set Truncation . . . . . . . . . . . 9 74 2.5 Unsuccessful Responses . . . . . . . . . . . . . . . . . 11 75 2.6 Invalid Scopes . . . . . . . . . . . . . . . . . . . . . 11 76 2.6.1 Indicating an Invalid Scope . . . . . . . . . . . . 11 77 2.6.2 Example of an Invalid Scope . . . . . . . . . . . . 12 78 3 Discovery of Supported Query Grammars . . . . . . . . . . . 13 79 3.1 The OPTIONS Method . . . . . . . . . . . . . . . . . . . 13 80 3.2 The DASL Response Header . . . . . . . . . . . . . . . . 13 81 3.3 DAV:supported-query-grammar-set (protected) . . . . . . 14 82 3.4 Example: Grammar Discovery . . . . . . . . . . . . . . . 14 83 4 Query Schema Discovery: QSD . . . . . . . . . . . . . . . . 17 84 4.1 Additional SEARCH semantics . . . . . . . . . . . . . . 17 85 4.1.1 Example of query schema discovery . . . . . . . . . 18 86 5 The DAV:basicsearch Grammar . . . . . . . . . . . . . . . . 20 87 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . 20 88 5.2 The DAV:basicsearch DTD . . . . . . . . . . . . . . . . 20 89 5.2.1 Example Query . . . . . . . . . . . . . . . . . . . 21 90 5.3 DAV:select . . . . . . . . . . . . . . . . . . . . . . . 22 91 5.4 DAV:from . . . . . . . . . . . . . . . . . . . . . . . . 22 92 5.4.1 Relationship to the Request-URI . . . . . . . . . . 23 93 5.4.2 Scope . . . . . . . . . . . . . . . . . . . . . . . 23 94 5.5 DAV:where . . . . . . . . . . . . . . . . . . . . . . . 24 95 5.5.1 Use of Three-Valued Logic in Queries . . . . . . . . 24 96 5.5.2 Handling Optional operators . . . . . . . . . . . . 24 97 5.5.3 Treatment of NULL Values . . . . . . . . . . . . . . 24 98 5.5.4 Treatment of properties with mixed/element content . 25 99 5.5.5 Example: Testing for Equality . . . . . . . . . . . 25 100 5.5.6 Example: Relative Comparisons . . . . . . . . . . . 25 101 5.6 DAV:orderby . . . . . . . . . . . . . . . . . . . . . . 26 102 5.6.1 Comparing Natural Language Strings. . . . . . . . . 26 103 5.6.2 Example of Sorting . . . . . . . . . . . . . . . . . 26 104 5.7 Boolean Operators: DAV:and, DAV:or, and DAV:not . . . . 27 105 5.8 DAV:eq . . . . . . . . . . . . . . . . . . . . . . . . . 27 106 5.9 DAV:lt, DAV:lte, DAV:gt, DAV:gte . . . . . . . . . . . . 27 107 5.10 DAV:literal . . . . . . . . . . . . . . . . . . . . . . 27 108 5.11 DAV:is-collection . . . . . . . . . . . . . . . . . . . 28 109 5.11.1 Example of DAV:is-collection . . . . . . . . . . . 28 110 5.12 DAV:isdefined . . . . . . . . . . . . . . . . . . . . . 28 111 5.13 DAV:like . . . . . . . . . . . . . . . . . . . . . . . 29 112 5.13.1 Syntax for the Literal Pattern . . . . . . . . . . 29 113 5.13.2 Example of DAV:like . . . . . . . . . . . . . . . . 29 114 5.14 DAV:contains . . . . . . . . . . . . . . . . . . . . . 30 115 5.14.1 Examples . . . . . . . . . . . . . . . . . . . . . 30 116 5.15 The DAV:limit XML Element . . . . . . . . . . . . . . . 31 117 5.16 The DAV:nresults XML Element . . . . . . . . . . . . . 31 118 5.17 The "casesensitive" XML attribute . . . . . . . . . . . 32 119 5.18 The DAV:score Property . . . . . . . . . . . . . . . . 32 120 5.19 Query schema for DAV:basicsearch . . . . . . . . . . . 33 121 5.19.1 DTD for DAV:basicsearch QSD . . . . . . . . . . . . 33 122 5.19.2 DAV:propdesc Element . . . . . . . . . . . . . . . 33 123 5.19.2.1 DAV:any-other-property . . . . . . . . . . . . 34 124 5.19.3 The DAV:datatype Property Description . . . . . . . 34 125 5.19.4 The DAV:searchable Property Description . . . . . . 35 126 5.19.5 The DAV:selectable Property Description . . . . . . 35 127 5.19.6 The DAV:sortable Property Description . . . . . . . 35 128 5.19.7 The DAV:casesensitive Property Description . . . . 36 129 5.19.8 The DAV:operators XML Element . . . . . . . . . . . 36 130 5.19.9 Example of Query Schema for DAV:basicsearch . . . . 36 131 6 Internationalization Considerations . . . . . . . . . . . . 38 132 7 Security Considerations . . . . . . . . . . . . . . . . . . 39 133 8 Scalability . . . . . . . . . . . . . . . . . . . . . . . . 40 134 9 Authentication . . . . . . . . . . . . . . . . . . . . . . . 41 135 10 IANA Considerations . . . . . . . . . . . . . . . . . . . . 42 136 11 Copyright . . . . . . . . . . . . . . . . . . . . . . . . . 43 137 12 Intellectual Property . . . . . . . . . . . . . . . . . . . 44 138 Normative References . . . . . . . . . . . . . . . . . . . . . 45 139 Informative References . . . . . . . . . . . . . . . . . . . . 45 140 Author's Addresses . . . . . . . . . . . . . . . . . . . . . . 46 141 A Three-Valued Logic in DAV:basicsearch . . . . . . . . . . . 47 142 B Change Log . . . . . . . . . . . . . . . . . . . . . . . . . 49 143 B.1 From draft-davis-dasl-protocol-xxx . . . . . . . . . . . 49 144 B.2 since start of draft-reschke-webdav-search . . . . . . . 50 145 B.3 since draft-reschke-webdav-search-00 . . . . . . . . . . 52 146 B.4 since draft-reschke-webdav-search-01 . . . . . . . . . . 52 147 Index . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53 149 1 Introduction 151 1.1 DASL 153 This document defines WebDAV SEARCH, an application of HTTP/1.1 154 forming a lightweight search protocol to transport queries and result 155 sets and allows clients to make use of server-side search facilities. 156 It is based on the expired draft for WebDAV DASL [DASL]. [DASLREQ] 157 describes the motivation for DASL. 159 DASL will minimize the complexity of clients so as to facilitate 160 widespread deployment of applications capable of utilizing the DASL 161 search mechanisms. 163 DASL consists of: 165 o the SEARCH method, 167 o the DASL response header, 169 o the DAV:searchrequest XML element, 171 o the DAV:queryschema property, 173 o the DAV:basicsearch XML element and query grammar, and 175 o the DAV:basicsearchschema XML element. 177 For WebDAV-compliant servers, it also defines a new live property 178 DAV:supported-query-grammar-set. 180 1.2 Relationship to DAV 182 DASL relies on the resource and property model defined by [RFC2518]. 183 DASL does not alter this model. Instead, DASL allows clients to 184 access DAV-modeled resources through server-side search. 186 1.3 Terms 188 This draft uses the terms defined in [RFC2616], [RFC2518], and 189 [DASLREQ]. 191 1.4 Notational Conventions 193 The augmented BNF used by this document to describe protocol elements 194 is exactly the same as the one described in Section 2.1 of [RFC2616]. 195 Because this augmented BNF uses the basic production rules provided 196 in Section 2.2 of [RFC2616], those rules apply to this document as 197 well. 199 The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT" 200 "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this 201 document are to be interpreted as described in [RFC2119]. 203 When an XML element type in the "DAV:" namespace is referenced in 204 this document outside of the context of an XML fragment, the string 205 "DAV:" will be prefixed to the element type. 207 Note that this draft currently defines elements and properties in the 208 WebDAV namespace "DAV:", which it shouldn't do as it isn't a work 209 item of the WebDAV working group. The reason for this is the desire 210 for some kind of backward compatibility to the expired DASL drafts 211 and the assumption that the draft may become an official RFC 212 submission of the WebDAV working group at a later point of time. 214 Similarily, when an XML element type in the namespace 215 "http://www.w3.org/2001/XMLSchema" is referenced in this document 216 outside of the context of an XML fragment, the string "xs:" will be 217 prefixed to the element type. 219 1.5 An Overview of DASL at Work 221 One can express the basic usage of DASL in the following steps: 223 o The client constructs a query using the DAV:basicsearch grammar. 225 o The client invokes the SEARCH method on a resource that will 226 perform the search (the search arbiter) and includes a text/xml or 227 application/xml request entity that contains the query. 229 o The search arbiter performs the query. 231 o The search arbiter sends the results of the query back to the 232 client in the response. The server MUST send an entity that 233 matches the [RFC2518] PROPFIND response. 235 2 The SEARCH Method 237 2.1 Overview 239 The client invokes the SEARCH method to initiate a server-side 240 search. The body of the request defines the query. The server MUST 241 emit an entity matching the [RFC2518] PROPFIND response. 243 The SEARCH method plays the role of transport mechanism for the query 244 and the result set. It does not define the semantics of the query. 245 The type of the query defines the semantics. 247 2.2 The Request 249 The client invokes the SEARCH method on the resource named by the 250 Request-URI. 252 2.2.1 The Request-URI 254 The Request-URI identifies the search arbiter. Any HTTP resource may 255 function as search arbiter. It is not a new type of resource (in the 256 sense of DAV:resourcetype as defined in [RFC2518]), nor does it have 257 to be a WebDAV-compliant resource. 259 The SEARCH method defines no relationship between the arbiter and the 260 scope of the search, rather the particular query grammar used in the 261 query defines the relationship. For example, the FOO query grammar 262 may force the request-URI to correspond exactly to the search scope. 264 2.2.2 The Request Body 266 The server MUST process a text/xml or application/xml request body, 267 and MAY process request bodies in other formats. See [RFC3023] for 268 guidance on packaging XML in requests. 270 If the client sends a text/xml or application/xml body, it MUST 271 include the DAV:searchrequest XML element. The DAV:searchrequest XML 272 element identifies the query grammar, defines the criteria, the 273 result record, and any other details needed to perform the search. 275 2.3 The DAV:searchrequest XML Element 277 279 The DAV:searchrequest XML element contains a single XML element that 280 defines the query. The name of the query element defines the type of 281 the query. The value of that element defines the query itself. 283 2.4 The Successful 207 (Multistatus) Response 285 If the server returns 207 (Multistatus), then the search proceeded 286 successfully and the response MUST match that of a PROPFIND. The 287 results of this method SHOULD NOT be cached. 289 There MUST be one DAV:response for each resource that matched the 290 search criteria. For each such response, the DAV:href element 291 contains the URI of the resource, and the response MUST include a 292 DAV:propstat element. 294 In addition, the server MAY include DAV:response items in the reply 295 where the DAV:href element contains a URI that is not a matching 296 resource, e.g. that of a scope or the query arbiter. Each such 297 response item MUST NOT contain a DAV:propstat element, and MUST 298 contain a DAV:status element (unless no property was selected). 300 2.4.1 Extending the PROPFIND Response 302 A response MAY include more information than PROPFIND defines so long 303 as the extra information does not invalidate the PROPFIND response. 304 Query grammars SHOULD define how the response matches the PROPFIND 305 response. 307 2.4.2 Example: A Simple Request and Response 309 This example demonstrates the request and response framework. The 310 following XML document shows a simple (hypothetical) natural language 311 query. The name of the query element is natural-language-query in the 312 XML namespace "http://example.com/foo". The actual query is "Find the 313 locations of good Thai restaurants in Los Angeles". For this 314 hypothetical query, the arbiter returns two properties for each 315 selected resource. 317 >> Request: 319 SEARCH / HTTP/1.1 320 Host: example.org 321 Content-Type: application/xml 322 Content-Length: xxx 324 325 326 327 Find the locations of good Thai restaurants in Los Angeles 328 329 331 >> Response: 333 HTTP/1.1 207 Multi-Status 334 Content-Type: text/xml; charset="utf-8" 335 Content-Length: xxx 337 338 340 341 http://siamiam.test/ 342 343 344 259 W. Hollywood 345 4 346 347 348 349 351 2.4.3 Example: Result Set Truncation 353 A server MAY limit the number of resources in a reply, for example to 354 limit the amount of resources expended in processing a query. If it 355 does so, the reply MUST use status code 207, return a DAV:multistatus 356 response body and indicate a status of 507 (Insufficient Storage) for 357 the search arbiter URI. It SHOULD include the partial results. 359 When a result set is truncated, there may be many more resources that 360 satisfy the search criteria but that were not examined. 362 If partial results are included and the client requested an ordered 363 result set in the original request, then any partial results that are 364 returned MUST be ordered as the client directed. 366 Note that the partial results returned MAY be any subset of the 367 result set that would have satisfied the original query. 369 >> Request: 371 SEARCH / HTTP/1.1 372 Host: example.net 373 Content-Type: text/xml; charset="utf-8" 374 Content-Length: xxx 376 ... the query goes here ... 378 >> Response: 380 HTTP/1.1 207 Multistatus 381 Content-Type: text/xml; charset="utf-8" 382 Content-Length: xxx 384 385 386 387 http://www.example.net/sounds/unbrokenchain.au 388 389 390 HTTP/1.1 200 OK 391 392 393 394 http://tech.mit.test/archive96/photos/Lesh1.jpg 395 396 397 HTTP/1.1 200 OK 398 399 400 401 http://example.net 402 HTTP/1.1 507 Insufficient Storage 403 404 Only first two matching records were returned 405 406 407 409 2.5 Unsuccessful Responses 411 If an error occurred that prevented execution of the query, the 412 server MUST indicate the failure with the appropriate status code and 413 SHOULD include a DAV:multistatus element to point out errors 414 associated with scopes. 416 400 Bad Request. The query could not be executed. The request may be 417 malformed (not valid XML for example). Additionally, this can be used 418 for invalid scopes and search redirections. 420 422 Unprocessable entity. The query could not be executed. If a 421 application/xml or text/xml request entity was provided, then it may 422 have been well-formed but may have contained an unsupported or 423 unimplemented query operator. 425 2.6 Invalid Scopes 427 2.6.1 Indicating an Invalid Scope 429 A client may submit a scope that the arbiter may be unable to query. 430 The inability to query may be due to network failure, administrative 431 policy, security, etc. This raises the condition described as an 432 "invalid scope". 434 To indicate an invalid scope, the server MUST respond with a 400 (Bad 435 Request). 437 The response includes a body with a DAV:multistatus element. Each 438 DAV:response in the DAV:multistatus identifies a scope. To indicate 439 that this scope is the source of the error, the server MUST include 440 the DAV:scopeerror element. 442 2.6.2 Example of an Invalid Scope 444 >> Response: 446 HTTP/1.1 400 Bad-Request 447 Content-Type: text/xml; charset="utf-8" 448 Content-Length: xxx 450 452 453 454 http://www.example.com/X 455 HTTP/1.1 404 Object Not Found 456 457 458 460 3 Discovery of Supported Query Grammars 462 Servers MUST support discovery of the query grammars supported by a 463 search arbiter resource. 465 Clients can determine which query grammars are supported by an 466 arbiter by invoking OPTIONS on the search arbiter. If the resource 467 supports SEARCH, then the DASL response header will appear in the 468 response. The DASL response header lists the supported grammars. 470 Servers supporting the WebDAV extensions [RFC3253] and/or [ACL] MUST 471 also 473 o report SEARCH in the live property DAV:supported-method-set for 474 all search arbiter resources and 476 o support the live property DAV:supported-query-grammar-set as 477 defined in Section 3.3. 479 3.1 The OPTIONS Method 481 The OPTIONS method allows the client to discover if a resource 482 supports the SEARCH method and to determine the list of search 483 grammars supported for that resource. 485 The client issues the OPTIONS method against a resource named by the 486 Request-URI. This is a normal invocation of OPTIONS defined in 487 [RFC2616]. 489 If a resource supports the SEARCH method, then the server MUST list 490 SEARCH in the OPTIONS response as defined by [RFC2616]. 492 DASL servers MUST include the DASL header in the OPTIONS response. 493 This header identifies the search grammars supported by that 494 resource. 496 3.2 The DASL Response Header 498 >> Response: 500 DASLHeader = "DASL" ":" Coded-URL-List 501 Coded-URL-List : Coded-URL [ "," Coded-URL-List ] 502 Coded-URL ; defined in section 9.4 of [RFC2518] 503 The DASL response header indicates server support for a query grammar 504 in the OPTIONS method. The value is a URI that indicates the type of 505 grammar. Note that although the URI can be used to identify each 506 supported search grammar, there is not necessarily a direct 507 relationship between the URI and the XML element name that can be 508 used in XML based SEARCH requests (the element name itself is 509 identified by it's namespace name (a URI reference) and the element's 510 local name). 512 This header MAY be repeated. 514 For example: 516 DASL: 517 DASL: 518 DASL: 519 DASL: 521 3.3 DAV:supported-query-grammar-set (protected) 523 This WebDAV property is required for any server supporting either 524 [RFC3253] and/or [ACL] and identifies the XML based query grammars 525 that are supported by the search arbiter resource. 527 529 531 533 ANY value: a query grammar element type 535 3.4 Example: Grammar Discovery 537 This example shows that the server supports search on the /somefolder 538 resource with the query grammars: DAV:basicsearch, 539 http://foobar.test/syntax1 and http://akuma.test/syntax2. Note that 540 every server MUST support DAV:basicsearch. 542 >> Request: 544 OPTIONS /somefolder HTTP/1.1 545 Host: example.org 547 >> Response: 549 HTTP/1.1 200 OK 550 Date: Tue, 20 Jan 1998 20:52:29 GMT 551 Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE, 552 MKCOL, PROPFIND, PROPPATCH, LOCK, UNLOCK, SEARCH 553 DASL: 554 DASL: 555 DASL: 557 This example shows the equivalent taking advantage of a server's 558 support for DAV:supported-method-set and DAV:supported-query-grammar- 559 set. 561 >> Request: 563 PROPFIND /somefolder HTTP/1.1 564 Host: example.org 565 Depth: 0 566 Content-Type: text/xml; charset="utf-8" 567 Content-Length: xxx 569 570 571 572 573 574 575 577 >> Response: 579 HTTP/1.1 207 Multi-Status 580 Content-Type: text/xml; charset="utf-8" 581 Content-Length: xxx 583 584 585 586 http://example.org/somefolder 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 HTTP/1.1 200 OK 619 620 621 623 Note that the query grammar element names marshalled as part of the 624 DAV:supported-query-grammar-set can be directly used as element names 625 in an XML based query. 627 4 Query Schema Discovery: QSD 629 Servers MAY support the discovery of the schema for a query grammar. 631 The DASL response header and the DAV:supported-query-grammar-set 632 property provide means for clients to discover the set of query 633 grammars supported by a resource. This alone is not sufficient 634 information for a client to generate a query. For example, the 635 DAV:basicsearch grammar defines a set of queries consisting of a set 636 of operators applied to a set of properties and values, but the 637 grammar itself does not specify which properties may be used in the 638 query. QSD for the DAV:basicsearch grammar allows a client to 639 discover the set of properties that are searchable, selectable, and 640 sortable. Moreover, although the DAV:basicsearch grammar defines a 641 minimal set of operators, it is possible that a resource might 642 support additional operators in a query. For example, a resource 643 might support a optional operator that can be used to express 644 content-based queries in a proprietary syntax. QSD allows a client to 645 discover these operators and their syntax. The set of discoverable 646 quantities will differ from grammar to grammar, but each grammar can 647 define a means for a client to discover what can be discovered. 649 In general, the schema for a given query grammar depends on both the 650 resource (the arbiter) and the scope. A given resource might have 651 access to one set of properties for one potential scope, and another 652 set for a different scope. For example, consider a server able to 653 search two distinct collections, one holding cooking recipes, the 654 other design documents for nuclear weapons. While both collections 655 might support properties such as author, title, and date, the first 656 might also define properties such as calories and preparation time, 657 while the second defined properties such as yield and applicable 658 patents. Two distinct arbiters indexing the same collection might 659 also have access to different properties. For example, the recipe 660 collection mentioned above might also indexed by a value-added server 661 that also stored the names of chefs who had tested the recipe. Note 662 also that the available query schema might also depend on other 663 factors, such as the identity of the principal conducting the search, 664 but these factors are not exposed in this protocol. 666 4.1 Additional SEARCH semantics 668 Each query grammar supported by DASL defines its own syntax for 669 expressing the possible query schema. A client retrieves the schema 670 for a given query grammar on an arbiter resource with a given scope 671 by invoking the SEARCH method on that arbiter with that grammar and 672 scope and with a root element of DAV:query-schema-discovery rather 673 than DAV:searchrequest. 675 Marshalling: 677 The requst body MUST be DAV:query-schema-discovery element. 679 680 ANY value: XML element defining a valid query 682 The response body takes the form of a RFC2518 DAV:multistatus 683 element, where DAV:response is extended to hold the returned query 684 grammar inside a DAV:query-schema container element. 686 688 690 The content of this container is an XML element whose name and syntax 691 depend upon the grammar, and whose value may (and likely will) vary 692 depending upon the grammar, arbiter, and scope. 694 4.1.1 Example of query schema discovery 696 In this example, the arbiter is recipes.test, the grammar is 697 DAV:basicsearch, the scope is also recipes.test. 699 >> Request: 701 SEARCH / HTTP/1.1 702 Host: recipes.test 703 Content-Type: application/xml 704 Content-Length: xxx 706 707 708 709 710 711 http://recipes.test 712 infinity 713 714 715 716 718 >> Response: 720 HTTP/1.1 207 Multistatus 721 Content-Type: application/xml 722 Content-Length: xxx 724 725 726 727 http://recipes.test 728 HTTP/1.1 200 OK 729 730 731 (See section "Query schema for DAV:basicsearch" for 732 the actual contents) 733 734 735 736 738 The query schema for DAV:basicsearch is defined in Section 5.19. 740 5 The DAV:basicsearch Grammar 742 5.1 Introduction 744 DAV:basicsearch uses an extensible XML syntax that allows clients to 745 express search requests that are generally useful for WebDAV 746 scenarios. DASL-extended servers MUST accept this grammar, and MAY 747 accept others grammars. 749 DAV:basicsearch has several components: 751 o DAV:select provides the result record definition. 753 o DAV:from defines the scope. 755 o DAV:where defines the criteria. 757 o DAV:orderby defines the sort order of the result set. 759 o DAV:limit provides constraints on the query as a whole. 761 5.2 The DAV:basicsearch DTD 763 765 767 768 770 771 772 773 774 776 779 780 782 784 786 787 789 790 792 793 795 796 798 799 801 803 804 805 807 809 810 813 815 817 818 820 5.2.1 Example Query 822 This query retrieves the content length values for all resources 823 located under the server's "/container1/" URI namespace whose length 824 exceeds 10000. 826 827 828 829 830 831 832 833 /container1/ 834 infinity 835 836 837 838 839 840 10000 841 842 843 844 845 846 847 848 849 850 852 5.3 DAV:select 854 DAV:select defines the result record, which is a set of properties 855 and values. This document defines two possible values: DAV:allprop 856 and DAV:prop, both defined in [RFC2518]and revised in [RFC3253]. 858 5.4 DAV:from 860 DAV:from defines the query scope. This contains exactly one DAV:scope 861 element. The scope element contains mandatory DAV:href and DAV:depth 862 elements. 864 DAV:href indicates the URI to use as a scope. 866 When the scope is a collection, if DAV:depth is "0", the search 867 includes only the collection. When it is "1", the search includes the 868 (toplevel) members of the collection. When it is "infinity", the 869 search includes all recursive members of the collection. 871 5.4.1 Relationship to the Request-URI 873 If the DAV:scope element is an absolute URI, the scope is exactly 874 that URI. 876 If the DAV:scope element is is an absolute URI reference, the scope 877 is taken to be relative to the request-URI. 879 5.4.2 Scope 881 A Scope can be an arbitrary URI. 883 Servers, of course, may support only particular scopes. This may 884 include limitations for particular schemes such as "http:" or "ftp:" 885 or certain URI namespaces. 887 If a scope is given that is not supported the server MUST respond 888 with a 400 status code that includes a Multistatus error. A scope in 889 the query appears as a resource in the response and must include an 890 appropriate status code indicating its validity with respect to the 891 search arbiter. 893 Example: 895 HTTP/1.1 400 Bad Request 896 Content-Type: text/xml; charset="utf-8" 897 Content-Length: xxx 899 900 901 902 http://www.example.com/scope1 903 HTTP/1.1 502 Bad Gateway 904 905 906 This example shows the response if there is a scope error. The 907 response provides a Multistatus with a status for the scope. In this 908 case, the scope cannot be reached because the server cannot search 909 another server (502). 911 5.5 DAV:where 913 DAV:where element defines the search condition for inclusion of 914 resources in the result set. The value of this element is an XML 915 element that defines a search operator that evaluates to one of the 916 Boolean truth values TRUE, FALSE, or UNKNOWN. The search operator 917 contained by DAV:where may itself contain and evaluate additional 918 search operators as operands, which in turn may contain and evaluate 919 additional search operators as operands, etc. recursively. 921 5.5.1 Use of Three-Valued Logic in Queries 923 Each operator defined for use in the where clause that returns a 924 Boolean value MUST evaluate to TRUE, FALSE, or UNKNOWN. The resource 925 under scan is included as a member of the result set if and only if 926 the search condition evaluates to TRUE. 928 Consult Section A for details on the application of three-valued 929 logic in query expressions. 931 5.5.2 Handling Optional operators 933 If a query contains an operator that is not supported by the server, 934 then the server MUST respond with a 422 (Unprocessable Entity) status 935 code. 937 5.5.3 Treatment of NULL Values 939 If a PROPFIND for a property value would yield a 404 or 403 response 940 for that property, then that property is considered NULL. 942 NULL values are "less than" all other values in comparisons. 944 Empty strings (zero length strings) are not NULL values. An empty 945 string is "less than" a string with length greater than zero. 947 The DAV:isdefined operator is defined to test if the value of a 948 property is NULL. 950 5.5.4 Treatment of properties with mixed/element content 952 Comparisons of properties that do not have simple types (text-only 953 content) is out-of-scope for DAV:basicsearch. For querying the 954 DAV:resourcetype property, see Section 5.11. 956 5.5.5 Example: Testing for Equality 958 The example shows a single operator (DAV:eq) applied in the criteria. 960 961 962 963 964 965 100 966 967 969 5.5.6 Example: Relative Comparisons 971 The example shows a more complex operation involving several 972 operators (DAV:and, DAV:eq, DAV:gt) applied in the criteria. This 973 DAV:where expression matches those resources that are "image/gifs" 974 over 4K in size. 976 977 978 979 980 981 982 image/gif 983 984 985 986 987 988 4096 989 990 991 993 5.6 DAV:orderby 995 The DAV:orderby element specifies the ordering of the result set. It 996 contains one or more DAV:order elements, each of which specifies a 997 comparison between two items in the result set. Informally, a 998 comparison specifies a test that determines whether one resource 999 appears before another in the result set. Comparisons are applied in 1000 the order they occur in the DAV:orderby element, earlier comparisons 1001 being more significant. 1003 The comparisons defined here use only a single property from each 1004 resource, compared using the same ordering as the DAV:lt operator 1005 (ascending) or DAV:gt operator (descending). If neither direction is 1006 specified, the default is DAV:ascending. 1008 In the context of the DAV:orderby element, null values are considered 1009 to collate before any actual (i.e., non null) value, including 1010 strings of zero length ( as in [SQL99]). 1012 5.6.1 Comparing Natural Language Strings. 1014 Comparisons on strings take into account the language defined for 1015 that property. Clients MAY specify the language using the xml:lang 1016 attribute. If no language is specified either by the client or 1017 defined for that property by the server or if a comparison is 1018 performed on strings of two different languages, the results are 1019 undefined. 1021 The "casesensitive" attribute may be used to indicate case- 1022 sensitivity for comparisons. Servers SHOULD do caseless matching as 1023 defined in [CaseMap]. 1025 5.6.2 Example of Sorting 1027 This sort orders first by last name of the author, and then by size, 1028 in descending order, so that the largest works appear first. 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1041 5.7 Boolean Operators: DAV:and, DAV:or, and DAV:not 1043 The DAV:and operator performs a logical AND operation on the 1044 expressions it contains. 1046 The DAV:or operator performs a logical OR operation on the values it 1047 contains. 1049 The DAV:not operator performs a logical NOT operation on the values 1050 it contains. 1052 5.8 DAV:eq 1054 The DAV:eq operator provides simple equality matching on property 1055 values. 1057 The "casesensitive" attribute may be used with this element. 1059 5.9 DAV:lt, DAV:lte, DAV:gt, DAV:gte 1061 The DAV:lt, DAV:lte, DAV:gt, and DAV:gte operators provide 1062 comparisons on property values, using less-than, less-than or equal, 1063 greater-than, and greater-than or equal respectively. The 1064 "casesensitive" attribute may be used with these elements. 1066 5.10 DAV:literal 1068 DAV:literal allows literal values to be placed in an expression. 1070 White space in literal values is significant in comparisons. For 1071 consistency with [RFC2518], clients SHOULD NOT specify the attribute 1072 "xml:space" (section 2.10 of [XML]) to override this behaviour. 1074 5.11 DAV:is-collection 1076 The DAV:is-collection operator allows clients to determine whether a 1077 resource is a collection (that is, whether it's DAV:resourcetype 1078 element contains the element DAV:collection). 1080 Rationale: This operator is provided in lieu of defining generic 1081 structure queries, which would suffice for this and for many more 1082 powerful queries, but seems inappropriate to standardize at this 1083 time. 1085 5.11.1 Example of DAV:is-collection 1087 This example shows a search criterion that picks out all and only the 1088 resources in the scope that are collections. 1090 1091 1092 1094 5.12 DAV:isdefined 1096 The DAV:isdefined operator allows clients to determine whether a 1097 property is defined on a resource. The meaning of "defined on a 1098 resource" is found in Section 5.5.3. 1100 Example: 1102 1103 1104 1106 5.13 DAV:like 1108 The DAV:like is an optional operator intended to give simple 1109 wildcard-based pattern matching ability to clients. 1111 The operator takes two arguments. 1113 The first argument is a DAV:prop element identifying a single 1114 property to evaluate. 1116 The second argument is a DAV:literal element that gives the pattern 1117 matching string. 1119 5.13.1 Syntax for the Literal Pattern 1121 Pattern := [wildcard] 0*( text [wildcard] ) 1122 wildcard := exactlyone | zeroormore 1123 text := 1*( | escapesequence ) 1124 exactlyone : = "?" 1125 zeroormore := "%" 1126 escapechar := "\" 1127 escapesequence := "\" ( exactlyone | zeroormore | escapechar ) 1128 character: see section 2.2 of [XML] 1130 The value for the literal is composed of wildcards separated by 1131 segments of text. Wildcards may begin or end the literal. Wildcards 1132 may not be adjacent. 1134 The "?" wildcard matches exactly one character. 1136 The "%" wildcard matches zero or more characters 1138 The " 1140 5.13.2 Example of DAV:like 1142 This example shows how a client might use DAV:like to identify those 1143 resources whose content type was a subtype of image. 1145 1146 1147 1148 image% 1149 1150 1152 5.14 DAV:contains 1154 The DAV:contains operator is an optional operator that provides 1155 content-based search capability. This operator implicitly searches 1156 against the text content of a resource, not against content of 1157 properties. The DAV:contains operator is intentionally not overly 1158 constrained, in order to allow the server to do the best job it can 1159 in performing the search. 1161 The DAV:contains operator evaluates to a Boolean value. It evaluates 1162 to TRUE if the content of the resource satisfies the search. 1163 Otherwise, It evaluates to FALSE. 1165 Within the DAV:contains XML element, the client provides a phrase: a 1166 single word or whitespace delimited sequence of words. Servers MAY 1167 ignore punctuation in a phrase. Case-sensitivity is left to the 1168 server. 1170 The following things may or may not be done as part of the search: 1171 Phonetic methods such as "soundex" may or may not be used. Word 1172 stemming may or may not be performed. Thesaurus expansion of words 1173 may or may not be done. Right or left truncation may or may not be 1174 performed. The search may be case insensitive or case sensitive. The 1175 word or words may or may not be interpreted as names. Multiple words 1176 may or may not be required to be adjacent or "near" each other. 1177 Multiple words may or may not be required to occur in the same order. 1178 Multiple words may or may not be treated as a phrase. The search may 1179 or may not be interpreted as a request to find documents "similar" to 1180 the string operand. 1182 The DAV:score property is intended to be useful to rank documents 1183 satisfying the DAV:contains operator. 1185 5.14.1 Examples 1187 The example below shows a search for the phrase "Peter Forsberg". 1189 Depending on its support for content-based searching, a server MAY 1190 treat this as a search for documents that contain the words "Peter" 1191 and "Forsberg". 1193 1194 Peter Forsberg 1195 1197 The example below shows a search for resources that contain "Peter" 1198 and "Forsberg". 1200 1201 1202 Peter 1203 Forsberg 1204 1205 1207 5.15 The DAV:limit XML Element 1209 1211 The DAV:limit XML element contains requested limits from the client 1212 to limit the size of the reply or amount of effort expended by the 1213 server. 1215 5.16 The DAV:nresults XML Element 1216 ;only digits 1218 The DAV:nresults XML element contains a requested maximum number of 1219 records to be returned in a reply. The server MAY disregard this 1220 limit. The value of this element is an integer. 1222 5.17 The "casesensitive" XML attribute 1224 The "casesensitive" attribute allows clients to specify case- 1225 sensitive or case-insensitive behavior for DAV:basicsearch operators. 1227 The possible values for "casesensitive" are "1" or "0". The "1" value 1228 indicates case-sensitivity. The "0" value indicates case- 1229 insensitivity. The default value is server-specified. Case- 1230 insensitivity SHOULD implemented using caseless matching as defined 1231 in [CaseMap]. 1233 Support for the "casesensitive" attribute is optional. A server 1234 should respond with a status of 422 if it is used but cannot be 1235 supported. 1237 5.18 The DAV:score Property 1239 1241 The DAV:score XML element is a synthetic property whose value is 1242 defined only in the context of a query result where the server 1243 computes a score, e.g. based on relevance. It may be used in 1244 DAV:select or DAV:orderby elements. Servers SHOULD support this 1245 property. The value is a string representing the score, an integer 1246 from zero to 10000 inclusive, where a higher value indicates a higher 1247 score (e.g. more relevant). 1249 Clients should note that, in general, it is not meaningful to compare 1250 the numeric values of scores from two different query results unless 1251 both were executed by the same underlying search system on the same 1252 collection of resources. 1254 5.19 Query schema for DAV:basicsearch 1256 The DAV:basicsearch grammar defines a search criteria that is a 1257 Boolean-valued expression, and allows for an arbitrary set of 1258 properties to be included in the result record. The result set may be 1259 sorted on a set of property values. Accordingly the DTD for schema 1260 discovery for this grammar allows the server to express: 1262 1. the set of properties that may be either searched, returned, or 1263 used to sort, and a hint about the data type of such properties 1265 2. the set of optional operators defined by the resource. 1267 5.19.1 DTD for DAV:basicsearch QSD 1269 1271 1272 1273 1276 1277 1278 1279 1281 The DAV:properties element holds a list of descriptions of 1282 properties. 1284 The DAV:operators element describes the optional operators that may 1285 be used in a DAV:where element. 1287 5.19.2 DAV:propdesc Element 1289 Each instance of a DAV:propdesc element describes the property or 1290 properties in the DAV:prop element it contains. All subsequent 1291 elements are descriptions that apply to those properties. All 1292 descriptions are optional and may appear in any order. Servers SHOULD 1293 support all the descriptions defined here, and MAY define others. 1295 DASL defines five descriptions. The first, DAV:datatype, provides a 1296 hint about the type of the property value, and may be useful to a 1297 user interface prompting for a value. The remaining four 1298 (DAV:searchable, DAV:selectable, DAV:sortable, and DAV:casesensitive) 1299 identify portions of the query (DAV:where, DAV:select, and 1300 DAV:orderby, respectively). If a property has a description for a 1301 section, then the server MUST allow the property to be used in that 1302 section. These descriptions are optional. If a property does not have 1303 such a description, or is not described at all, then the server MAY 1304 still allow the property to be used in the corresponding section. 1306 5.19.2.1 DAV:any-other-property 1308 This element can be used in place of DAV:prop to describe properties 1309 of WebDAV properties not mentioned in any other DAV:prop element. For 1310 instance, this can be used to indicate that all other properties are 1311 searchable and selectable without giving details about their types (a 1312 typical scenario for dead properties). 1314 5.19.3 The DAV:datatype Property Description 1316 The DAV:datatype element contains a single XML element that provides 1317 a hint about the domain of the property, which may be useful to a 1318 user interface prompting for a value to be used in a query. Datatypes 1319 are identified by an element name. Where appropriate, a server SHOULD 1320 use the simple datatypes defined in [XS2]. 1322 1324 Examples from [XS2], section 3: 1326 Qualified name Example 1328 xs:boolean true, false, 1, 0 1329 xs:string Foobar 1330 xs:dateTime 1994-11-05T08:15:5Z 1331 xs:float .314159265358979E+1 1332 xs:integer -259, 23 1334 If the data type of a property is not given, then the data type 1335 defaults to xs:string. 1337 5.19.4 The DAV:searchable Property Description 1339 1341 If this element is present, then the server MUST allow this property 1342 to appear within a DAV:where element where an operator allows a 1343 property. Allowing a search does not mean that the property is 1344 guaranteed to be defined on every resource in the scope, it only 1345 indicates the server's willingness to check. 1347 5.19.5 The DAV:selectable Property Description 1349 1351 This element indicates that the property may appear in the DAV:select 1352 element. 1354 5.19.6 The DAV:sortable Property Description 1356 This element indicates that the property may appear in the 1357 DAV:orderby element. 1359 1361 5.19.7 The DAV:casesensitive Property Description 1363 This element only applies to properties whose data type is 1364 "xs:string" and derived data types as per the DAV:datatype property 1365 description. Its presence indicates that compares performed for 1366 searches, and the comparisons for ordering results on the string 1367 property will be case sensitive. (The default is case insensitive.) 1369 1371 5.19.8 The DAV:operators XML Element 1373 The DAV:operators element describes every optional operator supported 1374 in a query. (Mandatory operators are not listed since they are 1375 mandatory and permit no variation in syntax.). All optional operators 1376 that are supported MUST be listed in the DAV:operators element. The 1377 listing for an operator consists of the operator (as an empty 1378 element), followed by one element for each operand. The operand MUST 1379 be either DAV:operand-property or DAV:operand-literal, which indicate 1380 that the operand in the corresponding position is a property or a 1381 literal value, respectively. If an operator is polymorphic (allows 1382 more than one operand syntax) then each permitted syntax MUST be 1383 listed separately. 1385 1386 1387 1388 1389 1391 5.19.9 Example of Query Schema for DAV:basicsearch 1393 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1421 This response lists four properties. The datatype of the last three 1422 properties is not given, so it defaults to xs:string. All are 1423 selectable, and the first three may be searched. All but the last may 1424 be used in a sort. Of the optional DAV operators, DAV:isdefined and 1425 DAV:like are supported. 1427 Note: The schema discovery defined here does not provide for 1428 discovery of supported values of the "casesensitive" attribute. This 1429 may require that the reply also list the mandatory operators. 1431 6 Internationalization Considerations 1433 Clients have the opportunity to tag properties when they are stored 1434 in a language. The server SHOULD read this language-tagging by 1435 examining the xml:lang attribute on any properties stored on a 1436 resource. 1438 The xml:lang attribute specifies a nationalized collation sequence 1439 when properties are compared. 1441 Comparisons when this attribute differs have undefined order. 1443 7 Security Considerations 1445 This section is provided to detail issues concerning security 1446 implications of which DASL applications need to be aware. All of the 1447 security considerations of HTTP/1.1 also apply to DASL. In addition, 1448 this section will include security risks inherent in searching and 1449 retrieval of resource properties and content. 1451 A query must not allow one to retrieve information about values or 1452 existence of properties that one could not obtain via PROPFIND. (e.g. 1453 by use in DAV:orderby, or in expressions on properties.) 1455 A server should prepare for denial of service attacks. For example a 1456 client may issue a query for which the result set is expensive to 1457 calculate or transmit because many resources match or must be 1458 evaluated. 7.1 Implications of XML External Entities 1460 XML supports a facility known as "external entities", defined in 1461 section 4.2.2 of [XML], which instruct an XML processor to retrieve 1462 and perform an inline include of XML located at a particular URI. An 1463 external XML entity can be used to append or modify the document type 1464 declaration (DTD) associated with an XML document. An external XML 1465 entity can also be used to include XML within the content of an XML 1466 document. For non-validating XML, such as the XML used in this 1467 specification, including an external XML entity is not required by 1468 [XML]. However, [XML] does state that an XML processor may, at its 1469 discretion, include the external XML entity. 1471 External XML entities have no inherent trustworthiness and are 1472 subject to all the attacks that are endemic to any HTTP GET request. 1473 Furthermore, it is possible for an external XML entity to modify the 1474 DTD, and hence affect the final form of an XML document, in the worst 1475 case significantly modifying its semantics, or exposing the XML 1476 processor to the security risks discussed in [RFC3023]. Therefore, 1477 implementers must be aware that external XML entities should be 1478 treated as untrustworthy. 1480 There is also the scalability risk that would accompany a widely 1481 deployed application which made use of external XML entities. In this 1482 situation, it is possible that there would be significant numbers of 1483 requests for one external XML entity, potentially overloading any 1484 server which fields requests for the resource containing the external 1485 XML entity. 1487 8 Scalability 1489 Query grammars are identified by URIs. Applications SHOULD not 1490 attempt to retrieve these URIs even if they appear to be retrievable 1491 (for example, those that begin with "http://") 1493 9 Authentication 1495 Authentication mechanisms defined in WebDAV will also apply to DASL. 1497 10 IANA Considerations 1499 This document uses the namespace defined by [RFC2518] for XML 1500 elements. All other IANA considerations mentioned in [RFC2518] are 1501 also applicable to DASL. 1503 11 Copyright 1505 To be supplied. 1507 12 Intellectual Property 1509 To be supplied. 1511 Normative References 1513 [ACL] Clemm, G., Hopkins, A., Sedlar, E. and Whitehead, J., 1514 "WebDAV Access Control Protocol", ID draft-ietf-webdav- 1515 acl-07, November 2001. 1517 [RFC2119] Bradner, S., "Key words for use in RFCs to Indicate 1518 Requirement Levels", BCP 14, RFC 2119, March 1997. 1520 [RFC2518] Goland, Y., Whitehead, E., Faizi, A., Carter, S.R. and 1521 Jensen, D., "HTTP Extensions for Distributed Authoring -- 1522 WEBDAV", RFC 2518, February 1999. 1524 [RFC2616] Fielding, R.T., Gettys, J., Mogul, J.C., Nielsen, H.F., 1525 Masinter, L., Leach, P.J. and Berners-Lee, T., "Hypertext 1526 Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. 1528 [RFC3023] Makoto, M., St.Laurent, S. and Kohn, D., "XML Media 1529 Types", RFC 3023, January 2001. 1531 [RFC3253] Clemm, G., Amsden, J., Ellison, T., Kaler, C. and 1532 Whitehead, J., "Versioning Extensions to WebDAV", RFC 1533 3253, March 2002. 1535 [XML] Bray, T., Paoli, J., Sperberg-McQueen, C.M. and Maler, E., 1536 "Extensible Markup Language (XML) 1.0 (2nd ed)", W3C REC- 1537 xml, October 2000. 1539 [XMLNS] Bray, T., Hollander, D. and Layman, A., "Namespaces in 1540 XML", W3C REC-xml-names, January 1999. 1542 [XS2] Biron, P. V., Malhotra, A. and World Wide Web Consortium, 1543 "XML Schema Part 2: Datatypes", W3C XS2, May 2001. 1545 Informative References 1547 [CaseMap] Davis, M., "Case Mappings", Unicode Techical Reports 21, 1548 February 2001. 1550 [DASL] Reddy, S., Lowry, D., Reddy, S., Henderson, R., Davis, J. 1551 and Babich, A., "DAV Searching & Locating", ID draft-dasl- 1552 protocol-00, July 1999. 1554 [DASLREQ] Davis, J., Reddy, S. and Slein, J., "Requirements for DAV 1555 Searching and Locating", ID draft-dasl-requirements-01, 1556 February 1999. 1558 [SQL99] Milton, J., "Database Language SQL Part 2: Foundation 1559 (SQL/Foundation)", ISO ISO/IEC 9075-2:1999 (E), July 1999. 1561 Author's Addresses 1563 Julian F. Reschke 1564 greenbytes GmbH 1565 Salzmannstrasse 152 1566 Muenster, NW 48159 1567 Germany 1569 Phone: +49 251 2807760 1570 Fax: +49 251 2807761 1571 EMail: julian.reschke@greenbytes.de 1572 URI: http://greenbytes.de/tech/webdav/ 1574 Surendra Reddy 1575 Oracle Corporation 1576 600 Oracle Parkway, M/S 6op3 1577 Redwoodshores, CA 94065 1579 Phone: +1 650 506 5441 1580 EMail: Surendra.Reddy@oracle.com 1582 Jim Davis 1583 Intelligent Markets 1584 410 Jessie Street 6th floor 1585 San Francisco, CA 94103 1587 EMail: jrd3@alum.mit.edu 1589 Alan Babich 1590 FileNET Corp. 1591 3565 Harbor Blvd. 1592 Costa Mesa, CA 92626 1594 Phone: +1 714 327 3403 1595 EMail: ababich@filenet.com 1597 A Three-Valued Logic in DAV:basicsearch 1599 ANSI standard three valued logic is used when evaluating the search 1600 condition (as defined in the ANSI standard SQL specifications, for 1601 example in ANSI X3.135-1992, section 8.12, pp. 188-189, section 8.2, 1602 p. 169, General Rule 1)a), etc.). 1604 ANSI standard three valued logic is undoubtedly the most widely 1605 practiced method of dealing with the issues of properties in the 1606 search condition not having a value (e.g., being null or not defined) 1607 for the resource under scan, and with undefined expressions in the 1608 search condition (e.g., division by zero, etc.). Three valued logic 1609 works as follows. 1611 Undefined expressions are expressions for which the value of the 1612 expression is not defined. Undefined expressions are a completely 1613 separate concept from the truth value UNKNOWN, which is, in fact, 1614 well defined. Property names and literal constants are considered 1615 expressions for purposes of this section. If a property in the 1616 current resource under scan has not been set to a value, then the 1617 value of that property is undefined for the resource under scan. DASL 1618 1.0 has no arithmetic division operator, but if it did, division by 1619 zero would be an undefined arithmetic expression. 1621 If any subpart of an arithmetic, string, or datetime subexpression is 1622 undefined, the whole arithmetic, string, or datetime subexpression is 1623 undefined. 1625 There are no manifest constants to explicitly represent undefined 1626 number, string, or datetime values. 1628 Since a Boolean value is ultimately returned by the search condition, 1629 arithmetic, string, and datetime expressions are always arguments to 1630 other operators. Examples of operators that convert arithmetic, 1631 string, and datetime expressions to Boolean values are the six 1632 relational operators ("greater than", "less than", "equals", etc.). 1633 If either or both operands of a relational operator have undefined 1634 values, then the relational operator evaluates to UNKNOWN. Otherwise, 1635 the relational operator evaluates to TRUE or FALSE, depending upon 1636 the outcome of the comparison. 1638 The Boolean operators DAV:and, DAV:or and DAV:not are evaluated 1639 according to the following rules: 1641 UNKNOWN and UNKNOWN = UNKNOWN 1643 UNKNOWN or UNKKNOWN = UNKNOWN 1644 not UNKNOWN = UNKNOWN 1646 UNKNOWN and TRUE = UNKNOWN 1648 UNKNOWN and FALSE = FALSE 1650 UNKNOWN and UNKNOWN = UNKNOWN 1652 UNKNOWN or TRUE = TRUE 1654 UNKNOWN or FALSE = UNKNOWN 1656 UNKNOWN or UNKNOWN = UNKNOWN 1658 B Change Log 1660 B.1 From draft-davis-dasl-protocol-xxx 1662 Feb 14, 1998 Initial Draft 1663 Feb 28, 1998 Referring to DASL as an extension to HTTP/1.1 1664 rather than DAV. 1665 Added new sections "Notational Conventions", 1666 "Protocol Model", "Security Considerations". 1667 Changed section 3 to "Elements of Protocol". 1668 Added some stuff to introduction. 1669 Added "result set" terminology. 1670 Added "IANA Considerations". 1671 Mar 9, 1998 Moved sub-headings of "Elements of Protocol" to 1672 first level and removed "Elements of Protocol" 1673 Heading. 1674 Added an sentence in introduction explaining that 1675 this is a "sketch" of a protocol. 1676 Mar 11, 1998 Added orderby, data typing, three valued logic, 1677 query schema property, and element definitions for 1678 schema for basicsearch. 1679 April 8, 1998 - made changes based on last week's DASL BOF. 1680 May 8, 1998 Removed most of DAV:searcherror; converted to 1681 DAV:searchredirect 1682 Altered DAV:basicsearch grammar to use avoid use 1683 of ANY in DTD 1684 June 17, 1998 -Added details on Query Schema Discovery 1685 -Shortened list of data types 1686 June 23, 1998 moved data types before change history 1687 rewrote the data types section 1688 removed the casesensitive element and replace with 1689 the casesensitive attribute 1690 added the casesensitive attribute to the DTD for 1691 all operations that might work on a string 1692 Jul 20, 1998 A series of changes. See Author's meeting minutes 1693 for details. 1694 July 28, 1998 Changes as per author's meeting. QSD uses SEARCH, 1695 not PROPFIND. 1696 Moved text around to keep concepts nearby. 1697 Boolean literals are 1 and 0, not T and F. 1698 contains changed to contentspassthrough. 1699 Renamed rank to score. 1700 July 28, 1998 Added Dale Lowry as Author 1701 September 4, 1998 Added 422 as response when query lists 1702 unimplemented operators. 1704 DAV:literal declares a default value for 1705 xml:space, 'preserve' (see XML spec, section 2.10) 1706 moved to new XML namespace syntax 1707 September 22, 1998 Changed "simplesearch" to "basicsearch" 1708 Changed isnull to isdefined 1709 Defined NULLness as having a 404 or 403 response 1710 used ENTITY syntax in DTD 1711 Added redirect 1712 October 9, 1998 Fixed a series of typographical and formatting 1713 errors. 1714 Modified the section of three-valued logic to use 1715 a table rather than a text description of the role 1716 of UNKNOWN in expressions. 1717 November 2, 1998 Added the DAV:contains operator. 1718 Removed the DAV:contentpassthrough operator. 1719 November 18, 1998 Various author comments for submission 1720 June 3, 1999 Cosmetic and minor editorial changes only. Fix 1721 nits reported by Jim Whitehead in email of April 1722 26, 1999. Converted to HTML from Word 97, 1723 manually. 1724 April 20, 2000 Removed redirection feature, since 301/302 1725 suffices. Removed Query Schema Discovery (former 1726 chapter 4). Everyone agrees this is a useful 1727 feature, but it is apparently too difficult to 1728 define at this time, and it is not essential for 1729 DASL. 1731 B.2 since start of draft-reschke-webdav-search 1733 October 09, 2001 Added Julian Reschke as author. 1734 Chapter about QSD re-added. 1735 Formatted into RFC2629-compliant XML document. 1736 Added first comments. 1737 ID version number kicked up to draft-dasl- 1738 protocol-03. 1739 October 17, 2001 Updated address information for Jim Davis. 1740 Added issue of datatype vocabularies. 1741 Updated issue descriptions for grammar discovery, 1742 added issues on query schema DTD. 1743 Fixed typos in XML examples. 1744 December 17, 2001 Re-introduced split between normative and non- 1745 normative references. 1747 January 05, 2002 Version bumbed up to 04. Started work on resolving 1748 the issues identified in the previous version. 1749 January 14, 2002 Fixed some XML typos. 1750 January 22, 2002 Closed issues naming-of-elements. Fixed query 1751 search DTD and added option to discover properties 1752 of "other" (non-listed) properties. 1753 January 25, 2002 Changed into private submission and added reference 1754 to historic DASL draft. Marked reference to DASL 1755 requirements non-normative. 1756 Updated reference to latest deltav spec. 1757 January 29, 2002 Added feedback from and updated contact info for 1758 Alan Babich. 1759 Included open issues collected in 1760 http://www.webdav.org/dasl/protocol/issues.html. 1761 February 8, 2002 Made sure that all artwork fits into 72 characters 1762 wide text. 1763 February 18, 2002 Changed Insufficient storage handling 1764 (multistatus). Moved is-collection to operators and 1765 added to DTD. Made scope/depth mandatory. 1766 February 20, 2002 Updated reference to SQL99. 1767 February 28, 2002 "Non-normative References" -> "Informative 1768 References". Abstract updated. Consistently specify 1769 a charset when using text/xml (no change bars). Do 1770 not attempt to define PROPFIND's entity encoding 1771 (take out specific references to text/xml). Remove 1772 irrelevant headers (Connection:) from examples (no 1773 change bars). Added issue on querying based on 1774 DAV:href. Updated introduction to indicate 1775 relationship to DASL draft. Updated HTTP reference 1776 from RFC2068 to RFC2616. Updated XML reference to 1777 XML 1.0 2nd edition. 1778 March 1, 2002 Removed superfluous namespace decl in 2.4.2. 1779 Reopened JW14 and suggest to drop xml:space 1780 support. 1781 March 3, 2002 Removed "xml:space" feature on DAV:literal. Added 1782 issue about string comparison vs. collations vs. 1783 xml:lang. Updated some of the open issues with 1784 details from JimW's original mail in April 1999. 1785 Resolved scope vs relative URI references. Resolved 1786 issues about DAV:ascending (added to index) and the 1787 BNF for DAV:like (changed "octets" to 1788 "characters"). 1789 March 8, 2002 Updated reference to DeltaV (now RFC3253). Added 1790 Martin Wallmer's comments, moved JW5 into 1791 DAV:basicsearch section. 1792 March 11, 2002 Closed open issues regaring the type of search 1793 arbiters (JW3) and their discovery (JW9). Rephrased 1794 requirements on multistatus response bodies 1795 (propstat only if properties were selected, removed 1796 requirement for responsedescription). 1797 March 23, 2002 RFC2376 -> RFC3023. Added missing first names of 1798 authors. OPTIONS added to example for 1799 DAV:supported-method-set. 1801 B.3 since draft-reschke-webdav-search-00 1803 March 29, 2002 Abstract doesn't refer to DASL WG anymore. 1804 April 7, 2002 Fixed section title (wrong property name supported- 1805 search-grammar-set. Changed DAV:casesensitve to 1806 "casesensitive" (it wasn't in the DAV: namespace after 1807 all). 1808 May 28, 2002 Updated some issues with Jim Davis's comments. 1809 June 10, 2002 Added proposal for different method for query schema 1810 discovery, not using pseudo-properties. 1811 June 25, 2002 QSD marshalling rewritten. Added issue "isdefined- 1812 optional". 1814 B.4 since draft-reschke-webdav-search-01 1816 July 04, 2002 Added issue "scope-collection". 1817 July 08, 2002 Closed issue "scope-collection". 1818 August 12, 2002 Added issues "results-vs-binds" and "select- 1819 allprop". 1820 October 22, 2002 Added issue "undefined-expressions". 1821 November 18, 2002 Changed example host names (no change tracking). 1822 November 25, 2002 Updated issue "DB2/DB7". Closed issues "undefined 1823 expressions", "isdefined-optional" and "select- 1824 allprop". 1826 Index 1828 D S 1830 DAV:ascending Scope 1831 XML element 5.6 Invalid 2.6 1833 DAV:descending SEARCH method 1834 XML element 5.6 2 1836 DAV:searchrequest 1837 XML element 2.3 1839 DAV:supported-query-grammar-set 1840 property 3.3 1842 O 1844 OPTIONS method 1845 3.1DASL response header 1846 3.2 1848 Q 1850 Query Grammar Discovery 1851 3using OPTIONS 3.1 1852 using live property 3.3 1854 R 1856 Result Set Truncation 1857 Example 2.4.3 1859 Full Copyright Statement 1861 Copyright (C) The Internet Society (2002). All Rights Reserved. 1863 This document and translations of it may be copied and furnished 1864 to others, and derivative works that comment on or otherwise 1865 explain it or assist in its implementation may be prepared, 1866 copied, published and distributed, in whole or in part, without 1867 restriction of any kind, provided that the above copyright notice 1868 and this paragraph are included on all such copies and derivative 1869 works. However, this document itself may not be modified in any 1870 way, such as by removing the copyright notice or references to the 1871 Internet Society or other Internet organizations, except as needed 1872 for the purpose of developing Internet standards in which case the 1873 procedures for copyrights defined in the Internet Standards 1874 process must be followed, or as required to translate it into 1875 languages other than English. 1877 The limited permissions granted above are perpetual and will not 1878 be revoked by the Internet Society or its successors or assigns. 1880 This document and the information contained herein is provided on 1881 an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET 1882 ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR 1883 IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF 1884 THE INFORMATION HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED 1885 WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. 1887 Acknowledgement 1889 Funding for the RFC editor function is currently provided by the 1890 Internet Society.