- From: Jim Davis <jdavis@parc.xerox.com>
- Date: Sat, 20 Jun 1998 18:38:35 PDT
- To: www-webdav-dasl@w3.org
The current protocol draft proposes that a client discover the schema for a given query grammar on a given resource by doing a PROPFIND on the resource where the property name is the name of the grammar. Thus if one is using the dav:simplesearch grammar on the resource nosy.com/finder, you send nosy.com a PROPFIND on /finder for the dav:simplesearch property. Judy Slein pointed out weeks ago that this can't work, because a query schema depends not just on the arbiter and grammar, but also on the scope. I propose the following replacement. Like the current scheme, it uses PROPFIND on the arbiter. Unlike the current scheme, the property to be fetched is not the URI of the grammar, rather it is a *parameterized* property, e.g. something like <prop> <queryschema> <grammar>URI</grammar> <scope>scope1</scope> <scope>scope2</scope> </queryschema> </prop> (This is not the exact syntax I propose, but is simpler, to show the idea.) As far as I can tell, nothing in WebDAV mandates that the tags within the prop element be empty. I've sent WebDAV a letter to ask. For those who want the full details, here's the language I would propose to add to the protocol draft. I suggest you read it only if you think the basic idea is sound. If you think the whole concept is bogus, skip it, but please come up with a better idea, because the only alternative I can think of is to define a new method. DETAILS: 4.2 Query Grammar Schema Discovery Servers MAY support the discovery of the schema for a query grammar. The DASL response header provides means for clients to discover the set of query grammars supported by a resource. This alone is not sufficient information for a client to generate a query. For example, the DAV:simplesearch grammar defines a set of queries consisting of a set of operators applied to a set of properties and values, but the grammar itself does not specify which properties may be used in the query. While WebDAV defines a small set of properties that are mandatory (e.g. DAV:getcontentlength) or suggested, but optional (e.g., DAV:displayname) it does not (and can not) mandate that any of these properties be used in DASL queries. In addition, it is likely that some servers will define additional properties, e.g. for metadata such as author name, or subject. Query Grammar Schema Discovery allows a client to discover the set of properties that are searchable, selectable, and sortable, and to discover their underlying datatypes. Moreover, while the DAV:simplesearch grammar defines a minimal set of operators, it is possible that a resource might support additional operators in a query. Query Grammar Schema Discovery allows a client to discover these operators, their syntax, and the underlying datatypes they work with. The schema for a given query grammar depends on both the resource (the arbiter) and the scope. A given resource might have access to one set of properties for one potential scope, and another set for a different scope. For example, consider a server able to search two distinct collections, one holding cooking recipes, the other design documents for nuclear weapons. While both collections might support properties such as author, title, and date, the first might also define properties such as calories and preparation time, while the second defined properties such as yield and applicable patents. Two distinct resources indexing the same collection might have access to different properties. For example, the recipe collection mentioned above might also indexed by a value-added server that also stored the names of chefs who had tested the recipe. Note also that the available query schema might also depend on other factors, such as the identity of the principal conducting the search, but these factors are not exposed in this protocol. A client obtains the schema for a given query grammar on an arbiter resource by invoking the PROPFIND method on the dav:queryschema property of that resource. Unlike other properties used within the dav:prop element of dav:propfind, the dav:queryschema property is not empty, instead it contains elements that indicate the grammar and scope to be used. This allows a server to define potentially different query schema for multiple grammars and scopes on the same arbiter resource. Each query grammar supported by DASL defines its own syntax for expressing the possible query schema. The query schema for DAV:simplesearch is defined in section 7.18 4.2.1 DAV:queryschema property <!ELEMENT queryschema (grammar, from) > <!ELEMENT grammar (#PCDATA) > ; URI of the grammar ;from is defined in section 7.3 4.2.2 Example PROPFIND / HTTP/1.1 Host: recipes.com Content-Type: text/xml Connection: Close Content-Length: xxxx <?xml version="1.0"?> <?xml:namespace ns="DAV:" prefix="D"?> <D:propfind> <D:prop> <D:queryschema> <D:grammar>DAV:simplesearch</D:grammar> <D:from> <D:scope> <D:href>/recipes/</D:href> </D:scope> <D:scope> <D:href>http://lanl.gov/bombs</D:href> <D:depth>1</D:depth> </D:scope> </D:from> </D:queryschema> </D:prop> <D:propfind> An example response is shown below in section 7.18.
Received on Saturday, 20 June 1998 21:56:03 UTC