Hello David,
Thank you for your finding!
It's a shame for me that you had to spend time on such kind of easy/stupid issue.
Unfortunately it's the week-end and I can't really test much on integration with ldap request. I'll have to wait for monday to play around (space with name, deal with special char, etc.). But before leaving the office yesterday, I could quickly check that I can indeed get ldap result from Alfred and display them as a list with contact icon.
For some reason I couldn't get it right from Script Filter and I had to dome something as you propose in your sample with:
1) "Script Filter" (get the keyword) + 2) "Action" -> "Run Script" (process {query} with Python and write an xml formatted result to a file + 3) call via "Output -> Run Script" oascript a new "Alfred 2" search + 4) "input" -> "Script Filter" that display xml file content (list of result). I'll check this week-end if I can do something less "complicated".
I still have now to figure out how to display a full page when I click on a name from the list (like contact detail page does). I hope this is possible ? It would be great to create a new email if clicked on email detail, launch SIP call if it's a fix line, call iMessage if it's a mobile number, etc. Also, It might even be possible to display person picture as I believe I can get this info from ldap ...
Once I'll have the all workflow working I'll post it there for those that have ldap directory at the office.
Thank you again David for your support.
O.