schema-def

Specifies an output that contains the class and attribute definitions in the eDirectory schema or the external application's schema.

Description

The <schema-def> element is part of the reply to a <query-schema> element and to the DriverShim getSchema method. The reply includes the <status> and then the <schema-def> element.

The <schema-def> element defines the available classes and attributes in the database. The DirXML snapin to ConsoleOne uses this file to display the schema definitions to administrators so that they can create mapping rules by clicking on the displayed classes and attributes.

Definition

  <!ELEMENT schema-def       (class-def)* >
  <!ATTLIST schema-def
            hierarchical     (%Boolean;)     "true">
            application-name  CDATA          #IMPLIED>
  
  <!ELEMENT class-def        (attr-def)* >
  <!ATTLIST class-def
            class-name       CDATA            #REQUIRED
            asn1id           CDATA            #IMPLIED
            container        (%Boolean;)      "false">
  
  <!ELEMENT attr-def         EMPTY>
  <!ATTLIST attr-def
            attr-name        CDATA            #REQUIRED
            asn1id           CDATA            #IMPLIED
            type             (%Attr-type;)    "string"
            required         (%Boolean;)      "false"
            naming           (%Boolean;)      "false"
            multi-valued     (%Boolean;)      "true"
            case-sensitive   (%Boolean;)      "false"
            read-only        (%Boolean;)      "false">
  
  

Attributes

hierarchical
Specifies whether the data is stored in a hierarchical structure. If not specified, defaults to a hierarchical structure.
application-name
Specifies the name of the application that uses the schema.

Elements

class-def
Specifies a class definition for the originating schema.
attr-def
Specifies an attribute definition for the parent <class-def> element.

Required Elements

The following elements and attributes are required to define an object class.

  <schema-def>
     <class-def class-name="xxx">
         <attr-def attr-name="aaa"/>
     </class-def>
  </schema-def>
  

All other class-def and attr-def attributes are optional. The XML documents for schema definitions can become very large. Therefore, if the default values for the XML attributes match the attribute or class schema definition, do not specify them in the XML document.

Parent

Remarks

The schema for the external application is not read dynamically. During initial set up, DirXML sends a schema read operation to your driver and stores the returned XML document. If the schema in your application changes, your driver will need to be stopped and the new XML schema document needs to be sent to the DirXML engine during initialization.

The <schema-def> element does not need to include all class and attribute definitions; it needs to include all class definitions for the entries that eDirectory and the external application will synchronize. The class definition does not need to include all attribute definitions; it needs to include the attribute definitions for the attributes that eDirectory and the external application will synchronize.

Example

The following example displays a definition for four classes (Organization, Organizational Unit, User, and Bogus). Most of the <attr-def> elements have more information than fits on one line, so the lines are wrapped and indented. Such wrapped lines do not begin with a <.

  schema-def hierarchical="true">
     <class-def class-name="Organization" container="true">
        <attr-def attr-name="Name" case-sensitive="false" multi-valued="false"
               naming="true" read-only="false" required="false" type="string"/>
        <attr-def attr-name="Object Path" case-sensitive="false" 
               multi-valued="false" naming="false" read-only="false"
               required="true" type="string"/>
        <attr-def attr-name="Unique Id" case-sensitive="false" 
               multi-valued="false" naming="false" read-only="false"
               required="true" type="string"/>
     </class-def>
  
     <class-def class-name="Organizational Unit" container="true">
        <attr-def attr-name="Name" case-sensitive="false" multi-valued="false"
               naming="true" read-only="false" required="false" type="string"/>
        <attr-def attr-name="Object Path" case-sensitive="false" 
               multi-valued="false" naming="false" read-only="false"
               required="true" type="string"/>
        <attr-def attr-name="Unique Id" case-sensitive="false" 
               multi-valued="false" naming="false" read-only="false" 
               required="true" type="string"/>
     </class-def>
  
     <class-def class-name="User" container="false">
        <attr-def attr-name="cn" case-sensitive="false" multi-valued="false"
                  naming="true" read-only="false" required="true" type="string"/>
         <attr-def attr-name="Surname" case-sensitive="false" multi-valued="false"
                 naming="false" read-only="false" required="false" 
                 type="string"/>
        <attr-def attr-name="Given Name" case-sensitive="false" 
                 multi-valued="false" naming="false" read-only="false"
                 required="false" type="string"/>
        <attr-def attr-name="Telephone Number" case-sensitive="false" 
                 multi-valued="true" naming="false" read-only="false"
                 required="false" type="string"/>
        <attr-def attr-name="Object Path" case-sensitive="false" 
                 multi-valued="false" naming="false" read-only="false" 
                 required="true" type="string"/>
        <attr-def attr-name="Unique Id" case-sensitive="false" 
                 multi-valued="false" naming="false" read-only="false"
                 required="true" type="string"/>
     </class-def>
  
     <class-def class-name="Bogus" container="false">
         <attr-def attr-name="Whatever" case-sensitive="false" multi-valued="true"
                naming="true" read-only="false" required="false" type="string"/>
        <attr-def attr-name="Object Path" case-sensitive="false" 
                multi-valued="false" naming="false" read-only="false" 
                required="true" type="string"/>
        <attr-def attr-name="Unique Id" case-sensitive="false" 
                multi-valued="false" naming="false" read-only="false" 
                required="true" type="string"/>
     </class-def>
  </schema-def>
  

A more complete document for the eDirectory schema is found in the schema.xml file. Since the eDirectory schema is extensible, this file does not include all possible attributes for a class. The ConsoleOne snap-in reads the eDirectory schema dynamically whenever it displays the classes and attributes.