This is embarrassingly simple, but I'm not great with xss and having
managed to find anything in a quick forum search. Also its a while since
I've had to look at the IDM systems and I'm out of practice:-)

We have a delimited text driver taking a daily export from another
system, and amongst other things it updates internet email address,
which is multi valued. The other system is not smart: I just get an
export of everything. We're discovering that when the email address
changes in the remote system the id vault is getting a second internet
email address attribute added rather than the existing one being
overwritten. There is a simple matching rule as well as the stylesheet
below, which is pretty much out of the box.

So how and where do I persuade the system to overwrite the current
attribute rather than append a new one.

The delim driver is running on IDM4.01 on OES2 now, but was originally
'developed' in IDM 3.5 on Netware 6.5.

cheers, Jim C

<?xml version="1.0" encoding="UTF-8"?><xsl:stylesheet
extension-element-prefixes="nxsl" version="1.0"
<!-- each application must fill in the name of the field that provides
the association key -->
<xsl:variable name="association-field-name" select="Email"/>
<xsl:variable name="srcdn-field-name1" select="CN"/>
<!-- <xsl:variable name="srcdn-field-name2" select="'LastName'"/> -->
<!-- each application must fill in the name of the class that the
delimited text represents -->
<xsl:variable name="object-class" select="'User'"/>
<xsl:template match="/">
<!-- if document element is delimited-text, then we need to do the
transformation -->
<xsl:when test="delimited-text">
<nds dtdversion="1.1" ndsversion="8.6" xml:space="default">
<!-- for each record, do an add -->
<xsl:for-each select="delimited-text/record">
<!-- see NDSDTD doc on web for Add verb syntax & details -->
<!-- get the association id into a variable -->
<xsl:variable name="association"
<!-- get the src-dn id into a variable, replacing invalid DN
characters with a dash -->
<xsl:variable name="srcdn"
<!-- generate the add event -->
<add class-name="{$object-class}" src-dn="{$srcdn}">
<!-- generate the association -->
<xsl:value-of select="$association"/>
<!-- handle each field -->
<xsl:for-each select="field[string()]">
<xsl:variable name="fieldValue" select="normalize-space(.)"/>
<!-- generate the add-attr -->
<add-attr attr-name="{@name}">
<!-- based on the field name, may want to do some special
handling -->
test="@name='Some field that needs special handling'">

<nxsl:assign-variable name="fieldValue" select="some operation on
<!-- generate the value element using string syntax -->
<!-- note that attributes that require a structured or octet
syntax -->
<!-- may require special handling here -->
<value type="string">
<xsl:value-of select="$fieldValue"/>
<!-- if the document element is not <delimited-text> copy as is-->
<xsl:copy-of select="."/>

jimc's Profile:
View this thread: