[jboss-svn-commits] JBL Code SVN: r25213 - in labs/jbossesb/trunk/product/samples/quickstarts: transform_XML2XML_simple and 1 other directories.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Tue Feb 10 17:33:43 EST 2009


Author: beve
Date: 2009-02-10 17:33:43 -0500 (Tue, 10 Feb 2009)
New Revision: 25213

Modified:
   labs/jbossesb/trunk/product/samples/quickstarts/transform_CSV2XML/smooks-res.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/smooks-res.xml
   labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_stream/smooks-res.xml
Log:
work for https://jira.jboss.org/jira/browse/JBESB-2374 "transformation quickstart that use xslt display a fatal error message"


Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_CSV2XML/smooks-res.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_CSV2XML/smooks-res.xml	2009-02-10 17:16:21 UTC (rev 25212)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_CSV2XML/smooks-res.xml	2009-02-10 22:33:43 UTC (rev 25213)
@@ -10,31 +10,43 @@
     <csv:reader targetProfile="source-csv" fields="orderId,orderDate,statusCode,netAmount,totalAmount,tax,userName,firstName,lastName,state,orderLine1Position,orderLine1Quantity,orderLine1ProductId,orderLine1ProductTitle,orderLine1ProductPrice,orderLine2Position,orderLine2Quantity,orderLine2ProductId,orderLine2ProductTitle,orderLine2ProductPrice" />    
 
 	<resource-config target-profile="canonical-xml" selector="csv-set">
-        <resource type="xsl">
+		<resource type="xsl">
             <![CDATA[
-				<orders>
-                <xsl:for-each select="csv-record">
-                    <Order orderId="{orderId}"
+			<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:smooks-bean="xalan://org.milyn.templating.xslt.XalanJavabeanExtension"
+                extension-element-prefixes="smooks-bean"
+                version="1.0">
+
+                <xsl:output method="xml" encoding="UTF-8" />
+
+                <xsl:template match="*" name="templatelet">
+					<orders>
+						<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="{orderLine1ProductTitle}" price="{orderLine1ProductPrice}"/>
-                                </OrderLine>
-                                <OrderLine posistion="{orderLine2Position}" quantity="{orderLine2Quantity}">
-                                    <Product  productId="{orderLine2ProductId}" title="{orderLine2ProductTitle}" price="{orderLine2ProductPrice}"/>
-                                </OrderLine>
-                            </OrderLines>
-                    </Order>
-                </xsl:for-each>
-				</orders>
+								<Customer userName="{userName}" firstName="{firstName}" lastName="{lastName}" state="{state}" />
+								<OrderLines>
+									<OrderLine posistion="{orderLine1Position}" quantity="{orderLine1Quantity}">
+										<Product  productId="{orderLine1ProductId}" title="{orderLine1ProductTitle}" price="{orderLine1ProductPrice}"/>
+									</OrderLine>
+									<OrderLine posistion="{orderLine2Position}" quantity="{orderLine2Quantity}">
+										<Product  productId="{orderLine2ProductId}" title="{orderLine2ProductTitle}" price="{orderLine2ProductPrice}"/>
+									</OrderLine>
+								</OrderLines>
+							</Order>
+						</xsl:for-each>
+					</orders>
+                </xsl:template>
+
+			</xsl:stylesheet>
             ]]>
         </resource>
-        <param name="is-xslt-templatelet">true</param>
-	</resource-config>
+        <param name="is-xslt-templatelet">false</param>
+    </resource-config>
+
 	
 </smooks-resource-list>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/smooks-res.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/smooks-res.xml	2009-02-10 17:16:21 UTC (rev 25212)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_simple/smooks-res.xml	2009-02-10 22:33:43 UTC (rev 25213)
@@ -3,13 +3,26 @@
 
 	<resource-config selector="OrderLine">
         <resource type="xsl">
-            <![CDATA[<line-item>
-                <product><xsl:value-of select="./Product/@productId" /></product>
-                <price><xsl:value-of select="./Product/@price" /></price>
-                <quantity><xsl:value-of select="@quantity" /></quantity>
-            </line-item>]]>
+            <![CDATA[
+            <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:smooks-bean="xalan://org.milyn.templating.xslt.XalanJavabeanExtension"
+                extension-element-prefixes="smooks-bean"
+                version="1.0">
+
+                <xsl:output method="xml" encoding="UTF-8" />
+
+                <xsl:template match="*" name="templatelet">
+					<line-item>
+						<product><xsl:value-of select="./Product/@productId" /></product>
+						<price><xsl:value-of select="./Product/@price" /></price>
+						<quantity><xsl:value-of select="@quantity" /></quantity>
+					</line-item>
+                </xsl:template>
+            </xsl:stylesheet>
+            ]]>
         </resource>
-        <param name="is-xslt-templatelet">true</param>
-	</resource-config>
+        <param name="is-xslt-templatelet">false</param>
+    </resource-config>
 
+
 </smooks-resource-list>

Modified: labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_stream/smooks-res.xml
===================================================================
--- labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_stream/smooks-res.xml	2009-02-10 17:16:21 UTC (rev 25212)
+++ labs/jbossesb/trunk/product/samples/quickstarts/transform_XML2XML_stream/smooks-res.xml	2009-02-10 22:33:43 UTC (rev 25213)
@@ -10,15 +10,26 @@
 
 	<resource-config selector="OrderLines OrderLine">
         <resource type="xsl">
-            <![CDATA[<line-item>
-                <product><xsl:value-of select="./Product/@productId" /></product>
-                <price><xsl:value-of select="./Product/@price" /></price>
-                <quantity><xsl:value-of select="@quantity" /></quantity>
-            </line-item>]]>
-        </resource>
-        <param name="is-xslt-templatelet">true</param>
-	</resource-config>
+            <![CDATA[
+            <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
+                xmlns:smooks-bean="xalan://org.milyn.templating.xslt.XalanJavabeanExtension"
+                extension-element-prefixes="smooks-bean"
+                version="1.0">
 
+                <xsl:output method="xml" encoding="UTF-8" />
 
+                <xsl:template match="*" name="templatelet">
+					<line-item>
+						<product><xsl:value-of select="./Product/@productId" /></product>
+						<price><xsl:value-of select="./Product/@price" /></price>
+						<quantity><xsl:value-of select="@quantity" /></quantity>
+					</line-item>
+                </xsl:template>
 
+            </xsl:stylesheet>
+            ]]>
+        </resource>
+        <param name="is-xslt-templatelet">false</param>
+    </resource-config>
+
 </smooks-resource-list>




More information about the jboss-svn-commits mailing list