Subject: Re: Substrings any match on an empty string

From: "Jim Sermersheim" <[email-masked]>
Date: Tue, 08 Jul 2003 00:30:17 -0600

It depends on the Assertion Value for the matching rule being used.

Which brings up an issue:
In Section 5.1 of [Syntaxes], there is a statement 
   "Note that the AssertionValue in a SubstringFilter
   [PROT] MUST conform to the assertion syntax of the equality
matching
   rule for the attribute type rather than the assertion syntax of the
   substrings matching rule for the attribute type.  "

This does not align with [Protocol]. Steven, is this a historical
artifact, or did I screw the protocol up?

Jim

>>> "Ramsay, Ron" <[email-masked]> 7/7/03 11:04:23 PM >>>
Hi all,

Does anyone have an answer to this question:

If I specify a filter of type 'substrings' where the substrings contain
only an 'any' with a zero-length value, should I return all entries
containing the attribute?

It seems to me that the empty string is a substring of all strings.

I've looked in RFC 2251, X.511 and X.520 but have not seen a statement
which I could interpret as answering this question.

Thanks for your help,

Ron

---

From: "Steven Legg" <[email-masked]>
Date: Tue, 8 Jul 2003 17:29:42 +1000

Jim,

> artifact, or did I screw the protocol up?

Well it's historical in the sense that it is analogous to
what X.500 defines, but it remains appropriate. If an AssertionValue
in a SubstringFilter were of the Substring Assertion syntax then we
would have something which contains initial, any and final substrings
embedded in something (the SubstringFilter) which also has initial,
any and final parts. That would be silly. For example, what would be
the point of the Substring Assertion syntax value "*foo" in the initial
AssertionValue ?

Given that the AssertionValue conforms to the assertion syntax of
the equality matching rule then for most attributes an "any" with
a zero-length string would be an invalid syntax. For those where
it is valid the result depends on the way string prep deals with empty
strings (each substring is prepared in isolation by the substring
matching rules).

Regards,
Steven