# attr-name-map

<attr-name-map> is the top level (document) element for schema mapping rules. Schema mapping rules are stored in the DirXML-XmlData attribute of a DirXML-Rule object that is pointed to by the DirXML-MappingRule attribute of a DirXML-Driver object.

<attr-name-map> contains <attr-name> and <class-name> elements that specify a one-to-one mapping between class and attribute names in eDirectory and the application namespace.

Schema mapping rules are applied to map from the eDirectory namespace to the application namespace whenever XML is sent or returned from DirXML to the driver and before the Output transform is applied.

Schema mapping rules are applied to map from the application namespace to the eDirectory namespace whenever XML is sent or returned from driver to DirXML after the Input transform is applied.

Schema mapping rules will try to map the class-name and attr-name attributes of all elements in the document. The class name to map an attribute name is found by looking the nearest ancestor element with a class-name attribute

Example

>     <attr-name-map>
>     <!-- map eDirectory class User application class inetOrgPerson -->
>      <class-name>
>       <nds-name>User</nds-name>
>       <app-name>inetOrgPerson</app-name>
>      </class-name>
>     <!-- map NDS attribute Given Name to application attribute givenName for class User -->
>      <attr-name class-name="User">
>       <nds-name>Given Name</nds-name>
>       <app-name>givenName</app-name>
>      </attr-name>
>     <!-- map NDS attribute Surname to application attribute sn for all classes -->
>     <!-- that don't have a class-specific mapping -->
>      <attr-name>
>       <nds-name>Surname</nds-name>
>       <app-name>sn</app-name>
>      </attr-name>
>     </attr-name-map>

## 1. Allowed Content

> attr-name
>   Map an attribute name.
> class-name
>   Map a class name.

## 2. No Attributes

## 3. Content Rule

> ( attr-name | class-name ) *

## 4. Parent Elements

> None

Top Elements || All Elements || Tree