3 Replies Latest reply on Dec 18, 2012 8:13 PM by 970002

    Using XSLT inside For Each Loop

      I have a file that i insert into a table. I use a for each to process each record. For each record I have a couple of assigns that do some calculations and some mappings. I would like to combine these into 1 XSLT because the process takes forever to process the file and I think i can combine these assigns into 1 XSLT. I currently reference the index number when assigned from the array in the assign process using below.


      How do I reference the index in the XSLT?
        • 1. Re: Using XSLT inside For Each Loop
          Refer the below URL to find the details about passing the parameters to the XSLT and refer the same.


          The index value can be passed to the XSLT from the BPEL process using the same the elements from the array can be referenced ( [position()=$indexvariable] ).

          I hope this will help you......

          Albin I
          • 2. Re: Using XSLT inside For Each Loop
            I'm testing this out. The ReadFileProductBookFileList is all of the records from an input file. I want to map to the index [1] of the top:F55F044Collection. I want to take the record of the input file, do some transformation and then store the current record in the Collenction as record 1. What is the syntax of the C1 record to get the current index record only.

            <source type="WSDL">
            <schema location="ReadFileProductBookFile.wsdl"/>
            <rootElement name="parameters" namespace="http://xx.com/XSLTParameters"/>
            <param name="parameters" />

            <xsl:param name="parameters"/>
            <xsl:template match="/">
            <xsl:value-of select="/imp1:ReadFileProductBookFileList/imp1:ReadFileProductBookFileRecord/imp1:C1"/>
            • 3. Re: Using XSLT inside For Each Loop
              Any ideas out there?