[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: XML to LDIF



Halvor Dahl:
> Geert Stappers wrote:
> 
> >>>>TODO:  Write a program for importing data from XML interface to
> >>>>Skolelinux' import format to ldap which is a comma/colon separated
> >>>>file.  Person to do it will be assigned later.
> >>>Please solve that problem in two stages
> >>>* XML to LDIF conversion
> >>>* LDIF import

XML to LDIF conversion... hmm DSML (Directory Services Markup Language)
is XML for the LDAP World.

Python-ldap have some functions for converting to/from dsml and ldif.
We use the eksport-functions already in Luma [1] for eksport
not only single ldap objects - but subtrees or whole directores for that
sake (both dsml and ldif) - using the modules dsml and ldif from
python-ldap[2]

> >>By "import format to ldap which is a comma/colon separated file" I meant
> >>LDIF (although I did not know the name when I wrote it).  The activity is
> >>to write the XML to LDIF conversion.  Sorry if this was unclear.  But then
> >>again, what can you expect?  I am a salesman, not a technician.

Though - it would be "handy" if one could actually load a semicolon
separated file - which together with a wizard could be a ok way to
import data from e.g. applicationtypes such as spreadsheets and
databases. Using python-ldap, I've made several small applications such
as addressbook-exports (using [2] ) for exporting from ldap to
semicolonseparated files for Palm and vCard-files for my cellular phone.

> >My research did stop when I realized that
> >that there is XSLT.
> >Other people may find other promising technologies,
> >I hope we will hear from them.

Yes - XSLT works pretty fine with DSML as far as I know. Though I
don't think its the best way to do ldapsearch, eksport to dsml and
transform it into html-tags using xslt. This would create way way to
much overhead imho.

> Sorry for being ignorant, but I would think that an average programmer
> could easily write something like this in a few hours by parsing the XML
> for the required data and dumping them into an LDIF file.  But then again,
> what would I know?

As I've mentioned above.. ldif/dsml-export is already done in Luma
(really easy using python-ldap) - and imports are high up on the todo-list. 
I cannot give any dates for these features if Luma will be concidered.

[1] Luma
    Graphical utility for accessing and managing data stored on LDAP
    servers. Features support for several languages and plugins such as
    browser, schema browser, search, addressbook, template, massive
    usercreation, user- and group-management. Everything is editable
    from the browser for those more experienced in LDAP and browsing
    trees. 
[2] Python-ldap
    Python LDAP-api build upon OpenLDAP client libraries.
    Supports fileObjects such as DSML and LDIF as well as external 
    authentications mechanisms in addition to good old ldap-bind.

-- 
Regards
 
Bjørn Ove Grøtan



Reply to: