From: <mi...@st...> - 2003-11-28 15:14:52
|
paul k=F6lle wrote: > Lukas Meyer wrote: >=20 >> I want to show the whole ldap structure in a tree. I want to do that=20 >> with a loop that continous searching in each branch it found. But my=20 >> problem is, how I can let the loop know if it is the end btw the last = >> branch of a branch. Is there anything to check for that? My current=20 >> code checks everytime the first branch, then the first branch of the=20 >> first branch etc. but if it is at the latest one, it hangs. So I need = >> anything how i can say "if you are in the latest one, break the loop".= >=20 > Just a thought, at least Openldap each entry has an operational=20 > attribute "hasSubordinates: TRUE | FALSE". This works on e.g. OpenLDAP (since 2.1.5?) and on some X.500 servers and = it's the most generic attribut for determining a leaf entry. One can also= =20 evaluate integer value of attribute 'subordinateCount' on Novell eDirecto= ry=20 or 'numSubordinates' on Netscape/iPlanet/SunONE Directory Server. Note th= at=20 the latter is not usable on iPlanet/SunONE Directory Server 5.x+ without = adding a-priori knowledge to the application that the attribute=20 'numSubordinates' should be there if it's a non-lead entry. web2ldap contains code for this when searching and doing recursive delete= s.=20 It also falls back to doing a one-level search when none of the attribute= s=20 above is present. Ciao, Michael. |