2

I have input like

<Loop2300>
    <HD></HD>
    <DTP>
        <DTP1></DTP1> 
        <DTP2></DTP2> 
        <DTP3></DTP3>
   </DTP> 
   <DTP>
        <DTP1></DTP1> 
        <DTP2></DTP2> 
        <DTP3></DTP3>
   </DTP> 
</Loop2300>
<Loop2300>
    <HD></HD>
    <DTP>
        <DTP1></DTP1> 
        <DTP2></DTP2> 
        <DTP3></DTP3>
    </DTP>
    <DTP>
        <DTP1></DTP1> 
        <DTP2></DTP2> 
        <DTP3></DTP3>
    </DTP> 
</Loop2300>

I am putting the value of all DTP in SQL Table. Along with DTP I have one id element in the destination schema where I have to put the sequence number of HD.

So it will output like this:

1    DTP1 DTP2 DTP3

1     DTP1 DTP2 DTP3

2    DTP1 DTP2 DTP3

2    DTP1 DTP2 DTP3

I am using XSLT functoid inline xslt call template.

Inside that I am using

<xsl:template>
    <xsl:for-each select="TS834_2300_Loop/HD_HealthCoverage">
        <xsl:number value="position()" format="1. "/>
    </xsl:for-each>
</xsl:template>

code with no input and one output to the Id

But its giving error transform fail.

So what change do I need to do get the appropriate id?

Filburt
  • 17,626
  • 12
  • 64
  • 115
user1104946
  • 680
  • 1
  • 9
  • 30
  • 1
    What is the error message for the transform error? Why do you need to do this using an Xslt Call Template functoid? You could receive the sequence number simply by using the Index functoid. – Filburt Dec 20 '11 at 07:56
  • I think Index functoid doe not give sequence number it only gives the first content of the sequence right....or does it giv sequence number also...Eroror was cant transform – user1104946 Dec 20 '11 at 14:39

1 Answers1

2

Try connecting your <HD> source node to an Iteration functoid.

To flatten your values under <DTP> you will need the Table Looping functoid.

I don't have my BizTalk dev machine ready right now to build a complete prototype but this should give yo a starting point.

Glorfindel
  • 21,988
  • 13
  • 81
  • 109
Filburt
  • 17,626
  • 12
  • 64
  • 115