Subject: Re: [sieve] Late breaing issue in draft-freed-sieve-in-xml-06.txt

From: Robert Burrell Donkin <[email-masked]>
Date: Fri, 4 Sep 2009 11:52:53 +0100

On Thu, Aug 27, 2009 at 7:01 AM, Aaron Stone<[email-masked]> wrote:
>
>
> On Aug 26, 2009, at 7:57 PM, Barry Leiba
> <[email-masked]> wrote:
>
>>> So what do we do about this? There are basically four options:
>>>
>>> (1) Drop the use of XML Schema and just have an RNG grammar.
>>>
>>> (2) Remove the ability to have displaydata, comments, and elements from
>>> other
>>>  namespaces appear in a command element after the test clause. This means
>>>  something like
>>>
>>>  <control name="if">
>>>    <test name="header">
>>>      <tag>is</tag>
>>>      <str>Sender</str>
>>>      <str>[email-masked]</str>
>>>    </test>
>>>    <action name="fileinto">
>>>      <str>filter</str>
>>>    </action> <comment>move to "filter" mailbox</comment>
>>>  </control>
>>>
>>>  is no longer valid. It would have to be written as:
>>>
>>>  <control name="if">
>>>    <test name="header">
>>>      <tag>is</tag>
>>>      <str>Sender</str>
>>>      <str>[email-masked]</str>
>>>    </test>
>>>    <action name="fileinto">
>>>      <str>filter</str>
>>>      <comment>move to "filter" mailbox</comment>
>>>    </action>
>>>  </control>
>>>
>>> (3) Switch to using XML comments instead of <comment> elements. Note that
>>>  this addresses the issue for comments only; we'd still have to drop the
>>>  ability to have material from other namespaces or displaydata appear
>>>  after the test clause.
>>>
>>> (4) Use a wrapper element to disambiguate the schema. This would mean
>>>  writing something like this:
>>>
>>>  <control name="if">
>>>    <test name="header">
>>>      <tag>is</tag>
>>>      <str>Sender</str>
>>>      <str>[email-masked]</str>
>>>    </test>
>>>    <action name="fileinto">
>>>      <str>filter</str>
>>>    </action>
>>>    <postamble>
>>>      <comment>move to "filter" mailbox</comment>
>>>    </postamble>
>>>  </control>
>>
>> ...
>>>
>>> My personal preference (and I believe it is Sai's as well because it was
>>> his
>>> idea) is (4). And I prefer to add two wrappers, not one. The additional
>>> elements are ugly, but this gives us the most flexibility and doesn't
>>> lose any
>>> capabilities.
>>
>> I'm happy with 2 and 4.  If we use 4, I agree that we should add both
>> wrappers.
>>
>
> I personally prefer 2 because it connects the comment with the action (with
> the caveat that I'm not sure how the parser divines this from sieve syntax).
> Option 4 does not appear to be able to represent multiple interleaved
> comments and actions.

my personal preference is 1 (in practice, validation is very likely to
be programmatic - or not at all - for this type of xml document)

but i'm happy with option 4 and agree that two wrappers would be
better than one

- robert