[jboss-svn-commits] JBL Code SVN: r12574 - labs/jbossesb/trunk/product/samples/quickstarts/transform_CSV2XML.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Thu Jun 14 07:13:04 EDT 2007


Author: beve
Date: 2007-06-14 07:13:04 -0400 (Thu, 14 Jun 2007)
New Revision: 12574

Added:
   labs/jbossesb/trunk/product/samples/quickstarts/transform_CSV2XML/smooks-res.xml
Log:
Delete this by mistake. Re adding.


Added: labs/jbossesb/trunk/product/samples/quickstarts/transform_CSV2XML/smooks-res.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_CSV2XML/smooks-res.xml	                        (rev 0)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_CSV2XML/smooks-res.xml	2007-06-14 11:13:04 UTC (rev 12574)
@@ -0,0 +1,56 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.0.xsd">
+
+	<resource-config target-profile="from-type:text/csv:order-list AND to-type:text/xml:smooks-order-xml" selector="org.xml.sax.driver">
+        <resource>org.milyn.csv.CSVParser</resource>
+        <param name="fields" type="string-list">
+			orderId,
+			orderDate,
+			statusCode,
+			netAmount,
+			totalAmount,
+			tax,
+			userName,
+			firstName,
+			lastName,
+			state,
+			orderLine1Position,
+			orderLine1Quantity,
+			orderLine1ProductId,
+			orderLine1ProductTitle,
+			orderLine1ProductPrice,
+			orderLine2Position,
+			orderLine2Quantity,
+			orderLine2ProductId,
+			orderLine2ProductTitle,
+			orderLine2ProductPrice
+		</param>
+	</resource-config>
+	
+	<resource-config target-profile="from-type:text/xml:smooks-order-xml AND to-type:text/xml:canonical-order-xml" selector="csv-set">
+        <resource type="xsl">
+            <![CDATA[
+                <xsl:for-each select="csv-record">
+                    <Order orderId="{orderId}"
+                                orderDate="{orderDate}"
+                                statusCode="{statusCode}"
+                                netAmount="{netAmount}"
+                                totalAmount="{totalAmount}"
+                                tax="{tax}" >
+                        <Customer userName="{userName}" firstName="{firstName}" lastName="{lastName}" state="{state}" />
+                            <OrderLines>
+                                <OrderLine posistion="{orderLine1Position}" quantity="{orderLine1Quantity}">
+                                    <Product  productId="{orderLine1ProductId}" title="{orderLine1Title}" price="{orderLine1Price}"/>
+                                </OrderLine>
+                                <OrderLine posistion="{orderLine1Position}" quantity="{orderLine1Quantity}">
+                                    <Product  productId="{orderLine1ProductId}" title="{orderLine1Title}" price="{orderLine1Price}"/>
+                                </OrderLine>
+                            </OrderLines>
+                    </Order>
+                </xsl:for-each>
+            ]]>
+        </resource>
+        <param name="is-xslt-templatelet">true</param>
+	</resource-config>
+	
+</smooks-resource-list>




More information about the jboss-svn-commits mailing list