[CalendarServer-users] OR prop-filters

Atli Thorbjornsson atlithorn at gmail.com
Fri Jul 4 06:15:06 PDT 2014


I found this http://tools.ietf.org/html/draft-daboo-caldav-extensions-01
and test=anyof works on the comp-filter eg.

<ns0:comp-filter name="VCALENDAR">
 <ns0:comp-filter name="VEVENT" test="anyof">
    <ns0:time-range start="20140621T000000Z" end="20140809T000000Z" />
    <ns0:prop-filter name="LOCATION">
        <ns0:text-match collation="i;octet">1</ns0:text-match>
    </ns0:prop-filter>
    <ns0:prop-filter name="LOCATION">
        <ns0:text-match collation="i;octet">2</ns0:text-match>
    </ns0:prop-filter>
 </ns0:comp-filter>
</ns0:comp-filter>

But that implies that I get events for LOCATION 1 and 2 regardless of
time-range.

I tried to put the test="anyof" param on the prop-filters but that didn't
work, even when I added multiple text-match elements to the same
prop-filter like so

   <ns0:comp-filter name="VEVENT">
      <ns0:time-range start="20140621T000000Z" end="20140809T000000Z" />
      <ns0:prop-filter name="CATEGORIES" test="anyof">
            <ns0:text-match collation="i;octet">1</ns0:text-match>
            <ns0:text-match collation="i;octet">2</ns0:text-match>
      </ns0:prop-filter>
   </ns0:comp-filter>

That causes an error on the server:

Too many children of type {urn:ietf:params:xml:ns:caldav}text-match for
{urn:ietf:params:xml:ns:caldav}prop-filter

So I'm still stumped...

Atli


On 4 July 2014 12:34, Atli Thorbjornsson <atlithorn at gmail.com> wrote:

> Hi guys, is there a way to "OR" prop-filters?
>
> I'm looking for all events that occur in either LOCATION 1 or 2.
>
> This is what I have been trying:
>
> <ns0:comp-filter name="VCALENDAR">
>  <ns0:comp-filter name="VEVENT">
>     <ns0:time-range start="20140621T000000Z" end="20140809T000000Z" />
>     <ns0:prop-filter name="LOCATION">
>         <ns0:text-match collation="i;octet">1</ns0:text-match>
>     </ns0:prop-filter>
>     <ns0:prop-filter name="LOCATION">
>         <ns0:text-match collation="i;octet">2</ns0:text-match>
>     </ns0:prop-filter>
>  </ns0:comp-filter>
> </ns0:comp-filter>
>
>
> But this ANDs the prop-filters. Is there no way to OR or is there another
> way to achieve what I'm trying to do here?
>
> Atli.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.macosforge.org/pipermail/calendarserver-users/attachments/20140704/498fd526/attachment.html>


More information about the calendarserver-users mailing list