BizTalk Mapper: Incorrect XSL Is Generated with Map When You Use the Iteration Functoid (279555)



The information in this article applies to:

  • Microsoft BizTalk Server 2000

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.

MORE INFORMATION

Steps to Reproduce This Behavior

  1. 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.
  2. Create a destination specification with one record and one child field.
  3. 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.
  4. Create an instance of the source specification. Make sure the instance has at least two occurrences of the parent record.
  5. 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="1"/ ...Record1 Field1="2"/...

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

    ...Record 1 Field1="1"/ ...Record1 Field1="1"/...


Modification Type:MajorLast Reviewed:9/30/2003
Keywords:kbnofix kbprb KB279555