Published on wayland's Computer Stuff (http://computerstuff.jdarx.info)
TreePath and LDAP
By wayland
Created 2008-04-15 01:05

LDAP has a very powerful path specification language. Unfortunately, it's somewhat more cumbersome than XPath, and familiar to fewer people than other more well-known tree navigation languages such as XPath and glob().

I'm proposing that the next version of LDAP have an option to use TreePath-based paths (as described in TreePath -- a universal tree navigation language [1]) as well as the traditional LDAP ones.

Using TreePath with LDAP

This would mean that a path such as

 dc=example,dc=com,ou=People,uid=user1
could be replaced with the following Complex TreePath:

 /*[dc="example"]/*[dc="com"]/*[ou="People"]/*[uid="user1"]
...which is admittedly worse, but it could also be replaced with the following Simple TreePath:

 /example/com/People/user1
...which I hope you'll agree is much simpler for first-time LDAP users. It would also mean that anyone who has used XPath before would quickly adapt to at least Complex TreePath. If the glob() people take up my suggestions regarding TreePath and glob() [2], it will also mean that many ordinary Unix users will be familiar with TreePath.

Another one of TreePath's advantages is that it incorporates into its syntax whether the search is to be a base, one, or sub type of search.

Conclusion

Allowing the use of TreePath with LDAP will make LDAP paths both simpler and more powerful.

Source URL: http://computerstuff.jdarx.info/content/treepath-and-ldap

Links:
[1] http://computerstuff.jdarx.info/content/treepath-universal-tree-navigation-language
[2] http://computerstuff.jdarx.info/content/treepath-and-glob