Hello Patrick,

On 12.05.2014, at 12:55, Patrick Ohly <patrick.o...@intel.com> wrote:

> What's the intended behavior of suppressempty for arrays?
> 
>        "suppressempty": This optional boolean value. can be set to true if 
> this property must
>        never be sent empty (without values). This is the case for most 
> vCalendar fields, for example.
> 
> The default seems to be suppressempty=no (judging from the "can be set
> to true"). When I have arrays with empty entries, will those be
> generated?

It also depends on "minShow" and "fDontSendEmptyProperties", and also on 
"mandatory", but basically empty array elements will generate a property when 
"suppressempty" is not set. At least that's the intention :-)

> Example:
> [...]
> 
>        <property name="X-ABRELATEDNAMES" groupfield="GROUP_TAG">
>          <value field="RELATEDNAMES"/>
>          <position field="RELATEDNAMES" repeat="array" increment="1" 
> minshow="0"/>

minshow further restricts what is generated - as you specify 0, this 
<positions> does not generate any empty property instances.
The idea of "minshow" is to ensure that a minimal number (usually 1) of that 
property appears in the output, even if empty.

>        <property name="X-ABLabel" suppressempty="yes" groupfield="GROUP_TAG" 
> rule="HAVE-ABLABEL-PROPERTY">
>          <value field="LABEL" repeat="array" increment="1" minshow="0"/>

Here as well, minshow is the restricting factor.

Best Regards,

Lukas

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail

_______________________________________________
os-libsynthesis mailing list
os-libsynthesis@synthesis.ch
http://lists.synthesis.ch/mailman/listinfo/os-libsynthesis

Reply via email to