Microsoft KB Archive/279555

= BizTalk Mapper: Incorrect XSL Is Generated with Map When You Use the Iteration Functoid =

Article ID: 279555

Article Last Modified on 9/30/2003

-

APPLIES TO


 * Microsoft BizTalk Server 2000 Standard Edition

-



This article was previously published under Q279555



SYMPTOMS
The BizTalk Mapper may compile maps incorrectly if a record connected to the Iteration functoid has a max occurrence of 1 and its parent node has a max occurrence of *. The Iteration functoid should count the iterations of the record that it is linked to; however, the functoid counts the iterations of the parent node instead.



WORKAROUND
Do not use the Iteration functoid with a record that has a max occurrence of 1. If the max occurrence is 1, the Iteration functoid should always return 1. Therefore, map a constant 1 into the destination record or field.



STATUS
Microsoft has confirmed that this is a problem in Microsoft BizTalk Server 2000.



Steps to Reproduce This Behavior
 Create a source specification. The specification should contain one parent record, one child record, and one child field associated with the child record. Set the max occurrence of parent record to * and the child record to 1. Create a destination specification with one record and one child field. Create a new map. Link the child record of the source specification with the child field of the destination specification by using an Iteration functoid. The child field in the destination stores the Iteration count. Create an instance of the source specification. Make sure the instance has at least two occurrences of the parent record. Run the map test script (Mapdocument.vbs) that is located in Microsoft BizTalk Server\SDK\Messaging Samples\MapTest\. You need to supply the instance (.xml) file and the map (.xsl) file as parameters. This produces the following output:

...Record 1 Field1=&quot;1&quot;/ ...Record1 Field1=&quot;2&quot;/...

The map actually counts the iterations for the parent record of the source specification. The correct output should be:

...Record 1 Field1=&quot;1&quot;/ ...Record1 Field1=&quot;1&quot;/...

</li></ol>

Additional query words: XML Tools

Keywords: kbnofix kbprb KB279555

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.