[jboss-dev-forums] [Design of JBoss ESB] - quickstart CVS to XML transform

akfs do-not-reply at jboss.com
Tue Dec 18 15:58:16 EST 2007


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.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4113965#4113965

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4113965



More information about the jboss-dev-forums mailing list