I'm back again with more ECMA questions. I'm attempting to convert the
demo from TUT369 to use a loopback driver, so that I can take action (i.e.
modify) against the results returned from the LDAP search (because the
query token is not as robust as an LDAP query).

The problem I'm currently encountering is that I cannot call the ECMA
function (located in a library) from within a stylesheet. I have the ECMA
object associated with the driver successfully - a policy in the same
driver is able to call the function. When I try to call the function from
within XSLT, however, I get the following error in the trace:

[6/13/2007 09:05:09.50] Drvrs : Business Rules Checker ST:
DirXML Log Event -------------------
Driver: DEV-01servicesDriver SetBusiness Rules Checker
Channel: Subscriber
Status: Error
Message: Code(-9061) Error processing XSLT policy:
(22): <xsl:for-each>: expression evaluation error: function
'es:ldapSearch' not found

The stylesheet that's generating this error follows. I would appreciate
any guidance you can provide.

Which brings up the question of how does everyone (Father) learn about
this stuff? Most of the documentation I've been able to find is pretty
weak and the few documented examples I've found are too simplistic to be
of much help.

<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet exclude-result-prefixes="query cmd dncv" version="1.0"
<!-- parameters passed in from the DirXML engine -->
<xslaram name="srcQueryProcessor" />
<xslaram name="destQueryProcessor" />
<xslaram name="srcCommandProcessor" />
<xslaram name="destCommandProcessor" />
<xslaram name="dnConverter" />
<xslaram name="fromNds" />
<!-- identity transformation template -->
<!-- in the absence of any other templates this will cause -->
<!-- the stylesheet to copy the input through unchanged to the output -->
<xsl:template match="node()|@*">
<xsl:apply-templates select="@*|node()" />
<!-- add your custom templates here -->
<xsl:template match="trigger[@source='Way to Disable Trigger']">
<xsl:variable name="driver-pwd">
select="query:getNamedPassword($destQueryProcessor ,
'businessrulesdriver')" />
select="es:ldapSearch('localhost', 636,
'cn=businessrulesdriver,o=services',$driver-pwd, 'ou=people,dc=xxx',
'sub', '(uid=*)', 'cn,uid')">
<xsl:value-of select="." />