5 Replies Latest reply on Dec 23, 2007 5:45 PM by marklittle

    quickstart CVS to XML transform

    akfs

      The for-each in the smooks-res.xml returns only the first csv-record from the csv file even though there are multiple csv records in there.

      here is my xml-xml configuration

      <resource-config target-profile="from-type:text/xml:inter-Pcard-xml AND to-type:text/xml:Pcard-xml" selector="csv-set">
       <resource type="xsl" ><![CDATA[
       <xsl:for-each select="csv-record">
       <Pcard>
       <txnNumber><xsl:value-of select="./txnNumber"/></txnNumber>
       <postDate><xsl:value-of select="./postDate"/></postDate>
       <amount><xsl:value-of select="./amount"/></amount>
       <fqa><xsl:value-of select="./fqa"/></fqa>
       <reference><xsl:value-of select="./reference"/></reference>
       <itemDesc><xsl:value-of select="./itemDesc"/></itemDesc>
       <purchaseDate><xsl:value-of select="./purchaseDate"/></purchaseDate>
       <itemPrice><xsl:value-of select="./itemPrice"/></itemPrice>
       <embossedName><xsl:value-of select="./embossedName"/></embossedName>
       <ccNumber><xsl:value-of select="./ccNumber"/></ccNumber>
       </Pcard>
       </xsl:for-each>
      
       ]]>
      </resource>
       <param name="is-xslt-templatelet">true</param>
       </resource-config>



      The CSV xml has all the entries in it. but the for-each returns back the first entry.