W3C home > Mailing lists > Public > www-webdav-dasl@w3.org > October to December 2003

RE: SEARCH by last path segment, Was: SEARCH for displayname

From: Wallmer, Martin <Martin.Wallmer@softwareag.com>
Date: Mon, 24 Nov 2003 09:36:38 +0100
Message-ID: <DFF2AC9E3583D511A21F0008C7E62106063A9151@daemsg02.software-ag.de>
To: "'Julian Reschke'" <julian.reschke@gmx.de>, "Wallmer, Martin" <Martin.Wallmer@softwareag.com>
Cc: "'www-webdav-dasl@w3.org'" <www-webdav-dasl@w3.org>
Hi,

agreed. So my proposal should look like:



5.4  DAV:from
<!ELEMENT scope            (href, depth, include-versions?,
<Martin>include-lastpathsegment*, exclude-lastpathsegment* </Martin>) >
<!ELEMENT include-versions EMPTY >
<Martin>
<!ELEMENT include-lastpathsegment(#PCDATA)>
<!ATTLIST include-lastpathsegment caseless   (yes|no) >
<!ELEMENT exclude-lastpathsegment(#PCDATA)>
<!ATTLIST exclude-lastpathsegment caseless   (yes|no) >

</Martin>

DAV:from defines the query scope.
This contains one or more DAV:scope elements. Support for multiple scope
elements is optional, however servers MUST fail a request specifying
multiple DAV:scope elements if they can't support it (see section 2.2.2,
precondition DAV:search-multiple-scope-supported). The scope element
contains mandatory DAV:href and DAV:depth elements.

DAV:href indicates the URI to use as a scope.

When the scope is a collection, if DAV:depth is "0", the search includes
only the collection. 

When it is "1", the search includes the (toplevel)
members of the collection. When it is "infinity", the search includes all
recursive members of the collection. When the scope is not a collection, the
depth 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) of all
version-controlled resources in scope. Servers that support versioning
but not support the DAV:include-versions feature MUST indicate an error if
it is used in a query.

<Martin>
The content of DAV:include-lastpathsegment and DAV:exclude-lastpathsegment
is a literal pattern same as defined for (@see 5.15.1) <DAV:like>

When neither <DAV:include-lastpathsegment> nor <DAV:exclude-lastpathsegment>
are present, the scope comprises ALL resources (that are defined by
<DAV:href> and <DAV:depth>)

When one or more <DAV:include-lastpathsegment> but no
<DAV:exclude-lastpathsegment> are present, the scope comprises those
resources matching the include pattern(s).

When one or more <DAV:exclude-lastpathsegment> but no
<DAV:include-lastpathsegment> are present, the scope compromises all
resources except those matching the exclude pattern(s).

When one or more <DAV:include-lastpathsegment> and one ore more
<DAV:exclude-lastpathsegment> are present, the scope compromises all
resources matching the include patterns except those 
matching the exclude patterns.

Example:
<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:include-lastpathsegment>report%</d:include-lastpathsegment>
        <d:exclude-lastpathsegment>%-2001-%</d:exclude-lastpathsegment>
        <d:include-lastpathsegment>chapter%</d:include-lastpathsegment>
      </d:scope>
    </d:from>
  </d:basicsearch>
</d:searchrequest>

The scope of this query comprises all resources within or below container1,
where the last pathsegment starts with "report" or "chapter", but not
the resource (for example) /container1/folder2/report-2001-july.pdf.

</Martin>


Best regards,
Martin

-----Original Message-----
From: Julian Reschke [mailto:julian.reschke@gmx.de]
Sent: Sonntag, 23. November 2003 18:32
To: Wallmer, Martin
Cc: 'www-webdav-dasl@w3.org'
Subject: Re: SEARCH by last path segment, Was: SEARCH for displayname


Wallmer, Martin wrote:

> here again my proposal. Is it now clear and "wasserdicht"?

I think using the "AND" terminology is still confusing. Alternate 
proposal inline.

> 
>                   5.4  DAV:from
>                   <!ELEMENT scope            (href, depth,
>                   include-versions?,
>                   <Martin>include-lastpathsegment*,
>                   exclude-lastpathsegment* </Martin>) >
>                   <!ELEMENT include-versions EMPTY >
>                   <Martin>
>                   <!ELEMENT include-lastpathsegment(#PCDATA)>
>                   <!ELEMENT exclude-lastpathsegment(#PCDATA)>
>                   </Martin>
> 
 > ...
>                   <Martin>
>                   The content of DAV:include-lastpathsegment and
>                   DAV:exclude-lastpathsegment is a literal pattern same
>                   as defined for (@see 5.15.1) <DAV:like>

Q: forgot to ask that before -- are we confident that we don't need a 
caseless matching attribute here? note that in the real world, people 
frequently have both lower- and uppercase extensions.

>                   When neither <DAV:include-lastpathsegment> nor
>                   <DAV:exclude-lastpathsegment> are present, the scope
>                   comprises ALL resources (that are defined by
>                   <DAV:href> and <DAV:depth>)
> 
>                   When one or more <DAV:include-lastpathsegment> but no
>                   <DAV:exclude-lastpathsegment> are present, the scope
>                   comprises ALL resources AND resources matching include
>                   pattern(s)

I'd just say "comprises those resources matching the include pattern(s)."

>                   When one or more <DAV:exclude-lastpathsegment> but no
>                   <DAV:include-lastpathsegment> are present, the scope
>                   comprises ALL resources AND NOT resources matching
>                   exclude pattern(s)

"...compromises all resources except those matching the excluse pattern(s)."

>                   When one or more <DAV:include-lastpathsegment> and one
>                   ore more <DAV:exclude-lastpathsegment> are present,
>                   the scope comprises ALL resources AND resources
>                   matching include pattern(s) AND NOT resources matching
>                   exclude pattern(s)

"...compromises all resources matching the include patterns except those 
matching the exclude patterns."

>                   Example:
>                   <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:include-lastpathsegment>%.pdf</d:include-lastpathsegment>
> 
>                          
>
<d:exclude-lastpathsegment>%-2001-%.pdf</d:exclude-lastpathsegment>
> 
>                          
>
<d:include-lastpathsegment>chapter%.doc</d:include-lastpathsegment>
> 
>                         </d:scope>
>                       </d:from>
>                     </d:basicsearch>
>                   </d:searchrequest>
> 
>                   The scope of this query comprises all resources within
>                   or below container1,
>                   that have the postfix .pdf, all doc files starting
>                   with "chapter", but not
>                   the file (for example) report-2001-july.pdf
> 
>                   </Martin>

I think it would be good to avoid examples using matching extensions -- 
this really *should* be done using matching on DAV:getcontenttype.


Julian

-- 
<green/>bytes GmbH -- http://www.greenbytes.de -- tel:+492512807760
Received on Monday, 24 November 2003 12:01:37 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Sunday, 22 March 2009 03:38:10 GMT