[Date Prev][Date Next] [Chronological] [Thread] [Top]

Re: LDAPprep: mapping of " " values



At 07:41 AM 11/19/2004, Hallvard B Furuseth wrote:
>Kurt D. Zeilenga writes:
>>At 06:30 AM 11/19/2004, John McMeeking wrote:
>>>I don't see how (l=foo * bar) can match "foo bar" (single space).  Doesn't
>>>that require that the trailing and leading spaces in the filter substring
>>>match the same character?  The * is supposed to match zero or more
>>>characters between two substrings, not allow the substrings to overlap.
>>
>> It's matching the same trailing/space space in the same sense
>> that (l= * ) matches " ".
>
>I don't see in which sense (l= * ) matches " " because of trailing
>space.  With the old semantics, both spaces in the filter are
>significant.  If we make both spaces insignificant, (l= * ) matches " "
>becuase (l=*) does.
>
>Going back to "foo bar": If you mean that (l=foo * bar) also matches
>"foobar", yes, it also matches "foo bar".  If we are talking about
>fixing things so it does not match "foobar", then I don't see it.  You
>have to treat one of the spaces in the filter as insignificant and one
>as significant.

Just as in (l= * ) matching " ". 

A single space is significant.  The assertion (l= * ) reads
"match values which start with a space and end with a space".
Can the space the match be same space?
I argue yes, because were there is one space there could be
many spaces.  Hence, each can be viewed as matching different
(disjoint) spaces.

If you take the view that the two spaces in (l= * ) can
only match significant spaces, then (l= * ) cannot matching
any value, not even " ".

>While that may indeed be preferable, it should be done
>with the intent that there is something one can replace the '*' with to
>turn it into a successful equality match.

Er, yes, that is (l=foo * bar) should match "foo X bar" for any
and all X, including an empty X.  "foo " and " bar" are disjoint
parts of "foo X bar" regardless of X.  The insignificant space
rule applies not only the attribute value, but to assertion
value (a sequence of substrings) as a whole.  When matching
against "foo bar", one of the spaces in the assertion value
is insignificant to matching of this attribute value.

One cannot apply the insignificant space rule to individual
substrings as that simply breaks things, leading to oddities
like (l=foo * bar) matching "foobar".

>Or we can explicitly decide that it would be very useful to have "word
>matching" semantics, where " * " is to be treated as a "*" where the
>substrings on both sides are to be delimited by space - even if it is
>the same space.
>
>[Skipping the rest for now, this is complex enough already...]
>
>-- 
>Hallvard


BTW, I'm heading out for a nice weekend away... so have fun
bashing this out without me.