LDAP-UX Client Services B.05.01 Administrator Guide for HP directory servers and Windows ADS
used in the /etc/opt/ldapux/schema/sample.xml and /etc/opt/ldapux/schema/
map-rules.xml files.
9.5.4 Schema definition file
The ldapschema utility queries and extends LDAP directory server based on the XML schema
definition file. When using the ldapschema tool, the schema argument used with the -q or -e
option must correspond to the XML file containing the appropriate schema definition.
Several predefined files (such as rfc3712.xml, rfc2256.xml, etc...) are stored in the /etc/
opt/ldapux/schema directory. But the schema definition file may be stored in any directory
with any file name.
Each schema definition file must adhere to the DTD template specified in /etc/opt/ldapux/
schema/schema.dtd file. Every XML file used by the ldapschema utility must include /etc/
opt/ldapux/schema/schema.dtd as its DTD. See Line 2 in Section 9.5.4.1 (page 365).
WARNING! Every XML file used with ldapschema utility must include /etc/opt/ldapux/
schema/schema.dtd file as its DTD template. Do not modify this file, or create your own DTD
template file. The /etc/opt/ldapux/schema/schema.dtd file is created to validate attribute
type and object class definitions before they can be added to the LDAP directory server schema.
Altering the format of any schema elements in this file will cause ldapschema to fail.
The schema definition file, enclosed by <schemaDefinition> tags, specifies schema name,
schema description and schema source, followed by any number of attribute type and object class
definitions. The schema name, schema description and schema source XML tags are
optional.
The following describes the schemaName, schemaDescription, and schemaSource tags:
<schemaName> Optional, specifies the name of schema definition file.
<schemaDescription> Optional, contains a brief one line schema description.
<schemaSource> An optional field used to specify the X-ORIGIN field of extended
attribute types and object classes, if used.
In the schema definition file, after general schema information is specified, attribute type definitions,
if any, must be specified followed by any object class definitions.
9.5.4.1 Sample RFC3712.xml file
The following sample rfc3712.xml file defines two attribute types, printer-name and
printer-aliases, followed by one object class, printerLPR, as specified in RFC3712:
Line 1: <?xml version="1.0" encoding="UTF-8"?>
Line 2: <!DOCTYPE schemaDefinition SYSTEM "/etc/opt/ldapux/schema/schema.dtd">
Line 3:
LINE 4: <schemaDefinition>
Line 5:
Line 6: <schemaName>rfc3712</schemaName>
Line 7: <schemaDescription>Printer Services Schema</schemaDescription>
Line 8: <schemaSource>RFC3712</schemaSource>
Line 9:
Line 10: <attributeTypeDefinition>
LINe 11: <oid>1.3.18.0.2.4.1135</oid>
Line 12: <name>printer-name</name>
Line 13: <desc>A site-specific administrative name of this printer</desc>
Line 14: <equality>caseIgnoreMatch</equality>
Line 15: <substr>caseIgnoreSubstringsMatch</substr>
Line 16: <syntax>1.3.6.1.4.1.1466.115.121.1.15</syntax>
Line 17: <length>127<length>
LIne 18: <singleValued/>
Line 19: </attributeTypeDefinition>
Line 20:
Line 21: <attributeTypeDefinition>
LINe 22: <oid>1.3.18.0.2.4.1108</oid>
9.5 Schema extension utility 365