Hello!

I have an XML-file that I need to import into my IDV and I'm trying to
use the text driver.

The XML looks like this (example):

<root>
<row>
<dn>cn=ffff,ou=AK3,ou=xxx,ou=USER,ou=xxx,ou=xxx,ou =xxx,ou=xxx,o=xxx</dn>
<workforceID>xxx</workforceID>
<cn>9915joed</cn>
<surname>rrrrrrrr</surname>
</row>
<row>
<dn>cn=dddd,ou=AK3,ou=xxx,ou=USER,ou=xxx,ou=xxx,ou =xxx,ou=xxx,o=xxx</dn>
<workforceID>yyy</workforceID>
<cn>9901kuem</cn>
<surname>tttttttt</surname>
</row>
</root>

In the XML there are several thousands <row> elements. Each <row>
contains a user.

This is the stylesheet I made, it works fine if I test with an XML that
only contains one <row> element but if it contains more like the example
above it creates one <nds> for each <row> which doesn't work.

How can I get the text driver to only read one <row> element, the run
the stylesheet, then read the next one and so on?
Thanks.




<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet exclude-result-prefixes="query cmd dncv" version="1.0"
xmlns:cmd="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.XdsCommandProcessor"
xmlns:dncv="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.DNConverter"
xmlns:query="http://www.novell.com/nxsl/java/com.novell.nds.dirxml.driver.XdsQueryProcessor"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"><!-- 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="row[not(contains(child::dn/text(), 'ELEVER'))]"/>



<xsl:template match="row">

<nds dtdversion="2.0">
<source><product version="2.0.0.0">DirXML</product>
<contact>Novell, Inc.</contact></source>
<input>
<add class-name="pidUser">
<add-attr attr-name="workforceID">
<value><xsl:copy-of select="workforceID/text()"/></value>
</add-attr>
<xsl:apply-templates select="row"/>
<association>
<xsl:copy-of select="workforceID/text()"/></association>
<add-attr attr-name="Surname"><value><xsl:copy-of
select="surname/text()"/></value>
</add-attr>
<add-attr attr-name="pidStuUserID">
<value><xsl:copy-of select="substring-after(substring-before(dn/text(),
','), 'cn=')"/></value>
</add-attr>
</add>
</input>
</nds>
</xsl:template>
<!-- add your custom templates here -->
</xsl:stylesheet>