BizTalk Server Tools - Mapping error

This is Interesting: Free IT Magazines  
Home > Archive > BizTalk Server Tools > March 2004 > Mapping error





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Mapping error
Norbert

2004-03-01, 7:36 am

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>


Everett Yang

2004-03-01, 4:38 pm

Try to use a looping functoid and connect 2 records that have the 1-to-1
relationship in looping logic.

Sincerely,


Everett Yang
DSI - Microsoft BizTalk Server

This posting is provided “AS IS” with no warranties, and confers no rights.
Subscribe at
http://support.microsoft.com/defaul...msdn/nospam.asp
&SD=msdn

Norbert

2004-03-02, 11:37 am

That solved the problem. Thanks

>-----Original Message-----
>Try to use a looping functoid and connect 2 records that

have the 1-to-1
>relationship in looping logic.
>
>Sincerely,
>
>
>Everett Yang
>DSI - Microsoft BizTalk Server
>
>This posting is provided "AS IS" with no warranties, and

confers no rights.
>Subscribe at
>http://support.microsoft.com/default.aspx?

scid=/servicedesks/msdn/nospam.asp
>&SD=msdn
>
>.
>

Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com