view Side-By-Side changes
Network Working Group J.F.Reschke,Editor Internet DraftEd. Internet-Draft greenbytes Expires:December 2003April 9, 2004 S. Reddy Oracle J. Davis Intelligent Markets A. Babich FilenetJuneOctober 10, 2003 WebDAV SEARCHdraft-reschke-webdav-search-04draft-reschke-webdav-search-05 Status of this Memo This document is an Internet-Draft and is in full conformance with all provisions of Section 10 of RFC2026. Internet-Drafts are working documents of the Internet Engineering Task Force (IETF), its areas, and its working groups. Note that other groups may also distribute working documents as Internet-Drafts. Internet-Drafts are draft documents valid for a maximum of six months and may be updated, replaced, or obsoleted by other documents at any time. It is inappropriate to use Internet-Drafts as reference material or to cite them other than as "work inprogress".progress." The list of current Internet-Drafts can be accessed athttp://www.ietf.org/ietf/1id-abstracts.txt.http:// www.ietf.org/ietf/1id-abstracts.txt. The list of Internet-Draft Shadow Directories can be accessed at http://www.ietf.org/shadow.html. This Internet-Draft will expirein December 2003.on April 9, 2004. Copyright Notice Copyright (C) The Internet Society (2003). All Rights Reserved. Abstract This document specifies a set of methods, headers, properties and content-types composing WebDAV SEARCH, an application of the HTTP/1.1Reschke, et al. Expires December 2003 [Page 1] Internet Draft WebDAV SEARCH June 2003protocol to efficiently search for DAV resources based upon a set of client-supplied criteria. Distribution of this document is unlimited. Please send comments to the Distributed Authoring and Versioning (WebDAV) DASL mailing list Reschke, et al. Expires April 9, 2004 [Page 1] Internet-Draft WebDAV SEARCH October 2003 atwww-webdav-dasl@w3.org,www-webdav-dasl@w3.org [1], which may be joined by sending a message with subject "subscribe" towww-webdav-dasl-request@w3.org.www-webdav-dasl-request@w3.org [2]. Discussions of the WebDAV DASL mailing list are archived at URL: http://www.w3.org/pub/WWW/Archives/Public/www-webdav-dasl/.Reschke, et al. Expires December 2003 [Page 2] Internet Draft WebDAV SEARCH June 2003 Table of Contents Abstract . . . . . . . . . . . . . . . . . . . . . . . . . . . 1Table of Contents. . . . . . . . . . . . . . . . . . . . . . 3 11. Introduction . . . . . . . . . . . . . . . . . . . . . . .. 65 1.1 DASL . . . . . . . . . . . . . . . . . . . . . . . . . .6. 5 1.2 Relationship to DAV . . . . . . . . . . . . . . . . . .6. 5 1.3 Terms . . . . . . . . . . . . . . . . . . . . . . . . .6. 5 1.4 Notational Conventions . . . . . . . . . . . . . . . . . . 7 1.5 Editorial note on usage of 'DAV:' namespace . . . . . . . 7 1.6 An Overview of DASL at Work . . . . . . . . . . . . . .7 2. 8 2. The SEARCH Method . . . . . . . . . . . . . . . . . . . .. 89 2.1 Overview . . . . . . . . . . . . . . . . . . . . . . . .8. 9 2.2 The Request . . . . . . . . . . . . . . . . . . . . . .8. 9 2.2.1 The Request-URI . . . . . . . . . . . . . . . . . .8. . . 9 2.2.2 The Request Body . . . . . . . . . . . . . . . . . .8 2.3 The DAV:searchrequest XML Element . . . . . . . .. . . 92.42.3 The Successful 207 (Multistatus) Response . . . . . . .9 2.4.1. 10 2.3.1 Extending the PROPFIND Response . . . . . . . . . .9 2.4.2. . . 10 2.3.2 Example: A Simple Request and Response . . . . . . . . . . 102.4.32.3.3 Example: Result Set Truncation . . . . . . . . . . .11 2.5 Unsuccessful Responses . . . . . . . . . . . . . . . . . 12 2.6 Invalid Scopes. . . 11 2.4 Unsuccessful Responses . . . . . . . . . . . . . . . . . .12 2.6.1 Indicating13 2.4.1 Example of an Invalid Scope . . . . . . . . . . . .12 2.6.2 Example of an Invalid Scope . . . . . . . . .. . . 1333. Discovery of Supported Query Grammars . . . . . . . . . ..14 3.1 The OPTIONS Method . . . . . . . . . . . . . . . . . . . . 14 3.2 The DASL Response Header . . . . . . . . . . . . . . . . . 14 3.3 DAV:supported-query-grammar-set (protected) . . . . . . . 15 3.4 Example: Grammar Discovery . . . . . . . . . . . . . . . . 1544. Query Schema Discovery: QSD . . . . . . . . . . . . . . ..18 4.1 Additional SEARCH semantics . . . . . . . . . . . . . . . 18 4.1.1 Example of query schema discovery . . . . . . . . . . . . 1955. The DAV:basicsearch Grammar . . . . . . . . . . . . . . ..21 5.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . 21 5.2 The DAV:basicsearch DTD . . . . . . . . . . . . . . . . . 21 5.2.1 Example Query . . . . . . . . . . . . . . . . . . . . . . 22 5.3 DAV:select . . . . . . . . . . . . . . . . . . . . . . . . 23 5.4 DAV:from . . . . . . . . . . . . . . . . . . . . . . . . . 23 5.4.1 Relationship to the Request-URI . . . . . . . . . . . . . 24 5.4.2 Scope . . . . . . . . . . . . . . . . . . . . . . .24. . . 24 5.5 DAV:where . . . . . . . . . . . . . . . . . . . . . . . . 24 5.5.1 Use of Three-Valued Logic in Queries . . . . . . . . . . . 24 5.5.2 Handling Optional operators . . . . . . . . . . . . . . . 24 5.5.3 Treatment of NULL Values . . . . . . . . . . . . . .25. . . 24 5.5.4 Treatment of properties with mixed/element content . . . . 25 5.5.5 Example: Testing for Equality . . . . . . . . . . . . . . 25 5.5.6 Example: Relative Comparisons . . . . . . . . . . .26. . . 25 Reschke, et al. Expires April 9, 2004 [Page 2] Internet-Draft WebDAV SEARCH October 2003 5.6 DAV:orderby . . . . . . . . . . . . . . . . . . . . . . . 26Reschke, et al. Expires December 2003 [Page 3] Internet Draft WebDAV SEARCH June 20035.6.1 Comparing Natural Language Strings . . . . . . . . .27. . . 26 5.6.2 Example of Sorting . . . . . . . . . . . . . . . . .27. . . 26 5.7 Boolean Operators: DAV:and, DAV:or, and DAV:not . . . . . 27 5.8 DAV:eq . . . . . . . . . . . . . . . . . . . . . . . . .28. 27 5.9 DAV:lt, DAV:lte, DAV:gt, DAV:gte . . . . . . . . . . . .28. 27 5.10 DAV:literal . . . . . . . . . . . . . . . . . . . . . .28. 27 5.11 DAV:typed-literal (optional) . . . . . . . . . . . . . . . 285.125.11.1 Example for typed numerical comparison . . . . . . . . . . 28 5.12 Support for matching xml:lang attributes on properties . . 29 5.12.1 DAV:language-defined (optional) . . . . . . . . . . . . . 29 5.12.2 DAV:language-matches (optional) . . . . . . . . . . . . . 29 5.12.3 Example of language-aware matching . . . . . . . . . . . . 29 5.13 DAV:is-collection . . . . . . . . . . . . . . . . . . . . 30 5.13.1 Example of DAV:is-collection . . . . . . . . . . . . . . . 30 5.14 DAV:is-defined . . . . . . . . . . . . . . . . . . . . . . 30 5.15 DAV:like . . . . . . . . . . . . . . . . . . . . . . .31. . 30 5.15.1 Syntax for the Literal Pattern . . . . . . . . . . . . . . 31 5.15.2 Example of DAV:like . . . . . . . . . . . . . . . . . . . 31 5.16 DAV:contains . . . . . . . . . . . . . . . . . . . . .32. . 31 5.16.1 Result scoring (DAV:score element) . . . . . . . . . . . . 32 5.16.2 Ordering by score . . . . . . . . . . . . . . . . .33. . . 32 5.16.3 Examples . . . . . . . . . . . . . . . . . . . . .33. . . . 32 5.17 Limiting the result set . . . . . . . . . . . . . . . .34. 33 5.17.1 Relationship to result ordering . . . . . . . . . .34. . . 33 5.18 The"caseless"'caseless' XML attribute . . . . . . . . . . . . .34. . 33 5.19 Query schema for DAV:basicsearch . . . . . . . . . . .35. . 34 5.19.1 DTD for DAV:basicsearch QSD . . . . . . . . . . . .35 5.19.2 DAV:propdesc Element . . . . .. . . 34 5.19.2 DAV:propdesc Element . . . . . . .35 5.19.2.1 DAV:any-other-property. . . . . . . . . . . .3634 5.19.3 The DAV:datatype Property Description . . . . . . .36. . . 35 5.19.4 The DAV:searchable Property Description . . . . . .37. . . 35 5.19.5 The DAV:selectable Property Description . . . . . .37. . . 36 5.19.6 The DAV:sortable Property Description . . . . . . .37. . . 36 5.19.7 The DAV:caseless Property Description . . . . . . .38. . . 36 5.19.8 The DAV:operators XML Element . . . . . . . . . . .38. . . 36 5.19.9 Example of Query Schema for DAV:basicsearch . . . .38 6. . . 37 6. Internationalization Considerations . . . . . . . . . . .. 40 738 7. Security Considerations . . . . . . . . . . . . . . . . . 39 7.1 Implications of XML External Entities .41 8 Scalability. . . . . . . . . 39 8. Scalability . . . . . . . . . . . . . . .42 9 Authentication. . . . . . . . 40 9. Authentication . . . . . . . . . . . . . . .43 10. . . . . . . 41 10. IANA Considerations . . . . . . . . . . . . . . . . . . . 42 11. Contributors .44 11 Copyright. . . . . . . . . . . . . . . . . . . . . . 43 12. Acknowledgements . . .45 12 Intellectual Property. . . . . . . . . . . . . . . . . . 44 Normative References .46 13 Acknowledgements. . . . . . . . . . . . . . . . . . 45 Informative References . . .47 Normative References. . . . . . . . . . . . . . . 46 Authors' Addresses . . . . . .48 Informative References. . . . . . . . . . . . . . 47 A. Three-Valued Logic in DAV:basicsearch . . . . . .48 Author's Addresses. . . . 48 Reschke, et al. Expires April 9, 2004 [Page 3] Internet-Draft WebDAV SEARCH October 2003 B. Change Log (to be removed by RFC Editor before publication) . . . . . . . . . . . . . . . . . .49 A Three-Valued Logic in DAV:basicsearch. . . . . 50 B.1 From draft-davis-dasl-protocol-xxx . . . . . .51 B Change Log. . . . . . 50 B.2 since start of draft-reschke-webdav-search . . . . . . . . 51 B.3 since draft-reschke-webdav-search-00 . . . . . . . . . . . 53B.1 From draft-davis-dasl-protocol-xxxB.4 since draft-reschke-webdav-search-01 . . . . . . . . . . . 53B.2B.5 sincestart of draft-reschke-webdav-searchdraft-reschke-webdav-search-02 . . . . . . . . . . . 54B.3B.6 sincedraft-reschke-webdav-search-00draft-reschke-webdav-search-03 . . . . . . . . . .56 Reschke, et al. Expires December 2003 [Page 4] Internet Draft WebDAV SEARCH June 2003 B.4. 54 B.7 sincedraft-reschke-webdav-search-01draft-reschke-webdav-search-04 . . . . . . . . . . . 55 C. Resolved issues (to be removed by RFC Editor before publication) . . . . . . . . . . . . . . . . . . . . . . . 56B.5 since draft-reschke-webdav-search-02C.1 1.3-import-condition-code-terminology . . . . . . . . . . 56B.6 since draft-reschke-webdav-search-03C.2 1.3-import-requirements-terminology . . . . . . . . . . . 56 C.3 1.3-import-DTD-terminology . . . . . . . . . . . . . . .57 Index. 56 C.4 invalid-scope . . . . . . . . . . . . . . . . . . . . . . 56 C.5 JW24d . . . . . . . . . . . . . . . . . . . . . . . . . . 57 C.6 scope-vs-versions . . . . . . . . . . . . . . . . . . . . 58Reschke, et al. Expires December 2003 [Page 5] Internet Draft WebDAV SEARCH June 2003 1 Introduction 1.1 DASL This documentC.7 DB2/DB7 . . . . . . . . . . . . . . . . . . . . . . . . . 58 D. Open issues (to be removed by RFC Editor before publication) . . . . . . . . . . . . . . . . . . . . . . . 61 D.1 1.3-apply-condition-code-terminology . . . . . . . . . . . 61 D.2 2.4-multiple-uris . . . . . . . . . . . . . . . . . . . . 61 D.3 result-truncation . . . . . . . . . . . . . . . . . . . . 61 D.4 qsd-optional . . . . . . . . . . . . . . . . . . . . . . . 62 D.5 5.1-name-filtering . . . . . . . . . . . . . . . . . . . . 62 D.6 5.4.2-multiple-scope . . . . . . . . . . . . . . . . . . . 63 D.7 5.4.2-scope-vs-redirects . . . . . . . . . . . . . . . . . 63 D.8 language-comparison . . . . . . . . . . . . . . . . . . . 63 D.9 JW16b/JW24a . . . . . . . . . . . . . . . . . . . . . . . 63 D.10 typed-literal . . . . . . . . . . . . . . . . . . . . . . 64 Index . . . . . . . . . . . . . . . . . . . . . . . . . . 65 Intellectual Property and Copyright Statements . . . . . . 67 Reschke, et al. Expires April 9, 2004 [Page 4] Internet-Draft WebDAV SEARCH October 2003 1. Introduction 1.1 DASL This document defines WebDAV SEARCH, an application of HTTP/1.1 forming a lightweight search protocol to transport queries and result sets and allows clients to make use of server-side search facilities. It is based on the expired draft for WebDAV DASL [DASL]. [DASLREQ] describes the motivation for DASL. DASL will minimize the complexity of clients so as to facilitate widespread deployment of applications capable of utilizing the DASL search mechanisms. DASL consists of: o the SEARCH method, o the DASL response header, o the DAV:searchrequest XML element, o the DAV:query-schema-discovery XML element, o the DAV:basicsearch XML element and query grammar, and o the DAV:basicsearchschema XML element. For WebDAV-compliant servers, it also defines a new live property DAV:supported-query-grammar-set. 1.2 Relationship to DAV DASL relies on the resource and property model defined by [RFC2518]. DASL does not alter this model. Instead, DASL allows clients to access DAV-modeled resources through server-side search. 1.3 Terms This document uses the terms defined in [RFC2616], in [RFC2518], in [RFC3253] and in this section. Criteria An expression against which each resource in the search scope is evaluated. Query Reschke, et al. Expires April 9, 2004 [Page 5] Internet-Draft WebDAV SEARCH October 2003 A query is a combination of a search scope, search criteria, result record definition, sort specification, and a search modifier. Query Grammar A set of definitions of XML elements, attributes, and constraints on their relations and values that defines a set of queries and the intended semantics. Query Schema A listing, for any given grammar and scope, of the properties and operators that may be used in a query with that grammar and scope. Result A result is a result set, optionally augmented with other information describing the search as a whole. Result Record A description of a resource. A result record is a set of properties, and possibly other descriptive information. Result Record Definition A specification of the set of properties to be returned in the result record. Result Set A set of records, one for each resource for which the search criteria evaluated to True. Scope A set of resources to be searched. Search Modifier An instruction that governs the execution of the query but is not part of the search scope, result record definition, the search criteria, or the sort specification. An example of a search modifier is one that controls how much time the server can spend on the query before giving a response. Sort Specification Reschke, et al. Expires April 9, 2004 [Page 6] Internet-Draft WebDAV SEARCH October 2003 A specification of an ordering on the result records in the result set. 1.4 Notational Conventions The augmented BNF used by this document to describe protocol elements is exactly the same as the one described in Section 2.1 of [RFC2616]. Because this augmented BNF uses the basic production rules provided in Section 2.2 of [RFC2616], those rules apply to this document as well. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT" "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this document are to be interpreted as described in [RFC2119]. This document uses XML DTD fragments as a purely notational convention. WebDAV request and response bodies can not be validated due to the specific extensibility rules defined in section 23 of [RFC2518] and due to the fact that all XML elements defined by this specification use the XML namespace name "DAV:". In particular: 1. element names use the "DAV:" namespace, 2. element ordering is irrelevant unless explicitly stated, 3. extension elements (elements not already defined as valid child elements) may be added anywhere, except when explicitly stated otherwise, 4. extension attributes (attributes not already defined as valid for this element) may be added anywhere, except when explicitly stated otherwise. When an XML element type in the "DAV:" namespace is referenced in this document outside of the context of an XML fragment, the string "DAV:" will be prefixed to the element type. Similarily, when an XML element type in the namespace "http:// www.w3.org/2001/XMLSchema" is referenced in this document outside of the context of an XML fragment, the string "xs:" will be prefixed to the element type. 1.5 Editorial note on usage of 'DAV:' namespace *Note that this draft currently defines elements and properties in the WebDAV namespace "DAV:" which it shouldn't do as it isn't a work item of the WebDAV working group. The reason for this is the desire Reschke, et al. Expires April 9, 2004 [Page 7] Internet-Draft WebDAV SEARCH October 2003 for some kind of backward compatibility to the expired DASL drafts and the assumption that the draft may become an official RFC submission of the WebDAV working group at a later point of time.* 1.6 An Overview of DASL at Work One can express the basic usage of DASL in the following steps: o The client constructs a query using the DAV:basicsearch grammar. o The client invokes the SEARCH method on a resource that will perform the search (the search arbiter) and includes a text/xml or application/xml request entity that contains the query. o The search arbiter performs the query. o The search arbiter sends the results of the query back to the client in the response. The server MUST send an entity that matches the [RFC2518] PROPFIND response. Reschke, et al. Expires April 9, 2004 [Page 8] Internet-Draft WebDAV SEARCH October 2003 2. The SEARCH Method 2.1 Overview The client invokes the SEARCH method to initiate a server-side search. The body of the request defines the query. The server MUST emit an entity matching the [RFC2518] PROPFIND response. The SEARCH method plays the role of transport mechanism for the query and the result set. It does not define the semantics of the query. The type of the query defines the semantics. 2.2 The Request The client invokes the SEARCH method on the resource named by the Request-URI. 2.2.1 The Request-URI The Request-URI identifies the search arbiter. Any HTTP resource may function as search arbiter. It is not a new type of resource (in the sense of DAV:resourcetype as defined in [RFC2518]), nor does it have to be a WebDAV-compliant resource. The SEARCH method defines no relationship between the arbiter and the scope of the search, rather the particular query grammar used in the query defines the relationship. For example, a query grammar may force the request-URI to correspond exactly to the search scope. 2.2.2 The Request Body The server MUST process a text/xml or application/xml request body, and MAY process request bodies in other formats. See [RFC3023] for guidance on packaging XML in requests. Marshalling: If a request body with content type text/xml or application/xml is included, it MUST be either a DAV:searchrequest or a DAV:query-schema-discovery XML element. It's single child element identifies the query grammar. For DAV:searchrequest, the definition of search criteria, the result record, and any other details needed to perform the search depend on the individual search grammar. For DAV:query-schema-discovery, the semantics is defined in Section 4. Reschke, et al. Expires April 9, 2004 [Page 9] Internet-Draft WebDAVSEARCH,SEARCH October 2003 Preconditions: (DAV:search-grammar-discovery-supported): when anapplication of HTTP/1.1 formingXML request body is present and has alightweightDAV:query-schema-discovery document element, the server MUST support the query schema discovery mechanism described in Section 4. (DAV:search-grammar-supported): when an XML request body is present, the searchprotocolgrammar identified by the document element's child element must be a supported search grammar. (DAV:search-scope-valid): the supplied search scope must be valid. There can be various reasons for a search scope totransport queries and result setsbe invalid, including unsupported URI schemes andallows clientscommunication problems. Servers MAY add [RFC2518] compliant DAV:response elements as content tomake use of server-sidethe condition element indicating the precise reason for the failure. 2.3 The Successful 207 (Multistatus) Response If the server returns 207 (Multistatus), then the searchfacilities. It is based onproceeded successfully and theexpired draftresponse MUST match that of a PROPFIND. The results of this method SHOULD NOT be cached. There MUST be one DAV:response forWebDAV DASL [DASL]. [DASLREQ] describeseach resource that matched themotivationsearch criteria. For each such response, the DAV:href element contains the URI of the resource, and the response MUST include a DAV:propstat element. Note that forDASL. DASL will minimizeeach matching resource found there may be multiple URIs within thecomplexitysearch scope mapped to it. In this case, a server SHOULD report all ofclientsthese URIs. Clients can use the live property DAV:resource-id defined in [BIND] to identify possible duplicates. 2.3.1 Extending the PROPFIND Response A response MAY include more information than PROPFIND defines so long asto facilitate widespread deployment of applications capable of utilizingtheDASL search mechanisms. DASL consists of: oextra information does not invalidate theSEARCH method, oPROPFIND response. Query grammars SHOULD define how theDASLresponseheader, omatches theDAV:searchrequestPROPFIND response. 2.3.2 Example: A Simple Request and Response This example demonstrates the request and response framework. The following XMLelement, odocument shows a simple (hypothetical) natural language query. The name of theDAV:queryschema property, oquery element is natural-language-query in theDAV:basicsearchXMLelement andnamespace "http://example.com/foo". The actual querygrammar, and ois "Find theDAV:basicsearchschema XML element.Reschke, et al. Expires April 9, 2004 [Page 10] Internet-Draft WebDAV SEARCH October 2003 locations of good Thai restaurants in Los Angeles". ForWebDAV-compliant servers, it also definesthis hypothetical query, the arbiter returns two properties for each selected resource. >> Request: SEARCH / HTTP/1.1 Host: example.org Content-Type: application/xml Content-Length: xxx <?xml version="1.0" encoding="UTF-8"?> <D:searchrequest xmlns:D="DAV:" xmlns:F="http://example.com/foo"> <F:natural-language-query> Find the locations of good Thai restaurants in Los Angeles </F:natural-language-query> </D:searchrequest> >> Response: HTTP/1.1 207 Multi-Status Content-Type: text/xml; charset="utf-8" Content-Length: xxx <?xml version="1.0" encoding="UTF-8"?> <D:multistatus xmlns:D="DAV:" xmlns:R="http://example.org/propschema"> <D:response> <D:href>http://siamiam.test/</D:href> <D:propstat> <D:prop> <R:location>259 W. Hollywood</R:location> <R:rating><R:stars>4</R:stars></R:rating> </D:prop> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> </D:multistatus> 2.3.3 Example: Result Set Truncation A server MAY limit the number of resources in anew live property DAV:supported-query-grammar-set. 1.2 Relationshipreply, for example toDAV DASL relies onlimit theresource and property model defined by [RFC2518]. DASL does not alter this model. Instead, DASL allows clients to access DAV-modeledamount of resourcesthrough server-side search. 1.3 Terms This draft usesexpended in processing a query. If it does so, the reply MUST use status code 207, return a DAV:multistatus response body and indicate a status of 507 (Insufficient Storage) for theterms defined in [RFC2616], [RFC2518], and [DASLREQ].search arbiter URI. It SHOULD include the partial results. Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page6] Internet Draft11] Internet-Draft WebDAV SEARCHJuneOctober 20031.4 Notational Conventions The augmented BNF used by this document to describe protocol elementsWhen a result set isexactlytruncated, there may be many more resources that satisfy thesame assearch criteria but that were not examined. If partial results are included and theone describedclient requested an ordered result set inSection 2.1 of [RFC2616]. Because this augmented BNF usesthebasic production rules provided in Section 2.2 of [RFC2616], those rules apply to this document as well. The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT" "SHOULD", "SHOULD NOT", "RECOMMENDED", "MAY", and "OPTIONAL" in this documentoriginal request, then any partial results that aretoreturned MUST beinterpretedordered asdescribed in [RFC2119]. When an XML element type in the "DAV:" namespace is referenced in this document outside ofthecontext of an XML fragment,client directed. Note that thestring "DAV:" willpartial results returned MAY beprefixed toany subset of theelement type. Noteresult set thatthis draft currently defines elements and properties inwould have satisfied the original query. >> Request: SEARCH / HTTP/1.1 Host: example.net Content-Type: text/xml; charset="utf-8" Content-Length: xxx ... the query goes here ... >> Response: HTTP/1.1 207 Multistatus Content-Type: text/xml; charset="utf-8" Content-Length: xxx <?xml version="1.0" encoding="utf-8"?> <D:multistatus xmlns:D="DAV:"> <D:response> <D:href>http://www.example.net/sounds/unbrokenchain.au</D:href> <D:propstat> <D:prop/> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> <D:response> <D:href>http://tech.mit.test/archive96/photos/Lesh1.jpg</D:href> <D:propstat> <D:prop/> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> <D:response> <D:href>http://example.net</D:href> <D:status>HTTP/1.1 507 Insufficient Storage</D:status> <D:responsedescription xml:lang="en"> Only first two matching records were returned </D:responsedescription> </D:response> Reschke, et al. Expires April 9, 2004 [Page 12] Internet-Draft WebDAVnamespace "DAV:", which it shouldn't do as it isn'tSEARCH October 2003 </D:multistatus> 2.4 Unsuccessful Responses If awork item of the WebDAV working group. The reason for this isSEARCH request could not be executed or thedesire for some kind of backward compatibilityattempt to execute it resulted in an error, theexpired DASL drafts and the assumption thatserver MUST indicate thedraft may becomefailure with anofficial RFC submission of the WebDAV working group atappropriate status code and SHOULD add alater point of time. Similarily, when an XML element typeresponse body as defined in [RFC3253], section 1.6. Unless otherwise stated, condition elements are empty, however specific conditions element MAY include additional child elements that describe thenamespace "http://www.w3.org/2001/XMLSchema" is referencederror condition inthis document outside of the contextmore detail. 2.4.1 Example of anXML fragment, the string "xs:" will be prefixed to the element type. 1.5 An Overview of DASL at Work One can express the basic usage of DASL inInvalid Scope In thefollowing steps: o The client constructsexample below, aquery using the DAV:basicsearch grammar. o The client invokesrequest failed because theSEARCH method onscope identifies a HTTP resource thatwill perform the search (the search arbiter) and includes a text/xml or application/xml request entity that containswas not found. >> Response: HTTP/1.1 409 Conflict Content-Type: text/xml; charset="utf-8" Content-Length: xxx <?xml version="1.0" encoding="UTF-8"?> <d:error xmlns:d="DAV:"> <d:search-scope-valid> <d:response> <d:href>http://www.example.com/X</d:href> <d:status>HTTP/1.1 404 Object Not Found</d:status> </d:response> </d:search-scope-valid> </d:error> Reschke, et al. Expires April 9, 2004 [Page 13] Internet-Draft WebDAV SEARCH October 2003 3. Discovery of Supported Query Grammars Servers MUST support discovery of thequery. o Thequery grammars supported by a search arbiterperforms the query. o The searchresource. Clients can determine which query grammars are supported by an arbitersendsby invoking OPTIONS on theresults ofsearch arbiter. If thequery back toresource supports SEARCH, then theclientDASL response header will appear in the response. Theserver MUST send an entity that matchesDASL response header lists the supported grammars. Servers supporting the[RFC2518] PROPFIND response. Reschke, et al. Expires December 2003 [Page 7] Internet DraftWebDAV extensions [RFC3253] and/or [ACL] MUST also o report SEARCHJune 2003 2in the live property DAV:supported-method-set for all search arbiter resources and o support the live property DAV:supported-query-grammar-set as defined in Section 3.3. 3.1 TheSEARCHOPTIONS Method2.1 OverviewTheclient invokes the SEARCHOPTIONS method allows the client toinitiatediscover if aserver-side search. The body of the request defines the query. The server MUST emit an entity matchingresource supports the[RFC2518] PROPFIND response. TheSEARCH methodplays the role of transport mechanism for the queryand to determine theresult set. It does not define the semantics of the query. The typelist ofthe query defines the semantics. 2.2 The Requestsearch grammars supported for that resource. The clientinvokesissues theSEARCHOPTIONS methodon theagainst a resource named by the Request-URI.2.2.1 The Request-URI The Request-URI identifies the search arbiter. Any HTTP resource may function as search arbiter. ItThis isnotanew type of resource (in the sensenormal invocation ofDAV:resourcetype asOPTIONS defined in[RFC2518]), nor does it have to be[RFC2616]. If aWebDAV-compliant resource. The SEARCH method defines no relationship between the arbiter and the scope of the search, ratherresource supports theparticular query grammar used inSEARCH method, then thequery definesserver MUST list SEARCH in therelationship. For example,OPTIONS response as defined by [RFC2616]. DASL servers MUST include theFOO query grammar may forceDASL header in therequest-URI to correspond exactly toOPTIONS response. This header identifies the searchscope. 2.2.2grammars supported by that resource. 3.2 TheRequest BodyDASL Response Header DASLHeader = "DASL" ":" Coded-URL-List Coded-URL-List : Coded-URL [ "," Coded-URL-List ] Coded-URL ; defined in section 9.4 of [RFC2518] The DASL response header indicates serverMUST process a text/xml or application/xml request body, and MAY process request bodies in other formats. See [RFC3023]support forguidance on packaging XMLa query grammar inrequests. Iftheclient sendsOPTIONS method. The value is atext/xml or application/xml body, it MUST includeURI that indicates theDAV:searchrequest XML element. The DAV:searchrequest XML element identifiestype of grammar. Note that although thequeryURI can be used to identify each supported search grammar,defines the criteria,there is not necessarily a direct relationship between theresult record,URI andany other details needed to performthesearch.XML element name that can be Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page8] Internet Draft14] Internet-Draft WebDAV SEARCHJuneOctober 20032.3 The DAV:searchrequestused in XMLElementbased SEARCH requests (the element name itself is identified by it's namespace name (a URI reference) and the element's local name). This header MAY be repeated. For example: DASL: <http://foobar.test/syntax1> DASL: <http://akuma.test/syntax2> DASL: <DAV:basicsearch> DASL: <http://example.com/foo/natural-language-query> 3.3 DAV:supported-query-grammar-set (protected) This WebDAV property is required for any server supporting either [RFC3253] and/or [ACL] and identifies the XML based query grammars that are supported by the search arbiter resource. <!ELEMENT supported-query-grammar-set (supported-query-grammar*)> <!ELEMENT supported-query-grammar grammar> <!ELEMENTsearchrequestgrammar ANY> ANY> The DAV:searchrequest XML element containsvalue: asingle XML element that defines the query. The name of thequery grammar elementdefines thetypeof the query. The value of3.4 Example: Grammar Discovery This example shows thatelement defines the query itself. 2.4 The Successful 207 (Multistatus) Response Ifthe serverreturns 207 (Multistatus), then thesupports searchproceeded successfully andon theresponse MUST match that of a PROPFIND. The results of this method SHOULD NOT be cached. There MUST be one DAV:response for each/somefolder resourcethat matched the search criteria. For each such response, the DAV:href element contains the URI ofwith theresource,query grammars: DAV:basicsearch, http:// foobar.test/syntax1 andthe response MUST include a DAV:propstat element.http://akuma.test/syntax2. Note thatfor each matching resource found there may be multiple URIs within the search scope mapped to it. In this case, a server SHOULD report all of these URIs. Clients can use the live property DAV:resource-id defined in [BIND] to identify possible duplicates. In addition, theevery serverMAY include DAV:response items in the reply where the DAV:href element contains a URI that is not a matching resource, e.g. that of a scope or the query arbiter. Each such response item MUST NOT contain a DAV:propstat element, andMUSTcontain a DAV:status element (unless no property was selected). 2.4.1 Extending the PROPFIND Response A response MAY include more information than PROPFIND defines so long as the extra information does not invalidate the PROPFIND response. Query grammars SHOULD define how the response matchessupport DAV:basicsearch. >> Request: OPTIONS /somefolder HTTP/1.1 Host: example.org >> Response: HTTP/1.1 200 OK Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE Allow: MKCOL, PROPFIND, PROPPATCH, LOCK, UNLOCK, SEARCH DASL: <DAV:basicsearch> DASL: <http://foobar.test/syntax1> DASL: <http://akuma.test/syntax2> This example shows thePROPFIND response.equivalent taking advantage of a server's Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page9] Internet Draft15] Internet-Draft WebDAV SEARCHJuneOctober 20032.4.2 Example: A Simple Request and Response This example demonstrates the request and response framework. The following XML document shows a simple (hypothetical) natural language query. The name of the query element is natural-language-query in the XML namespace "http://example.com/foo". The actual query is "Find the locations of good Thai restaurants in Los Angeles". For this hypothetical query, the arbiter returns two propertiessupport foreach selected resource.DAV:supported-method-set and DAV:supported-query-grammar-set. >> Request:SEARCH /PROPFIND /somefolder HTTP/1.1 Host: example.org Depth: 0 Content-Type:application/xmltext/xml; charset="utf-8" Content-Length: xxx <?xml version="1.0"encoding="UTF-8"?> <D:searchrequest xmlns:D="DAV:" xmlns:F="http://example.com/foo"> <F:natural-language-query> Findencoding="UTF-8" ?> <propfind xmlns="DAV:"> <prop> <supported-query-grammar-set/> <supported-method-set/> </prop> </propfind> >> Response: HTTP/1.1 207 Multi-Status Content-Type: text/xml; charset="utf-8" Content-Length: xxx <?xml version="1.0" encoding="utf-8" ?> <multistatus xmlns="DAV:"> <response> <href>http://example.org/somefolder</href> <propstat> <prop> <supported-query-grammar-set> <supported-query-grammar> <grammar><basicsearch/></grammar> </supported-query-grammar> <supported-query-grammar> <grammar><syntax1 xmlns="http://foobar.test" /></grammar> </supported-query-grammar> <supported-query-grammar> <grammar><syntax2 xmlns="http://akuma.test/"/></grammar> </supported-query-grammar> </supported-query-grammar-set> <supported-method-set> <supported-method name="COPY" /> <supported-method name="DELETE" /> <supported-method name="GET" /> <supported-method name="HEAD" /> <supported-method name="LOCK" /> Reschke, et al. Expires April 9, 2004 [Page 16] Internet-Draft WebDAV SEARCH October 2003 <supported-method name="MKCOL" /> <supported-method name="MOVE" /> <supported-method name="OPTIONS" /> <supported-method name="POST" /> <supported-method name="PROPFIND" /> <supported-method name="PROPPATCH" /> <supported-method name="PUT" /> <supported-method name="SEARCH" /> <supported-method name="TRACE" /> <supported-method name="UNLOCK" /> </supported-method-set> </prop> <status>HTTP/1.1 200 OK</status> </propstat> </response> </multistatus> Note that thelocationsquery grammar element names marshalled as part ofgood Thai restaurantsthe DAV:supported-query-grammar-set can be directly used as element names inLos Angeles </F:natural-language-query> </D:searchrequest> >> Response: HTTP/1.1 207 Multi-Status Content-Type: text/xml; charset="utf-8" Content-Length: xxx <?xml version="1.0" encoding="UTF-8"?> <D:multistatus xmlns:D="DAV:" xmlns:R="http://example.org/propschema"> <D:response> <D:href>http://siamiam.test/</D:href> <D:propstat> <D:prop> <R:location>259 W. Hollywood</R:location> <R:rating><R:stars>4</R:stars></R:rating> </D:prop> </D:propstat> </D:response> </D:multistatus>an XML based query. Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page10] Internet Draft17] Internet-Draft WebDAV SEARCHJuneOctober 20032.4.3 Example: Result Set Truncation A server4. Query Schema Discovery: QSD Servers MAYlimitsupport thenumberdiscovery ofresources inthe schema for areply,query grammar. The DASL response header and the DAV:supported-query-grammar-set property provide means forexampleclients tolimitdiscover theamountset ofresources expended in processingquery grammars supported by a resource. This alone is not sufficient information for a client to generate a query.If itFor example, the DAV:basicsearch grammar defines a set of queries consisting of a set of operators applied to a set of properties and values, but the grammar itself doesso,not specify which properties may be used in thereply MUST use status code 207, returnquery. QSD for the DAV:basicsearch grammar allows aDAV:multistatus response bodyclient to discover the set of properties that are searchable, selectable, andindicatesortable. Moreover, although the DAV:basicsearch grammar defines astatusminimal set of507 (Insufficient Storage)operators, it is possible that a resource might support additional operators in a query. For example, a resource might support a optional operator that can be used to express content-based queries in a proprietary syntax. QSD allows a client to discover these operators and their syntax. The set of discoverable quantities will differ from grammar to grammar, but each grammar can define a means forthe search arbiter URI. It SHOULD include the partial results. Whenaresult set is truncated, there mayclient to discover what can bemany more resources that satisfydiscovered. In general, thesearch criteria but that were not examined. If partial results are includedschema for a given query grammar depends on both the resource (the arbiter) and theclient requested an ordered resultscope. A given resource might have access to one setin the original request, then any partial results that are returned MUST be ordered as the client directed. Note that the partial results returned MAY be any subsetofthe resultproperties for one potential scope, and another setthat would have satisfiedfor a different scope. For example, consider a server able to search two distinct collections, one holding cooking recipes, theoriginal query. >> Request: SEARCH / HTTP/1.1 Host: example.net Content-Type: text/xml; charset="utf-8" Content-Length: xxx ...other design documents for nuclear weapons. While both collections might support properties such as author, title, and date, thequery goes here ... >> Response: HTTP/1.1 207 Multistatus Content-Type: text/xml; charset="utf-8" Content-Length: xxx <?xml version="1.0" encoding="utf-8"?> <D:multistatus xmlns:D="DAV:"> <D:response> <D:href>http://www.example.net/sounds/unbrokenchain.au</D:href> <D:propstat> <D:prop/> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> <D:response> <D:href>http://tech.mit.test/archive96/photos/Lesh1.jpg</D:href> Reschke, et al. Expires December 2003 [Page 11] Internet Draft WebDAV SEARCH June 2003 <D:propstat> <D:prop/> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> <D:response> <D:href>http://example.net</D:href> <D:status>HTTP/1.1 507 Insufficient Storage</D:status> <D:responsedescription xml:lang="en"> Onlyfirsttwo matching records were returned </D:responsedescription> </D:response> </D:multistatus> 2.5 Unsuccessful Responses If an error occurred that prevented execution ofmight also define properties such as calories and preparation time, while the second defined properties such as yield and applicable patents. Two distinct arbiters indexing thequery,same collection might also have access to different properties. For example, the recipe collection mentioned above might also indexed by a value-added serverMUST indicatethat also stored thefailure withnames of chefs who had tested theappropriate status code and SHOULD include a DAV:multistatus element to point out errors associated with scopes. 400 Bad Request. Therecipe. Note also that the available querycouldschema might also depend on other factors, such as the identity of the principal conducting the search, but these factors are notbe executed. The request may be malformed (not valid XML for example). Additionally,exposed in thiscan be usedprotocol. 4.1 Additional SEARCH semantics Each query grammar supported by DASL defines its own syntax forinvalid scopes and search redirections. 422 Unprocessable entity. Theexpressing the possible querycould not be executed. Ifschema. A client retrieves the schema for aapplication/xml or text/xml request entity was provided, then it may have been well-formed but may have contained an unsupported or unimplementedgiven queryoperator. 2.6 Invalid Scopes 2.6.1 Indicatinggrammar on anInvalid Scope A client may submitarbiter resource with a given scopethatby invoking the SEARCH method on that arbitermay be unable to query. The inability to query may be due to network failure, administrative policy, security, etc. This raises the condition described as an "invalid scope". To indicate an invalid scope, the server MUST respondwith that grammar and scope and with a400 (Bad Request).root element of DAV:query-schema-discovery rather than DAV:searchrequest. Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page12] Internet Draft18] Internet-Draft WebDAV SEARCHJuneOctober 2003 Marshalling: Theresponse includesrequest body MUST be DAV:query-schema-discovery element. <!ELEMENT query-schema-discovery ANY> ANY value: XML element defining a valid query The response bodywithtakes the form of a RFC2518 DAV:multistatuselement. Eachelement, where DAV:responseinis extended to hold theDAV:multistatus identifiesreturned query grammar inside ascope. To indicate thatDAV:query-schema container element. <!ELEMENT response (href, ((href*, status)|(propstat+)), query-schema?, responsedescription?) > <!ELEMENT query-schema ANY> The content of thisscopecontainer is an XML element whose name and syntax depend upon the grammar, and whose value may (and likely will) vary depending upon thesourcegrammar, arbiter, and scope. 4.1.1 Example of query schema discovery In this example, theerror,arbiter is recipes.test, theserver MUST includegrammar is DAV:basicsearch, theDAV:scopeerror element. 2.6.2 Example of an Invalid Scopescope is also recipes.test. >>Response:Request: SEARCH / HTTP/1.1400 Bad-RequestHost: recipes.test Content-Type:text/xml; charset="utf-8"application/xml Content-Length: xxx <?xmlversion="1.0" encoding="UTF-8"?> <d:multistatus xmlns:d="DAV:"> <d:response> <d:href>http://www.example.com/X</d:href> <d:status>HTTP/1.1 404 Object Not Found</d:status> <d:scopeerror/> </d:response> </d:multistatus>version="1.0"?> <query-schema-discovery xmlns="DAV:"> <basicsearch> <from> <scope> <href>http://recipes.test</href> <depth>infinity</depth> </scope> </from> </basicsearch> </query-schema-discovery> >> Response: HTTP/1.1 207 Multistatus Content-Type: application/xml Content-Length: xxx Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page13] Internet Draft19] Internet-Draft WebDAV SEARCHJuneOctober 20033 Discovery of Supported Query Grammars Servers MUST support discovery of<?xml version="1.0"?> <multistatus xmlns="DAV:"> <response> <href>http://recipes.test</href> <status>HTTP/1.1 200 OK</status> <query-schema> <basicsearchschema> <!-- (See section "Query schema for DAV:basicsearch" for the actual contents) --> </basicsearchschema> </query-schema> </response> </multistatus> The querygrammars supported by aschema for DAV:basicsearch is defined in Section 5.19. Reschke, et al. Expires April 9, 2004 [Page 20] Internet-Draft WebDAV SEARCH October 2003 5. The DAV:basicsearch Grammar 5.1 Introduction DAV:basicsearch uses an extensible XML syntax that allows clients to express searcharbiter resource. Clients can determine which query grammarsrequests that aresupported by an arbiter by invoking OPTIONS ongenerally useful for WebDAV scenarios. DASL-extended servers MUST accept this grammar, and MAY accept other grammars. DAV:basicsearch has several components: o DAV:select provides thesearch arbiter. Ifresult record definition. o DAV:from defines theresource supports SEARCH, thenscope. o DAV:where defines theDASL response header will appear incriteria. o DAV:orderby defines theresponse. The DASL response header listssort order of thesupported grammars. Servers supportingresult set. o DAV:limit provides constraints on the query as a whole. 5.2 The DAV:basicsearch DTD <!ELEMENT basicsearch (select, from, where?, orderby?, limit?) > <!ELEMENT select (allprop | prop) > <!ELEMENT from (scope) > <!ELEMENT scope (href, depth) > <!ENTITY %comp_ops "eq | lt | gt| lte | gte"> <!ENTITY %log_ops "and | or | not"> <!ENTITY %special_ops "is-collection | is-defined"> <!ENTITY %string_ops "like"> <!ENTITY %content_ops "contains"> <!ENTITY %all_ops "%comp_ops; | %log_ops; | %special_ops; | %string_ops; | %content_ops;"> <!ELEMENT where ( %all_ops; ) > <!ELEMENT and ( ( %all_ops; ) +) > <!ELEMENT or ( ( %all_ops; ) +) > <!ELEMENT not ( %all_ops; ) > Reschke, et al. Expires April 9, 2004 [Page 21] Internet-Draft WebDAVextensions [RFC3253] and/or [ACL] MUST also o reportSEARCHinOctober 2003 <!ELEMENT lt (prop, literal) > <!ATTLIST lt caseless (yes|no) > <!ELEMENT lte (prop, literal) > <!ATTLIST lte caseless (yes|no) > <!ELEMENT gt (prop, literal) > <!ATTLIST gt caseless (yes|no) > <!ELEMENT gte (prop, literal) > <!ATTLIST gte caseless (yes|no) > <!ELEMENT eq (prop, literal) > <!ATTLIST eq caseless (yes|no) > <!ELEMENT literal (#PCDATA)> <!ELEMENT is-defined (prop) > <!ELEMENT like (prop, literal) > <!ATTLIST like caseless (yes|no) > <!ELEMENT contains (#PCDATA)> <!ELEMENT orderby (order+) > <!ELEMENT order ((prop | score), (ascending | descending)?) <!ATTLIST order caseless (yes|no) > <!ELEMENT ascending EMPTY> <!ELEMENT descending EMPTY> <!ELEMENT limit (nresults) > <!ELEMENT nresults (#PCDATA) > 5.2.1 Example Query This query retrieves thelive property DAV:supported-method-setcontent length values for allsearch arbiterresourcesand o support the live property DAV:supported-query-grammar-set as defined in section3.3. 3.1 The OPTIONS Method The OPTIONS method allows the client to discover if a resource supports the SEARCH method and to determine the list of search grammars supported for that resource. The client issues the OPTIONS method against a resource named by the Request-URI. This is a normal invocation of OPTIONS defined in [RFC2616]. If a resource supports the SEARCH method, then the server MUST list SEARCH in the OPTIONS response as defined by [RFC2616]. DASL servers MUST include the DASL header in the OPTIONS response. This header identifieslocated under thesearch grammars supported by that resource. 3.2 The DASL Response Header >> Response: DASLHeader = "DASL" ":" Coded-URL-List Coded-URL-List : Coded-URL [ "," Coded-URL-List ] Coded-URL ; defined in section 9.4 of [RFC2518]server's "/container1/" URI namespace whose length exceeds 10000. <d:searchrequest xmlns:d="DAV:"> <d:basicsearch> <d:select> <d:prop><d:getcontentlength/></d:prop> </d:select> <d:from> <d:scope> <d:href>/container1/</d:href> Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page14] Internet Draft22] Internet-Draft WebDAV SEARCHJuneOctober 2003The DASL response header indicates server support for<d:depth>infinity</d:depth> </d:scope> </d:from> <d:where> <d:gt> <d:prop><d:getcontentlength/></d:prop> <d:literal>10000</d:literal> </d:gt> </d:where> <d:orderby> <d:order> <d:prop><d:getcontentlength/></d:prop> <d:ascending/> </d:order> </d:orderby> </d:basicsearch> </d:searchrequest> 5.3 DAV:select DAV:select defines the result record, which is aquery grammarset of properties and values. This document defines two possible values: DAV:allprop and DAV:prop, both defined in [RFC2518] and revised in [RFC3253]. 5.4 DAV:from <!ELEMENT scope (href, depth, include-versions?) > <!ELEMENT include-versions EMPTY > DAV:from defines theOPTIONS method.query scope. This contains exactly one DAV:scope element. Thevalue is a URI thatscope element contains mandatory DAV:href and DAV:depth elements. DAV:href indicates thetype of grammar. Note that although theURIcan be usedtoidentify each supported search grammar, thereuse as a scope. When the scope isnot necessarilyadirect relationship betweencollection, if DAV:depth is "0", theURI andsearch includes only theXML element name that can be used in XML based SEARCH requests (the element name itselfcollection. When it isidentified by it's namespace name (a URI reference) and"1", theelement's local name). This header MAY be repeated. For example: DASL: <http://foobar.test/syntax1> DASL: <http://akuma.test/syntax2> DASL: <DAV:basicsearch> DASL: <http://example.com/foo/natural-language-query> 3.3 DAV:supported-query-grammar-set (protected) This WebDAV property is required for any server supporting either [RFC3253] and/or [ACL] and identifiessearch includes theXML based query grammars that are supported by(toplevel) members of thesearch arbiter resource. <!ELEMENT supported-query-grammar-set (supported-query-grammar*)> <!ELEMENT supported-query-grammar grammar> <!ELEMENT grammar ANY> ANY value: a query grammar element type 3.4 Example: Grammar Discovery This example shows thatcollection. When it is "infinity", theserver supportssearchonincludes all recursive members of the/somefolder resource withcollection. When thequery grammars: DAV:basicsearch, http://foobar.test/syntax1 and http://akuma.test/syntax2. Note that every server MUST support DAV:basicsearch. Reschke, et al. Expires December 2003 [Page 15] Internet Draft WebDAV SEARCH June 2003 >> Request: OPTIONS /somefolder HTTP/1.1 Host: example.org >> Response: HTTP/1.1 200 OK Allow: OPTIONS, GET, HEAD, POST, PUT, DELETE, TRACE, COPY, MOVE Allow: MKCOL, PROPFIND, PROPPATCH, LOCK, UNLOCK, SEARCH DASL: <DAV:basicsearch> DASL: <http://foobar.test/syntax1> DASL: <http://akuma.test/syntax2> This example showsscope is not a collection, theequivalent taking advantagedepth is ignored and the search applies just to the resource itself. When the child element DAV:include-versions is present, the search scope will include all versions (see [RFC3253], section 2.2.1) ofa server'sall version-controlled resources in scope. Servers that do supportfor DAV:supported-method-set and DAV:supported-query-grammar- set. >> Request: PROPFIND /somefolder HTTP/1.1 Host: example.org Depth: 0 Content-Type: text/xml; charset="utf-8" Content-Length: xxx <?xml version="1.0" encoding="UTF-8" ?> <propfind xmlns="DAV:"> <prop> <supported-query-grammar-set/> <supported-method-set/> </prop> </propfind> >> Response: HTTP/1.1 207 Multi-Status Content-Type: text/xml; charset="utf-8" Content-Length: xxxversioning but do not support the DAV:include-versions feature MUST signal an error if it is used in a query. Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page16] Internet Draft23] Internet-Draft WebDAV SEARCHJuneOctober 2003<?xml version="1.0" encoding="utf-8" ?> <multistatus xmlns="DAV:"> <response> <href>http://example.org/somefolder</href> <propstat> <prop> <supported-query-grammar-set> <supported-query-grammar> <grammar><basicsearch/></grammar> </supported-query-grammar> <supported-query-grammar> <grammar><syntax1 xmlns="http://foobar.test" /></grammar> </supported-query-grammar> <supported-query-grammar> <grammar><syntax2 xmlns="http://akuma.test/"/></grammar> </supported-query-grammar> </supported-query-grammar-set> <supported-method-set> <supported-method name="COPY" /> <supported-method name="DELETE" /> <supported-method name="GET" /> <supported-method name="HEAD" /> <supported-method name="LOCK" /> <supported-method name="MKCOL" /> <supported-method name="MOVE" /> <supported-method name="OPTIONS" /> <supported-method name="POST" /> <supported-method name="PROPFIND" /> <supported-method name="PROPPATCH" /> <supported-method name="PUT" /> <supported-method name="SEARCH" /> <supported-method name="TRACE" /> <supported-method name="UNLOCK" /> </supported-method-set> </prop> <status>HTTP/1.1 200 OK</status> </propstat> </response> </multistatus> Note5.4.1 Relationship to the Request-URI If the DAV:scope element is an absolute URI, the scope is exactly that URI. If the DAV:scope element is is an absolute URI reference, the scope is taken to be relative to the request-URI. 5.4.2 Scope A Scope can be an arbitrary URI. Servers, of course, may support only particular scopes. This may include limitations for particular schemes such as "http:" or "ftp:" or certain URI namespaces. 5.5 DAV:where The DAV:where element defines thequery grammarsearch condition for inclusion of resources in the result set. The value of this elementnames marshalledis an XML element that defines a search operator that evaluates to one of the Boolean truth values TRUE, FALSE, or UNKNOWN. The search operator contained by DAV:where may itself contain and evaluate additional search operators aspartoperands, which in turn may contain and evaluate additional search operators as operands, etc. recursively. 5.5.1 Use of Three-Valued Logic in Queries Each operator defined for use in theDAV:supported-query-grammar-set can be directly usedwhere clause that returns a Boolean value MUST evaluate to TRUE, FALSE, or UNKNOWN. The resource under scan is included aselement namesa member of the result set if and only if the search condition evaluates to TRUE. Consult Appendix A for details on the application of three-valued logic in query expressions. 5.5.2 Handling Optional operators If a query contains anXML based query.operator that is not supported by the server, then the server MUST respond with a 422 (Unprocessable Entity) status code. 5.5.3 Treatment of NULL Values If a PROPFIND for a property value would yield a non-2xx (see [RFC2616], section 10.2) response for that property, then that property is considered NULL. Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page17] Internet Draft24] Internet-Draft WebDAV SEARCHJuneOctober 20034 Query Schema Discovery: QSD Servers MAY support the discovery of the schema forNULL values are "less than" all other values in comparisons. Empty strings (zero length strings) are not NULL values. An empty string is "less than" aquery grammar.string with length greater than zero. TheDASL response header and the DAV:supported-query-grammar-set property provide means for clientsDAV:is-defined operator is defined todiscovertest if thesetvalue ofquery grammars supported byaresource. This aloneproperty is NULL. 5.5.4 Treatment of properties with mixed/element content Comparisons of properties that do notsufficient informationhave simple types (text-only content) is out-of-scope fora client to generate a query. For example,theDAV:basicsearch grammar defines a set of queries consisting of a set ofstandard operatorsapplied to a set of propertiesdefined for DAV:basicsearch andvalues, but the grammar itself does not specify which properties maytherefore is defined to beused inUNKNOWN (as per Appendix A). For querying thequery. QSDDAV:resourcetype property, see Section 5.13. 5.5.5 Example: Testing for Equality The example shows a single operator (DAV:eq) applied in theDAV:basicsearch grammar allowscriteria. <d:where> <d:eq> <d:prop> <d:getcontentlength/> </d:prop> <d:literal>100</d:literal> </d:eq> </d:where> 5.5.6 Example: Relative Comparisons The example shows aclient to discovermore complex operation involving several operators (DAV:and, DAV:eq, DAV:gt) applied in theset of propertiescriteria. This DAV:where expression matches those resources that aresearchable, selectable, and sortable. Moreover, although"image/gifs" over 4K in size. <D:where> <D:and> <D:eq> <D:prop> <D:getcontenttype/> </D:prop> <D:literal>image/gif</D:literal> </D:eq> <D:gt> <D:prop> <D:getcontentlength/> </D:prop> Reschke, et al. Expires April 9, 2004 [Page 25] Internet-Draft WebDAV SEARCH October 2003 <D:literal>4096</D:literal> </D:gt> </D:and> </D:where> 5.6 DAV:orderby The DAV:orderby element specifies theDAV:basicsearch grammar defines a minimal setordering ofoperators, it is possible thatthe result set. It contains one or more DAV:order elements, each of which specifies aresource might support additional operatorscomparison between two items in the result set. Informally, aquery. For example, a resource might supportcomparison specifies aoptional operatortest thatcan be used to express content-based queriesdetermines whether one resource appears before another ina proprietary syntax. QSD allows a client to discover these operators and their syntax.the result set. Comparisons are applied in the order they occur in the DAV:orderby element, earlier comparisons being more significant. Theset of discoverable quantities will differcomparisons defined here use only a single property fromgrammar to grammar, buteachgrammar can define a means for a client to discover what can be discovered. In general,resource, compared using theschema for a given query grammar depends on bothsame ordering as theresource (the arbiter) andDAV:lt operator (ascending) or DAV:gt operator (descending). If neither direction is specified, thescope. A given resource might have accessdefault is DAV:ascending. In the context of the DAV:orderby element, null values are considered toone setcollate before any actual (i.e., non null) value, including strings ofpropertieszero length (this is compatible with [SQL99]). 5.6.1 Comparing Natural Language Strings Comparisons on strings take into account the language defined forone potential scope, and another setthat property. Clients MAY specify the language using the xml:lang attribute. If no language is specified either by the client or defined for that property by the server or if a comparison is performed on strings of two differentscope. For example, consider a server ablelanguages, the results are undefined. The "caseless" attribute may be used tosearch two distinct collections, one holding cooking recipes,indicate case-sensitivity for comparisons. 5.6.2 Example of Sorting This sort orders first by last name of theother design documents for nuclear weapons. While both collections might support properties such asauthor,title, and date, the first might also define properties such as caloriesandpreparation time, whilethen by size, in descending order, so that for each author, thesecond defined properties such as yieldlargest works appear first. <d:orderby> <d:order> <d:prop><r:lastname/></d:prop> <d:ascending/> </d:order> <d:order> Reschke, et al. Expires April 9, 2004 [Page 26] Internet-Draft WebDAV SEARCH October 2003 <d:prop><d:getcontentlength/></d:prop> <d:descending/> </d:order> </d:orderby> 5.7 Boolean Operators: DAV:and, DAV:or, andapplicable patents. Two distinct arbiters indexing the same collection might also have access to different properties. For example, the recipe collection mentioned above might also indexed byDAV:not The DAV:and operator performs avalue-added server that also storedlogical AND operation on thenames of chefs who had testedexpressions it contains. The DAV:or operator performs a logical OR operation on therecipe. Note also thatvalues it contains. The DAV:not operator performs a logical NOT operation on theavailable query schema might also dependvalues it contains. 5.8 DAV:eq The DAV:eq operator provides simple equality matching onother factors, such asproperty values. The "caseless" attribute may be used with this element. 5.9 DAV:lt, DAV:lte, DAV:gt, DAV:gte The DAV:lt, DAV:lte, DAV:gt, and DAV:gte operators provide comparisons on property values, using less-than, less-than or equal, greater-than, and greater-than or equal respectively. The "caseless" attribute may be used with these elements. 5.10 DAV:literal DAV:literal allows literal values to be placed in an expression. White space in literal values is significant in comparisons. For consistency with [RFC2518], clients SHOULD NOT specify theidentityattribute "xml:space" (section 2.10 ofthe principal conducting the search, but these factors are not exposed in[XML]) to override thisprotocol. 4.1 Additional SEARCH semantics Each query grammar supported by DASL defines its own syntax for expressingbehaviour. In comparisons, thepossible query schema. A client retrievescontents of DAV:literal SHOULD be treated as string, with theschemafollowing exceptions: o when operand for agiven query grammar on an arbiter resourcecomparison with agiven scope by invoking the SEARCH method on that arbiter with that grammar and scope andDAV:getcontentlength property, it SHOULD be treated as an integer value (the behaviour for non-integer values is undefined), o when operand for a comparison with aroot element of DAV:query-schema-discovery rather than DAV:searchrequest.DAV:creationdate or DAV:getlastmodified property, it SHOULD be treated as a date value in the ISO-8601 subset defined for the DAV:creationdate property Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page18] Internet Draft27] Internet-Draft WebDAV SEARCHJuneOctober 2003Marshalling: The request body MUST be DAV:query-schema-discovery element. <!ELEMENT query-schema-discovery ANY> ANY value: XML element defining([RFC2518], section 13.1). o when operand for avalid query The response body takes the form ofcomparison with aRFC2518 DAV:multistatus element, where DAV:responseproperty for which the type isextendedknown, it MAY be treated according tohold the returned query grammar insidethis type. 5.11 DAV:typed-literal (optional) There are situations in which aDAV:query-schema container element. <!ELEMENT response (href, ((href*, status)|(propstat+)), query-schema?, responsedescription?) >client may want to force a comparison not to be string-based (as defined for DAV:literal). In these cases, a typed comparison can be enforced by using DAV:typed-literal instead. <!ELEMENTquery-schema ANY>typed-literal (#PCDATA)> Thecontent of this containerdata type isan XML element whose name and syntax depend uponspecified using thegrammar, and whose value may (and likely will) vary depending uponxsi:type attribute defined in [XS1], section 2.6.1. If thegrammar, arbiter, and scope. 4.1.1type is not specified, it defaults to "xs:string". A server MUST reject a request with an unknown type. 5.11.1 Example for typed numerical comparison Consider a set ofquery schema discovery In this example, the arbiter is recipes.test,resources with thegrammar is DAV:basicsearch,dead property "edits" in thescope is also recipes.test. >> Request: SEARCH / HTTP/1.1 Host: recipes.test Content-Type: application/xml Content-Length: xxx <?xml version="1.0"?> <query-schema-discovery xmlns="DAV:"> <basicsearch> <from>namespace "http://ns.example.org": +-----+----------------+ | URI | property value | +-----+----------------+ | /a | "-1" | | | | | /b | "01" | | | | | /c | "3" | | | | | /d | "test" | | | | | /e | (undefined) | +-----+----------------+ The expression <lt xmlns="DAV:" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <prop><edits xmlns="http://ns.example.org"/></prop> <typed-literal xsi:type="xs:integer">3</typed-literal> </lt> Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page19] Internet Draft28] Internet-Draft WebDAV SEARCHJuneOctober 2003<scope> <href>http://recipes.test</href> <depth>infinity</depth> </scope> </from> </basicsearch> </query-schema-discovery> >> Response: HTTP/1.1 207 Multistatus Content-Type: application/xml Content-Length: xxx <?xml version="1.0"?> <multistatus xmlns="DAV:"> <response> <href>http://recipes.test</href> <status>HTTP/1.1 200 OK</status> <query-schema> <basicsearchschema> <!-- (See section "Query schema for DAV:basicsearch"will evaluate to TRUE for theactual contents) --> </basicsearchschema> </query-schema> </response> </multistatus> The query schemaresources "/a" and "/b" (their property values can be parsed as type xs:number, and the numerical comparison evaluates to true), to FALSE for "/c" (property value is compatible, but numerical comparison evaluates to false) and UNKNOWN forDAV:basicsearch"/d" and "/e" (the property either isdefined in section5.19. Reschke, et al. Expires December 2003 [Page 20] Internet Draft WebDAV SEARCH June 2003 5undefined, or its value can not be parsed as xs:number). 5.12 Support for matching xml:lang attributes on properties TheDAV:basicsearch Grammar 5.1 Introduction DAV:basicsearch uses an extensible XML syntax that allows clientsfollowing two optional operators can be used to expresssearch requests that are generally usefulconditions on the language of a property value (as expressed using the xml:lang attribute). 5.12.1 DAV:language-defined (optional) <!ELEMENT language-defined (prop)> This operator evaluates to TRUE if the language forWebDAV scenarios. DASL-extended servers MUST accept this grammar, and MAY accept other grammars. DAV:basicsearch has several components: o DAV:select providestheresult record definition. o DAV:from definesvalue of thescope. o DAV:where definesgiven property is known, FALSE if it isn't and UNKNOWN if thecriteria. o DAV:orderby definesproperty itself is not defined. 5.12.2 DAV:language-matches (optional) <!ELEMENT language-matches (prop, literal)> This operator evaluates to TRUE if thesort orderlanguage for the value of theresult set. o DAV:limit provides constraints ongiven property is known and matches thequery aslanguage name given in the <literal> element, FALSE if it doesn't match and UNKNOWN if the property itself is not defined. Languages are considered to match if they are the same, or if the language of the property value is awhole. 5.2 The DAV:basicsearch DTD <!ELEMENT basicsearch (select, from, where?, orderby?, limit?) > <!ELEMENT select (allprop | prop) > <!ELEMENT from (scope) > <!ELEMENT scope (href, depth) > <!ENTITY %comp_ops "eq | lt | gt| lte | gte"> <!ENTITY %log_ops "and |sublanguage of the language specified in the <literal> element (see [XPATH], section 4.3, "lang function"). 5.12.3 Example of language-aware matching The expression below will evaluate to TRUE if the property "foobar" exists and it's language is either unknown, English or| not"> <!ENTITY %special_ops "is-collection | is-defined"> <!ENTITY %string_ops "like"> <!ENTITY %content_ops "contains"> <!ENTITY %all_ops "%comp_ops; | %log_ops; | %special_ops; | %string_ops; | %content_ops;"> <!ELEMENT where ( %all_ops; ) >a sublanguage of English. <or xmlns="DAV:"> <not> <language-defined> <prop><foobar/></prop> </language-defined> </not> <language-matches> Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page21] Internet Draft29] Internet-Draft WebDAV SEARCHJuneOctober 2003<!ELEMENT and ( ( %all_ops; ) +) > <!ELEMENT or ( ( %all_ops; ) +) > <!ELEMENT not ( %all_ops; ) > <!ELEMENT lt (prop, literal) > <!ATTLIST lt caseless (yes|no) > <!ELEMENT lte (prop, literal) > <!ATTLIST lte caseless (yes|no) > <!ELEMENT gt (prop, literal) > <!ATTLIST gt caseless (yes|no) > <!ELEMENT gte (prop, literal) > <!ATTLIST gte caseless (yes|no) > <!ELEMENT eq (prop, literal) > <!ATTLIST eq caseless (yes|no) > <!ELEMENT literal (#PCDATA)> <!ELEMENT is-defined (prop) > <!ELEMENT like (prop, literal) > <!ATTLIST like caseless (yes|no) > <!ELEMENT<prop><foobar/></prop> <literal>en</literal> </language-matches> </or> 5.13 DAV:is-collection The DAV:is-collection operator allows clients to determine whether a resource is a collection (that is, whether it's DAV:resourcetype element contains(#PCDATA)> <!ELEMENT orderby (order+) > <!ELEMENT order ((prop | score), (ascending | descending)?) <!ATTLIST order caseless (yes|no) > <!ELEMENT ascending EMPTY> <!ELEMENT descending EMPTY> <!ELEMENT limit (nresults) > <!ELEMENT nresults (#PCDATA) > 5.2.1 Example Query This query retrievesthecontent length valueselement DAV:collection). Rationale: This operator is provided in lieu of defining generic structure queries, which would suffice for this and for many more powerful queries, but seems inappropriate to standardize at this time. 5.13.1 Example of DAV:is-collection This example shows a search criterion that picks out all and only the resourceslocated underin theserver's "/container1/" URI namespace whose length exceeds 10000.scope that are collections. <where xmlns="DAV:"> <is-collection/> </where> 5.14 DAV:is-defined The DAV:is-defined operator allows clients to determine whether a property is defined on a resource. The meaning of "defined on a resource" is found in Section 5.5.3. Example: <d:is-defined> <d:prop><x:someprop/></d:prop> </d:is-defined> 5.15 DAV:like The DAV:like is an optional operator intended to give simple wildcard-based pattern matching ability to clients. The operator takes two arguments. The first argument is a DAV:prop element identifying a single property to evaluate. Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page22] Internet Draft30] Internet-Draft WebDAV SEARCHJuneOctober 2003<d:searchrequest xmlns:d="DAV:"> <d:basicsearch> <d:select> <d:prop><d:getcontentlength/></d:prop> </d:select> <d:from> <d:scope> <d:href>/container1/</d:href> <d:depth>infinity</d:depth> </d:scope> </d:from> <d:where> <d:gt> <d:prop><d:getcontentlength/></d:prop> <d:literal>10000</d:literal> </d:gt> </d:where> <d:orderby> <d:order> <d:prop><d:getcontentlength/></d:prop> <d:ascending/> </d:order> </d:orderby> </d:basicsearch> </d:searchrequest> 5.3 DAV:select DAV:select defines the result record, whichThe second argument is asetDAV:literal element that gives the pattern matching string. 5.15.1 Syntax for the Literal Pattern Pattern := [wildcard] 0*( text [wildcard] ) wildcard := exactlyone | zeroormore text := 1*( <character> | escapesequence ) exactlyone : = "_" zeroormore := "%" escapechar := "\" escapesequence := "\" ( exactlyone | zeroormore | escapechar ) character: valid XML characters (see section 2.2 ofproperties and values. This document defines two possible values: DAV:allprop and DAV:prop, both defined in [RFC2518] and revised in [RFC3253]. 5.4 DAV:from DAV:from defines[XML]), minus ( exactlyone | zeroormore | escapechar ) The value for the literal is composed of wildcards separated by segments of text. Wildcards may begin or end thequery scope. This containsliteral. The "_" wildcard matches exactly oneDAV:scope element.character. Thescope element contains mandatory DAV:href"%" wildcard matches zero or more characters The "\" character is an escape sequence so that the literal can include >"_" andDAV:depth elements. DAV:href indicates"%". To include theURI to use as a scope. When"\" character in thescopepattern, the escape sequence "\\" is used. 5.15.2 Example of DAV:like This example shows how acollection, if DAV:depth is "0", the search includes only the collection. When itclient might use DAV:like to identify those resources whose content type was a subtype of image. <D:where> <D:like caseless="yes"> <D:prop><D:getcontenttype/></D:prop> <D:literal>image/%</D:literal> </D:like> </D:where> 5.16 DAV:contains The DAV:contains operator is"1", thean optional operator that provides content-based searchincludescapability. This operator implicitly searches against the(toplevel) memberstext content ofthe collection. When ita resource, not against content of properties. The DAV:contains operator is"infinity",intentionally not overly constrained, in order to allow thesearch includes all recursive members ofserver to do thecollection. Whenbest job it can in performing the search. The DAV:contains operator evaluates to a Boolean value. It evaluates Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page23] Internet Draft31] Internet-Draft WebDAV SEARCHJuneOctober 2003scope is not a collection, the depth is ignored and the search applies just to the resource itself. 5.4.1 Relationshipto TRUE if theRequest-URI Ifcontent of theDAV:scope element is an absolute URI,resource satisfies thescope is exactly that URI. Ifsearch. Otherwise, It evaluates to FALSE. Within theDAV:scope element is is an absolute URI reference,DAV:contains XML element, thescopeclient provides a phrase: a single word or whitespace delimited sequence of words. Servers MAY ignore punctuation in a phrase. Case-sensitivity istaken to be relativeleft to therequest-URI. 5.4.2 Scope A Scope can be an arbitrary URI. Servers, of course,server. The following things maysupport only particular scopes. Thisor mayinclude limitations for particular schemesnot be done as part of the search: Phonetic methods such as"http:""soundex" may or"ftp:"may not be used. Word stemming may orcertain URI namespaces. 5.5 DAV:where The DAV:where element defines the search condition for inclusionmay not be performed. Thesaurus expansion ofresources in the result set.words may or may not be done. Right or left truncation may or may not be performed. Thevalue of this element is an XML element that defines asearchoperator that evaluates to one of the Boolean truth values TRUE, FALSE,may be case insensitive orUNKNOWN.case sensitive. Thesearch operator contained by DAV:whereword or words mayitself contain and evaluate additional search operators as operands, which in turnor maycontain and evaluate additional search operatorsnot be interpreted asoperands, etc. recursively. 5.5.1 Use of Three-Valued Logic in Queries Each operator defined for usenames. Multiple words may or may not be required to be adjacent or "near" each other. Multiple words may or may not be required to occur in thewhere clause that returns a Boolean value MUST evaluate to TRUE, FALSE,same order. Multiple words may orUNKNOWN.may not be treated as a phrase. Theresource under scan is includedsearch may or may not be interpreted as amember ofrequest to find documents "similar" to theresult set if and only ifstring operand. 5.16.1 Result scoring (DAV:score element) Servers SHOULD indicate scores for thesearchDAV:contains conditionevaluatesby adding a DAV:score XML element toTRUE. Consult appendixA for details ontheapplication of three-valued logicDAV:response element. It's value is defined only inquery expressions. 5.5.2 Handling Optional operators Ifthe context of a particular querycontains an operator thatresult. The value isnot supported by the server, then the server MUST respond with a 422 (Unprocessable Entity) status Reschke, et al. Expires December 2003 [Page 24] Internet Draft WebDAV SEARCH June 2003 code. 5.5.3 Treatment of NULL Values IfaPROPFIND forstring representing the score, an integer from zero to 10000 inclusive, where apropertyhigher valuewould yieldindicates anon-2xx (see [RFC2616], section 10.2) responsehigher score (e.g. more relevant). Modified DTD fragment forthat property, then that property is considered NULL. NULL values are "less than" all other valuesDAV:propstat: <!ELEMENT response (href, ((href*, status)|(propstat+)), responsedescription?, score?) > <!ELEMENT score (#PCDATA) > Clients should note that, incomparisons. Empty strings (zero length strings) are not NULL values. An empty string is "less than" a string with length greater than zero. The DAV:isdefined operatorgeneral, it isdefinednot meaningful totest ifcompare thevalue of a property is NULL. 5.5.4 Treatmentnumeric values ofproperties with mixed/element content Comparisonsscores from two different query results unless both were executed by the same underlying search system on the same collection ofproperties that do not have simple types (text-only content) is out-of-scope forresources. 5.16.2 Ordering by score To order search results by their score, thestandard operators defined for DAV:basicsearch and therefore is defined toDAV:score element may beUNKNOWN (as per appendixA). For queryingadded as child to theDAV:resourcetype property, see section5.13. 5.5.5 Example: Testing for Equality The example showsDAV:orderby element (in place of asingle operator (DAV:eq) applied in the criteria. <d:where> <d:eq> <d:prop> <d:getcontentlength/> </d:prop> <d:literal>100</d:literal> </d:eq> </d:where>DAV:prop element). 5.16.3 Examples Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page25] Internet Draft32] Internet-Draft WebDAV SEARCHJuneOctober 20035.5.6 Example: Relative ComparisonsThe example below shows amore complex operation involving several operators (DAV:and, DAV:eq, DAV:gt) applied insearch for thecriteria. This DAV:where expression matches thosephrase "Peter Forsberg". Depending on its support for content-based searching, a server MAY treat this as a search for documents that contain the words "Peter" and "Forsberg". <D:where> <D:contains>Peter Forsberg</D:contains> </D:where> The example below shows a search for resources thatare "image/gifs" over 4K in size.contain "Peter" and "Forsberg". <D:where> <D:and><D:eq> <D:prop> <D:getcontenttype/> </D:prop> <D:literal>image/gif</D:literal> </D:eq> <D:gt> <D:prop> <D:getcontentlength/> </D:prop> <D:literal>4096</D:literal> </D:gt><D:contains>Peter</D:contains> <D:contains>Forsberg</D:contains> </D:and> </D:where>5.6 DAV:orderby5.17 Limiting the result set <!ELEMENT limit (nresults) > <!ELEMENT nresults (#PCDATA)> ;only digits TheDAV:orderbyDAV:limit XML elementspecifiescontains requested limits from theorderingclient to limit the size of theresult set. It contains onereply ormore DAV:order elements, eachamount ofwhich specifieseffort expended by the server. The DAV:nresults XML element contains acomparison between two itemsrequested maximum number of DAV:response elements to be returned in the response body. The server MAY disregard this limit. The value of this element is an integer. 5.17.1 Relationship to resultset. Informally, a comparison specifies a test that determines whether one resource appears before another inordering If the resultset. Comparisonsset is both limited by DAV:limit and ordered according to DAV:orderby, the results that areappliedincluded in the response document must be those that orderthey occur in the DAV:orderby element, earlier comparisons being more significant.highest. 5.18 Thecomparisons defined here use only a single property from each resource, compared using the same ordering as the DAV:lt operator (ascending) or DAV:gt operator (descending). If neither direction is specified, the default is DAV:ascending. In the context'caseless' XML attribute The "caseless" attribute allows clients to specify caseless matching behaviour instead ofthe DAV:orderby element, nullcharacter-by-character matching for DAV:basicsearch operators. The possible values for "caseless" areconsidered to collate before any actual (i.e., non null) value, including strings of zero length (this"yes" or "no". The default value iscompatible with [SQL99]).server-specified. Caseless matching SHOULD be implemented as defined in [CaseMap]. Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page26] Internet Draft33] Internet-Draft WebDAV SEARCHJuneOctober 20035.6.1 Comparing Natural Language Strings Comparisons on strings take into accountSupport for thelanguage defined"caseless" attribute is optional. A server should respond with a status of 422 if it is used but cannot be supported. 5.19 Query schema for DAV:basicsearch The DAV:basicsearch grammar defines a search criteria thatproperty. Clients MAY specifyis a Boolean-valued expression, and allows for an arbitrary set of properties to be included in thelanguage usingresult record. The result set may be sorted on a set of property values. Accordingly thexml:lang attribute. If no language is specifiedDTD for schema discovery for this grammar allows the server to express: 1. the set of properties that may be eitherby the clientsearched, returned, or used to sort, and a hint about the data type of such properties 2. the set of optional operators definedfor that propertyby theserver or ifresource. 5.19.1 DTD for DAV:basicsearch QSD <!ELEMENT basicsearchschema (properties, operators)> <!ELEMENT any-other-property EMPTY> <!ELEMENT properties (propdesc*)> <!ELEMENT propdesc (prop|any-other-property), datatype?, searchable?, selectable?, sortable?, caseless?)> <!ELEMENT operators (opdesc*)> <!ELEMENT opdesc ANY> <!ELEMENT operand-literal EMPTY> <!ELEMENT operand-property EMPTY> The DAV:properties element holds acomparison is performed on stringslist oftwo different languages, the results are undefined.descriptions of properties. The"caseless" attributeDAV:operators element describes the optional operators that may be usedto indicate case-sensitivity for comparisons. 5.6.2 Example of Sorting This sort orders first by last namein a DAV:where element. 5.19.2 DAV:propdesc Element Each instance of a DAV:propdesc element describes theauthor, and then by size,property or properties indescending order, so that for each author,thelargest worksDAV:prop element it contains. All subsequent elements are descriptions that apply to those properties. All descriptions are optional and may appearfirst. <d:orderby> <d:order> <d:prop><r:lastname/></d:prop> <d:ascending/> </d:order> <d:order> <d:prop><d:getcontentlength/></d:prop> <d:descending/> </d:order> </d:orderby> 5.7 Boolean Operators: DAV:and, DAV:or,in any order. Servers SHOULD support all the descriptions defined here, andDAV:notMAY define others. DASL defines five descriptions. TheDAV:and operator performsfirst, DAV:datatype, provides alogical AND operation onhint about theexpressions it contains. The DAV:or operator performs a logical OR operation ontype of thevalues it contains. The DAV:not operator performsproperty value, and may be useful to alogical NOT operation on the values it contains.user interface prompting for a value. The remaining four (DAV:searchable, DAV:selectable, DAV:sortable, and DAV:caseless) Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page27] Internet Draft34] Internet-Draft WebDAV SEARCHJuneOctober 20035.8 DAV:eq The DAV:eq operator provides simple equality matching onidentify portions of the query (DAV:where, DAV:select, and DAV:orderby, respectively). If a propertyvalues. The "caseless" attribute mayhas a description for a section, then the server MUST allow the property to be usedwith this element. 5.9 DAV:lt, DAV:lte, DAV:gt, DAV:gte The DAV:lt, DAV:lte, DAV:gt, and DAV:gte operators provide comparisons onin that section. These descriptions are optional. If a propertyvalues, using less-than, less-than or equal, greater-than, and greater-thandoes not have such a description, orequal respectively. The "caseless" attribute may be used with these elements. 5.10 DAV:literal DAV:literal allows literal valuesis not described at all, then the server MAY still allow the property to beplaced in an expression. White space in literal values is significantused incomparisons. For consistency with [RFC2518], clients SHOULD NOT specifytheattribute "xml:space" (section 2.10corresponding section. 5.19.2.1 DAV:any-other-property This element can be used in place of[XML])DAV:prop tooverride this behaviour. In comparisons, the contentsdescribe properties ofDAV:literal SHOULD be treated as string, with the following exceptions: o when operand for a comparison with a DAV:getcontentlength property, it SHOULDWebDAV properties not mentioned in any other DAV:prop element. For instance, this can betreated as an integer value (the behaviour for non-integer values is undefined), o when operandused to indicate that all other properties are searchable and selectable without giving details about their types (a typical scenario for dead properties). 5.19.3 The DAV:datatype Property Description The DAV:datatype element contains acomparison withsingle XML element that provides aDAV:creationdate or DAV:getlastmodifiedhint about the domain of the property,it SHOULDwhich may betreated asuseful to a user interface prompting for adatevalue to be used in a query. Datatypes are identified by an element name. Where appropriate, a server SHOULD use theISO-8601 subsetsimple datatypes definedfor the DAV:creationdate property ([RFC2518],in [XS2]. <!ELEMENT datatype ANY > Examples from [XS2], section13.1). o when operand for a comparison with a property for which3: +----------------+---------------------+ | Qualified name | Example | +----------------+---------------------+ | xs:boolean | true, false, 1, 0 | | | | | xs:string | Foobar | | | | | xs:dateTime | 1994-11-05T08:15:5Z | | | | | xs:float | .314159265358979E+1 | | | | | xs:integer | -259, 23 | +----------------+---------------------+ If the data typeis known, it MAY be treated according to this type. 5.11 DAV:typed-literal (optional) There are situations in which a client may want to forceof acomparisonproperty is not given, then the data type defaults tobe string-based (as defined for DAV:literal). In these cases, a typed comparison can be enforced by using DAV:typed-literal instead.xs:string. 5.19.4 The DAV:searchable Property Description <!ELEMENT searchable EMPTY> Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page28] Internet Draft35] Internet-Draft WebDAV SEARCHJuneOctober 2003<!ELEMENT typed-literal (#PCDATA)> The data typeIf this element isspecified usingpresent, then thexsi:type attribute defined in [XS1], section 2.6.1. Ifserver MUST allow this property to appear within a DAV:where element where an operator allows a property. Allowing a search does not mean that thetypeproperty isnot specified,guaranteed to be defined on every resource in the scope, itdefaultsonly indicates the server's willingness to"xs:string". A server MUST reject a request with an unknown type. 5.12 Example for typed numerical comparison Consider a set of resources withcheck. 5.19.5 The DAV:selectable Property Description <!ELEMENT selectable EMPTY> This element indicates that thedeadproperty"edits"may appear in thenamespace "http://ns.example.org": URIDAV:select element. 5.19.6 The DAV:sortable Property Description This element indicates that the propertyvalue /a "-1" /b "01" /c "3" /d "test" /e (undefined)may appear in the DAV:orderby element. <!ELEMENT sortable EMPTY> 5.19.7 Theexpression <lt xmlns="DAV:" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xs="http://www.w3.org/2001/XMLSchema"> <prop><edits xmlns="http://ns.example.org"/></prop> <typed-literal xsi:type="xs:integer">3</typed-literal> </lt> will evaluateDAV:caseless Property Description This element only applies toTRUE for the resources "/a"properties whose data type is "xs:string" and"/b" (their property values can be parsedderived data types astype xs:number,per the DAV:datatype property description. Its presence indicates that compares performed for searches, and thenumerical comparison evaluates to true), to FALSEcomparisons for"/c" (property valueordering results on the string property will be caseless (the default iscompatible, but numerical comparison evaluates to false) and UNKNOWN fot "/d"character-by-character). <!ELEMENT caseless EMPTY> 5.19.8 The DAV:operators XML Element The DAV:operators element describes every optional operator supported in a query. (Mandatory operators are not listed since they are mandatory and"/e" (the propertypermit no variation in syntax.). All optional operators that are supported MUST be listed in the DAV:operators element. The listing for an operator consists of the operator (as an empty element), followed by one element for each operand. The operand MUST be either DAV:operand-property or DAV:operand-literal, which indicate that the operand in the corresponding position isundefined,a property orits value can nota literal value, respectively. If an operator is polymorphic (allows more than one operand syntax) then each permitted syntax MUST be listed separately. <operators xmlns='DAV:'> <opdesc> <like/><operand-property/><operand-literal/> </opdesc> Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page29] Internet Draft36] Internet-Draft WebDAV SEARCHJuneOctober 2003parsed as xs:number). 5.13 DAV:is-collection</operators> 5.19.9 Example of Query Schema for DAV:basicsearch <D:basicsearchschema xmlns:D="DAV:" xmlns:xs="http://www.w3.org/2001/XMLSchema""> <D:properties> <D:propdesc> <D:prop><D:getcontentlength/></D:prop> <D:datatype><xs:nonNegativeInteger/></D:datatype> <D:searchable/><D:selectable/><D:sortable/> </D:propdesc> <D:propdesc> <D:prop><D:getcontenttype/><D:displayname/></D:prop> <D:searchable/><D:selectable/><D:sortable/> </D:propdesc> <D:propdesc> <D:prop><fstop xmlns="http://jennicam.org"/></D:prop> <D:selectable/> </D:propdesc> <D:propdesc> <D:any-other-property/> <D:searchable/><D:selectable/> </D:propdesc> </D:properties> <D:operators> <D:opdesc> <D:like/><D:operand-property/><D:operand-literal/> </D:opdesc> </D:operators> </D:basicsearchschema> This response lists four properties. TheDAV:is-collection operator allows clients to determine whether a resource is a collection (that is, whether it's DAV:resourcetype element containsdatatype of theelement DAV:collection). Rationale: This operatorlast three properties isprovided in lieu of defining generic structure queries, which would suffice for this and for many more powerful queries, but seems inappropriatenot given, so it defaults tostandardize at this time. 5.13.1 Example of DAV:is-collection This example shows a search criterion that picks out allxs:string. All are selectable, andonlytheresourcesfirst three may be searched. All but the last may be used in a sort. Of thescope that are collections. <where xmlns="DAV:"> <is-collection/> </where> 5.14optional DAV operators, DAV:is-defined and DAV:like are supported. Note: TheDAV:is-defined operator allows clients to determine whether a property isschema discovery definedon a resource. The meaninghere does not provide for discovery of"defined on a resource" is found in section5.5.3. Example: <d:is-defined> <d:prop><x:someprop/></d:prop> </d:is-defined>supported values of the "caseless" attribute. This may require that the reply also list the mandatory operators. Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page30] Internet Draft37] Internet-Draft WebDAV SEARCHJuneOctober 20035.15 DAV:like The DAV:like is an optional operator intended to give simple wildcard-based pattern matching ability to clients. The operator takes two arguments. The first argument is a DAV:prop element identifying a single property to evaluate. The second argument is a DAV:literal element that gives the pattern matching string. 5.15.1 Syntax for6. Internationalization Considerations Properties may be language-tagged using theLiteral Pattern Pattern := [wildcard] 0*( text [wildcard] ) wildcard := exactlyone | zeroormore text := 1*( <character> | escapesequence ) exactlyone : = "_" zeroormore := "%" escapechar := "\" escapesequence := "\" ( exactlyone | zeroormore | escapechar ) character: valid XML charactersxml:lang attribute (see [RFC2518], section2.2 of [XML]), minus ( exactlyone | zeroormore | escapechar ) The value for the literal is composed of wildcards separated by segments of text. Wildcards may begin or end the literal. The "_" wildcard matches exactly one character. The "%" wildcard matches zero or more characters4.4). The" 5.15.2 Example of DAV:like This example shows how a client might use DAV:likeoptional operators DAV:language-defined (Section 5.12.1) and DAV:language-matches (Section 5.12.2) allow toidentify those resources whose content type was a subtype of image.express conditions on the language tagging information. Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page31] Internet Draft38] Internet-Draft WebDAV SEARCHJuneOctober 2003<D:where> <D:like caseless="yes"> <D:prop><D:getcontenttype/></D:prop> <D:literal>image/%</D:literal> </D:like> </D:where> 5.16 DAV:contains The DAV:contains operator is an optional operator that provides content-based search capability.7. Security Considerations Thisoperator implicitly searches against the text content of a resource, not against content of properties. The DAV:contains operatorsection isintentionally not overly constrained, in orderprovided toallow the serverdetail issues concerning security implications of which DASL applications need todo the best job it can in performingbe aware. All of thesearch. The DAV:contains operator evaluates to a Boolean value. It evaluatessecurity considerations of HTTP/1.1 also apply toTRUE if the contentDASL. In addition, this section will include security risks inherent in searching and retrieval oftheresourcesatisfies the search. Otherwise, It evaluatesproperties and content. A query must not allow one toFALSE. Within the DAV:contains XML element, the client provides a phrase: a single wordretrieve information about values orwhitespace delimited sequenceexistence ofwords. Servers MAY ignore punctuationproperties that one could not obtain via PROPFIND. (e.g. by use in DAV:orderby, or in expressions on properties.) A server should prepare for denial of service attacks. For example aphrase. Case-sensitivityclient may issue a query for which the result set isleftexpensive tothe server. The following things maycalculate ormay nottransmit because many resources match or must bedone as partevaluated. 7.1 Implications ofthe search: Phonetic methods suchXML External Entities XML supports a facility known as"soundex" may or may not be used. Word stemming may or may not be performed. Thesaurus expansion"external entities", defined in section 4.2.2 ofwords may or may not be done. Right or left truncation may or may not be performed. The search may be case insensitive or case sensitive. The word or words may or may not[XML], which instruct an XML processor to retrieve and perform an inline include of XML located at a particular URI. An external XML entity can beinterpreted as names. Multiple words mayused to append ormay notmodify the document type declaration (DTD) associated with an XML document. An external XML entity can also berequiredused tobe adjacent or "near" each other. Multiple words may or mayinclude XML within the content of an XML document. For non-validating XML, such as the XML used in this specification, including an external XML entity is notberequired by [XML]. However, [XML] does state that an XML processor may, at its discretion, include the external XML entity. External XML entities have no inherent trustworthiness and are subject tooccurall the attacks that are endemic to any HTTP GET request. Furthermore, it is possible for an external XML entity to modify the DTD, and hence affect the final form of an XML document, in thesame order. Multiple words mayworst case significantly modifying its semantics, ormay notexposing the XML processor to the security risks discussed in [RFC3023]. Therefore, implementers must betreated as a phrase. The search may or may notaware that external XML entities should beinterpretedtreated asa request to find documents "similar" to the string operand. 5.16.1 Result scoring (DAV:score element) Servers SHOULD indicate scores foruntrustworthy. There is also theDAV:contains condition by addingscalability risk that would accompany aDAV:scorewidely deployed application which made use of external XMLelement to the DAV:response element. It's valueentities. In this situation, it isdefined only inpossible that there would be significant numbers of requests for one external XML entity, potentially overloading any server which fields requests for thecontext of a particular query result. The value is a string representingresource containing thescore, an integer from zero to 10000 inclusive, where a higher value indicates a higher score (e.g.external XML entity. Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page32] Internet Draft39] Internet-Draft WebDAV SEARCHJuneOctober 2003more relevant). Modified DTD fragment for DAV:propstat: <!ELEMENT response (href, ((href*, status)|(propstat+)), responsedescription?, score?) > <!ELEMENT score (#PCDATA) > Clients should note that, in general, it is8. Scalability Query grammars are identified by URIs. Applications SHOULD notmeaningfulattempt tocompare the numeric values of scores from two different query results unless both were executed by the same underlying search system on the same collection of resources. 5.16.2 Ordering by score To order search results by their score, the DAV:score element may be added as childretrieve these URIs even if they appear tothe DAV:orderby element (in place of a DAV:prop element). 5.16.3 Examples The example below shows a search for the phrase "Peter Forsberg". Depending on its support for content-based searching, a server MAY treat this as a search for documentsbe retrievable (for example, those thatcontainbegin with "http://") Reschke, et al. Expires April 9, 2004 [Page 40] Internet-Draft WebDAV SEARCH October 2003 9. Authentication Authentication mechanisms defined in WebDAV will also apply to DASL. Reschke, et al. Expires April 9, 2004 [Page 41] Internet-Draft WebDAV SEARCH October 2003 10. IANA Considerations This document uses thewords "Peter" and "Forsberg". <D:where> <D:contains>Peter Forsberg</D:contains> </D:where> The example below shows a search for resources that contain "Peter" and "Forsberg". <D:where>namespace defined by [RFC2518] for XML elements. All other IANA considerations mentioned in [RFC2518] are also applicable to DASL. Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page33] Internet Draft42] Internet-Draft WebDAV SEARCHJuneOctober 2003<D:and> <D:contains>Peter</D:contains> <D:contains>Forsberg</D:contains> </D:and> </D:where> 5.17 Limiting the result set <!ELEMENT limit (nresults) > <!ELEMENT nresults (#PCDATA)> ;only digits The DAV:limit XML element contains requested limits from the client to limit the size of11. Contributors This document is based on prior work on thereply or amount of effort expendedDASL protocol done by theserver. The DAV:nresults XML element contains a requested maximum number of DAV:response elements to be returned in the response body. The server MAY disregard this limit. The value of this element is an integer. 5.17.1 Relationship to result ordering IfWebDAV DASL working group until theresult set is both limitedyear 2000 -- namely byDAV:limitAlan Babich, Jim Davis, Rick Henderson, Dale Lowry, Saveen Reddy andordered according to DAV:orderby, the results that are included in the responseSurendra Reddy. Reschke, et al. Expires April 9, 2004 [Page 43] Internet-Draft WebDAV SEARCH October 2003 12. Acknowledgements This documentmust be those that order highest. 5.18 The "caseless" XML attribute The "caseless" attribute allows clients to specify caseless matching behaviour instead of character-by-character matching for DAV:basicsearch operators. The possible values for "caseless" are "yes" or "no". The default value is server-specified. Caseless matching SHOULD be implemented as defined in [CaseMap]. Support for the "caseless" attribute is optional. A server should respond with a status of 422 if it is used but cannot be supported.has benefited from thoughtful discussion by Lisa Dusseault, Sung Kim, Elias Sinderson, Martin Wallmer, Jim Whitehead and Kevin Wiggen. Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page34] Internet Draft44] Internet-Draft WebDAV SEARCHJuneOctober 20035.19 Query schema for DAV:basicsearch The DAV:basicsearch grammar defines a search criteria that is a Boolean-valued expression,Normative References [ACL] Clemm, G., Hopkins, A., Sedlar, E. andallowsJ. Whitehead, "WebDAV Access Control Protocol", ID draft-ietf-webdav-acl-12, October 2003, <http:// www.webdav.org/acl/protocol/draft-ietf-webdav-acl-12.htm>. [RFC2119] Bradner, S., "Key words foran arbitrary set of properties to be includeduse inthe result record. The result set may be sorted on a set of property values. Accordingly the DTD for schema discovery for this grammar allows the server to express: 1. the set of properties that may be either searched, returned, or usedRFCs tosort,Indicate Requirement Levels", BCP 14, RFC 2119, March 1997. [RFC2518] Goland, Y., Whitehead, E., Faizi, A., Carter, S. anda hint about the data type of such properties 2. the set of optional operators defined by the resource. 5.19.1 DTDD. Jensen, "HTTP Extensions forDAV:basicsearch QSD <!ELEMENT basicsearchschema (properties, operators)> <!ELEMENT any-other-property EMPTY> <!ELEMENT properties (propdesc*)> <!ELEMENT propdesc (prop|any-other-property), datatype?, searchable?, selectable?, sortable?, caseless?)> <!ELEMENT operators (opdesc*)> <!ELEMENT opdesc ANY> <!ELEMENT operand-literal EMPTY> <!ELEMENT operand-property EMPTY> The DAV:properties element holds a list of descriptions of properties. The DAV:operators element describes the optional operators that may be used in a DAV:where element. 5.19.2 DAV:propdesc Element Each instance of a DAV:propdesc element describes the property or properties in the DAV:prop element it contains. All subsequent elements are descriptions that apply to those properties. All descriptions are optional and may appear in any order. Servers SHOULD support all the descriptions defined here,Distributed Authoring -- WEBDAV", RFC 2518, February 1999. [RFC2616] Fielding, R., Gettys, J., Mogul, J., Nielsen, H., Masinter, L., Leach, P. andMAY define others. Reschke, et al. Expires December 2003 [Page 35] Internet Draft WebDAV SEARCHT. Berners-Lee, "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, June2003 DASL defines five descriptions. The first, DAV:datatype, provides a hint about the type of the property value,1999. [RFC3023] Makoto, M., St.Laurent, S. andmay be usefulD. Kohn, "XML Media Types", RFC 3023, January 2001. [RFC3253] Clemm, G., Amsden, J., Ellison, T., Kaler, C. and J. Whitehead, "Versioning Extensions toa user interface prompting for a value. The remaining four (DAV:searchable, DAV:selectable, DAV:sortable,WebDAV", RFC 3253, March 2002. [XML] Bray, T., Paoli, J., Sperberg-McQueen, C. andDAV:caseless) identify portions of the query (DAV:where, DAV:select,E. Maler, "Extensible Markup Language (XML) 1.0 (2nd ed)", W3C REC-xml, October 2000, <http://www.w3.org/TR/2000/ REC-xml-20001006>. [XMLNS] Bray, T., Hollander, D. andDAV:orderby, respectively). If a property has a description for a section, then the server MUST allow the property to be used in that section. These descriptions are optional. If a property does not have such a description, or is not described at all, then the server MAY still allow the property to be used in the corresponding section. 5.19.2.1 DAV:any-other-property This element can be usedA. Layman, "Namespaces inplace of DAV:prop to describe properties ofXML", W3C REC-xml-names, January 1999, <http://www.w3.org/ TR/REC-xml-names>. [XPATH] Clark, J. and S. DeRose, "XML Path Language (XPath) Version 1.0", W3C REC REC-xpath, November 1999, <http:// www.w3.org/TR/xpath>. [XS1] Thompson, H., Beech, D., Maloney, M., Mendelsohn, N. and World Wide Web Consortium, "XML Schema Part 1: Structures", W3C XS1, May 2001, <http://www.w3.org/TR/ xmlschema-1/>. [XS2] Biron, P., Malhotra, A. and World Wide Web Consortium, "XML Schema Part 2: Datatypes", W3C XS2, May 2001, <http:/ /www.w3.org/TR/xmlschema-2/>. Reschke, et al. Expires April 9, 2004 [Page 45] Internet-Draft WebDAVproperties not mentioned in any other DAV:prop element. For instance, this can be used to indicate that all other properties are searchableSEARCH October 2003 Informative References [BIND] Clemm, G., Crawford, J., Reschke, J., Slein, J. andselectable without giving details about their types (a typical scenario for dead properties). 5.19.3 The DAV:datatype Property Description The DAV:datatype element contains a single XML element that provides a hint about the domain of the property, which may be usefulJ. Whitehead, "Binding Extensions toa user interface promptingWebDAV", ID draft-ietf-webdav-bind-02, June 2003, <http:// www.webdav.org/bind/draft-ietf-webdav-bind-02.htm>. [CaseMap] Davis, M., "Case Mappings", Unicode Techical Reports 21, February 2001, <http://www.unicode.org/unicode/reports/ tr21>. [DASL] Reddy, S., Lowry, D., Reddy, S., Henderson, R., Davis, J. and A. Babich, "DAV Searching & Locating", ID draft-dasl-protocol-00, July 1999, <http://www.webdav.org/ dasl/protocol/draft-dasl-protocol-00.html>. [DASLREQ] Davis, J., Reddy, S. and J. Slein, "Requirements fora value to be used in a query. Datatypes are identified by an element name. Where appropriate, a server SHOULD use the simple datatypes defined in [XS2]. <!ELEMENT datatype ANY > Examples from [XS2], section 3: Qualified name Example xs:boolean true, false, 1, 0 xs:string Foobar xs:dateTime 1994-11-05T08:15:5Z xs:float .314159265358979E+1 xs:integer -259, 23DAV Searching and Locating", ID draft-dasl-requirements-01, February 1999, <http://www.webdav.org/dasl/requirements/ draft-dasl-requirements-01.html>. [SQL99] Milton, J., "Database Language SQL Part 2: Foundation (SQL/Foundation)", ISO ISO/IEC 9075-2:1999 (E), July 1999. Reschke, et al. Expires April 9, 2004 [Page 46] Internet-Draft WebDAV SEARCH October 2003 URIs [1] <mailto:www-webdav-dasl@w3.org> [2] <mailto:www-webdav-dasl-request@w3.org?subject=subscribe> [3] <http://lists.w3.org/Archives/Public/www-webdav-dasl/ 2003JanMar/0042.html> [4] <http://lists.w3.org/Archives/Public/www-webdav-dasl/ 2003JulSep/0012.html> [5] <http://lists.w3.org/Archives/Public/www-webdav-dasl/ 1999AprJun/0002.html> [6] <http://lists.w3.org/Archives/Public/www-webdav-dasl/ 2002AprJun/0047.html> [7] <http://lists.w3.org/Archives/Public/www-webdav-dasl/ 1999OctDec/0023.html> [8] <http://lists.w3.org/Archives/Public/www-webdav-dasl/ 2002JanMar/0163.html> [9] <http://lists.w3.org/Archives/Public/www-webdav-dasl/ 2003JulSep/0002.html> [10] <http://lists.w3.org/Archives/Public/www-webdav-dasl/ 2003JulSep/0012.html> [11] <http://lists.w3.org/Archives/Public/www-webdav-dasl/ 2003OctDec/0010.html> [12] <http://lists.w3.org/Archives/Public/www-webdav-dasl/ 2002JanMar/0122.html> [13] <http://lists.w3.org/Archives/Public/www-webdav-dasl/ 1999AprJun/0002.html> Reschke, et al. Expires April 9, 2004 [Page 47] Internet-Draft WebDAV SEARCH October 2003 Authors' Addresses Julian F. Reschke (editor) greenbytes GmbH Salzmannstrasse 152 Muenster, NW 48159 Germany Phone: +49 251 2807760 Fax: +49 251 2807761 EMail: julian.reschke@greenbytes.de URI: http://greenbytes.de/tech/webdav/ Surendra Reddy Oracle Corporation 600 Oracle Parkway, M/S 6op3 Redwoodshores, CA 94065 Phone: +1 650 506 5441 EMail: Surendra.Reddy@oracle.com Jim Davis Intelligent Markets 410 Jessie Street 6th floor San Francisco, CA 94103 EMail: jrd3@alum.mit.edu Alan Babich FileNET Corp. 3565 Harbor Blvd. Costa Mesa, CA 92626 Phone: +1 714 327 3403 EMail: ababich@filenet.com Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page36] Internet Draft48] Internet-Draft WebDAV SEARCHJuneOctober 2003If the data type of a property is not given, then the data type defaults to xs:string. 5.19.4 The DAV:searchable Property Description <!ELEMENT searchable EMPTY> If this elementAppendix A. Three-Valued Logic in DAV:basicsearch ANSI standard three valued logic ispresent, thenused when evaluating theserver MUST allow this property to appear within a DAV:where element where an operator allows a property. Allowing asearchdoes not mean that the property is guaranteed to becondition (as definedon every resource in the scope, it only indicates the server's willingness to check. 5.19.5 The DAV:selectable Property Description <!ELEMENT selectable EMPTY> This element indicates that the property may appearin theDAV:select element. 5.19.6 The DAV:sortable Property Description This element indicates that the property may appearANSI standard SQL specifications, for example inthe DAV:orderby element. <!ELEMENT sortable EMPTY> Reschke, et al. Expires December 2003 [Page 37] Internet Draft WebDAV SEARCH June 2003 5.19.7 The DAV:caseless Property Description This element only applies to properties whose data typeANSI X3.135-1992, section 8.12, pp. 188-189, section 8.2, p. 169, General Rule 1)a), etc.). ANSI standard three valued logic is"xs:string" and derived data types as per the DAV:datatype property description. Its presence indicates that compares performed for searches, andundoubtedly thecomparisons for ordering results onmost widely practiced method of dealing with thestring property will be caseless (the default is character-by-character). <!ELEMENT caseless EMPTY> 5.19.8 The DAV:operators XML Element The DAV:operators element describes every optional operator supportedissues of properties in the search condition not having aquery. (Mandatory operators arevalue (e.g., being null or notlisted since they are mandatorydefined) for the resource under scan, andpermit no variation in syntax.). All optional operators that are supported MUST be listedwith undefined expressions in theDAV:operators element. The listing for an operator consists of the operator (as an empty element), followedsearch condition (e.g., division byone elementzero, etc.). Three valued logic works as follows. Undefined expressions are expressions foreach operand. The operand MUST be either DAV:operand-property or DAV:operand-literal,whichindicate thattheoperand invalue of thecorresponding positionexpression is not defined. Undefined expressions are aproperty or a literal value, respectively. If an operator is polymorphic (allows more than one operand syntax) then each permitted syntax MUST be listed separately. <operators xmlns='DAV:'> <opdesc> <like/><operand-property/><operand-literal/> </opdesc> </operators> 5.19.9 Example of Query Schema for DAV:basicsearch <D:basicsearchschema xmlns:D="DAV:" Reschke, et al. Expires December 2003 [Page 38] Internet Draft WebDAV SEARCH June 2003 xmlns:xs="http://www.w3.org/2001/XMLSchema""> <D:properties> <D:propdesc> <D:prop><D:getcontentlength/></D:prop> <D:datatype><xs:nonNegativeInteger/></D:datatype> <D:searchable/><D:selectable/><D:sortable/> </D:propdesc> <D:propdesc> <D:prop><D:getcontenttype/><D:displayname/></D:prop> <D:searchable/><D:selectable/><D:sortable/> </D:propdesc> <D:propdesc> <D:prop><fstop xmlns="http://jennicam.org"/></D:prop> <D:selectable/> </D:propdesc> <D:propdesc> <D:any-other-property/> <D:searchable/><D:selectable/> </D:propdesc> </D:properties> <D:operators> <D:opdesc> <D:like/><D:operand-property/><D:operand-literal/> </D:opdesc> </D:operators> </D:basicsearchschema> This response lists four properties. The datatypecompletely separate concept from the truth value UNKNOWN, which is, in fact, well defined. Property names and literal constants are considered expressions for purposes of this section. If a property in thelast three properties iscurrent resource under scan has notgiven, so it defaultsbeen set toxs:string. All are selectable, anda value, then thefirst three may be searched. All butvalue of that property is undefined for thelast mayresource under scan. DASL 1.0 has no arithmetic division operator, but if it did, division by zero would beused inan undefined arithmetic expression. If any subpart of an arithmetic, string, or datetime subexpression is undefined, the whole arithmetic, string, or datetime subexpression is undefined. There are no manifest constants to explicitly represent undefined number, string, or datetime values. Since asort. OfBoolean value is ultimately returned by theoptional DAV operators, DAV:isdefinedsearch condition, arithmetic, string, andDAV:likedatetime expressions aresupported. Note: The schema discovery defined here does not provide for discovery of supported valuesalways arguments to other operators. Examples ofthe "caseless" attribute. This may requireoperators that convert arithmetic, string, and datetime expressions to Boolean values are thereply also list the mandatory operators. Reschke, et al. Expires December 2003 [Page 39] Internet Draft WebDAV SEARCH June 2003 6 Internationalization Considerations Clientssix relational operators ("greater than", "less than", "equals", etc.). If either or both operands of a relational operator have undefined values, then theopportunityrelational operator evaluates totag properties when they are stored in a language. The server SHOULD read this language-tagging by examiningUNKNOWN. Otherwise, thexml:lang attribute on any properties stored on a resource.relational operator evaluates to TRUE or FALSE, depending upon the outcome of the comparison. Thexml:lang attribute specifies a nationalized collation sequence when propertiesBoolean operators DAV:and, DAV:or and DAV:not arecompared. Comparisons when this attribute differs have undefined order.evaluated according to the following rules: UNKNOWN and UNKNOWN = UNKNOWN UNKNOWN or UNKNOWN = UNKNOWN Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page40] Internet Draft49] Internet-Draft WebDAV SEARCHJuneOctober 20037 Security Considerations This section is provided to detail issues concerning security implications of which DASL applications need to be aware. All of the security considerations of HTTP/1.1 also apply to DASL. In addition, this section will include security risks inherent in searchingnot UNKNOWN = UNKNOWN UNKNOWN andretrieval of resource propertiesTRUE = UNKNOWN UNKNOWN andcontent. A query must not allow one to retrieve information about values or existence of properties that one could not obtain via PROPFIND. (e.g. by use in DAV:orderby,FALSE = FALSE UNKNOWN and UNKNOWN = UNKNOWN UNKNOWN orin expressions on properties.) A server should prepare for denial of service attacks. For example a client may issue a query for which the result set is expensive to calculateTRUE = TRUE UNKNOWN ortransmit because many resources matchFALSE = UNKNOWN UNKNOWN ormustUNKNOWN = UNKNOWN Reschke, et al. Expires April 9, 2004 [Page 50] Internet-Draft WebDAV SEARCH October 2003 Appendix B. Change Log (to beevaluated. 7.1 Implications of XML External Entities XML supports a facility knownremoved by RFC Editor before publication) B.1 From draft-davis-dasl-protocol-xxx Feb 14, 1998 Initial Draft Feb 28, 1998 Referring to DASL as"external entities", defined inan extension to HTTP/1.1 rather than DAV. Added new sections "Notational Conventions", "Protocol Model", "Security Considerations". Changed section4.2.2 of [XML], which instruct an XML processor3 toretrieve and perform an inline include"Elements ofXML located at a particular URI. An external XML entity can be usedProtocol". Added some stuff toappend or modify the document type declaration (DTD) associated with an XML document. An external XML entity can also be usedintroduction. Added "result set" terminology. Added "IANA Considerations". Mar 9, 1998 Moved sub-headings of "Elements of Protocol" toinclude XML within the contentfirst level and removed "Elements of Protocol" Heading. Added anXML document. For non-validating XML, such as the XML usedsentence in introduction explaining that thisspecification, including an external XML entityisnot required by [XML]. However, [XML] does state that an XML processor may, at its discretion, include the external XML entity. External XML entities have no inherent trustworthinessa "sketch" of a protocol. Mar 11, 1998 Added orderby, data typing, three valued logic, query schema property, andare subject to all the attacks that are endemic to any HTTP GET request. Furthermore, it is possibleelement definitions foran external XML entityschema for basicsearch. April 8, 1998 - made changes based on last week's DASL BOF. May 8, 1998 Removed most of DAV:searcherror; converted tomodify the DTD, and hence affect the final formDAV:searchredirect Altered DAV:basicsearch grammar to use avoid use ofan XML document,ANY in DTD June 17, 1998 -Added details on Query Schema Discovery -Shortened list of data types June 23, 1998 moved data types before change history rewrote the data types section removed the casesensitive element and replace with theworst case significantly modifying its semantics, or exposingcasesensitive attribute added theXML processorcasesensitive attribute to thesecurity risks discussed in [RFC3023]. Therefore, implementers must be aware that external XML entities should be treated as untrustworthy. There is also the scalability riskDTD for all operations thatwould accompanymight work on awidely deployed application which made use of external XML entities. In this situation, it is possible that there would be significant numbersstring Jul 20, 1998 A series ofrequests for one external XML entity, potentially overloading any server which fields requestschanges. See Author's meeting minutes forthe resource containing the external XML entity. Reschke, et al. Expires December 2003 [Page 41] Internet Draft WebDAV SEARCH June 2003 8 Scalability Query grammars are identified by URIs. Applications SHOULDdetails. July 28, 1998 Changes as per author's meeting. QSD uses SEARCH, notattempt to retrieve these URIs even if they appear to be retrievable (for example, those that begin with "http://") Reschke, et al. Expires December 2003 [Page 42] Internet Draft WebDAV SEARCH June 2003 9 Authentication Authentication mechanisms defined in WebDAV will also applyPROPFIND. Moved text around toDASL. Reschke, et al. Expires December 2003 [Page 43] Internet Draft WebDAV SEARCH June 2003 10 IANA Considerations This document uses the namespace defined by [RFC2518] for XML elements. All other IANA considerations mentioned in [RFC2518]keep concepts nearby. Boolean literals arealso applicable to DASL. Reschke, et al. Expires December 2003 [Page 44] Internet Draft WebDAV SEARCH June 2003 11 Copyright To be supplied.1 and 0, not T and F. contains changed to contentspassthrough. Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page45] Internet Draft51] Internet-Draft WebDAV SEARCHJune 2003 12 Intellectual Property To be supplied. Reschke, et al. Expires DecemberOctober 2003[Page 46] Internet Draft WebDAV SEARCHRenamed rank to score. July 28, 1998 Added Dale Lowry as Author September 4, 1998 Added 422 as response when query lists unimplemented operators. DAV:literal declares a default value for xml:space, 'preserve' (see XML spec, section 2.10) moved to new XML namespace syntax September 22, 1998 Changed "simplesearch" to "basicsearch" Changed isnull to isdefined Defined NULLness as having a 404 or 403 response used ENTITY syntax in DTD Added redirect October 9, 1998 Fixed a series of typographical and formatting errors. Modified the section of three-valued logic to use a table rather than a text description of the role of UNKNOWN in expressions. November 2, 1998 Added the DAV:contains operator. Removed the DAV:contentpassthrough operator. November 18, 1998 Various author comments for submission June2003 13 Acknowledgements This draft has benefited from thoughtful discussion3, 1999 Cosmetic and minor editorial changes only. Fix nits reported byLisa Dusseault, Sung Kim, Elias Sinderson, Martin WallmerJim Whitehead in email of April 26, 1999. Converted to HTML from Word 97, manually. April 20, 2000 Removed redirection feature, since 301/302 suffices. Removed Query Schema Discovery (former chapter 4). Everyone agrees this is a useful feature, but it is apparently too difficult to define at this time, and it is not essential for DASL. B.2 since start of draft-reschke-webdav-search October 09, 2001 Added Julian Reschke as author. Chapter about QSD re-added. Formatted into RFC2629-compliant XML document. Added first comments. ID version number kicked up to draft-dasl-protocol-03. October 17, 2001 Updated address information for JimWhitehead.Davis. Added issue of datatype vocabularies. Updated issue descriptions for grammar discovery, added issues on query schema DTD. Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page47] Internet Draft52] Internet-Draft WebDAV SEARCHJuneOctober 2003Normative References [ACL] Clemm, G., Hopkins, A., Sedlar, E. and Whitehead, J., "WebDAV Access Control Protocol", ID draft-ietf-webdav- acl-09, July 2002. [RFC2119] Bradner, S., "Key words for useFixed typos inRFCsXML examples. December 17, 2001 Re-introduced split between normative and non-normative references. January 05, 2002 Version bumbed up toIndicate Requirement Levels", BCP04. Started work on resolving the issues identified in the previous version. January 14,RFC 2119, March 1997. [RFC2518] Goland, Y., Whitehead, E., Faizi, A., Carter, S.R. and Jensen, D., "HTTP Extensions for Distributed Authoring -- WEBDAV", RFC 2518, February 1999. [RFC2616] Fielding, R.T., Gettys, J., Mogul, J.C., Nielsen, H.F., Masinter, L., Leach, P.J. and Berners-Lee, T., "Hypertext Transfer Protocol -- HTTP/1.1", RFC 2616, June 1999. [RFC3023] Makoto, M., St.Laurent, S. and Kohn, D., "XML Media Types", RFC 3023,2002 Fixed some XML typos. January2001. [RFC3253] Clemm, G., Amsden, J., Ellison, T., Kaler, C.22, 2002 Closed issues naming-of-elements. Fixed query search DTD andWhitehead, J., "Versioning Extensionsadded option toWebDAV", RFC 3253, March 2002. [XML] Bray, T., Paoli, J., Sperberg-McQueen, C.M. and Maler, E., "Extensible Markup Language (XML) 1.0 (2nd ed)", W3C REC- xml, October 2000. [XMLNS] Bray, T., Hollander, D. and Layman, A., "Namespaces in XML", W3C REC-xml-names,discover properties of "other" (non-listed) properties. January1999. [XS1] Thompson, H. S., Beech, D., Maloney, M., Mendelsohn, N.25, 2002 Changed into private submission andWorld Wide Web Consortium, "XML Schema Part 1: Structures", W3C XS1, May 2001. [XS2] Biron, P. V., Malhotra, A.added reference to historic DASL draft. Marked reference to DASL requirements non-normative. Updated reference to latest deltav spec. January 29, 2002 Added feedback from andWorld Wide Web Consortium, "XML Schema Part 2: Datatypes", W3C XS2, May 2001. Informative References [BIND] Clemm, G., Crawford, J., Reschke, J. F., Slein, J.updated contact info for Alan Babich. Included open issues collected in http://www.webdav.org/dasl/ protocol/issues.html. February 8, 2002 Made sure that all artwork fits into 72 characters wide text. February 18, 2002 Changed Insufficient storage handling (multistatus). Moved is-collection to operators andWhitehead, J., "Binding Extensionsadded toWebDAV", ID draft- ietf-webdav-bind-00, October 2002. Reschke, et al. Expires December 2003 [Page 48] Internet Draft WebDAV SEARCH June 2003 [CaseMap] Davis, M., "Case Mappings", Unicode Techical Reports 21,DTD. Made scope/depth mandatory. February2001. [DASL] Reddy, S., Lowry, D., Reddy, S., Henderson, R., Davis, J.20, 2002 Updated reference to SQL99. February 28, 2002 "Non-normative References" -> "Informative References". Abstract updated. Consistently specify a charset when using text/xml (no change bars). Do not attempt to define PROPFIND's entity encoding (take out specific references to text/ xml). Remove irrelevant headers (Connection:) from examples (no change bars). Added issue on querying based on DAV:href. Updated introduction to indicate relationship to DASL draft. Updated HTTP reference from RFC2068 to RFC2616. Updated XML reference to XML 1.0 2nd edition. March 1, 2002 Removed superfluous namespace decl in 2.4.2. Reopened JW14 andBabich, A., "DAV Searching & Locating", ID draft-dasl- protocol-00, Julysuggest to drop xml:space support. Reschke, et al. Expires April 9, 2004 [Page 53] Internet-Draft WebDAV SEARCH October 2003 March 3, 2002 Removed "xml:space" feature on DAV:literal. Added issue about string comparison vs. collations vs. xml:lang. Updated some of the open issues with details from JimW's original mail in April 1999.[DASLREQ] Davis, J., Reddy, S.Resolved scope vs relative URI references. Resolved issues about DAV:ascending (added to index) andSlein, J., "Requirementsthe BNF forDAV SearchingDAV:like (changed "octets" to "characters"). March 8, 2002 Updated reference to DeltaV (now RFC3253). Added Martin Wallmer's comments, moved JW5 into DAV:basicsearch section. March 11, 2002 Closed open issues regaring the type of search arbiters (JW3) andLocating", ID draft-dasl-requirements-01, February 1999. [SQL99] Milton, J., "Database Language SQL Part 2: Foundation (SQL/Foundation)", ISO ISO/IEC 9075-2:1999 (E), July 1999. Author's Addresses Julian F. Reschke (editor) greenbytes GmbH Salzmannstrasse 152 Muenster, NW 48159 Germany Phone: +49 251 2807760 Fax: +49 251 2807761 EMail: julian.reschke@greenbytes.de URI: http://greenbytes.de/tech/webdav/ Surendra Reddy Oracle Corporation 600 Oracle Parkway, M/S 6op3 Redwoodshores, CA 94065 Phone: +1 650 506 5441 EMail: Surendra.Reddy@oracle.com Jim Davis Intelligent Markets 410 Jessie Street 6th floor San Francisco, CA 94103 EMail: jrd3@alum.mit.edutheir discovery (JW9). Rephrased requirements on multistatus response bodies (propstat only if properties were selected, removed requirement for responsedescription). March 23, 2002 RFC2376 -> RFC3023. Added missing first names of authors. OPTIONS added to example for DAV:supported-method-set. B.3 since draft-reschke-webdav-search-00 March 29, 2002 Abstract doesn't refer to DASL WG anymore. April 7, 2002 Fixed section title (wrong property name supported-search-grammar-set. Changed DAV:casesensitve to "casesensitive" (it wasn't in the DAV: namespace after all). May 28, 2002 Updated some issues with Jim Davis's comments. June 10, 2002 Added proposal for different method for query schema discovery, not using pseudo-properties. June 25, 2002 QSD marshalling rewritten. Added issue "isdefined-optional". B.4 since draft-reschke-webdav-search-01 July 04, 2002 Added issue "scope-collection". July 08, 2002 Closed issue "scope-collection". August 12, 2002 Added issues "results-vs-binds" and "select-allprop". October 22, 2002 Added issue "undefined-expressions". Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page49] Internet Draft54] Internet-Draft WebDAV SEARCHJuneOctober 2003Alan Babich FileNET Corp. 3565 Harbor Blvd. Costa Mesa, CA 92626 Phone: +1 714 327 3403 EMail: ababich@filenet.comNovember 18, 2002 Changed example host names (no change tracking). November 25, 2002 Updated issue "DB2/DB7". Closed issues "undefined expressions", "isdefined-optional" and "select-allprop". B.5 since draft-reschke-webdav-search-02 November 27, 2002 Added issues "undefined-properties", "like-exactlyone" and "like-wildcard-adjacent". Closed issue "query-on-href". Added acknowledgments section. November 28, 2002 Closed issue "like-exactlyone". Added issue "mixed-content-properties". December 14, 2002 Closed issues "undefined-properties", "results-vs-binds", "mixed-content-properties". Updated issue "like-wildcard-adjacent". Added informative reference to BIND draft. Updated reference to ACL draft. January 9, 2003 Removed duplicate section on invalid scopes. Added comments to some open issues. Closed issues JW25/26, score-pseudo-property and null-ordering. January 10, 2003 Issue limit-vs-ordering plus resolution. Closed issue JW17/JW24b. January 14, 2003 New issue order-precedence. Started resolution of DB2/DB7. January 15, 2003 Started spec of DAV:typed-literal. January 17, 2003 Fix one DAV:like/DAV:getcontenttype example (add / to like expression, make case-insensitive). January 28, 2003 Update issue(s) result-truncation, JW24d. Fixed response headers in OPTIONS example. Added issue qsd-optional. Closed issue(s) order-precedence, case-insensitivity-name. February 07, 2003 Added issue scope-vs-versions. score-pseudo-property: allow DAV:orderby to explicitly specify DAV:score. B.6 since draft-reschke-webdav-search-03 Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page50] Internet Draft55] Internet-Draft WebDAV SEARCH October 2003 April 24, 2003 Fixed two "?" vs "_" issues (not updated in last draft). June 13, 2003A Three-Valued LogicImprove index. B.7 since draft-reschke-webdav-search-04 July 7, 2003 Typo fixed (propstat without status element). August 11, 2003 Remove superfluous IP and copyright sections. September 09, 2003 Added issues "2.4-multiple-uris" and "5.1-name-filtering". October 06, 2003 Fix misplaced section end inDAV:basicsearch ANSI standard three valued logic is used when evaluating the search condition (as defined5.11, add table formatting. Enhance table formatting inthe ANSI standard SQL specifications,5.18.3. Updated ACL and BIND references. Added XPATH reference. Closed issue JW24d by adding new optional operators. Updated more open issues, added issues from January meeting. Add K. Wiggen to Acknowledgements. Add Contributors section forexamplethe authors of the original draft. Close issue "scope-vs-versions" (optional feature added). Close (new) issue "1.3-import-DTD-terminology". Add issue "1.3-import-requirements-terminology". October 07, 2003 Typos fixed. Moved statement about DAV: namespace usage into separate (sub-)section. Closed "1.3-import-requirements-terminology". Update I18N Considerations with new xml:lang support info (see issue JW24d). Close issue "DB2/DB7" (remaining typing issues are now summarized inANSI X3.135-1992,issue "typed-literal"). Fix misplaced section8.12, pp. 188-189,end in section8.2, p. 169, General Rule 1)a), etc.). ANSI standard three valued logic is undoubtedly7. Started change to use RFC3253-style method definitions and error marshalling. October 08, 2003 Remove obsolete language that allowed reporting invalid scopes and such inside multistatus. Add new issue "5.4.2-scope-vs-redirects". Reschke, et al. Expires April 9, 2004 [Page 56] Internet-Draft WebDAV SEARCH October 2003 Appendix C. Resolved issues (to be removed by RFC Editor before publication) Issues that were either rejected or resolved in this version of this document. C.1 1.3-import-condition-code-terminology Type: change [3] julian.reschke@greenbytes.de (2003-10-05): Import RFC3253 pre/ postcondition code terminology and use it throughout the document to identify conditions. Resolution: Section 2.5 rewritten. C.2 1.3-import-requirements-terminology Type: change julian.reschke@greenbytes.de (2003-10-06): Import terminology from DASLREQ. Resolution: Done. C.3 1.3-import-DTD-terminology Type: change [4] julian.reschke@greenbytes.de (2003-09-27): Import DTD usage notes from ordering spec. C.4 invalid-scope Type: change julian.reschke@greenbytes.de (2003-01-09): Marshalling a BAD REQUEST with an (extended) multistatus body seems to be a weird approach. Should be resolved by finally adopting the RFC3253 error marshalling. julian.reschke@greenbytes.de (2003-01-28): Funny enough, Roy Fielding's feedback on a related issue indicates that this may be themost widely practiced method of dealingabsolutely right thing to do. Needs coordination with RFC2518bis activity. Reschke, et al. Expires April 9, 2004 [Page 57] Internet-Draft WebDAV SEARCH October 2003 Resolution: Document style change to use RFC3253 preconditions. C.5 JW24d Type: edit [5] ejw@ics.uci.edu (2000-04-20): Where does xml:lang go in a query? julian.reschke@greenbytes.de (2002-02-28): What would be theissues*purpose* ofproperties inputting xml:lang into a query? jrd3@alum.mit.edu (2002-05-28): The purpose is to allow one to express queries more precisely, e.g. to distinguish between thesearch condition not havingEnglish word "hoop" (a circular object) and Dutch "hoop" (hope). Imagine avalue (e.g., being null or not defined)property that holds keywords forthe resource under scan,a resource. See 4.4 in http://www.ietf.org/rfc/rfc2518.txt, andwith undefined expressions2.12 in http://www.w3.org/ TR/REC-xml julian.reschke@greenbytes.de (2002-05-28): I think this would be an interesting feature, but it seems to be extremely hard to implement. So assuming a query that - thesearch condition (e.g., division by zero, etc.). Three valued logic works as follows. Undefined expressions are expressions for whichquery specifies a language and - be thevaluetext content of theexpression is not defined. Undefined expressions are a completely separate concept fromproperty matches The result will be: 1) true (match), if thetruth value UNKNOWN, which is, in fact, well defined. Property names and literal constants are considered expressions for purposes of this section. Ifproperty was stored with a matching xml:lang propertyin(where thecurrent resource under scan has not been setlanguage tag matching rules would have toa value, thenapply) 2) undefined if thevalue of thatpropertyis undefined forwas stored without xml:lang 3) false otherwise On theresource under scan. DASL 1.0 has no arithmetic division operator, butother hand ifit did, division by zero would be an- the query doesn't specify a language the result will be: 4) undefinedarithmetic expression. If any subpart of an arithmetic, string, or datetime subexpression is undefined,(at least according to the current wording). So, 1) requires that thewhole arithmetic, string, or datetime subexpression is undefined. There are no manifest constantsquery engine actually knows how toexplicitly represent undefined number, string, or datetime values. Since a Boolean valuematch language tags -- I'm not sure that everybody isultimately returned by the search condition, arithmetic, string, and datetime expressions are always argumentswilling toother operators. Examples of operatorsimplement that. 2) is this desirable? 3) ok. 4) thatconvert arithmetic, string, and datetime expressionsseems toBoolean values are the six relational operators ("greater than", "less than", "equals", etc.).be wrong. Ifeither or both operandsthe query doesn't care, it should match, right? Other problems: - what is the language of arelational operator have undefined values, thendate-typed property? - (sic!) where should xml:lang go into therelational operator evaluatesquery? There's no XML feature toUNKNOWN. Otherwise,undefine an xml:lang which is in scope, but there may be cases where this is needed. On therelational operator evaluates to TRUE or FALSE, depending uponother hand, if we drop this requirement, a client can still do a query and then process theoutcome ofresult set -- thecomparison. The Boolean operators DAV:and, DAV:or and DAV:not are evaluated accordingproperty elements in the response body will be reported with xml:lang (when persisted with language) anyway. So I'd recommend to drop thefollowing rules: UNKNOWN and UNKNOWN = UNKNOWN UNKNOWN or UNKNOWN = UNKNOWN Reschke, et al. Expires December 2003 [Page 51] Internet Draft WebDAV SEARCH June 2003 not UNKNOWN = UNKNOWN UNKNOWN and TRUE = UNKNOWN UNKNOWN and FALSE = FALSE UNKNOWN and UNKNOWN = UNKNOWN UNKNOWN or TRUE = TRUE UNKNOWN or FALSE = UNKNOWN UNKNOWN or UNKNOWN = UNKNOWNfeature. Defining string comparisons vs. collation sequences is hard enough. julian.reschke@greenbytes.de (2003-01-09): (Proposal to reject) julian.reschke@greenbytes.de (2003-01-28): WG meeting feedback: should be moved into explicit operators (see proposal on mailing list). Open: is this optional or required? Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page52] Internet Draft58] Internet-Draft WebDAV SEARCHJuneOctober 2003B Change Log B.1 From draft-davis-dasl-protocol-xxx Feb 14, 1998 Initial Draft Feb 28, 1998 Referring to DASL as an extension to HTTP/1.1 rather than DAV. AddedResolution: Add newsections "Notational Conventions", "Protocol Model", "Security Considerations". Changed section 3 to "Elements of Protocol". Added some stuffoptional operators. C.6 scope-vs-versions Type: change [6] julian.reschke@greenbytes.de (2003-02-05): A relatively frequent use case for servers that both support versioning and DASL seems tointroduction. Added "result set" terminology. Added "IANA Considerations". Mar 9, 1998 Moved sub-headingshave searches that include all versions of"Elementsthe resources in scope. In general, the version URIs may not be in the scope ofProtocol"the query. Therefore, I'd like tofirst level and removed "Elementsextend the DAV:scope to specify inclusion ofProtocol" Heading. Addedversions. This would be ansentence in introduction explainingoptional extension -- however, a server thatthis isdoes not support his feature should reject the request (so that the client would know that the request could not be satisfied). Example: <d:from xmlns:d="DAV:"> <d:scope> <d:href>/container1/</ d:href> <d:depth>infinity</d:depth> <d:include-versions /> </d:scope> </d:from> Martin.Wallmer@softwareag.com (2003-02-06): just to clarify: 1. If a"sketch"resource in scope has versions, the server SHOULD take care ofa protocol. Mar 11, 1998 Added orderby, data typing, three valued logic, query schema property, and element definitions for schema for basicsearch. April 8, 1998 - made changes based on last week's DASL BOF. May 8, 1998 Removed mostversions as well. 2. If the client specifies <d:include-versions />, the server MUST take care ofDAV:searcherror; converted to DAV:searchredirect Altered DAV:basicsearch grammarversions or MUST reject the request. 3. If the user does not want touse avoid use of ANYget versions, he must specify <not xmlns="DAV:"><is-defined><version-name /></is-defined></not> ... Is my understanding correct? However, a defined "switch" (include - exclude) could be a good hint for the server inDTD June 17, 1998 -Added details on Query Schema Discovery -Shortened listterms ofdata types June 23, 1998 moved data types before change history rewrote the data types section removedperformance, so I'd prefer a <d:exclude-versions/> as well. Alternatively thecasesensitive element and replace withserver should only include thecasesensitive attribute addedversions, if <d:include-versions /> is specified. Does this make sense? julian.reschke@greenbytes.de (2003-02-06): I don't like that, because I'd prefer to keep thecasesensitive attributedefinition of "scope" intact. If versions happen to be in theDTD for all operations that might work on a string Jul 20, 1998 A seriesnamespace scope, they should be in scope ofchanges. See Author's meeting minutes for details. July 28, 1998 Changesthe search asper author's meeting. QSD uses SEARCH, not PROPFIND. Moved text aroundwell. Thus the proposal tokeep concepts nearby. Boolean literals are 1 and 0, not T and F. contains changedadd a specific element that *extends* the scope of the query. C.7 DB2/DB7 Type: change [7] ejw@ics.uci.edu (2000-04-20): Dates (HTTPDate in getlastmodified). ejw@ics.uci.edu (2000-04-20): Agreement that it is OK tocontentspassthrough. Renamed ranksubmit isodate toscore. July 28, 1998 Added Dale Lowry as Author September 4, 1998 Added 422 as response when query lists unimplemented operators.search HTTPDate (i.e., it's a marshalling issue only). Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page53] Internet Draft59] Internet-Draft WebDAV SEARCHJuneOctober 2003DAV:literal declaresejw@ics.uci.edu (2000-04-20): Booleans appear to be underspecified in the specification. How is adefault value for xml:space, 'preserve' (see XML spec, section 2.10) movedboolean tested, and what are the behavior of operators like less than, greater than, etc. julian.reschke@greenbytes.de (2002-01-28): I think similar questions apply tonewbooleans. Proposal: allow specification of the literal's type using XMLnamespace syntax September 22, 1998 Changed "simplesearch"Schema simple types, and declare that "both" WebDAV date types are compatible. ABabich@filenet.com (2002-01-29): The current DASL draft doesn't really have Booleans or any other data type. It's trying to skate on data types. Booleans could be tested using the "eq" and the combination "not eq", if you had well defined literals for TRUE and FALSE. With the current syntax, that is the way you would have to"basicsearch" Changed isnulltest a Boolean. Generally, Boolean values are not considered toisdefined Defined NULLness as havingbe ordered, so "gt" etc. wouldn't apply. However, if the literal values of a404 or 403 responseBoolean were 1 and 0 for TRUE and FALSE (using the most commonly usedENTITY syntax in DTD Added redirect October 9, 1998 Fixed a seriesconvention oftypographicalpositive logic), then you would have an obvious ordering. 1 andformatting errors. Modified0 have thesectionadvantage ofthree-valued logic to use a table rather thanbeing language independent. You now see atext descriptionlot of electronic and electro-mechanical devices (air conditioners, computers, etc.) with a "1/0" label on therolepower switch, "1" meaning "on", and "0" meaning "off". SQL databases don't have Booleans. SQL doesn't control DASL, ofUNKNOWNcourse, but SQL databases are so widely used that they are important. The closest thing inexpressions. November 2, 1998 Added the DAV:contains operator. RemovedSQL is a bit field. Each bit in a bit field is zero or 1. So, why not close theDAV:contentpassthrough operator. November 18, 1998 Various author commentsissue by saying: DASL doesn't have data types. You can simulate Booleans by an integer data type, using 1 forsubmission June 3, 1999 Cosmetic"TRUE" andminor editorial changes only. Fix nits reported by Jim Whitehead in email of April 26, 1999. Converted0 for "FALSE". julian.reschke@greenbytes.de (2002-10-22): let's consider a dead property "foo", and some resources a, b and c on which this dead property is defined and has the values "1", "3" and "10". Consider a DAV:basicsearch with the where clause: <gte xmlns="DAV:"> <prop><foo xmlns=""/></prop> <literal>3</literal> </gte> Which resource will match? As DAV:basicsearch currently isn't type-aware, the server will have toHTML from Word 97, manually. April 20, 2000 Removed redirection feature, since 301/302 suffices. Removed Query Schema Discovery (former chapter 4). Everyone agreesdo a string comparison, and only the b (with value "3") will match. Is thisisreally sufficient? It basically means that dead property comparisons are restricted to strings. Proposals: a) If the server happens to have type information for auseful feature, butdead property, itis apparently too difficultshould try todefine atdo a comparison according to the known property type, if the literal can be parsed into thistime, andtype. This basically replicates the behaviour that a client would expect when querying on live properties such as DAV:getcontentlength, so itis not essential for DASL. B.2 since start of draft-reschke-webdav-search October 09, 2001 Added Julian Reschkecould be taken asauthor. Chapter about QSD re-added. Formatted into RFC2629-compliant XML document. Added first comments. ID version number kicked up to draft-dasl- protocol-03. October 17, 2001 Updated address information for Jim Davis. Added issue of datatype vocabularies. Updated issue descriptions for grammar discovery, added issues on query schema DTD. Fixed typosa simple clarification. Extended proposal: b) A client can enforce comparison using a specific data type by specifying the type inXML examples. December 17, 2001 Re-introduced split between normative and non- normative references.the query, for instance using: <gte xmlns="DAV:"> <prop><foo xmlns=""/></ prop> <literal xsi:type="xs:long">3</literal> </gte> Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page54] Internet Draft60] Internet-Draft WebDAV SEARCHJuneOctober 2003January 05, 2002 Version bumbed up to 04. Started work on resolving the issues identified in the previous version. January 14, 2002 Fixed some XML typos. January 22, 2002 Closed issues naming-of-elements. Fixed query search DTD and added option to discover properties of "other" (non-listed) properties. January 25, 2002 Changed into private submission and added reference to historic DASL draft. Marked reference to DASL requirements non-normative. Updated referenceMartin.Wallmer@softwareag.com (2002-11-25): What about existing implementations? Currently a server might react with "xsi:type unknown entity" or just ignore it (which would mean: String comparison) julian.reschke@greenbytes.de (2002-11-25): OK, how about *adding* an alternative tolatest deltav spec. January 29, 2002 Added feedback from and updated contact info for Alan Babich. Included open issues collected in http://www.webdav.org/dasl/protocol/issues.html. February 8, 2002 Made sure that all artwork fits into 72 characters wide text. February 18, 2002 Changed Insufficient storage handling (multistatus). Moved is-collectionDAV:literal? Therefore: DAV:literal: untyped, server can compare according tooperators and addedit's internal knowledge of types (with the clarification above) DAV:typed-literal: typed according toDTD. Made scope/depth mandatory. February 20, 2002 Updated referencethe xsi:type attribute -- "new" servers can implement this without affecting any existing code. We'll need toSQL99. February 28, 2002 "Non-normative References" -> "Informative References". Abstract updated. Consistently specify a charset when using text/xml (no change bars). Do not attemptthink about discovery of this feature, though. It might be possible to do this with QSD (in the meantime, are there any QSD implementations except ours?) Resolution: WG meeting feedback: definePROPFIND's entity encoding (take out specific referencesDAV:typed-literal. Also allow DAV:literal totext/xml). Remove irrelevant headers (Connection:) from examples (nobe evaluated by the server according "internal" type knowledge. Require timestamps to be ISO, even for DAV:getlastmodified. Reschke, et al. Expires April 9, 2004 [Page 61] Internet-Draft WebDAV SEARCH October 2003 Appendix D. Open issues (to be removed by RFC Editor before publication) D.1 1.3-apply-condition-code-terminology Type: changebars). Addedjulian.reschke@greenbytes.de (2003-10-07): (Umbrella issueon querying based on DAV:href. Updated introduction to indicate relationship to DASL draft. Updated HTTP reference from RFC2068that will be left open until RFC3253 condition terminlogy is used throughout the document) D.2 2.4-multiple-uris Type: change julian.reschke@greenbytes.de (2003-09-09): However, the set of URIs for a given resource may be unlimited due toRFC2616. Updated XML referencepossible bind loops. Therefore consider toXML 1.0 2nd edition. March 1, 2002 Removed superfluous namespace decl in 2.4.2. Reopened JW14report just one URI per resource. D.3 result-truncation Type: change [8] ldusseault@xythos.com (2002-03-29): I believe the same response body that contains the first N <DAV:response> elements should also contain a *different* element stating that the results were incomplete andsuggestthe result set was truncated by the server. There may also be a need todrop xml:space support. March 3, 2002 Removed "xml:space" feature on DAV:literal. Added issue about string comparison vs. collations vs. xml:lang. Updated somereport that the results were incomplete and the result set was truncated at the choice of theopen issuesclient (isn't there a limit set in the client request?) That's important so the client knows the difference between receiving 10 results because there were >10 but only 10 were asked for, and receiving 10 results because there were only exactly 10 results and it just happens that 10 were asked for. jrd3@alum.mit.edu (2002-05-28): I agree that this could be useful, but I think this issue should be consolidated withdetails from JimW's original mailissue JW5 (see below), which proposes that DASL basicsearch ought to have a way for client to request additional result sets. It should be moved because there is little or no value inApril 1999. Resolved scope vs relative URI references. Resolved issues about DAV:ascending (addedallowing a client toindex) anddistinguish between theBNFcase where "N results were requested, and there are exactly N available" and "N results were requested, and there are more than N available" if there is no way forDAV:like (changed "octets" to "characters"). March 8, 2002 Updated referenceclient toDeltaV (now RFC3253). Added Martin Wallmer's comments, moved JW5 into DAV:basicsearch section. March 11, 2002 Closed open issues regaringget thetypenext batch ofsearch arbiters (JW3)results. julian.reschke@greenbytes.de (2003-01-28): Feedback from interim WG meeting: agreement that marshalling should be rewritten andtheir discovery (JW9). Rephrased requirements on multistatus response bodiesbackwards compatibility is not important. Proposal: extend DAV:multistatus by a Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page55] Internet Draft62] Internet-Draft WebDAV SEARCHJuneOctober 2003(propstat only if properties were selected, removed requirementnew child element that indicates (1) the range that was returned, (2) the total number of results and (3) a URI identifying the result (for resubmission when getting the "next" results). Such as <multistatus xmlns='DAV:'> <search-result> <href>...identifier forresponsedescription). March 23, 2002 RFC2376 -> RFC3023. Added missing first namesresult set...</ href> <total><-- number ofauthors. OPTIONS added to exampleresults --></total> <start><-- 1-based index of 1st result --></start> <length><-- size of result set returned --></length> <partial-result/><-- indicates that this is a partial result --> </search-result> ...response elements forDAV:supported-method-set. B.3 since draft-reschke-webdav-search-00 March 29, 2002 Abstract doesn't refersearch results... </multistatus> The example below would then translate to: HTTP/1.1 207 Multistatus Content-Type: text/xml; charset="utf-8" Content-Length: xxx <?xml version="1.0" encoding="utf-8"?> <D:multistatus xmlns:D="DAV:"> <D:search-result> <D:partial-result/> </D:search-result> <D:response> <D:href>http://www.example.net/ sounds/unbrokenchain.au</D:href> <D:propstat> <D:prop/> <D:status>HTTP/1.1 200 OK</D:status> </D:propstat> </D:response> <D:response> <D:href>http://tech.mit.test/archive96/photos/ Lesh1.jpg</D:href> <D:propstat> <D:prop/> <D:status>HTTP/1.1 200 OK</ D:status> </D:propstat> </D:response> </D:multistatus> Q: do we need all elements, in particular start and length? julian.reschke@greenbytes.de (2003-10-07): Related: if this is supposed toDASL WG anymore. April 7, 2002 Fixed section title (wrong property name supported- search-grammar-set. Changed DAV:casesensitvebe normative to"casesensitive" (it wasn'tDAV:basicsearch, it can't stay inthe DAV: namespace after all). May 28, 2002 Updated some issues with Jim Davis's comments. June 10, 2002 Added proposal for different method for query schema discovery, not using pseudo-properties. June 25, 2002an "example" sub-section. D.4 qsd-optional Type: change julian.reschke@greenbytes.de (2003-01-28): WG January meeting feedback: QSDmarshalling rewritten. Added issue "isdefined- optional". B.4 since draft-reschke-webdav-search-01 July 04, 2002 Added issue "scope-collection". July 08, 2002 Closed issue "scope-collection". August 12, 2002 Added issues "results-vs-binds" and "select- allprop". October 22, 2002 Added issue "undefined-expressions". November 18, 2002 Changed example host names (noshould be made required. kwiggen@xythos.com (2003-10-03): (significant pushback, see mailing list thread at http://lists.w3.org/Archives/Public/www-webdav-dasl/ 2003OctDec/0003.html). D.5 5.1-name-filtering Type: changetracking). November 25, 2002 Updated issue "DB2/DB7". Closed issues "undefined expressions", "isdefined-optional"[9] julian.reschke@greenbytes.de (2003-09-08): This query grammar supports properties and"select- allprop". B.5 since draft-reschke-webdav-search-02content, but not conditions on URL elements (such as the last segment that many WebDAV implementations treat as "file name"). Discuss possible extension such as adding name filters to the scope, or adding a specific operator. Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page56] Internet Draft63] Internet-Draft WebDAV SEARCHJuneOctober 2003November 27, 2002 Added issues "undefined-properties", "like- exactlyone" and "like-wildcard-adjacent". Closed issue "query-on-href". Added acknowledgments section. November 28, 2002 Closed issue "like-exactlyone". Added issue "mixed- content-properties". December 14, 2002 Closed issues "undefined-properties", "results-vs- binds", "mixed-content-properties". Updated issue "like-wildcard-adjacent". Added informative reference to BIND draft. Updated referenceD.6 5.4.2-multiple-scope Type: change [10] prakash.yamuna@covigna.com (2003-09-27): (asks for the ability toACL draft. January 9, 2003 Removed duplicate sectionspecify multiple scopes in a single query) julian.reschke@greenbytes.de (2003-10-03): Consider making this an optional extension iff we can come up with a simple enough definition of it's impact oninvalid scopes. Added comments to some open issues. Closed issues JW25/26, score-pseudo-propertysorting/ranking andnull-ordering. January 10, 2003 Issue limit-vs-ordering plus resolution. Closed issue JW17/JW24b. January 14, 2003 New issue order-precedence. Started resolutionso on. Otherwise propose to reject. D.7 5.4.2-scope-vs-redirects Type: change [11] julian.reschke@greenbytes.de (2003-10-08): Clarify the relation ofDB2/DB7. January 15, 2003 Started specscope and redirect (3xx) resources. D.8 language-comparison Type: change [12] julian.reschke@greenbytes.de (2002-03-03): XPath/XQuery (see draft, and open issue) specify string comparisons based on collations, not languages. I think we should adopt this. This would mean that "xml:lang" would be removed, and an optional attribute specifying the name ofDAV:typed-literal. January 17, 2003 Fix one DAV:like/DAV:getcontenttype example (add / to like expression, make case-insensitive). January 28, 2003 Update issue(s) result-truncation, JW24d. Fixed response headersthe collation is added. julian.reschke@greenbytes.de (2003-01-09): Proposal: adopt "lang" and "collation" attribute from XSLT 2.0's xsl:sort. D.9 JW16b/JW24a Type: change [13] ejw@ics.uci.edu (2000-04-20): Define how comparisons on strings work, esp for i18n. Need policy statement about sort order inOPTIONS example. Added issue qsd-optional. Closed issue(s) order-precedence, case-insensitivity-name. February 07, 2003 Addedvarious national languages. (JW said "non-Latin" but it's an issuescope-vs-versions. score-pseudo- property: allow DAV:orderby to explicitly specify DAV:score. B.6 since draft-reschke-webdav-search-03 April 24, 2003 Fixed two "?" vs "_" issues (not updatedeven inlast draft). June 13,languages that use the latin char set.) Reschke, et al. Expires April 9, 2004 [Page 64] Internet-Draft WebDAV SEARCH October 2003Improve index.julian.reschke@greenbytes.de (2003-01-28): This issue not only applies to the comparison operators, but also to ordering! D.10 typed-literal Type: change julian.reschke@greenbytes.de (2003-01-15): 1. (insert language defining the comparison following the rules defined in http:// www.w3.org/TR/xpath20/#id-comparisons). 2. Extend Basicsearch QSD grammar to support discovery of typed-literal 3. Update DTD. 4. Discuss behaviour of DAV:literal when the property's type is known for the complete search scope (is the server allowed to be "smart"?) Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page57] Internet Draft65] Internet-Draft WebDAV SEARCHJuneOctober 2003 Index C caseless attribute5.8, 5.1827, 33 Criteria 5 D DAV:and5.727 DAV:ascending5.626 DAV:contains5.1631 DAV:depth5.423 DAV:descending5.626 DAV:eq5.8caseless27 caseless attribute5.827 DAV:from5.423 DAV:gt5.927 DAV:gte5.927 DAV:include-versions5.423 DAV:is-collection5.1330 DAV:is-defined5.1430 DAV:language-defined 29 DAV:language-matches 29 DAV:like5.1530 DAV:limit5.1733 DAV:literalReschke, et al. Expires December 2003 [Page 58] Internet Draft WebDAV SEARCH June 2003 5.1027 DAV:lt5.927 DAV:lte5.927 DAV:not5.727 DAV:nresults5.1733 DAV:or5.727 DAV:orderby5.626 DAV:scope5.423 DAV:score5.16.1relationship32 relationship to DAV:orderby5.17.1 DAV:searchrequest 2.333 DAV:search-grammar-discovery-supported precondition 10 DAV:search-grammar-supported precondition 10 DAV:search-scope-valid precondition 10 DAV:select5.323 DAV:supported-query-grammar-set property3.315 DAV:typed-literal5.1128 DAV:where5.524 O OPTIONS method3.1DASL14 DASL response header3.2 Q Query Grammar Discovery 3using OPTIONS 3.1 using live property 3.314 P Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page59] Internet Draft66] Internet-Draft WebDAV SEARCHJuneOctober 2003 Preconditions DAV:search-grammar-discovery-supported 10 DAV:search-grammar-supported 10 DAV:search-scope-valid 10 Q Query Grammar Discovery 14 using live property 15 using OPTIONS 14 Query Grammar 6 Query Schema 6 Query 5 R Result Record Definition 6 Result Record 6 Result Set Truncation Example2.4.311 Result Set 6 Result 6 S ScopeInvalid 2.66 SEARCH method29 Search Modifier 6 Sort Specification 6 Reschke, et al. Expires April 9, 2004 [Page 67] Internet-Draft WebDAV SEARCH October 2003 Intellectual Property Statement The IETF takes no position regarding the validity or scope of any intellectual property or other rights that might be claimed to pertain to the implementation or use of the technology described in this document or the extent to which any license under such rights might or might not be available; neither does it represent that it has made any effort to identify any such rights. Information on the IETF's procedures with respect to rights in standards-track and standards-related documentation can be found in BCP-11. Copies of claims of rights made available for publication and any assurances of licenses to be made available, or the result of an attempt made to obtain a general license or permission for the use of such proprietary rights by implementors or users of this specification can be obtained from the IETF Secretariat. The IETF invites any interested party to bring to its attention any copyrights, patents or patent applications, or other proprietary rights which may cover technology that may be required to practice this standard. Please address the information to the IETF Executive Director. Full Copyright Statement Copyright (C) The Internet Society (2003). All Rights Reserved. This document and translations of it may be copied and furnished to others, and derivative works that comment on or otherwiseReschke, et al. Expires December 2003 [Page 60] Internet Draft WebDAV SEARCH June 2003explain it or assist in its implementation may be prepared, copied, published and distributed, in whole or in part, without restriction of any kind, provided that the above copyright notice and this paragraph are included on all such copies and derivative works. However, this document itself may not be modified in any way, such as by removing the copyright notice or references to the Internet Society or other Internet organizations, except as needed for the purpose of developing Internet standards in which case the procedures for copyrights defined in the Internet Standards process must be followed, or as required to translate it into languages other than English. The limited permissions granted above are perpetual and will not be revoked by the Internet Society or its successors or assignees. This document and the information contained herein is provided on an "AS IS" basis and THE INTERNET SOCIETY AND THE INTERNET ENGINEERING TASK FORCE DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTY THAT THE USE OF THE INFORMATION Reschke, et al. Expires April 9, 2004 [Page 68] Internet-Draft WebDAV SEARCH October 2003 HEREIN WILL NOT INFRINGE ANY RIGHTS OR ANY IMPLIED WARRANTIES OF MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.AcknowledgementAcknowledgment Funding for the RFCeditorEditor function is currently provided by the Internet Society. Reschke, et al. ExpiresDecember 2003April 9, 2004 [Page61]69] ----