OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

office message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]

Subject: Re: [office] table:filter-condition extension proposal

On Wed, 2007-06-13 at 13:46 +0200, Thomas Zander wrote:
> On Tuesday 12 June 2007 16:56:40 Kohei Yoshida wrote:
> > The original motivation for proposing this format:
> >
> >     <filter-set-item table:value="John Doe"/>
> >
> > instead of the other format:
> >
> >     <filter-set-item>John Doe</filter-set-item>
> >
> > is to make it in line with the 'table:value' attribute of the current
> > table:filter-condition element, which is formatted like this:
> >
> >   <filter-condition table:field-number=1 table:operator="="
> >           table:value="Doe"/>
> I understand the logic, but I am under the impression that the moving of 
> the attribute to become a node will make the suggestion of mine to be 
> very common and obvious.
> In other words; if its all the same to you, I think we should go for the
>      <filter-set-item>John Doe</filter-set-item>
> form.

There is one difference we need to be aware of that may make a
difference.  If we go ahead and use a text node instead of an attribute,
we will then have to deal with ambiguous leading and trailing
whitespaces and line breaks.  That would require the implementor to add
extra logic to determine whether those whitespace and linebreak
characters are desired during filter evaluation.  Image if the value is
given like this:

      John Doe

How should we interpret this?  Is the leading whitespace significant in
this case, or not?  There is also a line break right after the opening
element.  Should we take it, or not?

If we use an attribute for this, however, things are a little less
complicated, because (as I understand it) line breaks are not allowed in
an attribute, and if there is a leading and trailing whitespace in the
value, it is more explicit.  For instance, given the following:

   <filter-set-item table:value="   John Doe"/>

We can easily see that the leading whitespace there is significant, and
evaluate it as such.
> ps. I'm totally uninformed about the actual feature you are extending. So 
> it would be great to get someone else to comment on that.
Kohei Yoshida - OpenOffice.org Engineer - Novell, Inc.

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]