matching-rules
Specify which class and attribute values must match for an entry in eDirectory to match an entry in the external application.
Matching rules establish links between an entry in eDirectory and an entry in the external application. If a match is successful, an association between the two entries is created.
The DirXML engine uses the matching rules when it receives an add operation from either the publisher or the subscriber. The DirXML engine changes a modify operation to an add operation when an entry does not have an association. Matching rules are applied before the create rules.
<!ELEMENT matching-rules (matching-rule*)> <!ELEMENT matching-rule (match-class*, match-path?, match-attr*)> <!ATTLIST matching-rule description CDATA #IMPLIED> <!ELEMENT match-class EMPTY> <!ATTLIST match-class class-name CDATA #REQUIRED> <!ELEMENT match-path EMPTY> <!ATTLIST match-path prefix CDATA #REQUIRED> <!ELEMENT match-attr (value)+ > <!ATTLIST match-attr attr-name CDATA #REQUIRED>
The following sample has three rules. The first rule requires User entries to match on both the Surname and Given Name attributes. The second rule, which is applied if the first rule fails, requires that the entries match on the Surname attribute. If both these rules fail, entries are match on their CN attribute.
The following example illustrates three matching rules.
<matching-rules> <!-- for Users, first try to match on Surname, Given Name --> <!-- and Location --> <matching-rule> <match-class class-name="User"/> <match-attr attr-name="Surname"/> <match-attr attr-name="Given Name"/> <match-attr attr-name="Location"/> </matching-rule> <!-- for Users, then try to match on Surname only in --> <!-- the o=novell subtree --> <matching-rule> <match-class class-name="User"/> <match-path prefix="o=novell"/> <match-attr attr-name="Surname"/> </matching-rule> <!-- for all classes try to match on CN only --> <matching-rule> <match-attr attr-name="CN"/> </matching-rule> </matching-rules>
For another example, see the sub_matching_rule.xml file used by the subscriber for the VRTest driver.