03-01-04 12:36 PM
I have a build a mapping to convert a XML file into a
XML file which is the used by the Biztalk SQL adapter.
This is a part of the mapping:<xsl:template match="BATCH">
<ROOT>
<sproc01>
<xsl:variable name="var:v1"
select="userVBScript:myfunction1
("spInsertFactuurBatchBZT")"/>
<xsl:attribute name="name"><xsl:value-of
select="$var:v1"/></xsl:attribute>
<param01>
<xsl:variable name="var:v2"
select="userVBScript:myfunction1("KlantID")"/>
<xsl:attribute name="name"><xsl:value-of
select="$var:v2"/></xsl:attribute>
<xsl:attribute name="value"><xsl:value-of
select="KLANTID/text()"/></xsl:attribute>
</param01>
</sproc01>
<sproc02>
<xsl:for-each select="FACTUUR">
<param01>
<xsl:if test="DEBITEURNUMMER"><xsl:attribute
name="value"><xsl:value-of select="DEBITEURNUMMER/text
()"/></xsl:attribute></xsl:if>
</param01>
</xsl:for-each>
<param40>
<xsl:variable name="var:v10"
select="userVBScript:myfunction1("KlantID")"/>
<xsl:attribute name="name"><xsl:value-of
select="$var:v10"/></xsl:attribute>
</param40>
<param41>
<xsl:variable name="var:v11"
select="userVBScript:myfunction1("BatchNaam")"/>
<xsl:attribute name="name"><xsl:value-of
select="$var:v11"/></xsl:attribute>
</param41>
</sproc02>
The problem is that the for statement should be before
the sproc2 node, but somehow biztalk mapper can not
handle this.....
The output I want is this:
<ROOT>
<sproc1>
<param1/>
</sproc1>
<sproc2>
<param1/>
<param40/>
<param41/>
</sproc2>
<sproc2>
<param1/>
<param40/>
<param41/>
</sproc2>
</ROOT>
This is what I get:
<ROOT>
<sproc1>
<param1/>
</sproc1>
<sproc2>
<param1/>
<param1/>
<param40/>
<param41/>
</sproc2>
</ROOT>
[ Post a follow-up to this message ]
|