placement-rules
Generate distinguished names for new entries.
The placement rules specify where a new entry is created in the destination. Both the subscriber and publisher can have their own rules, or they can share the same rules. The placement rules are kept in an DirXML-Rule object and associated with your driver through the DirXML-PlacementRule attribute of your driver's DirXML-Publisher and DirXML-Subscriber objects.
<!ELEMENT placement-rules (placement-rule*)> <!ATTLIST placement-rules src-dn-format (%dn-format;) "slash" dest-dn-format (%dn-format;) "slash" src-dn-delims CDATA #IMPLIED dest-dn-delims CDATA #IMPLIED> <!ELEMENT placement-rule (match-class*, match-path*, match-attr*, placement)> <!ATTLIST placement-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> <!ELEMENT placement (#PCDATA | copy-name | copy-attr | copy-path | copy-path-suffix)* >
Only one of the attributes for formats can specify a value, either dest-dn-delims or dest-dn-format, but not both.
The format for eDirectory is always slash.
The format for the external application must be what the application uses. Most applications should be able to use one of the values specified for the *-dn-format attributes. If these are not adequate, the *-dn-delims attributes accept up to eight characters with the following meanings:
If the RDN delimiter and the Relative RDN delimiter are the same character, the orientation of the name is root right; otherwise, the orientation is root left.
The following example shows three placement rules.
<placement-rules src-dn-format="slash" dest-dn-format="ldap" > <!-- for Users coming from the subtree \Tree\novell in NDS --> <!-- place them in the same relative hierarchy --> <!-- under o=novell --> <placement-rule> <match-class class-name="User"/> <match-path prefix="\TREE\novell"/> <placement><copy-path-suffix/>,o=novell</placement> </placement-rule> <!-- for all other users and groups --> <!-- place them in the department container under novell --> <placement-rule> <match-class class-name="User"/> <match-class class-name="Group"/> <placement>cn=<copy-name/>,ou=<copy-attr attr-name="OU"/>,o=novell</placement> </placement-rule> <!-- for everything else, try to mirror the hierarchy --> <placement-rule> <placement><copy-path/></placement> </placement-rule> </placement-rules>
For another example, see the pub_placement_rule.xml file used by the publisher in the VRTest Driver.