I'm working on importing students into my vault with a data file. I
need to modify the input transform so that instead of building the CN
and DN from the concatenated name fields, it uses the uniqueID instead.

I'm very new to XML and have been stumbling my way through and need to
get the syntax hammered out for this.

Here's the default syntax from the file:

<!-- The following two fields will be concatinated to form the CN of the
user -->
<xsl:variable name="srcdn-field-name1" select="'givenName'"/>
<xsl:variable name="srcdn-field-name2" select="'surname'"/>

and then further down:

<!-- get the src-dn id into a variable, replacing invalid DN characters
with a dash -->
<xsl:variable name="temp1"
select="concat(field[@name=$srcdn-field-name1],' ')"/>
<xsl:variable name="temp2"
select="concat($temp1,field[@name=$srcdn-field-name2])"/>
<xsl:variable name="srcdn"
select="translate($temp2,'+=,.\','-----')"/>
<!-- generate the add event -->
<add class-name="{$object-class}"
src-dn="{$srcdn}">

Fixing the first part seems easy enough to me. I rem out the line with
the surname in it and change the given name attribute to uniqueID. The
second part is where I get confused. I don't need to concatenate so I
thought that I'd rem out the temp2 line and change the translation line
to $temp1 and in the temp1 line, remove the space as shown below.
Unfortunately, there is a syntax error there somewhere because the
driver won't start.

<!-- The following two fields will be concatinated to form the CN of the
user -->
<xsl:variable name="srcdn-field-name1" select="'uniqueID'"/>
<!-- <xsl:variable name="srcdn-field-name2" select="'surname'"/> -->

<!-- get the src-dn id into a variable, replacing invalid DN characters
with a dash -->
<xsl:variable name="temp1"
select="concat(field[@name=$srcdn-field-name1],'')"/>
<!-- <xsl:variable name="temp2"
select="concat($temp1,field[@name=$srcdn-field-name2])"/> -->
<xsl:variable name="srcdn"
select="translate($temp1)"/>
<!-- generate the add event -->
<add class-name="{$object-class}"
src-dn="{$srcdn}">

So, if I change the translate line to

<xsl:variable name="srcdn" select="$temp1"/>

I get an add but the CN shows up as 'false'

Please help.