[prev in list] [next in list] [prev in thread] [next in thread] 

List:       openldap-general
Subject:    Re: XML?
From:       "Mark Wilcox" <mark () mjwilcox ! com>
Date:       1999-08-07 4:02:39
[Download RAW message or body]


-----Original Message-----
From: John Merrells <merrells@netscape.com>
To: Dan Dickey <ddickey@wamnet.com>
Cc: MCGARRAHAN KENNETH L (SWBT) <km4155@momail.sbc.com>;
openldap-general@OpenLDAP.org <openldap-general@OpenLDAP.org>
Date: Wednesday, August 04, 1999 3:05 PM
Subject: Re: XML?


>
>
>Dan Dickey wrote:
>>
>> "MCGARRAHAN, KENNETH L (SWBT)" wrote:
>> >
>> > We routinely "stuff" XML files into an attribute declared as "binary"
in our
>> > OpenLDAP Directory implementation.
>>
>> That's not quite what I was thinking.  :)
>>
>> I've had time to read a bit more, and am learning.
>>
>> Basically; what we needed to do here was use ldap from the
>> start - we are creating a directory off of an Informix database,
>> but the initial desired format was XML.  So I have a bunch of
>> XML files - 1 per entry in the directory.
>> I want to take these XML files and do *whatever* to them,
>> and make the information available in an ldap server (slapd?).
>> Showing that I can run ldapsearch and "see" the data will be
>> enough to me to know I'm on the right track.
>>
>> The correct way to do the above of course is to have the
>> database populate the directory directly - without going
>> through XML.  If LDAP proves useful to us here, we may
>> do just that.  Of course, there is always the time factor. :)
>
Well coming from someone who's in the middle of a fairly massive LDAP
deployment, you're going to need to "massage" the data from a database into
your LDAP schema. XML works as good as anything else if you have XML talent
on board. While I think putting it into XML is a great idea, we just don't
have the time/talent.

>Interpretting your question as: 'How do I get my XML files
>into the directory?'
>
>The server can only import files in an LDIF format. The LDIF
>format is specified in an RFC written by Gordon Good. You'll
>need to convert each of your XML files into LDIF entries...
>then probably create one big LDIF file that you can import
>into the directory server.
Well LDIF is one way to get it ready for import. You don't necessarily have
to do this (unless you only want to use the LDAP command line tools like
ldapmodify) and while we wait for DSML to come out with a standard, you can
always develop your own XML DTD for you data (after all there may be more
uses for the data once in XML than just importing directly into LDAP). The
ability to design your own DTD is one of the nice things about XML.

What you could do is write your own loading application that used both an
XML parser and an LDAP API.

The application would read in the XML file. As each entry is read, then a
new LDAP operation (e.g add, modify, delete) is prepared by the application
via the LDAP API.

To me this seems to be the best solution.

If you don't want to go the XML route, you can do what I've done in the past
and written a db to LDAP middleware  application. I used Java and
JDBC/Netscape Directory SDK to query the database (which in my case was a
simple Access database) and then populated the LDAP server. In my mind,
unless you're sharing the XML data with other processes, that's (e.g.
database to LDAP middleware) a much simpler process. Or if you have the
budget , perhaps something like Oblix's product might work for you (can't
remember if they have a db driver or not).

Just my two cents.
Mark

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic