RFC: KEP3: Introduction of 'subevent' sub-tag for 'exclusion' from 'recurrence' (revision #10661 2 uses cases for <exception><subevent><deleted> and <exception><subevent><exceptionStartDate>
Alain Abbas
alain.abbas at libertech.fr
Sun Dec 12 17:27:38 CET 2010
Hello
continuing my thoughs ... :-)
2 uses cases for <exception><subevent><deleted> and
<exception><subevent><exceptionStartDate>
First case deletion of an existing exception
step 1 :
create a reccurring event 5days for exemple
<<summary>test recurrence format</summary>
<location />
<start-date>2010-12-21T05:00:00Z</start-date>
- <#><recurrence cycle="*daily*">
<interval>1</interval>
<range type="*number*">5</range>
</recurrence>
<show-time-as>busy</show-time-as>
<end-date>2010-12-21T06:00:00Z</end-date>
</event>
step 2 :
modify the subject one one of the occurence
<recurrence cycle="*daily*">
<interval>1</interval>
<range type="*number*">5</range>
<exception>
<subevent>
<exceptionstartdate>2010-12-23</exceptionstartdate>
<summary>modified occurence </summary>
</subevent>
</recurrence>
Step 3 :
delete the occurence who was modified at step 3
<recurrence cycle="*daily*">
<interval>1</interval>
<range type="*number*">5</range>
<exception>
<subevent>
<exceptionstartdate>2010-12-23</exceptionstartdate>
<summary>modified occurence </summary>
<deleted>1</deleted>
</subevent>
</recurrence>
in you way you must delete the subevent and add the exclusion
in a flag way <deleted> you must just flag the subevent.
Second Case
Modification of the start date (not the same day)
why we need a exceptionStartDate attribute
step 1 :
add a daily event each 2 days
<summary>test recurrence format</summary>
<location />
<start-date>2010-12-21T05:00:00Z</start-date>
- <#><recurrence cycle="*daily*">
<interval>2</interval>
<range type="*number*">5</range>
</recurrence>
<show-time-as>busy</show-time-as>
<end-date>2010-12-21T06:00:00Z</end-date>
</event>
that means we have an event the 21,23,25,27,29
step 2:
modify the ocurence of the 23 and set the start date to the 24
<summary>test recurrence format</summary>
<location />
<start-date>2010-12-21T05:00:00Z</start-date>
- <#><recurrence cycle="*daily*">
<interval>2</interval>
<range type="*number*">5</range>
<subevent>
<exceptionStartDate>2010-12-23</exceptionStartDate>
<start-date>2010-12-24T05:00:00Z</start-date>
<end-date>2010-12-24T06:00:00Z</end-date>
</subevent>
</recurrence>
<show-time-as>busy</show-time-as>
<end-date>2010-12-21T06:00:00Z</end-date>
</event>
if we don t have <exceptionStartDate> we have no way to know at which
date is the exception. In this case without this reference
you could have 2 cases this is the 23 or the 25 the exception ?
in Conclusion :
<exceptionStartDate> is needed to have the reference of the
exception because the start date could be modified
<deleted> with this flag it is more simple in case of deletion of an
exiwting exception (and all the cases) ( the only thing that i see to
keep the <exclusion> is for backward compatibility) but not for logic
reason.
Regards
Alain
Alain Abbas a écrit :
> Jeroen van Meeuwen (Kolab Systems) a écrit :
>
>> Georg C. F. Greve wrote:
>>
>>
>>> Hi Alain,
>>>
>>> On Monday 06 December 2010 21.36:54 Alain Abbas wrote:
>>>
>>>> but it s more simple to process all at the same level for
>>>>
>> alghorithm as
>>
>>
>>>> subevent Poom model in active sync is like that and the object
>>>>
>> model in
>>
>>
>>>> outlook i think too if the deletion is in the same tag you have just a
>>>>
>>>> loop and a test . if there are at different level you must have 2
>>>>
>> loops
>>
>>
>>>> with the risk of error if a date is in the exclusion and in the
>>>>
>> subevent
>>
>>
>>>> too
>>>>
>>> I must say this defeats my expectation of how this would work
>>>
>> practically.
>>
>>
>>> Normally I'd parse XML through one of the parsers, which would give me a
>>>
>>> tree structure in memory. From that came the expectation that a check
>>>
>>> if ( exception.subevent != null) { // treat as deletion
>>>
>>> would be as simple as
>>>
>>> if ( exception.delete == 1) { // treat as deletion
>>>
>>> Help, anyone? How do others see this?
>>>
>> I don't see the problem as Alain perceives it to exist, but I think I
>> do have a clue as to what he means.
>>
>> Alain Abbas wrote:
>>
>>
>>> <event>
>>>
>>> ...
>>>
>>> <recurrence>
>>>
>>> ...
>>>
>>> <exclusion>date1
>>>
>>> <subevent>
>>>
>>> <start-date>date</start-date>
>>>
>>> <deleted>1</deleted>
>>>
>>> </subevent>
>>>
>>> </exclusion>
>>>
>>> </recurrence>
>>>
>>> </event>
>>>
>> The "<deleted/>" that would not have to exist, because;
>>
>> - The datetime in the <exclusion /> already establishes which
>> occurence is being altered,
>>
>> - If the occurence is to be deleted, or skipped, there would be no
>> <subevent />
>>
>> Ergo, a deleted occurence would look like this;
>>
>> <event>
>>
>> ...
>>
>> <recurrence>
>>
>> ...
>>
>> <exclusion>date1</exclusion>
>>
>> </recurrence>
>>
>> </event>
>>
>> And if the following occurence where to be modified;
>>
>> <event>
>>
>> ...
>>
>> <recurrence>
>>
>> ...
>>
>> <exclusion>date1</exclusion>
>>
>>
>> <exclusion>date2
>>
>> <subevent>
>>
>> ...
>>
>> </subevent>
>>
>> </exclusion>
>>
>>
>> </recurrence>
>>
>> </event>
>>
>> In code, this would mean that the list of exclusions will need to be
>> iterated, one by one - I think that may be what Alain is referring to.
>>
>> Kind regards,
>>
>> Jeroen van Meeuwen
>>
>> --
>>
>>
> just seems more logic for me in an object program model that the type
> is the exclusion is in the exclusion itself (mod or delete) and
> not separated of the exclusion object .
> In this case we have only one object for all the case , in the other
> case 2 object a special one for the deleted and a special one for the
> modified.
> After a little search on the internet i found in design patterns the 2
> cases
>
> but it s just a mind vision .
>
>
>
>
>
>> Senior Engineer, Kolab Systems AG
>>
>> e: vanmeeuwen at kolabsys.com
>>
>> t: +316 42 801 403
>>
>> w: http://www.kolabsys.com
>>
>> pgp: 9342 BF08
>>
>>
>
> _______________________________________________
> Kolab-format mailing list
> Kolab-format at kolab.org
> https://kolab.org/mailman/listinfo/kolab-format
>
More information about the format
mailing list