Subject: CAP-12: 8.16 EXPAND property

From: [email-masked]
Date: Mon, 19 Jan 2004 13:58:05 -0500

Ok, we didnt get an answer to my question on EXPAND with time bounded 
searches so I wanted to ask again.  The current description of EXPAND is:

   Description: If a CUA wishes to see all of the instances of a
   recurring component the CUA sets EXPAND=TRUE in the "VQUERY"
   component. If not specified, the default is FALSE. Note that if the
   CS has its "RECUR-EXPAND" CS property value set to false then the
   "EXPAND" property will be ignored and the result will be as if the
   "EXPAND" value was set to false. The results will be bounded by any
   date range or other limits in the query.

In trying to get my head around the use of EXPAND before I noted that its 
unclear and quite ambiguous what the CS should do for a VQUERY that has 
both a time range as part of the WHERE selection subclause and the 
EXPAND:TRUE property.  I can see the scenarios for when a CUA would or 
would not use EXPAND to get the correct results but nowhere in CAP do I 
see where it deals with the ambiguous case of:

          BEGIN:VQUERY
          EXPAND:TRUE
          QUERY:SELECT * FROM VEVENT
          WHERE DTSTART >= '20031208T050000Z'
          AND DTEND <= '20031213T045959Z'
          AND STATE() = 'BOOKED'
          END:VQUERY 

In the interest of getting this resolved faster I thought Id propose that 
CAP be changed to either prevent the above query or to specify a 
consistant behaviour by all CS.  I propose that the following text be 
added to Section 8.16 EXPAND property:

   The "EXPAND" propety MAY NOT be included in a VQUERY that component 
that 
   contains any WHERE clause that specify a bounding or specific date-time
   related search criteria.  If a CS receives such a VQUERY, it MUST 
   ignore the EXPAND property.  For example, if the CUA sends:

          BEGIN:VQUERY
          EXPAND:TRUE
          QUERY:SELECT * FROM VEVENT
          WHERE DTSTART >= '20031208T050000Z'
          AND DTEND <= '20031213T045959Z'
          AND STATE() = 'BOOKED'
          END:VQUERY 

   then the CS would treat the VQUERY as if it were just:

          BEGIN:VQUERY
          QUERY:SELECT * FROM VEVENT
          WHERE DTSTART >= '20031208T050000Z'
          AND DTEND <= '20031213T045959Z'
          AND STATE() = 'BOOKED'
          END:VQUERY 

This also means that when stored queries are reproposed they too will be 
covered from the CUA sending EXPAND:TRUE and the stored VQUERY containing 
the same kinds of date-time search criterias.

Editorial note: the 'false' in lines 4 & 6 at top should 'FALSE'.

Bruce
===========================================================================
Bruce Kahn                                INet: 
[email-masked]
Messaging & Collaboration                 Phone: 978.399.6496
IBM Software Group                         FAX: and nothing but the FAX...
Warning: Dates in Calendar are closer than they appear.