Subject: RE: NOT filter question

From: "Jim Sermersheim" <[email-masked]>
Date: Thu, 02 Sep 2004 09:05:41 -0600

(&(height=*)(!(height<6))) works to weed out all height-impared people
with all versions

>>> "Ramsay, Ron" <[email-masked]> 9/1/04 7:14:44 PM >>>
It was changed in X.500:2000.

Just on a side note, it doesn't make sense to return TRUE.

Consider the filter: !(height<5)

If there is no height attribute, this, according to you, should
evaluate to true. But this implies that height >= 5.

Say you were forming a volleyball team and you searched you company's
directory for all employees at least 6' high. You then invite them to
join a team. On the first day of training you turn up and they're all
midgets!

Ron

-----Original Message-----
From: Kurt D. Zeilenga [mailto:[email-masked]] 
Sent: Thursday, 2 September 2004 01:46
To: Ramsay, Ron
Cc: John McMeeking; [email-masked] 
Subject: RE: NOT filter question

X.501(93), 8.7.3:
>An AVA is:
>a) undefined, if any of the following hold:
>1) the attribute type is unknown,

CN is (presumed) known.

>2) the attribute type has no equality matching rule,

CN has an equality matching rule.

>3) the value does not conform to the data type indicated by the syntax
of the assertion of the attribute's
>equality matching rule;

"bob" conforms to assertion syntax.

>b) true, if the entry contains an attribute of that type, one of whose
values matches that value;

The entry doesn't contain CN.

>c) false, otherwise.

(CN=bob) is False.  (!(CN=bob)) is True.

At 07:18 PM 8/31/2004, Ramsay, Ron wrote:
>Many (most?) LDAP servers evaluate it to true.

I would hope so.

Kurt

---

From: "Kurt D. Zeilenga" <[email-masked]>
Date: Thu, 02 Sep 2004 12:21:13 -0700

If one want to match entries which contain height of 6 or
greater, just use (height>=6).  If one want to match entries
which contain height greater than 6, use (height>=7).
(I'm assuming height here is a single-valued attribute of
integer syntax with an integerMatch equality rule and an
integerOrderingMatch ordering rule.)

If height is single-valued of a syntax where one cannot
specify the next value in the ordering (as I did in
the first paragraph of this note), then I suggest
(&(height>=6)(!(height=6))) instead.  But don't use this
if height is multi-valued.

If height is multi-valued, use (height>=6) and then
weed out results return.  (Note: component matching may
be able to help here.)

But I would avoid assertions similar to your suggestion,
e.g., (&(height=*)(!(height<=6))), as it based (I believe)
on a flawed assumptions, such as if (height=*) is True
for some entry that either (height<=6) or (height>=6) will
evaluate to True for that entry.  For instance, this
could occur when there are administrative controls
which prohibit evaluation of certain assertions for
(some) values of (some) attributes of (some) entries.

Kurt