You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cocoon.apache.org by Jeff Turner <je...@socialchange.net.au> on 2000/10/04 15:45:34 UTC

Re: LDAP taglib: stronger LDAP/XML coupling (was: Re: LDAP taglib password?)

On Wed, 4 Oct 2000, Ugo Cei wrote:

> Jeff Turner wrote:
>
> > That would be very cool. I proposed something like this on XML-DEV once.
> > The LDAP and XML data models seem very close. Imagine if you could query
> > LDAP with XPATH expressions, or use a SAX-like API for parsing search
> > results..
>
> The problem I foresee is that the results of an LDAP query do not
> necessarily form a tree.

Well XPath expressions don't return trees either :) They can return
node-sets, which can be iterated over with <xsl:for-each> just like
JNDI SearchResults can be iterated over with a NamingEnumeration.

> > Back to reality, Sun have got a DSML service provider for JNDI:
> >
> > http://developer.java.sun.com/developer/earlyAccess/jndi/
> 
> I do not see this as very useful, as it only allows you to use a DSML
> document as a data source, and not as output.

Hmm.. I haven't played with it much, but the webpage says:

"You can use [the JNDI/DSML service provider] to access DSML
documents,
manipulate and update its contents by using the JNDI APIs, and then
re-export the contents in
DSML format."
-- http://developer.java.sun.com/developer/earlyAccess/jndi/

So it ought to be two-way, and could thus be used as an intermediate
between LDAP and XML.

> > update LDAP. Castor (http://castor.exolab.org/) can do this. I'm not
> > sure how compatible the licences are.
>
> Castor is cool, but aside from licensing issues (which shouldn't be too
> thorny: Castor uses a BSD-like license that is very liberal, like the  
> Apache license), I don't think we need Castor just to produce DSML from
> LDAP via a taglib, for now.

True.

> Just to test these ideas, I've put together some code of my own and
> Alain Ketterlin's LDAP Taglib
> (http://dpt-info.u-strasbg.fr/~alain/ldap/). My taglib uses "jndi" as
> the namespace identifier (the Java code uses JNDI and is not (or will
> not) use LDAP exclusively, so I think "jndi" is more appropriate than
> "ldap"), and produces (or tries to produce) a DSML document.

Thanks; I had a look, and will try it tomorrow.

I'm just wondering..  is it desirable for Cocoon taglibs to expose the
underlying technology through the naming conventions? Shouldn't taglib
naming conventions indicate functionality, rather than implementation,
eg
'esql' rather than 'jdbc'?

Besides, JNDI's 'security-principal' and 'security-credentials' are
pretty
awful compared to 'username' and 'password' ;)

--Jeff

> 
> I've also changed the names of some of the input parameters in order to
> reflect more closely the JNDI names (e.g. "provider-url" instead of
> "server-url"). There is no documentation aside from the source code
> itself, so you'll have to figure out how it is to be used from the code.
> 
>       Ugo
> 
> --
> Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
> P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
> Phone: +39.0382.525100 - E-mail: u.cei@cbim.it

Re: LDAP taglib: stronger LDAP/XML coupling (was: Re: LDAP taglib password?)

Posted by Ugo Cei <u....@cbim.it>.
Jeff Turner wrote:
> >
> > I do not see this as very useful, as it only allows you to use a DSML
> > document as a data source, and not as output.
> 
> Hmm.. I haven't played with it much, but the webpage says:
> 
> "You can use [the JNDI/DSML service provider] to access DSML
> documents,
> manipulate and update its contents by using the JNDI APIs, and then
> re-export the contents in
> DSML format."
> -- http://developer.java.sun.com/developer/earlyAccess/jndi/
> 
> So it ought to be two-way, and could thus be used as an intermediate
> between LDAP and XML.

I think I need to take a better look at it.

> I'm just wondering..  is it desirable for Cocoon taglibs to expose the
> underlying technology through the naming conventions? Shouldn't taglib
> naming conventions indicate functionality, rather than implementation,
> eg
> 'esql' rather than 'jdbc'?

Your observation is correct, but what name should we choose? Clearly not
"ldap", since through JNDI we can access much more that LDAP
directories. Also, "naming-and-directory" would bee too long to type :).

--
Ugo Cei - Consorzio di Bioingegneria e Informatica Medica
P.le Volontari del Sangue, 2 - 27100 Pavia - Italy
Phone: +39.0382.525100 - E-mail: u.cei@cbim.it