Novell Home

My Favorites

Close

Please to see your favorites.

DirXML 1.1a Lotus Notes driver import causes Java Error when creating a user in eDirectory

(Last modified: 06Oct2004)

This document (10078111) is provided subject to the disclaimer at the end of this document.

fact

Novell Lotus Notes Driver

Novell DirXML 1.1a

symptom

<xsl:variable>: expression evaluation error: function 'query:query' not found

<xsl:variable>: > expression evaluation error: unable to convert type 'java.lang.String' to > type 'com.novell.nds.dirxml.driver.XdsQueryProcessor' >

DirXML 1.1a Lotus Notes driver import causes Java Error when creating a user in eDirectory

cause

There is an error in the Subscriber Command Transformation Stylesheet 

fix

To resolve this issue you can paste the following code into the Subscriber Command Transformation Stylesheet.  Be sure to backup your existing code before overwriting it.

You must modify the Notes Universal ID for the Deny Access Group in the code below prior to saving the stylesheet (see 'ENTER UNIVERSAL ID FOR NOTES DENY GROUP HERE' below). 

<?xml version="1.0" encoding="UTF-8"?>

<xsl:stylesheet version="1.0" xmlns:query="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.XdsQueryProcessorxmlns:xsl="http://www.w3.org/1999/XSL/Transform">

<!-- String constants that will be used through the stylesheet -->

<!-- The first two templates implement the identity transform. -->

<!-- Anything that doesn't match a more specific template will -->

<!-- be copied as is to the output. -->

<xsl:param name="destQueryProcessor"/>

<xsl:template match="/">

<xsl:apply-templates select="node()|@*"/>

</xsl:template>

<xsl:template match="node()|@*">

<xsl:copy>

<xsl:apply-templates select="node()|@*"/>

</xsl:copy>

</xsl:template>

<!--###################################################################

SubscriberCommandTransformSS:

This Style Sheet is a template for the DirXML Driver 1.5a for Lotus Notes This transformation looks for

- ADDS to append an extended-ou attribute to avoid Notes name collisions.

- MODIFIES to user objects where Login Disabled has been changed In response to this condition the stylesheet copies the modify on the user through, and then synthesizes a group modify of the deny access group.

- DELETES to user objects. The same deny access modification is done.

###################################################################-->

<!-- ################################################################### -->

<!-- Enter the Notes Universal ID for the Deny Access Group. -->

<!-- This can be found on the Properties sheet for the Group in the Notes Client -->

<!-- ###################################################################-->

<xsl:variable name="grpassoc">ENTER UNIVERSAL ID FOR NOTES DENY GROUP HERE</xsl:variable>

 

<!-- The following is for testing the stylesheet outside of DirXML so things are tabbed correctly and pretty to look at -->

<xsl:strip-space elements="*"/>

<xsl:preserve-space elements="value,component"/>

<xsl:output indent="yes" method="xml"/>

 

<xsl:template match="add[@class-name='User']">

<xsl:copy>

<xsl:variable name="given_name" select="add-attr[@attr-name='Given Name']/value"/>

<xsl:variable name="surname" select="add-attr[@attr-name='Surname']/value"/>

<xsl:variable name="query">

<query class-name="User" scope="subtree">

<search-class class-name="User"/>

<search-attr attr-name="Surname">

<value type="string">

<xsl:value-of select="$surname"/>

</value>

</search-attr>

<search-attr attr-name="Given Name">

<value type="string">

<xsl:value-of select="$given_name"/>

</value>

</search-attr>

<read-attr/>

</query>

</xsl:variable>

<xsl:variable name="result" select="query:query($destQueryProcessor,$query)"/>

<xsl:variable name="count-result" select="string(count($result//instance))"/>

<xsl:if test="$count-result != '0'">

<xsl:attribute name="extended-ou"><xsl:value-of select="concat($given_name, ' ', $surname, $count-result)"/></xsl:attribute>

</xsl:if>

<xsl:apply-templates select="node()|@*"/>

</xsl:copy>

</xsl:template>

 

<xsl:template match="modify[@class-name='User']">

<xsl:variable name="disabled" select="modify-attr[@attr-name='Login Disabled']/add-value/value"/>

<xsl:variable name="usersrcdn" select="@src-dn"/>

<xsl:variable name="userassoc" select="association"/>

<xsl:choose>

<xsl:when test="$disabled = 'true'">

<modify class-name="Group">

<xsl:apply-templates select="association"/>

<modify-attr attr-name="Member">

<add-value>

<value type="dn" association-ref="{$userassoc}">

<xsl:value-of select="$usersrcdn"/>

</value>

</add-value>

</modify-attr>

</modify>

</xsl:when>

<xsl:when test="$disabled = 'false'">

<modify>

<xsl:attribute name="class-name">Group</xsl:attribute>

<association state="associated">

<xsl:value-of select="$grpassoc"/>

</association>

<modify-attr attr-name="Member">

<remove-value>

<value type="dn" association-ref="{$userassoc}">

<xsl:value-of select="$usersrcdn"/>

</value>

</remove-value>

</modify-attr>

</modify>

</xsl:when>

<xsl:otherwise>

<xsl:copy>

<xsl:apply-templates select="node()|@*"/>

</xsl:copy>

</xsl:otherwise>

</xsl:choose>

</xsl:template>

 

<xsl:template match="delete[@class-name='User']">

<xsl:variable name="usersrcdn" select="@src-dn"/>

<xsl:variable name="userassoc" select="association"/>

<modify class-name="Group">

<xsl:apply-templates select="association"/>

<modify-attr attr-name="Member">

<add-value>

<value type="dn" association-ref="{$userassoc}">

<xsl:value-of select="$usersrcdn"/>

</value>

</add-value>

</modify-attr>

</modify>

</xsl:template>

</xsl:stylesheet>

.

disclaimer

The Origin of this information may be internal or external to Novell. Novell makes all reasonable efforts to verify this information. However, the information provided in this document is for your information only. Novell makes no explicit or implied claims to the validity of this information.
Any trademarks referenced in this document are the property of their respective owners. Consult your product manuals for complete trademark information.

  • Document ID:
  • 10078111
  • Solution ID: NOVL85133
  • Creation Date: 24Dec2002
  • Modified Date: 06Oct2004
    • NetIQeDirectory

Did this document solve your problem? Provide Feedback