An attribute syntax defines a standard data type which an attribute uses to store its values in the NDS tree. The syntax definitions are static definitions represented in basic C-code format. For example, the schema includes the following attribute syntaxes:
The Case Ignore String syntax is used in attributes whose values are strings and where the case (upper or lower) is not significant.
The Integer syntax is used for attributes whose values are signed integers.
For a complete list of the attribute syntaxes defined in the schema, see Attribute Syntax Definitions.
Attribute type definitions are built on attribute syntaxes. Developers extending the schema can create new attribute types using these syntaxes, but they cannot create any new syntax definitions.
An attribute syntax consists of a single data type. Matching rules indicate the characteristics that are significant when comparing two values of the same syntax. There are three primary matching rules:
To match for equality, two values must be identical, use the same attribute syntax, and conform to the data type of the attribute syntax. Most syntaxes specify a match for equality. NDS™ checks that the values being matched conform to the data type of the syntax. NDS will not attempt to match two values if the syntax does not specify a match for equality.
To match for ordering, a syntax must be open to comparisons of less than, equal to, and greater than. For example, 50 is less than 100, and N is greater than B.
To match substrings, a syntax must be open to search and comparison patterns that include the asterisk (*) wildcard. For example, in a syntax using substring matching, N*V*L would match NAVAL, NAVEL, or NOVEL.
An approximate comparison rule can be used in searches and comparisons on syntaxes with lists of strings and syntaxes with multiple fields and an ID field:
The approximate rule determines whether a string is present in a syntax with a string list.
The approximate rule determines whether an ID matches the ID in a corresponding field while ignoring the other fields in the syntax. Although most of the API structures for syntaxes require an object name, NDS replaces these names with IDs in the comparison and search operations.
This NDS approximate matching rule is quite different from the LDAP approximate matching rule.
A syntax can specify one or more of these matching rules. For example, the Case Ignore String syntax specifies matching rules of equality and substrings.
A syntax can also specify qualifiers for comparison which ignore characters such as dashes, leading spaces, trailing spaces, and multiple consecutive internal spaces. All string syntaxes use comparison operations that ignore extra spaces. Other qualifiers allow only digits or only printable characters.
The Attribute Syntax Definitions section lists the names of each syntax in alphabetical order. The name of the syntax is followed by a brief description of how the syntax is used.
Each syntax defines the following information:
A 32-bit integer used as an identifier in Application Programming Interface (API) functions that transfer attribute values in and out of NCP™ message buffers. The syntax IDs are defined in nwdsdefs.h.
A C structure supported by the NDS API.
The format the syntax takes when it is transferred on the wire.
The rules for matching two values that comply with the syntax.
A list of attribute type definitions that use the syntax.
Additional information that may include information concerning comparisons, explanations of structure members, and qualifiers.
To determine which syntax is used for a particular attribute type, refer to the attribute’s syntax specification in the Base Attribute Definitions.