Subject: Re: matchingRuleUse / extensibleMatch

From: "Jim Sermersheim" <[email-masked]>
Date: Tue, 15 Feb 2005 13:51:39 -0700

I should have been more specific in my questions:

>>> "Kurt D. Zeilenga" <[email-masked]> 2/15/05 10:48:06 AM >>>
>At 08:34 AM 2/15/2005, Jim Sermersheim wrote:
>>Two questions:
>> 
>>1) In [Models], MatchingRuleUseDescription.APPLIES says: "provides a
list of attribute types the matching rule applies to". Does this include
or exclude subtypes?

>If a matching rule is applicable to a type X, then it should also be
>applicable to Y if Y is a subtype of X. Hence, both X and Y should
>be listed as the rule is applicable to both (assuming the use is
>above and beyond those in of the attribute types' definitions).

Ok, but let's assume that X is listed, but Y isn't. Because Y is a
subtype of X, is it implied that the matching rule also applies to Y?
 
>>2) In [Protocol], SearchRequest.filter.extensibleMatch says: "If the
type field is absent and the matchingRule is present, the matchValue is
compared against all attributes in an entry which support that
matchingRule.". Does this mean "as determined by any matchingRuleUse for
that mathing rule",
>>or "as determined by any matchingRuleUse, or the EQUALITY, ORDERING,
or SUBSTR rules of the attribute"?
>
>"which support that matching rule" means "which the matching rule
>may be applied to".
>
>Note that matchingRuleUse lists attribute types which the rule
>applies to above and beyond those uses indicated in attribute
>type definitions. caseIgnoreMatch applies to CN even those
>matchingRuleUse not list CN in the APPLIES of caseIgnoreMatch.
>
>So, what matters here is not what is listed in matchingRuleUse,
>but whether the rule applies to the type.

Maybe I'm just being dense, but I don't see the answer. In your first
paragraph, it looks like you believe that the matching rule is applied
to any attribute which lists the matching rule in its attribute type
definition, _as well as_ any attribute which is listed in a
matchingRuleUse for that matching rule. But the second paragraph
indicates that matchingRuleUse is not even considered.

>>Whatever the answers are to these, I don't find it obvious by reading
the text.
>
>Do you have a specific suggestion on how to improve the text?

Maybe, once I understand what the semantics are. My initial assumptions
led me to believe:
 
For #1: "...provides a list of attribute types (and/or attribute
supertypes of attribute types) to which the matching rule applies"
 
For #2: "...which support that matchingRule. This includes attributes
types which specify the matchingRule, as well as attribute types listed
in the matchingRuleUse for the matching rule."

Jim

---

From: "Kurt D. Zeilenga" <[email-masked]>
Date: Tue, 15 Feb 2005 13:49:07 -0800

At 12:51 PM 2/15/2005, Jim Sermersheim wrote:
>>>1) In [Models], MatchingRuleUseDescription.APPLIES says: "provides a list of attribute types the matching rule applies to". Does this include or exclude subtypes?
>
>Ok, but let's assume that X is listed, but Y isn't. Because Y is a subtype of X, is it implied that the matching rule also applies to Y?

Regardless of whether Y is listed or not, the listing of X
along with the definition of Y as a subtype of X implies that
the rule applies to Y.  The fact that Y is not listed implies
that the rule must not apply above and beyond the definition
of Y.  That is, the rule must be listed in the definition of
of Y for the schema to be self consistent.

One could argue that Y should be listed the APPLIES of the
rule regardless of whether the rule is listed in the definition
of Y.  Given that accepting this text would greatly simplify
the semantics of matchingRuleUses, I have no problem with adopting
it.

>>>2) In [Protocol], SearchRequest.filter.extensibleMatch says: "If the type field is absent and the matchingRule is present, the matchValue is compared against all attributes in an entry which support that matchingRule.". Does this mean "as determined by any matchingRuleUse for that mathing rule",
>>>or "as determined by any matchingRuleUse, or the EQUALITY, ORDERING, or SUBSTR rules of the attribute"?
>>
>Maybe I'm just being dense, but I don't see the answer. In your first paragraph, it looks like you believe that the matching rule is applied to any attribute which lists the matching rule in its attribute type definition, _as well as_ any attribute which is listed in a matchingRuleUse for that matching rule. But the second paragraph indicates that matchingRuleUse is not even considered.

If you want to determine whether a rule applies to an attribute
type, you should consider both whether the attribute type definition
lists the rule and whether the rule use definition lists the
attribute type.  If either is true, then the rule applies to the
attribute type.

>>>Whatever the answers are to these, I don't find it obvious by reading the text.
>>
>Maybe, once I understand what the semantics are. My initial assumptions led me to believe:
> 
>For #1: "...provides a list of attribute types (and/or attribute supertypes of attribute types) to which the matching rule applies"

This is incorrect.  This implies that if the rule applies to
X:
        ( 1.1.1 NAME 'X' SYNTAX 1.1.0 )
that Y:
        ( 1.1.2 NAME 'Y' SUP X )
need not listed.  Y should be listed in this case as
if the rule applies to X it should apply to Y because Y is
a subtype of X.  That is, the implementation is not excused
from listing Y because it is subtype of some listed type.
Instead, the server is obligated to list Y as the rule applies
to subtypes of X.

>For #2: "...which support that matchingRule. This includes attributes types which specify the matchingRule, as well as attribute types listed in the matchingRuleUse for the matching rule."

I rather say "... which this matching rule applies (see Section
4.1.4 of [Models])".

And then clarify what 'applies' means in the referenced section.

---

From: Michael Ströder <[email-masked]>
Date: Wed, 16 Feb 2005 18:48:55 +0100

> Instead, the server is obligated to list Y as the rule applies

Otherwise a schema-aware LDAP client evaluating 'matchingRuleUse' would 
also have to resolve attribute type inheritance for resolving matching 
rule use.

Glad to read this provided my understanding of your words is correct...

Ciao, Michael.

-- 
Michael Ströder
E-Mail: [email-masked]
http://www.stroeder.com