placement-rules

Generate distinguished names for new entries.

Description

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.

Definition

  <!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)* >
  
  

Attributes

dest-dn-delims
Specifies the format of the destination dn when the dest-dn-format is empty. See the table below for the defined character set.
dest-dn-format
Specifies the format of the destination dn (dot, qualified dot, slash, qualified-slash, or ldap) when the des-dn-delims attribute is empty.
src-dn-delims
Specifies the format of the source dn when the src-dn-format is empty. See the table below for the defined character set.
src-dn-format
Specifies the format of the source dn (dot, qualified dot, slash, qualified-slash, or ldap) when the src-dn-delims attribute is empty.

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:

Character Number

Description

#1

Typed Name Boolean Flag: 0 means names are not typed, 1 means names are typed.

#2

Unicode No-Map Character Boolean Flag: 0 means don't output or interpret unmappable unicode characters as escaped hex digit strings, for example, \FEFF. eDirectory does not accept the following unicode characters: 0xFEFF, 0xFFFE, 0xFFFD, and 0xFFFF.

#3

Relative RDN delimiter.

#4

RDN delimiter.

#5

Name divider.

#6

Name value delimiter.

#7

Wildcard character.

#8

Escape character.

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.

Elements

placement-rule
Specifies the criteria for selecting an entry and for generating the distinguished name.
match-attr
Specifies attribute values the entry must match to use this placement rule.
match-class
Specifies the base class the entry must match to use this placement rule.
match-path
Specifies the root container the entry's dn must match to use this placement rule.
placement
Specifies where the entry is placed when it matches all the placement criteria.

Parent

Sample Placement Rules

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.