<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:itunes="http://www.itunes.com/dtds/podcast-1.0.dtd"
>

<channel>
	<title>Smooks Data Integration</title>
	<atom:link href="http://blog.smooks.org/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.smooks.org</link>
	<description>The official blog</description>
	<lastBuildDate>Wed, 03 Mar 2010 16:01:20 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.4</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<!-- podcast_generator="Blubrry PowerPress/0.9.7" mode="simple" entry="normal" -->
	<itunes:summary>The official blog</itunes:summary>
	<itunes:author>Smooks Data Integration</itunes:author>
	<itunes:explicit>no</itunes:explicit>
	<itunes:image href="http://blog.smooks.org/wp-content/plugins/powerpress/itunes_default.jpg" />
	<itunes:owner>
		<itunes:name>Smooks Data Integration</itunes:name>
		<itunes:email>tom.fennelly@gmail.com</itunes:email>
	</itunes:owner>
	<managingEditor>tom.fennelly@gmail.com (Smooks Data Integration)</managingEditor>
	<itunes:subtitle>The official blog</itunes:subtitle>
	<image>
		<title>Smooks Data Integration</title>
		<url>http://blog.smooks.org/wp-content/plugins/powerpress/rss_default.jpg</url>
		<link>http://blog.smooks.org</link>
	</image>
		<item>
		<title>Smooks v1.3&#8230; Available for download</title>
		<link>http://blog.smooks.org/2010/03/03/smooks-v1-3-available-for-download/</link>
		<comments>http://blog.smooks.org/2010/03/03/smooks-v1-3-available-for-download/#comments</comments>
		<pubDate>Wed, 03 Mar 2010 14:09:02 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Release]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=432</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2010/03/03/smooks-v1-3-available-for-download/';
var dzone_title = 'Smooks v1.3&#8230; Available for download';
var dzone_blurb = 'We were slow about doing it, but eventually&#8230; Smooks v1.3 (final) has hit the shelves!!Download and try it out.Thanks to everyone that contributed...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2010/03/03/smooks-v1-3-available-for-download/';
var dzone_title = 'Smooks v1.3&#8230; Available for download';
var dzone_blurb = 'We were slow about doing it, but eventually&#8230; Smooks v1.3 (final) has hit the shelves!!Download and try it out.Thanks to everyone that contributed...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>We were slow about doing it, but eventually&#8230; Smooks v1.3 (final) has hit the shelves!!</p>
<h3><span style="color: #008000;"><strong><a href="http://www.smooks.org/mediawiki/index.php?title=Downloads">Download and try it out</a></strong></span>.</h3>
<p>Thanks to everyone that contributed to this release.  As well as 65+ bug fixes, we&#8217;ve added a number of new features and improvements:</p>
<ol>
<li> Greatly <strong>improved XPath support</strong> in selectors.  This allows you to write more complex selectors with XPath syntax.  See <a title="V1.3:Smooks v1.3 User Guide" href="http://www.smooks.org/mediawiki/index.php?title=V1.3:Smooks_v1.3_User_Guide#Selectors">here</a>.  See <a title="http://jira.codehaus.org/browse/MILYN-43" rel="nofollow" href="http://jira.codehaus.org/browse/MILYN-43">JIRA</a>.</li>
<li> Support for <strong>Fixed Length Field (FLF)</strong> messages. See <a title="http://jira.codehaus.org/browse/MILYN-290" rel="nofollow" href="http://jira.codehaus.org/browse/MILYN-290">JIRA</a>.</li>
<li> <strong>Java Binding Improvements</strong>:
<ul>
<li> Ability to bind raw data values into the bean context. See <a title="http://jira.codehaus.org/browse/MILYN-349" rel="nofollow" href="http://jira.codehaus.org/browse/MILYN-349">JIRA</a>.</li>
<li> Support for factory methods for bean creation.  See <a title="http://jira.codehaus.org/browse/MILYN-377" rel="nofollow" href="http://jira.codehaus.org/browse/MILYN-377">JIRA</a>.</li>
<li> Make bind data available to Expression Base Bindings.  See <a title="http://jira.codehaus.org/browse/MILYN-384" rel="nofollow" href="http://jira.codehaus.org/browse/MILYN-384">JIRA</a>.</li>
</ul>
</li>
<li> String manipulation <strong>functions for tweaking CSV and FLF</strong> fields before forwarding to Smooks components.  See <a title="http://jira.codehaus.org/browse/MILYN-386" rel="nofollow" href="http://jira.codehaus.org/browse/MILYN-386">JIRA</a>.</li>
<li> Support premature <strong>Filter termination</strong>.  See <a title="http://jira.codehaus.org/browse/MILYN-395" rel="nofollow" href="http://jira.codehaus.org/browse/MILYN-395">JIRA</a>.</li>
<li> <strong>Simple fragment splitter</strong>.  See <a title="http://jira.codehaus.org/browse/MILYN-405" rel="nofollow" href="http://jira.codehaus.org/browse/MILYN-405">JIRA</a>.</li>
<li> CSV Header Validation. See <a title="http://jira.codehaus.org/browse/MILYN-428" rel="nofollow" href="http://jira.codehaus.org/browse/MILYN-428">JIRA</a>.</li>
</ol>
<p><em><strong><a title="http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11071&amp;version=15079" rel="nofollow" href="http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11071&amp;version=15079">See here for a full list of Fixes and Features</a></strong></em></p>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/release/">Release</a> by Tom <a href="http://blog.smooks.org/2010/03/03/smooks-v1-3-available-for-download/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2010/03/03/smooks-v1-3-available-for-download/';
var dzone_title = 'Smooks v1.3&#8230; Available for download';
var dzone_blurb = 'We were slow about doing it, but eventually&#8230; Smooks v1.3 (final) has hit the shelves!!Download and try it out.Thanks to everyone that contributed...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>We were slow about doing it, but eventually&#8230; Smooks v1.3 (final) has hit the shelves!!</p>
<h3><span style="color: #008000;"><strong><a href="http://www.smooks.org/mediawiki/index.php?title=Downloads">Download and try it out</a></strong></span>.</h3>
<p>Thanks to everyone that contributed to this release.  As well as 65+ bug fixes, we&#8217;ve added a number of new features and improvements:</p>
<ol>
<li> Greatly <strong>improved XPath support</strong> in selectors.  This allows you to write more complex selectors with XPath syntax.  See <a title="V1.3:Smooks v1.3 User Guide" href="http://www.smooks.org/mediawiki/index.php?title=V1.3:Smooks_v1.3_User_Guide#Selectors">here</a>.  See <a title="http://jira.codehaus.org/browse/MILYN-43" rel="nofollow" href="http://jira.codehaus.org/browse/MILYN-43">JIRA</a>.</li>
<li> Support for <strong>Fixed Length Field (FLF)</strong> messages. See <a title="http://jira.codehaus.org/browse/MILYN-290" rel="nofollow" href="http://jira.codehaus.org/browse/MILYN-290">JIRA</a>.</li>
<li> <strong>Java Binding Improvements</strong>:
<ul>
<li> Ability to bind raw data values into the bean context. See <a title="http://jira.codehaus.org/browse/MILYN-349" rel="nofollow" href="http://jira.codehaus.org/browse/MILYN-349">JIRA</a>.</li>
<li> Support for factory methods for bean creation.  See <a title="http://jira.codehaus.org/browse/MILYN-377" rel="nofollow" href="http://jira.codehaus.org/browse/MILYN-377">JIRA</a>.</li>
<li> Make bind data available to Expression Base Bindings.  See <a title="http://jira.codehaus.org/browse/MILYN-384" rel="nofollow" href="http://jira.codehaus.org/browse/MILYN-384">JIRA</a>.</li>
</ul>
</li>
<li> String manipulation <strong>functions for tweaking CSV and FLF</strong> fields before forwarding to Smooks components.  See <a title="http://jira.codehaus.org/browse/MILYN-386" rel="nofollow" href="http://jira.codehaus.org/browse/MILYN-386">JIRA</a>.</li>
<li> Support premature <strong>Filter termination</strong>.  See <a title="http://jira.codehaus.org/browse/MILYN-395" rel="nofollow" href="http://jira.codehaus.org/browse/MILYN-395">JIRA</a>.</li>
<li> <strong>Simple fragment splitter</strong>.  See <a title="http://jira.codehaus.org/browse/MILYN-405" rel="nofollow" href="http://jira.codehaus.org/browse/MILYN-405">JIRA</a>.</li>
<li> CSV Header Validation. See <a title="http://jira.codehaus.org/browse/MILYN-428" rel="nofollow" href="http://jira.codehaus.org/browse/MILYN-428">JIRA</a>.</li>
</ol>
<p><em><strong><a title="http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11071&amp;version=15079" rel="nofollow" href="http://jira.codehaus.org/secure/ReleaseNote.jspa?projectId=11071&amp;version=15079">See here for a full list of Fixes and Features</a></strong></em></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2010/03/03/smooks-v1-3-available-for-download/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Apache Camel + Smooks</title>
		<link>http://blog.smooks.org/2010/02/22/apache-camel-smooks/</link>
		<comments>http://blog.smooks.org/2010/02/22/apache-camel-smooks/#comments</comments>
		<pubDate>Mon, 22 Feb 2010 16:31:00 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Camel]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=382</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2010/02/22/apache-camel-smooks/';
var dzone_title = 'Apache Camel + Smooks';
var dzone_blurb = 'I did a little playing with Camel over the weekend&#8230; had a go at integrating Smooks.I think those using Camel may find it interesting as another option. ...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2010/02/22/apache-camel-smooks/';
var dzone_title = 'Apache Camel + Smooks';
var dzone_blurb = 'I did a little playing with Camel over the weekend&#8230; had a go at integrating Smooks.I think those using Camel may find it interesting as another option. ...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>I did a little playing with Camel over the weekend&#8230; had a go at integrating Smooks.</p>
<p>I think those using Camel may find it interesting as another option.  The integration was simple enough and <a href="https://svn.codehaus.org/milyn/workspaces/tfennelly/camel-integration/camel">can be seen in this svn workspace (including tests etc)</a>.  With better knowledge of Camel, I&#8217;m sure there&#8217;s a better way of integrating it, but at least it&#8217;s a start.</p>
<p>At the moment, you can map String or Java results into the out-message of the Camel Exchange, so you can do <a href="http://www.smooks.org/mediawiki/index.php?title=V1.3:Smooks_v1.3_User_Guide#Templating">templating</a> or <a href="http://www.smooks.org/mediawiki/index.php?title=V1.3:Smooks_v1.3_User_Guide#Java_Binding">java binding</a> (not exposing <a href="http://www.smooks.org/mediawiki/index.php?title=V1.3:Smooks_v1.3_User_Guide#Validation">validation</a> results yet) of XML and non-XML data.  So you can do lots of the normal Smooks type processing.</p>
<p><strong>The aspect I think most Camel users might find interesting</strong> is the potential wrt splitting and routing of huge messages (XML <span style="text-decoration: underline;"><strong>and non-XML</strong></span>).  Basically&#8230; being able to split and route huge messages as you stream them i.e. not the two step method that seems to be there at the moment &#8211; 1) split out all messages 2) route all messages.</p>
<p>Lets look at a simple example, where we have an XML message stream containing customer account activity logs (or&#8230; could be CSV formatted).  We want to route each log event to JMS queues based on nationality.</p>
<p>The RouteBuilder config (can also configure the SmooksProcessor via Java ala DSL) &#8230;</p>
<pre class="brush: java; wrap-lines: false; toolbar: false">public class MyRouteBuilder extends RouteBuilder {

    public void configure() throws Exception {

        from("file:src/data/logs?noop=true").
            process(new SmooksProcessor("/configs/log-split.xml", this));

        from("jms:queue:ireland").process(new LogProcessor("ie"));
        from("jms:queue:greatbritain").process(new LogProcessor("gb"));
    }
}</pre>
<p>And then the Smooks &#8220;log-split.xml&#8221; config&#8230;</p>
<pre class="brush: xml; wrap-lines: false; toolbar: false">&lt;smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
          xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.3.xsd"
          xmlns:camel="http://www.milyn.org/xsd/smooks/camel-1.4.xsd"&gt;

    &lt;!-- Create a new ActivityLogEvent for each log entry... --&gt;
    &lt;jb:bean beanId="logEvent" class="com.acme.activity.ActivityLogEvent"
                                  createOnElement="activity/event"&gt;
        &lt;jb:value property="transactionId" data="event/@txId" /&gt;
        &lt;jb:value property="customerId" data="event/customer/@customerId" /&gt;
        &lt;jb:value property="nationality" data="event/customer/countryCode" /&gt;
        &lt;!-- etc... --&gt;
    &lt;/jb:bean&gt;

    &lt;!-- Route GB based customer activity... --&gt;
    &lt;camel:router beanId="logEvent" toEndpoint="jms:queue:greatbritain"
                                 routeOnElement="activity/event"&gt;
        &lt;condition&gt;logEvent.nationality == 'GB'&lt;/condition&gt;
    &lt;/camel:router&gt;

    &lt;!-- Route Irish based customer activity... --&gt;
    &lt;camel:router beanId="logEvent" toEndpoint="jms:queue:ireland"
                                 routeOnElement="activity/event"&gt;
        &lt;condition&gt;logEvent.nationality == 'IE'&lt;/condition&gt;
    &lt;/camel:router&gt;

&lt;/smooks-resource-list&gt;</pre>
<p>The <em><strong>&lt;jb:bean&gt;</strong></em> config creates an ActivityLogEvent bean instance for every activity log.  The following <em><strong>&lt;camel:router&gt;</strong></em> configs conditionally route the ActivityLogEvent bean instances to the specified JMS endpoints based on the country-code on the event log.  Of course, using <a href="http://www.smooks.org/mediawiki/index.php?title=V1.3:Smooks_v1.3_User_Guide#Templating">Smooks Templating</a>, you could apply a template to the ActivityLogEvent to produce some other data format and route that instead (a simple template generated String bean bound into the Smooks BeanContext).</p>
<p>The size of the event log is irrelevant here &#8211; could be GBs.  Only one ActivityLogEvent instance is in memory at any given time (a new instance created for each event).  The routing is performed as the event log is being streamed i.e. not batched up for routing in a later step.  Assumption here is that there&#8217;s a way of telling the Camel File component to forward the file as a stream/reader.</p>
<p>The current implementation is available in SVN <a href="https://svn.codehaus.org/milyn/workspaces/tfennelly/camel-integration/camel">here</a>.  Since I&#8217;m not overly familiar with Camel, I&#8217;m sure there are things we could do better/different.  Please let us know!!!</p>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/camel/">Camel</a> by Tom <a href="http://blog.smooks.org/2010/02/22/apache-camel-smooks/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2010/02/22/apache-camel-smooks/';
var dzone_title = 'Apache Camel + Smooks';
var dzone_blurb = 'I did a little playing with Camel over the weekend&#8230; had a go at integrating Smooks.I think those using Camel may find it interesting as another option. ...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>I did a little playing with Camel over the weekend&#8230; had a go at integrating Smooks.</p>
<p>I think those using Camel may find it interesting as another option.  The integration was simple enough and <a href="https://svn.codehaus.org/milyn/workspaces/tfennelly/camel-integration/camel">can be seen in this svn workspace (including tests etc)</a>.  With better knowledge of Camel, I&#8217;m sure there&#8217;s a better way of integrating it, but at least it&#8217;s a start.</p>
<p>At the moment, you can map String or Java results into the out-message of the Camel Exchange, so you can do <a href="http://www.smooks.org/mediawiki/index.php?title=V1.3:Smooks_v1.3_User_Guide#Templating">templating</a> or <a href="http://www.smooks.org/mediawiki/index.php?title=V1.3:Smooks_v1.3_User_Guide#Java_Binding">java binding</a> (not exposing <a href="http://www.smooks.org/mediawiki/index.php?title=V1.3:Smooks_v1.3_User_Guide#Validation">validation</a> results yet) of XML and non-XML data.  So you can do lots of the normal Smooks type processing.</p>
<p><strong>The aspect I think most Camel users might find interesting</strong> is the potential wrt splitting and routing of huge messages (XML <span style="text-decoration: underline;"><strong>and non-XML</strong></span>).  Basically&#8230; being able to split and route huge messages as you stream them i.e. not the two step method that seems to be there at the moment &#8211; 1) split out all messages 2) route all messages.</p>
<p>Lets look at a simple example, where we have an XML message stream containing customer account activity logs (or&#8230; could be CSV formatted).  We want to route each log event to JMS queues based on nationality.</p>
<p>The RouteBuilder config (can also configure the SmooksProcessor via Java ala DSL) &#8230;</p>
<pre class="brush: java; wrap-lines: false; toolbar: false">public class MyRouteBuilder extends RouteBuilder {

    public void configure() throws Exception {

        from("file:src/data/logs?noop=true").
            process(new SmooksProcessor("/configs/log-split.xml", this));

        from("jms:queue:ireland").process(new LogProcessor("ie"));
        from("jms:queue:greatbritain").process(new LogProcessor("gb"));
    }
}</pre>
<p>And then the Smooks &#8220;log-split.xml&#8221; config&#8230;</p>
<pre class="brush: xml; wrap-lines: false; toolbar: false">&lt;smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
          xmlns:jb="http://www.milyn.org/xsd/smooks/javabean-1.3.xsd"
          xmlns:camel="http://www.milyn.org/xsd/smooks/camel-1.4.xsd"&gt;

    &lt;!-- Create a new ActivityLogEvent for each log entry... --&gt;
    &lt;jb:bean beanId="logEvent" class="com.acme.activity.ActivityLogEvent"
                                  createOnElement="activity/event"&gt;
        &lt;jb:value property="transactionId" data="event/@txId" /&gt;
        &lt;jb:value property="customerId" data="event/customer/@customerId" /&gt;
        &lt;jb:value property="nationality" data="event/customer/countryCode" /&gt;
        &lt;!-- etc... --&gt;
    &lt;/jb:bean&gt;

    &lt;!-- Route GB based customer activity... --&gt;
    &lt;camel:router beanId="logEvent" toEndpoint="jms:queue:greatbritain"
                                 routeOnElement="activity/event"&gt;
        &lt;condition&gt;logEvent.nationality == 'GB'&lt;/condition&gt;
    &lt;/camel:router&gt;

    &lt;!-- Route Irish based customer activity... --&gt;
    &lt;camel:router beanId="logEvent" toEndpoint="jms:queue:ireland"
                                 routeOnElement="activity/event"&gt;
        &lt;condition&gt;logEvent.nationality == 'IE'&lt;/condition&gt;
    &lt;/camel:router&gt;

&lt;/smooks-resource-list&gt;</pre>
<p>The <em><strong>&lt;jb:bean&gt;</strong></em> config creates an ActivityLogEvent bean instance for every activity log.  The following <em><strong>&lt;camel:router&gt;</strong></em> configs conditionally route the ActivityLogEvent bean instances to the specified JMS endpoints based on the country-code on the event log.  Of course, using <a href="http://www.smooks.org/mediawiki/index.php?title=V1.3:Smooks_v1.3_User_Guide#Templating">Smooks Templating</a>, you could apply a template to the ActivityLogEvent to produce some other data format and route that instead (a simple template generated String bean bound into the Smooks BeanContext).</p>
<p>The size of the event log is irrelevant here &#8211; could be GBs.  Only one ActivityLogEvent instance is in memory at any given time (a new instance created for each event).  The routing is performed as the event log is being streamed i.e. not batched up for routing in a later step.  Assumption here is that there&#8217;s a way of telling the Camel File component to forward the file as a stream/reader.</p>
<p>The current implementation is available in SVN <a href="https://svn.codehaus.org/milyn/workspaces/tfennelly/camel-integration/camel">here</a>.  Since I&#8217;m not overly familiar with Camel, I&#8217;m sure there are things we could do better/different.  Please let us know!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2010/02/22/apache-camel-smooks/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>JBoss Tools Smooks Editor &#8211; Progress&#8230;</title>
		<link>http://blog.smooks.org/2010/01/15/jboss-tools-smooks-editor-progress/</link>
		<comments>http://blog.smooks.org/2010/01/15/jboss-tools-smooks-editor-progress/#comments</comments>
		<pubDate>Fri, 15 Jan 2010 10:27:54 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Eclipse]]></category>
		<category><![CDATA[JBoss Tools]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=366</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2010/01/15/jboss-tools-smooks-editor-progress/';
var dzone_title = 'JBoss Tools Smooks Editor &#8211; Progress&#8230;';
var dzone_blurb = 'At JBoss, we&#8217;ve been making some good progress with the JBoss Tools Smooks Editor.  The following are two rough Screencasts illustrating two use...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2010/01/15/jboss-tools-smooks-editor-progress/';
var dzone_title = 'JBoss Tools Smooks Editor &#8211; Progress&#8230;';
var dzone_blurb = 'At JBoss, we&#8217;ve been making some good progress with the JBoss Tools Smooks Editor.  The following are two rough Screencasts illustrating two use...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>At JBoss, we&#8217;ve been making some good progress with the <a href="http://www.jboss.org/tools/">JBoss Tools</a> Smooks Editor.  The following are two rough Screencasts illustrating two use cases that extend from each other.</p>
<h2>EDI to Java</h2>
<p>In this Screencast, we bind EDI Purchase Order data (but can also be XML, JSON etc) into an &#8220;Order&#8221; object model (Java).  This Screencast was created a few weeks ago, using the v3.1.0.CR1 release of JBoss Tools.</p>
<p style="text-align: right;"><em>To enlarge, press screen icon </em>(bottom right)</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="360" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="bgcolor" value="#FFFFFF" /><param name="flashVars" value="thumb=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4b184ca6-9a6d-4817-b15d-aac8576d36bb/FirstFrame.jpg&amp;containerwidth=640&amp;containerheight=360&amp;content=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4b184ca6-9a6d-4817-b15d-aac8576d36bb/jbtools-310cr1-smooks.mp4" /><param name="allowFullScreen" value="true" /><param name="scale" value="showall" /><param name="allowScriptAccess" value="always" /><param name="base" value="http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4b184ca6-9a6d-4817-b15d-aac8576d36bb/" /><param name="src" value="http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4b184ca6-9a6d-4817-b15d-aac8576d36bb/mp4h264player.swf" /><param name="flashvars" value="thumb=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4b184ca6-9a6d-4817-b15d-aac8576d36bb/FirstFrame.jpg&amp;containerwidth=640&amp;containerheight=360&amp;content=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4b184ca6-9a6d-4817-b15d-aac8576d36bb/jbtools-310cr1-smooks.mp4" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="360" src="http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4b184ca6-9a6d-4817-b15d-aac8576d36bb/mp4h264player.swf" base="http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4b184ca6-9a6d-4817-b15d-aac8576d36bb/" allowscriptaccess="always" scale="showall" allowfullscreen="true" flashvars="thumb=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4b184ca6-9a6d-4817-b15d-aac8576d36bb/FirstFrame.jpg&amp;containerwidth=640&amp;containerheight=360&amp;content=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4b184ca6-9a6d-4817-b15d-aac8576d36bb/jbtools-310cr1-smooks.mp4" bgcolor="#FFFFFF" quality="high"></embed></object></p>
<h2>EDI to XML (via XSD)</h2>
<p>In this Screencast, we extend the example shown in the above Screencast, applying a template to the &#8220;Order&#8221; object model to produce an XML Purchase Order.  The XML Purchase Order is defined in an XML Schema (XSD), but you&#8217;ll see how the editor makes it very easy to work with the XSD.  This Screencast was created recently, using one of the <a href="http://www.jboss.org/tools/download.html">Nightly Builds of JBoss Tools</a>.</p>
<p style="text-align: right;"><em>To enlarge, press screen icon </em>(bottom right)</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="360" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="bgcolor" value="#FFFFFF" /><param name="flashVars" value="thumb=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4d3b6d6c-ea6d-4e6d-b826-3f0c19d87104/FirstFrame.jpg&amp;containerwidth=640&amp;containerheight=360&amp;content=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4d3b6d6c-ea6d-4e6d-b826-3f0c19d87104/2010-01-13_184602.mp4" /><param name="allowFullScreen" value="true" /><param name="scale" value="showall" /><param name="allowScriptAccess" value="always" /><param name="base" value="http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4d3b6d6c-ea6d-4e6d-b826-3f0c19d87104/" /><param name="src" value="http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4d3b6d6c-ea6d-4e6d-b826-3f0c19d87104/mp4h264player.swf" /><param name="flashvars" value="thumb=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4d3b6d6c-ea6d-4e6d-b826-3f0c19d87104/FirstFrame.jpg&amp;containerwidth=640&amp;containerheight=360&amp;content=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4d3b6d6c-ea6d-4e6d-b826-3f0c19d87104/2010-01-13_184602.mp4" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="360" src="http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4d3b6d6c-ea6d-4e6d-b826-3f0c19d87104/mp4h264player.swf" base="http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4d3b6d6c-ea6d-4e6d-b826-3f0c19d87104/" allowscriptaccess="always" scale="showall" allowfullscreen="true" flashvars="thumb=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4d3b6d6c-ea6d-4e6d-b826-3f0c19d87104/FirstFrame.jpg&amp;containerwidth=640&amp;containerheight=360&amp;content=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4d3b6d6c-ea6d-4e6d-b826-3f0c19d87104/2010-01-13_184602.mp4" bgcolor="#FFFFFF" quality="high"></embed></object></p>
<h2>Status</h2>
<p>We are currently working towards the v3.1.0.CR2 release of <a href="http://www.jboss.org/tools/">JBoss Tools</a>, which is due to be released in Feb (not sure of exact date).  There are still a number of <a href="https://jira.jboss.org/jira/browse/JBIDE/component/12311840">issues</a> with the editor.  We are working on these and will be resolving many of them for the 3.1.0.CR2 release.</p>
<p>We have purposely restricted the 3.1.0 version of the editor:</p>
<ol>
<li><strong>Supported Use Cases</strong>:
<ul>
<li><em>Java Mapping/Binding</em>:  Drag &amp; Drop mapping/binding of XML, JSON, CSV and EDI data to Java.</li>
<li><em>CSV and XML Templating</em>:  Drag &amp; Drop templating of Java Mappings (see #1 above) to produce CSV or XML (XML via XSD or XML Sample).</li>
</ul>
</li>
<li><strong>Supported Integration</strong>:
<ul>
<li><em>JBoss Tools ESB Editor</em>:  Will have basic open and edit integration with the ESB SmooksAction.</li>
</ul>
</li>
<li><strong>Supported Versions</strong>:
<ul>
<li><em>Smooks v1.2 Configurations</em>:  The Editor will only support Smooks v1.2 configuration namespaces.  Therefore, if you have configurations using config namespaces from earlier (or newer v1.3) versions of Smooks, the editor will not open the configurations.</li>
</ul>
</li>
</ol>
<p>So, the 3.1.0 version of the editor will not support:</p>
<ol>
<li>Direct Source to Result drag &amp; drop templating e.g. XML to XML, EDI to XML, XML to CSV etc.  We hope to support this in a future release (next one hopefully), but for now (in the v3.1.0 release), you need to define a Java Object model to use as the canonical form of the data being mapped i.e. v3.1.0 templating works as <em>Source -&gt; Java -&gt; Result</em>.</li>
<li>A number of features supported by the Smooks Runtime, such as Persistence, Validation, Splitting &amp; Routing etc.  We will be adding support for these in future releases.</li>
<li>Smooks v1.1 (and before) configuration namespaces that have newer versions in Smooks v1.2.  For example, Smooks v1.2 added a v1.2 javabean config namespace.  It is this version of the javabean config namespace that is supported by the editor.  The v1.1 javabean config namespace is not supported.</li>
<li>Smooks v1.3 (yet to be released) configuration namespaces.</li>
</ol>
<h2>Try it Out&#8230;</h2>
<p>Please take the editor for a spin and let us know what you think.  It can be downloaded (standalone, or as part of <a href="http://www.jboss.org/tools/">JBoss Tools</a>) from the <a href="http://www.jboss.org/tools/download.html">JBoss Tools Downloads Page</a>.  <a href="https://jira.jboss.org/jira/secure/BrowseProject.jspa?id=10020">Please log any issues</a> you find with the editor (against the &#8220;smooks&#8221; component), if not already logged.</p>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/eclipse/">Eclipse</a> by Tom <a href="http://blog.smooks.org/2010/01/15/jboss-tools-smooks-editor-progress/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2010/01/15/jboss-tools-smooks-editor-progress/';
var dzone_title = 'JBoss Tools Smooks Editor &#8211; Progress&#8230;';
var dzone_blurb = 'At JBoss, we&#8217;ve been making some good progress with the JBoss Tools Smooks Editor.  The following are two rough Screencasts illustrating two use...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>At JBoss, we&#8217;ve been making some good progress with the <a href="http://www.jboss.org/tools/">JBoss Tools</a> Smooks Editor.  The following are two rough Screencasts illustrating two use cases that extend from each other.</p>
<h2>EDI to Java</h2>
<p>In this Screencast, we bind EDI Purchase Order data (but can also be XML, JSON etc) into an &#8220;Order&#8221; object model (Java).  This Screencast was created a few weeks ago, using the v3.1.0.CR1 release of JBoss Tools.</p>
<p style="text-align: right;"><em>To enlarge, press screen icon </em>(bottom right)</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="360" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="bgcolor" value="#FFFFFF" /><param name="flashVars" value="thumb=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4b184ca6-9a6d-4817-b15d-aac8576d36bb/FirstFrame.jpg&amp;containerwidth=640&amp;containerheight=360&amp;content=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4b184ca6-9a6d-4817-b15d-aac8576d36bb/jbtools-310cr1-smooks.mp4" /><param name="allowFullScreen" value="true" /><param name="scale" value="showall" /><param name="allowScriptAccess" value="always" /><param name="base" value="http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4b184ca6-9a6d-4817-b15d-aac8576d36bb/" /><param name="src" value="http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4b184ca6-9a6d-4817-b15d-aac8576d36bb/mp4h264player.swf" /><param name="flashvars" value="thumb=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4b184ca6-9a6d-4817-b15d-aac8576d36bb/FirstFrame.jpg&amp;containerwidth=640&amp;containerheight=360&amp;content=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4b184ca6-9a6d-4817-b15d-aac8576d36bb/jbtools-310cr1-smooks.mp4" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="360" src="http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4b184ca6-9a6d-4817-b15d-aac8576d36bb/mp4h264player.swf" base="http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4b184ca6-9a6d-4817-b15d-aac8576d36bb/" allowscriptaccess="always" scale="showall" allowfullscreen="true" flashvars="thumb=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4b184ca6-9a6d-4817-b15d-aac8576d36bb/FirstFrame.jpg&amp;containerwidth=640&amp;containerheight=360&amp;content=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4b184ca6-9a6d-4817-b15d-aac8576d36bb/jbtools-310cr1-smooks.mp4" bgcolor="#FFFFFF" quality="high"></embed></object></p>
<h2>EDI to XML (via XSD)</h2>
<p>In this Screencast, we extend the example shown in the above Screencast, applying a template to the &#8220;Order&#8221; object model to produce an XML Purchase Order.  The XML Purchase Order is defined in an XML Schema (XSD), but you&#8217;ll see how the editor makes it very easy to work with the XSD.  This Screencast was created recently, using one of the <a href="http://www.jboss.org/tools/download.html">Nightly Builds of JBoss Tools</a>.</p>
<p style="text-align: right;"><em>To enlarge, press screen icon </em>(bottom right)</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="640" height="360" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="quality" value="high" /><param name="bgcolor" value="#FFFFFF" /><param name="flashVars" value="thumb=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4d3b6d6c-ea6d-4e6d-b826-3f0c19d87104/FirstFrame.jpg&amp;containerwidth=640&amp;containerheight=360&amp;content=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4d3b6d6c-ea6d-4e6d-b826-3f0c19d87104/2010-01-13_184602.mp4" /><param name="allowFullScreen" value="true" /><param name="scale" value="showall" /><param name="allowScriptAccess" value="always" /><param name="base" value="http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4d3b6d6c-ea6d-4e6d-b826-3f0c19d87104/" /><param name="src" value="http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4d3b6d6c-ea6d-4e6d-b826-3f0c19d87104/mp4h264player.swf" /><param name="flashvars" value="thumb=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4d3b6d6c-ea6d-4e6d-b826-3f0c19d87104/FirstFrame.jpg&amp;containerwidth=640&amp;containerheight=360&amp;content=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4d3b6d6c-ea6d-4e6d-b826-3f0c19d87104/2010-01-13_184602.mp4" /><param name="allowfullscreen" value="true" /><embed type="application/x-shockwave-flash" width="640" height="360" src="http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4d3b6d6c-ea6d-4e6d-b826-3f0c19d87104/mp4h264player.swf" base="http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4d3b6d6c-ea6d-4e6d-b826-3f0c19d87104/" allowscriptaccess="always" scale="showall" allowfullscreen="true" flashvars="thumb=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4d3b6d6c-ea6d-4e6d-b826-3f0c19d87104/FirstFrame.jpg&amp;containerwidth=640&amp;containerheight=360&amp;content=http://content.screencast.com/users/tfennelly/folders/Camtasia/media/4d3b6d6c-ea6d-4e6d-b826-3f0c19d87104/2010-01-13_184602.mp4" bgcolor="#FFFFFF" quality="high"></embed></object></p>
<h2>Status</h2>
<p>We are currently working towards the v3.1.0.CR2 release of <a href="http://www.jboss.org/tools/">JBoss Tools</a>, which is due to be released in Feb (not sure of exact date).  There are still a number of <a href="https://jira.jboss.org/jira/browse/JBIDE/component/12311840">issues</a> with the editor.  We are working on these and will be resolving many of them for the 3.1.0.CR2 release.</p>
<p>We have purposely restricted the 3.1.0 version of the editor:</p>
<ol>
<li><strong>Supported Use Cases</strong>:
<ul>
<li><em>Java Mapping/Binding</em>:  Drag &amp; Drop mapping/binding of XML, JSON, CSV and EDI data to Java.</li>
<li><em>CSV and XML Templating</em>:  Drag &amp; Drop templating of Java Mappings (see #1 above) to produce CSV or XML (XML via XSD or XML Sample).</li>
</ul>
</li>
<li><strong>Supported Integration</strong>:
<ul>
<li><em>JBoss Tools ESB Editor</em>:  Will have basic open and edit integration with the ESB SmooksAction.</li>
</ul>
</li>
<li><strong>Supported Versions</strong>:
<ul>
<li><em>Smooks v1.2 Configurations</em>:  The Editor will only support Smooks v1.2 configuration namespaces.  Therefore, if you have configurations using config namespaces from earlier (or newer v1.3) versions of Smooks, the editor will not open the configurations.</li>
</ul>
</li>
</ol>
<p>So, the 3.1.0 version of the editor will not support:</p>
<ol>
<li>Direct Source to Result drag &amp; drop templating e.g. XML to XML, EDI to XML, XML to CSV etc.  We hope to support this in a future release (next one hopefully), but for now (in the v3.1.0 release), you need to define a Java Object model to use as the canonical form of the data being mapped i.e. v3.1.0 templating works as <em>Source -&gt; Java -&gt; Result</em>.</li>
<li>A number of features supported by the Smooks Runtime, such as Persistence, Validation, Splitting &amp; Routing etc.  We will be adding support for these in future releases.</li>
<li>Smooks v1.1 (and before) configuration namespaces that have newer versions in Smooks v1.2.  For example, Smooks v1.2 added a v1.2 javabean config namespace.  It is this version of the javabean config namespace that is supported by the editor.  The v1.1 javabean config namespace is not supported.</li>
<li>Smooks v1.3 (yet to be released) configuration namespaces.</li>
</ol>
<h2>Try it Out&#8230;</h2>
<p>Please take the editor for a spin and let us know what you think.  It can be downloaded (standalone, or as part of <a href="http://www.jboss.org/tools/">JBoss Tools</a>) from the <a href="http://www.jboss.org/tools/download.html">JBoss Tools Downloads Page</a>.  <a href="https://jira.jboss.org/jira/secure/BrowseProject.jspa?id=10020">Please log any issues</a> you find with the editor (against the &#8220;smooks&#8221; component), if not already logged.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2010/01/15/jboss-tools-smooks-editor-progress/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Smooks v1.2.4 Released</title>
		<link>http://blog.smooks.org/2009/12/22/smooks-v1-2-4-released/</link>
		<comments>http://blog.smooks.org/2009/12/22/smooks-v1-2-4-released/#comments</comments>
		<pubDate>Tue, 22 Dec 2009 13:50:59 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=364</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/12/22/smooks-v1-2-4-released/';
var dzone_title = 'Smooks v1.2.4 Released';
var dzone_blurb = 'We&#8217;ve just made a Smooks v1.2.4 patch release (Download).This contains:Some performance enhancements (reader pooling), Some bug fixes and, One small...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/12/22/smooks-v1-2-4-released/';
var dzone_title = 'Smooks v1.2.4 Released';
var dzone_blurb = 'We&#8217;ve just made a Smooks v1.2.4 patch release (Download).This contains:Some performance enhancements (reader pooling), Some bug fixes and, One small...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>We&#8217;ve just made a Smooks v1.2.4 patch release (<a href="http://www.smooks.org/mediawiki/index.php?title=Downloads">Download</a>).</p>
<p>This contains:</p>
<ol>
<li>Some performance enhancements (reader pooling),</li>
<li> Some bug fixes and,</li>
<li> One small new feature to support <a href="http://www.smooks.org/mediawiki/index.php?title=V1.2:Smooks_v1.2_User_Guide#Basic_Splitting_and_Routing">Basic Fragment Splitting and Routing</a>.  Right&#8230; we normally only do fixes in patch releases, but I wanted to get this into the JBoss SOA Platform before it released, so we made an exception for this one.</li>
</ol>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/uncategorized/">Uncategorized</a> by Tom <a href="http://blog.smooks.org/2009/12/22/smooks-v1-2-4-released/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/12/22/smooks-v1-2-4-released/';
var dzone_title = 'Smooks v1.2.4 Released';
var dzone_blurb = 'We&#8217;ve just made a Smooks v1.2.4 patch release (Download).This contains:Some performance enhancements (reader pooling), Some bug fixes and, One small...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>We&#8217;ve just made a Smooks v1.2.4 patch release (<a href="http://www.smooks.org/mediawiki/index.php?title=Downloads">Download</a>).</p>
<p>This contains:</p>
<ol>
<li>Some performance enhancements (reader pooling),</li>
<li> Some bug fixes and,</li>
<li> One small new feature to support <a href="http://www.smooks.org/mediawiki/index.php?title=V1.2:Smooks_v1.2_User_Guide#Basic_Splitting_and_Routing">Basic Fragment Splitting and Routing</a>.  Right&#8230; we normally only do fixes in patch releases, but I wanted to get this into the JBoss SOA Platform before it released, so we made an exception for this one.</li>
</ol>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2009/12/22/smooks-v1-2-4-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Introduction: Using a factory to instantiate beans with the javabean cartridge</title>
		<link>http://blog.smooks.org/2009/10/12/introduction-using-a-factory-to-instantiate-beans-with-the-javabean-cartridge/</link>
		<comments>http://blog.smooks.org/2009/10/12/introduction-using-a-factory-to-instantiate-beans-with-the-javabean-cartridge/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 08:01:59 +0000</pubDate>
		<dc:creator>Maurice</dc:creator>
				<category><![CDATA[Java Binding]]></category>
		<category><![CDATA[Smooks]]></category>
		<category><![CDATA[Technical Info & Concepts]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=354</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/10/12/introduction-using-a-factory-to-instantiate-beans-with-the-javabean-cartridge/';
var dzone_title = 'Introduction: Using a factory to instantiate beans with the javabean cartridge';
var dzone_blurb = 'I would like to introduce the new factory feature in the Javabean cartridge of the up coming Smooks 1.3 release. This new features makes it possible to...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/10/12/introduction-using-a-factory-to-instantiate-beans-with-the-javabean-cartridge/';
var dzone_title = 'Introduction: Using a factory to instantiate beans with the javabean cartridge';
var dzone_blurb = 'I would like to introduce the new factory feature in the Javabean cartridge of the up coming Smooks 1.3 release. This new features makes it possible to...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>I would like to introduce the new factory feature in the Javabean cartridge of the up coming Smooks 1.3 release. This new features makes it possible to use a static factory method or a factory object to instantiate objects with the Javabean cartridge.</p>
<p><span id="more-354"></span></p>
<p>Before this new feature you could only instantiate new beans by providing the class name of the bean and the bean would then be created using it&#8217;s public parameterless constructor. So it was mandatory to have a parameterless constructor on the Javabean. Here is an example:</p>
<pre class="brush: xml;">
&lt;jb:bean
   beanId=&quot;orders&quot;
   class=&quot;java.util.ArrayList&quot;
   createOnElement=&quot;orders&quot;
&gt;
     &lt;!-- ... bindings --&gt;
&lt;/jb:bean&gt;
</pre>
<p>But now it is possible to use a factory to instantiate the bean. So you don&#8217;t need a public parameterless constructur anymore. You even don&#8217;t have to define the actual class name any more. Any of the interfaces that the class implements suffices. However only the methods of that interface are available for binding then. Here is an example where we instantiate an ArrayList object using a static factory method:</p>
<pre class="brush: xml;">
&lt;jb:bean
   beanId=&quot;orders&quot;
   class=&quot;java.util.List&quot;
   factory=&quot;some.package.ListFactory#newList&quot;
   createOnElement=&quot;orders&quot;
&gt;
     &lt;!-- ... bindings --&gt;
&lt;/jb:bean&gt;
</pre>
<p>With the factory attribute you set the factory definition. The class attributes defines that a List object is returned. What kind of List object (ArrayList, LinkedList) is up to the ListFactory to decide. Here is another example:</p>
<pre class="brush: xml;">
&lt;jb:bean
   beanId=&quot;orders&quot;
   class=&quot;java.util.List&quot;
   factory=&quot;some.package.ListFactory#getInstance.newList&quot;
   createOnElement=&quot;orders&quot;
&gt;
     &lt;!-- ... bindings --&gt;
&lt;/jb:bean&gt;
</pre>
<p>Here we define that an instance of the ListFactory needs to be retrieved using the static method getInstance() and that then the newList() method needs to be called on the ListFactory object to create the List object. This construct makes it possible to easily call Singleton Factories.</p>
<p>The default factory definition language looks like this: <strong>factory.class#static_method<em>{.instance_method}</em></strong></p>
<p>It is also possible to use MVEL as the factory definition language. MVEL has some advantages over the basic default definition language, for example you can use objects from the bean context as the factory object or  you can call factory methods with parameters. These parameters can be defined within the definition or they can be objects from the bean context. To be able to use MVEL you must set the &#8216;factory.definition.parser.class&#8217; global parameter to &#8216;org.milyn.javabean.factory.MVELFactoryDefinitionParser&#8217;.</p>
<p>Here is an example using MVEL:</p>
<pre class="brush: xml;">
&lt;smooks-resource-list
   xmlns=&quot;http://www.milyn.org/xsd/smooks-1.1.xsd&quot;
   xmlns:jb=&quot;http://www.milyn.org/xsd/smooks/javabean-1.3.xsd&quot;&gt;

	&lt;params&gt;
		&lt;param name=&quot;factory.definition.parser.class&quot;&gt;
			org.milyn.javabean.factory.MVELFactoryDefinitionParser
		&lt;/param&gt;
	&lt;/params&gt;

    &lt;jb:bean
		beanId=&quot;orders&quot;
		class=&quot;java.util.List&quot;
		factory=&quot;some.package.ListFactory.getInstance().newList()&quot;
		createOnElement=&quot;orders&quot;
	&gt;
		&lt;!-- ... bindings --&gt;
    &lt;/jb:bean&gt;

&lt;/smooks-resource-list&gt;
</pre>
<p>Maybe you wonder why we don&#8217;t use MVEL as the default factory definition language? Currently the performance of the basic definition language and MVEL is about equal. The reason that the basic definition language isn&#8217;t faster is because it currently uses reflection to call the factory methods. However there are plans to use byte code generation instead of reflection. This should improve the performance dramatically. If MVEL where the default language then we couldn&#8217;t do anything to improve the performance for those people who don&#8217;t need any thing more then the basic features that the basic definition language offers.</p>
<p>If you have any questions or remarks then I would gladly hear them.</p>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/java-binding/">Java Binding</a> by Maurice <a href="http://blog.smooks.org/2009/10/12/introduction-using-a-factory-to-instantiate-beans-with-the-javabean-cartridge/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/10/12/introduction-using-a-factory-to-instantiate-beans-with-the-javabean-cartridge/';
var dzone_title = 'Introduction: Using a factory to instantiate beans with the javabean cartridge';
var dzone_blurb = 'I would like to introduce the new factory feature in the Javabean cartridge of the up coming Smooks 1.3 release. This new features makes it possible to...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>I would like to introduce the new factory feature in the Javabean cartridge of the up coming Smooks 1.3 release. This new features makes it possible to use a static factory method or a factory object to instantiate objects with the Javabean cartridge.</p>
<p><span id="more-354"></span></p>
<p>Before this new feature you could only instantiate new beans by providing the class name of the bean and the bean would then be created using it&#8217;s public parameterless constructor. So it was mandatory to have a parameterless constructor on the Javabean. Here is an example:</p>
<pre class="brush: xml;">
&lt;jb:bean
   beanId=&quot;orders&quot;
   class=&quot;java.util.ArrayList&quot;
   createOnElement=&quot;orders&quot;
&gt;
     &lt;!-- ... bindings --&gt;
&lt;/jb:bean&gt;
</pre>
<p>But now it is possible to use a factory to instantiate the bean. So you don&#8217;t need a public parameterless constructur anymore. You even don&#8217;t have to define the actual class name any more. Any of the interfaces that the class implements suffices. However only the methods of that interface are available for binding then. Here is an example where we instantiate an ArrayList object using a static factory method:</p>
<pre class="brush: xml;">
&lt;jb:bean
   beanId=&quot;orders&quot;
   class=&quot;java.util.List&quot;
   factory=&quot;some.package.ListFactory#newList&quot;
   createOnElement=&quot;orders&quot;
&gt;
     &lt;!-- ... bindings --&gt;
&lt;/jb:bean&gt;
</pre>
<p>With the factory attribute you set the factory definition. The class attributes defines that a List object is returned. What kind of List object (ArrayList, LinkedList) is up to the ListFactory to decide. Here is another example:</p>
<pre class="brush: xml;">
&lt;jb:bean
   beanId=&quot;orders&quot;
   class=&quot;java.util.List&quot;
   factory=&quot;some.package.ListFactory#getInstance.newList&quot;
   createOnElement=&quot;orders&quot;
&gt;
     &lt;!-- ... bindings --&gt;
&lt;/jb:bean&gt;
</pre>
<p>Here we define that an instance of the ListFactory needs to be retrieved using the static method getInstance() and that then the newList() method needs to be called on the ListFactory object to create the List object. This construct makes it possible to easily call Singleton Factories.</p>
<p>The default factory definition language looks like this: <strong>factory.class#static_method<em>{.instance_method}</em></strong></p>
<p>It is also possible to use MVEL as the factory definition language. MVEL has some advantages over the basic default definition language, for example you can use objects from the bean context as the factory object or  you can call factory methods with parameters. These parameters can be defined within the definition or they can be objects from the bean context. To be able to use MVEL you must set the &#8216;factory.definition.parser.class&#8217; global parameter to &#8216;org.milyn.javabean.factory.MVELFactoryDefinitionParser&#8217;.</p>
<p>Here is an example using MVEL:</p>
<pre class="brush: xml;">
&lt;smooks-resource-list
   xmlns=&quot;http://www.milyn.org/xsd/smooks-1.1.xsd&quot;
   xmlns:jb=&quot;http://www.milyn.org/xsd/smooks/javabean-1.3.xsd&quot;&gt;

	&lt;params&gt;
		&lt;param name=&quot;factory.definition.parser.class&quot;&gt;
			org.milyn.javabean.factory.MVELFactoryDefinitionParser
		&lt;/param&gt;
	&lt;/params&gt;

    &lt;jb:bean
		beanId=&quot;orders&quot;
		class=&quot;java.util.List&quot;
		factory=&quot;some.package.ListFactory.getInstance().newList()&quot;
		createOnElement=&quot;orders&quot;
	&gt;
		&lt;!-- ... bindings --&gt;
    &lt;/jb:bean&gt;

&lt;/smooks-resource-list&gt;
</pre>
<p>Maybe you wonder why we don&#8217;t use MVEL as the default factory definition language? Currently the performance of the basic definition language and MVEL is about equal. The reason that the basic definition language isn&#8217;t faster is because it currently uses reflection to call the factory methods. However there are plans to use byte code generation instead of reflection. This should improve the performance dramatically. If MVEL where the default language then we couldn&#8217;t do anything to improve the performance for those people who don&#8217;t need any thing more then the basic features that the basic definition language offers.</p>
<p>If you have any questions or remarks then I would gladly hear them.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2009/10/12/introduction-using-a-factory-to-instantiate-beans-with-the-javabean-cartridge/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Eclipse Tooling for Smooks&#8230; Let us hear what you think&#8230;</title>
		<link>http://blog.smooks.org/2009/09/30/seeking-feedback-on-the-smooks-configuration/</link>
		<comments>http://blog.smooks.org/2009/09/30/seeking-feedback-on-the-smooks-configuration/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 13:34:09 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=350</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/09/30/seeking-feedback-on-the-smooks-configuration/';
var dzone_title = 'Eclipse Tooling for Smooks&#8230; Let us hear what you think&#8230;';
var dzone_blurb = 'Of late, JBoss have been making more of a push on their Smooks Eclipse Tooling within JBoss Tools.  Prior to a few weeks ago, Dart Peng was &#8220;more...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/09/30/seeking-feedback-on-the-smooks-configuration/';
var dzone_title = 'Eclipse Tooling for Smooks&#8230; Let us hear what you think&#8230;';
var dzone_blurb = 'Of late, JBoss have been making more of a push on their Smooks Eclipse Tooling within JBoss Tools.  Prior to a few weeks ago, Dart Peng was &#8220;more...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>Of late, JBoss have been making more of a push on their Smooks Eclipse Tooling within JBoss Tools.  Prior to a few weeks ago, Dart Peng was &#8220;more or less&#8221; left to his own devices on this work, without much help from myself or anyone else.  More recently, Brian Fitzpatrick (JBoss) and myself have been more actively contributing to the great work being done by Dart.</p>
<p>Brian has been blogging about this work <a href="http://jbosstools.blogspot.com/2009/09/seeking-feedback-on-smooks.html">here on the JBoss Tools blog.</a> Please take a look and contribute your throughs and ideas!!!</p>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/uncategorized/">Uncategorized</a> by Tom <a href="http://blog.smooks.org/2009/09/30/seeking-feedback-on-the-smooks-configuration/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/09/30/seeking-feedback-on-the-smooks-configuration/';
var dzone_title = 'Eclipse Tooling for Smooks&#8230; Let us hear what you think&#8230;';
var dzone_blurb = 'Of late, JBoss have been making more of a push on their Smooks Eclipse Tooling within JBoss Tools.  Prior to a few weeks ago, Dart Peng was &#8220;more...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>Of late, JBoss have been making more of a push on their Smooks Eclipse Tooling within JBoss Tools.  Prior to a few weeks ago, Dart Peng was &#8220;more or less&#8221; left to his own devices on this work, without much help from myself or anyone else.  More recently, Brian Fitzpatrick (JBoss) and myself have been more actively contributing to the great work being done by Dart.</p>
<p>Brian has been blogging about this work <a href="http://jbosstools.blogspot.com/2009/09/seeking-feedback-on-smooks.html">here on the JBoss Tools blog.</a> Please take a look and contribute your throughs and ideas!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2009/09/30/seeking-feedback-on-the-smooks-configuration/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>SOPERA Data Integration Smooks Component for Talend</title>
		<link>http://blog.smooks.org/2009/08/29/sopera-data-integration-smooks-component-for-talend/</link>
		<comments>http://blog.smooks.org/2009/08/29/sopera-data-integration-smooks-component-for-talend/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 12:40:25 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Others Using Smooks]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=339</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/08/29/sopera-data-integration-smooks-component-for-talend/';
var dzone_title = 'SOPERA Data Integration Smooks Component for Talend';
var dzone_blurb = 'SOPERA have created a new Open Source project on Google called &#8220;soperadi-smooks&#8220;.  It is (or is hopefully going to be) a Smooks component...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/08/29/sopera-data-integration-smooks-component-for-talend/';
var dzone_title = 'SOPERA Data Integration Smooks Component for Talend';
var dzone_blurb = 'SOPERA have created a new Open Source project on Google called &#8220;soperadi-smooks&#8220;.  It is (or is hopefully going to be) a Smooks component...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p><a href="http://www.sopera.de/" target="_blank">SOPERA</a> have created a new Open Source project on Google called &#8220;<a href="http://code.google.com/p/soperadi-smooks/" target="_blank">soperadi-smooks</a>&#8220;.  It is (or is hopefully going to be) a Smooks component for <a href="http://www.talend.com/index.php" target="_blank">Talend</a>.</p>
<p>Cool!!!!</p>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/others-using-smooks/">Others Using Smooks</a> by Tom <a href="http://blog.smooks.org/2009/08/29/sopera-data-integration-smooks-component-for-talend/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/08/29/sopera-data-integration-smooks-component-for-talend/';
var dzone_title = 'SOPERA Data Integration Smooks Component for Talend';
var dzone_blurb = 'SOPERA have created a new Open Source project on Google called &#8220;soperadi-smooks&#8220;.  It is (or is hopefully going to be) a Smooks component...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p><a href="http://www.sopera.de/" target="_blank">SOPERA</a> have created a new Open Source project on Google called &#8220;<a href="http://code.google.com/p/soperadi-smooks/" target="_blank">soperadi-smooks</a>&#8220;.  It is (or is hopefully going to be) a Smooks component for <a href="http://www.talend.com/index.php" target="_blank">Talend</a>.</p>
<p>Cool!!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2009/08/29/sopera-data-integration-smooks-component-for-talend/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Multiple Results &amp; Outputs with Smooks</title>
		<link>http://blog.smooks.org/2009/08/29/multiple-results-outputs-with-smooks/</link>
		<comments>http://blog.smooks.org/2009/08/29/multiple-results-outputs-with-smooks/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 12:28:40 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Technical Info & Concepts]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=337</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/08/29/multiple-results-outputs-with-smooks/';
var dzone_title = 'Multiple Results &#038; Outputs with Smooks';
var dzone_blurb = 'Smooks can produce &#8220;output&#8221; in a number of different ways.  It can produce multiple sets of results, as well as output fragments of data to...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/08/29/multiple-results-outputs-with-smooks/';
var dzone_title = 'Multiple Results &#038; Outputs with Smooks';
var dzone_blurb = 'Smooks can produce &#8220;output&#8221; in a number of different ways.  It can produce multiple sets of results, as well as output fragments of data to...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>Smooks can produce &#8220;output&#8221; in a number of different ways.  It can produce multiple sets of results, as well as output fragments of data to multiple different endpoints (ESB Service Endpoints, Files, JMS Destinations, DBs etc&#8230; and in different formats), all in a single filtering pass of a message stream.</p>
<p>For more on this, <a href="http://www.smooks.org/mediawiki/index.php?title=Multiple_Outputs/Results">please see the Smooks Wiki&#8230;</a></p>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/technical-info-concepts/">Technical Info &amp; Concepts</a> by Tom <a href="http://blog.smooks.org/2009/08/29/multiple-results-outputs-with-smooks/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/08/29/multiple-results-outputs-with-smooks/';
var dzone_title = 'Multiple Results &#038; Outputs with Smooks';
var dzone_blurb = 'Smooks can produce &#8220;output&#8221; in a number of different ways.  It can produce multiple sets of results, as well as output fragments of data to...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p>Smooks can produce &#8220;output&#8221; in a number of different ways.  It can produce multiple sets of results, as well as output fragments of data to multiple different endpoints (ESB Service Endpoints, Files, JMS Destinations, DBs etc&#8230; and in different formats), all in a single filtering pass of a message stream.</p>
<p>For more on this, <a href="http://www.smooks.org/mediawiki/index.php?title=Multiple_Outputs/Results">please see the Smooks Wiki&#8230;</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2009/08/29/multiple-results-outputs-with-smooks/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Processing EDI, XML, CSV and more with Smooks v1.2</title>
		<link>http://blog.smooks.org/2009/07/14/processing-edi-csv-and-more-with-smooks-v12/</link>
		<comments>http://blog.smooks.org/2009/07/14/processing-edi-csv-and-more-with-smooks-v12/#comments</comments>
		<pubDate>Tue, 14 Jul 2009 21:08:11 +0000</pubDate>
		<dc:creator>tom</dc:creator>
				<category><![CDATA[Release]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=327</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/07/14/processing-edi-csv-and-more-with-smooks-v12/';
var dzone_title = 'Processing EDI, XML, CSV and more with Smooks v1.2';
var dzone_blurb = 'Smooks v1.2 has just been released (download).  This release adds a number of very interesting features and enhancements to Smooks, most notably:EDIFACT...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/07/14/processing-edi-csv-and-more-with-smooks-v12/';
var dzone_title = 'Processing EDI, XML, CSV and more with Smooks v1.2';
var dzone_blurb = 'Smooks v1.2 has just been released (download).  This release adds a number of very interesting features and enhancements to Smooks, most notably:EDIFACT...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p><a href="http://www.smooks.org"><strong>Smooks</strong></a> v1.2 has just been released (<strong><a href="http://smooks.org/mediawiki/index.php?title=Downloads">download</a></strong>).  This release adds a number of very interesting features and enhancements to Smooks, most notably:</p>
<ol>
<li><a href="http://smooks.org/mediawiki/index.php?title=V1.2:Smooks_v1.2_User_Guide#EJC_-_Edifact_Java_Compiler"><strong>EDIFACT Java Compiler (EJC)</strong></a>:  EJC greatly simplifies the process of binding EDI data to a Java object graph.   EJC is <strong>similar to <a class="external text" title="http://jaxb.dev.java.net/" rel="nofollow" href="http://jaxb.dev.java.net/">JAXBs</a> XJC</strong>, accept for EDI messages.  This is just the first of a number of developer optimization features we are in the process of adding in the area of EDI message processing.</li>
<li><a href="http://smooks.org/mediawiki/index.php?title=V1.2:Smooks_v1.2_User_Guide#Persistence_.28Database_Reading_and_Writing_.29"><strong>Entity Persistence Framework Support</strong></a>:  Reuse your Entity Persistence resources (like <strong>Hibernate</strong>, <strong>iBATIS</strong> or any <strong>JPA</strong> compatible resource) to persist or enrich messages of any format (EDI, XML etc).  Access a database and use it&#8217;s query language, or CRUD methods, for reading and writing to the database.</li>
<li><a href="http://smooks.org/mediawiki/index.php?title=V1.2:Smooks_v1.2_User_Guide#Validation"><strong>Validation</strong></a>:  Perform Rule based message fragment validation on messages of any format  (EDI, XML etc).  Supports <strong>Data Field</strong> level validation using <strong>regular expressions</strong>, or <strong>Business Rule</strong> compliance validation using <strong><a href="http://mvel.codehaus.org/">MVEL</a> expressions</strong>.</li>
<li><a href="http://smooks.org/mediawiki/index.php?title=V1.2:Smooks_v1.2_User_Guide#Binding_CSV_Records_to_Java"><strong>Simplified CSV Processing</strong></a>:  Bind CSV records to Java objects in seconds using a much simplified XML configuration, or using a very simple programmatic API.</li>
<li><strong>Improved Programmatic APIs</strong>:  Prior to Smooks v1.2, programmatic configuration was not one of Smooks&#8217; strengths.   In Smooks v1.2 we&#8217;ve made significant improvements in this area.  Most Smooks features can now be utilised through Java, without writing a line of XML.</li>
</ol>
<p>As well as these new features, Smooks v1.2 includes numerous bug fixes.  Please <strong><a href="http://smooks.org/mediawiki/index.php?title=Downloads">download Smooks v1.2</a></strong> and <a href="http://smooks.org/mediawiki/index.php?title=Mailing_Lists">let us know what you think</a>.  We hope you find it useful!!</p>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/release/">Release</a> by Tom <a href="http://blog.smooks.org/2009/07/14/processing-edi-csv-and-more-with-smooks-v12/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/07/14/processing-edi-csv-and-more-with-smooks-v12/';
var dzone_title = 'Processing EDI, XML, CSV and more with Smooks v1.2';
var dzone_blurb = 'Smooks v1.2 has just been released (download).  This release adds a number of very interesting features and enhancements to Smooks, most notably:EDIFACT...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p><a href="http://www.smooks.org"><strong>Smooks</strong></a> v1.2 has just been released (<strong><a href="http://smooks.org/mediawiki/index.php?title=Downloads">download</a></strong>).  This release adds a number of very interesting features and enhancements to Smooks, most notably:</p>
<ol>
<li><a href="http://smooks.org/mediawiki/index.php?title=V1.2:Smooks_v1.2_User_Guide#EJC_-_Edifact_Java_Compiler"><strong>EDIFACT Java Compiler (EJC)</strong></a>:  EJC greatly simplifies the process of binding EDI data to a Java object graph.   EJC is <strong>similar to <a class="external text" title="http://jaxb.dev.java.net/" rel="nofollow" href="http://jaxb.dev.java.net/">JAXBs</a> XJC</strong>, accept for EDI messages.  This is just the first of a number of developer optimization features we are in the process of adding in the area of EDI message processing.</li>
<li><a href="http://smooks.org/mediawiki/index.php?title=V1.2:Smooks_v1.2_User_Guide#Persistence_.28Database_Reading_and_Writing_.29"><strong>Entity Persistence Framework Support</strong></a>:  Reuse your Entity Persistence resources (like <strong>Hibernate</strong>, <strong>iBATIS</strong> or any <strong>JPA</strong> compatible resource) to persist or enrich messages of any format (EDI, XML etc).  Access a database and use it&#8217;s query language, or CRUD methods, for reading and writing to the database.</li>
<li><a href="http://smooks.org/mediawiki/index.php?title=V1.2:Smooks_v1.2_User_Guide#Validation"><strong>Validation</strong></a>:  Perform Rule based message fragment validation on messages of any format  (EDI, XML etc).  Supports <strong>Data Field</strong> level validation using <strong>regular expressions</strong>, or <strong>Business Rule</strong> compliance validation using <strong><a href="http://mvel.codehaus.org/">MVEL</a> expressions</strong>.</li>
<li><a href="http://smooks.org/mediawiki/index.php?title=V1.2:Smooks_v1.2_User_Guide#Binding_CSV_Records_to_Java"><strong>Simplified CSV Processing</strong></a>:  Bind CSV records to Java objects in seconds using a much simplified XML configuration, or using a very simple programmatic API.</li>
<li><strong>Improved Programmatic APIs</strong>:  Prior to Smooks v1.2, programmatic configuration was not one of Smooks&#8217; strengths.   In Smooks v1.2 we&#8217;ve made significant improvements in this area.  Most Smooks features can now be utilised through Java, without writing a line of XML.</li>
</ol>
<p>As well as these new features, Smooks v1.2 includes numerous bug fixes.  Please <strong><a href="http://smooks.org/mediawiki/index.php?title=Downloads">download Smooks v1.2</a></strong> and <a href="http://smooks.org/mediawiki/index.php?title=Mailing_Lists">let us know what you think</a>.  We hope you find it useful!!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2009/07/14/processing-edi-csv-and-more-with-smooks-v12/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Data Validation with Smooks v1.2</title>
		<link>http://blog.smooks.org/2009/05/21/data-validation-with-smooks-v12/</link>
		<comments>http://blog.smooks.org/2009/05/21/data-validation-with-smooks-v12/#comments</comments>
		<pubDate>Thu, 21 May 2009 13:43:18 +0000</pubDate>
		<dc:creator>daniel</dc:creator>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Smooks]]></category>
		<category><![CDATA[validation]]></category>

		<guid isPermaLink="false">http://blog.smooks.org/?p=167</guid>
		<description><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/05/21/data-validation-with-smooks-v12/';
var dzone_title = 'Data Validation with Smooks v1.2';
var dzone_blurb = 'Smooks 1.2 adds support for message data Validation as one of its new features. This new feature allows you to perform strong field and fragment validation...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/05/21/data-validation-with-smooks-v12/';
var dzone_title = 'Data Validation with Smooks v1.2';
var dzone_blurb = 'Smooks 1.2 adds support for message data Validation as one of its new features. This new feature allows you to perform strong field and fragment validation...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p><a href="http://www.smooks.org">Smooks</a> 1.2 adds support for message data Validation as one of its new features. This new feature allows you to perform strong field and fragment <strong>validation</strong> on not just XML data, but also on EDI,  JSON, CSV etc.  It currently supports <strong>Regex</strong> and <a href="http://mvel.codehaus.org"><strong>MVEL</strong></a> rules bases (<strong>Drools</strong> to follow).  <strong>Regex</strong> rules allow you to perform low level field format validation, while <strong>MVEL</strong> rules allow you to perform Business rules validation at a fragment/message level.</p>
<p><span id="more-167"></span>This is not intended as an alternative to Schema based validation such as XSD or Relax.  It provides additional layers of validation in areas not covered by these mechanisms.</p>
<p>Examples of validations one might perform on an Order message containing a collection of Order Item:</p>
<ol> 1. Use a Regex rule to validate that an orderId field follows a predefined format of  &#8220;Uppercase Char, followed by 5 digits&#8221; e.g. &#8220;W12345&#8243; or &#8220;U54321&#8243;.</ol>
<ol> 2. Use an MVEL rule to enforce a business rule by validating that an order item total is not greater than 50.00 i.e. &#8220;price * quantity &lt; 50.00&#8243;.  Of course these can be more complex.</ol>
<p>The easiest way to get familiar with the validation features is to look at an example, so here goes.</p>
<p>For the following example assume that we have the xml that looks like this:</p>
<pre class="brush: xml;">&lt;Order&gt;
    &lt;header&gt;
        &lt;orderId&gt;A188127&lt;/orderId&gt;
        &lt;username&gt;user1&lt;/username&gt;
        &lt;name&gt;
            &lt;firstname&gt;Harry&lt;/firstname&gt;
            &lt;lastname&gt;Fletcher&lt;/lastname&gt;
        &lt;/name&gt;
        &lt;email&gt;harry.fletcher@gmail.&lt;/email&gt;
        &lt;state&gt;South Dakota&lt;/state&gt;
    &lt;/header&gt;
&lt;/Order&gt;</pre>
<p>An example of a validation configuration could look like this:</p>
<pre class="brush: xml;">&lt;?xml version="1.0"?&gt;
&lt;smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
                   xmlns:rules="http://www.milyn.org/xsd/smooks/rules-1.0.xsd"
                   xmlns:validation="http://www.milyn.org/xsd/smooks/validation-1.0.xsd"&gt;

   &lt;!-- ruleBases used by validation rules... --&gt;
   &lt;rules:ruleBases&gt;
      &lt;rules:ruleBase name="customer"
                    src="rules/customer.properties"
                    provider="org.milyn.rules.regex.RegexProvider"/&gt;
   &lt;/rules:ruleBases&gt;

   &lt;!-- email validation rule targeted at the email element in the header... --&gt;
   &lt;validation:rule executeOn="Order/header/email" name="customer.email" onFail="WARN"/&gt;

&lt;/smooks-resource-list&gt;</pre>
<p>The &#8216;<strong>exeuteOn</strong>&#8216; attribte specifies the fragment or attribute that you want the validation rule to be applied to.  In the case of a Regex rule, it specifies a specific field of data (attribute or element text), while in the case of an MVEL rule, it simply identifies the fragment that triggers execution of that rule.</p>
<p>The next thing to notice is the &#8216;<strong>name</strong>&#8216; attribute. This attribute refers to a rule in one of the configured ruleBase.  In the case of the example above, we refer to the &#8216;<strong>email</strong>&#8216; rule in the &#8216;<strong>customer</strong>&#8216; ruleBase i.e. &#8216;<strong>customer.email</strong>&#8216;. You can define as many ruleBase elements and validation element as you need, but we are only using one of each here to keep this easy to read.</p>
<p>The &#8216;customer&#8217; ruleBase is handled by the RegexProvider, as defined in the &#8216;provider&#8217; attribute on the ruleBase configuration.  We can also see that the &#8216;customer&#8217; ruleBase rules are located in a properties file named &#8216;<strong>rules/customer.properties</strong>&#8216;:</p>
<pre class="brush: xml;"># Email address...
email=^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$</pre>
<p>Next, lets take a look at how we execute Smooks to capture some validation results in a <a href="http://www.milyn.org/javadoc/v1.2/smooks-cartridges/validation/org/milyn/validation/ValidationResult.html">ValidationResult</a> instance:</p>
<pre class="brush: java;">final Smooks smooks = new Smooks("smooks-config.xml");
try
{
    // Create an exec context - no profiles....
    final ExecutionContext executionContext = smooks.createExecutionContext();
    final ValidationResult validationResult = new ValidationResult();

    // Filter the input message...
    smooks.filterSource(executionContext, new StringSource(messageIn), validationResult);

    for (OnFailResult result : results.getWarnings())
    {
        System.out.println("\t" + result.getMessage());
    }
}
finally
{
    smooks.close();
}</pre>
<p>As you can see, Validation faiures can be reported at different levels of severity.  This is controlled by setting &#8216;<strong>onFail</strong>&#8216; to one of &#8216;<strong>OK</strong>&#8216;, &#8216;<strong>WARN</strong>&#8216;, &#8216;<strong>ERROR</strong>&#8216;, or &#8216;<strong>FATAL</strong>&#8216;. Setting onFail to &#8216;FATAL&#8217; will cause an exception to be thrown and processing to halt.  The other three levels will not generate an exception.  Failures at these lower severity levels can be accessed through the <a href="http://www.milyn.org/javadoc/v1.2/smooks-cartridges/validation/org/milyn/validation/ValidationResult.html">ValidationResult</a> instance supplied to the Smooks.filterSource method.  An example of getting WARN level failures is shown above with the <strong>result.getWarnings()</strong> call.</p>
<p>Having usable validation reports is important and Smooks validation supports <strong>localized messages for validation failures</strong>. These messages can be defined in standard Java ResourceBundle files (.properties format). A convention is used here, based on the rule source name (&#8221;<strong>src</strong>&#8220;). The validation message bundle base name is derived from the rule source (&#8221;<strong>src</strong>&#8220;) by dropping the rule source file extension and appending a &#8220;<strong>_messages</strong>&#8220;.</p>
<p>So for our example we could have a file named &#8216;<strong>customer_messages.properties</strong>&#8216; containing our default locale results:</p>
<pre class="brush: xml;">email=ftl:Invalid email address '${ruleResult.text}' at '${path}'.</pre>
<p>So calling <strong>result.getMessage()</strong> for a validation failure on &#8216;customer.email&#8217; rule will result in the following message:</p>
<p class="brush: xml;" style="padding-left: 30px;"><span style="color: #000000;"><em>Invalid email address &#8216;harry.fletcher@gmail.&#8217; at &#8216;/Order/header/email&#8217;.</em></span></p>
<p>And we could also add a message bundle file for Swedish users.  Following the ResourceBundle naming convention, it should be named &#8216;<strong>customer_messages_sv_SE.properties</strong>&#8216; and would contain the Sweish localized messages:</p>
<pre class="brush: xml;">email=ftl:Felaktig epost adress '${ruleResult.text}' i '${path}'.</pre>
<p>Calling <strong>result.getMessage(new Locale(&#8221;sv, &#8220;SE&#8221;))</strong> will produce:</p>
<p class="brush: xml;" style="padding-left: 30px;"><span style="color: #000000;"><em>Felaktig epost adress &#8216;harry.fletcher@gmail.&#8217; i &#8216;/Order/header/email&#8217;.</em></span></p>
<p>We have only shown a portion of the validation features here.  More information can be found in the <a href="http://www.smooks.org/mediawiki/index.php?title=V1.2:Smooks_v1.2_User_Guide">Smooks User Guide</a>.  An example of the validation features can be found in <a href="http://www.smooks.org/mediawiki/index.php?title=V1.2:validation-basic">Validation Example</a>.</p>
<div style="display:block"><small><em>posted in <a href="http://blog.smooks.org/category/blog/">Blog</a> by Daniel <a href="http://blog.smooks.org/2009/05/21/data-validation-with-smooks-v12/#comments">Leave A Comment</a></em></small></div>]]></description>
			<content:encoded><![CDATA[<div style="float: right; width: 42px; padding-right: 10px; margin: 0 0 0 10px;"><script type="text/javascript">
<!--
var dzone_url = 'http://blog.smooks.org/2009/05/21/data-validation-with-smooks-v12/';
var dzone_title = 'Data Validation with Smooks v1.2';
var dzone_blurb = 'Smooks 1.2 adds support for message data Validation as one of its new features. This new feature allows you to perform strong field and fragment validation...';
var dzone_style = '1';
//-->
</script>
<script language="javascript" src="http://widgets.dzone.com/widgets/zoneit.js"></script> 
</div>
<p><a href="http://www.smooks.org">Smooks</a> 1.2 adds support for message data Validation as one of its new features. This new feature allows you to perform strong field and fragment <strong>validation</strong> on not just XML data, but also on EDI,  JSON, CSV etc.  It currently supports <strong>Regex</strong> and <a href="http://mvel.codehaus.org"><strong>MVEL</strong></a> rules bases (<strong>Drools</strong> to follow).  <strong>Regex</strong> rules allow you to perform low level field format validation, while <strong>MVEL</strong> rules allow you to perform Business rules validation at a fragment/message level.</p>
<p><span id="more-167"></span>This is not intended as an alternative to Schema based validation such as XSD or Relax.  It provides additional layers of validation in areas not covered by these mechanisms.</p>
<p>Examples of validations one might perform on an Order message containing a collection of Order Item:</p>
<ol> 1. Use a Regex rule to validate that an orderId field follows a predefined format of  &#8220;Uppercase Char, followed by 5 digits&#8221; e.g. &#8220;W12345&#8243; or &#8220;U54321&#8243;.</ol>
<ol> 2. Use an MVEL rule to enforce a business rule by validating that an order item total is not greater than 50.00 i.e. &#8220;price * quantity &lt; 50.00&#8243;.  Of course these can be more complex.</ol>
<p>The easiest way to get familiar with the validation features is to look at an example, so here goes.</p>
<p>For the following example assume that we have the xml that looks like this:</p>
<pre class="brush: xml;">&lt;Order&gt;
    &lt;header&gt;
        &lt;orderId&gt;A188127&lt;/orderId&gt;
        &lt;username&gt;user1&lt;/username&gt;
        &lt;name&gt;
            &lt;firstname&gt;Harry&lt;/firstname&gt;
            &lt;lastname&gt;Fletcher&lt;/lastname&gt;
        &lt;/name&gt;
        &lt;email&gt;harry.fletcher@gmail.&lt;/email&gt;
        &lt;state&gt;South Dakota&lt;/state&gt;
    &lt;/header&gt;
&lt;/Order&gt;</pre>
<p>An example of a validation configuration could look like this:</p>
<pre class="brush: xml;">&lt;?xml version="1.0"?&gt;
&lt;smooks-resource-list xmlns="http://www.milyn.org/xsd/smooks-1.1.xsd"
                   xmlns:rules="http://www.milyn.org/xsd/smooks/rules-1.0.xsd"
                   xmlns:validation="http://www.milyn.org/xsd/smooks/validation-1.0.xsd"&gt;

   &lt;!-- ruleBases used by validation rules... --&gt;
   &lt;rules:ruleBases&gt;
      &lt;rules:ruleBase name="customer"
                    src="rules/customer.properties"
                    provider="org.milyn.rules.regex.RegexProvider"/&gt;
   &lt;/rules:ruleBases&gt;

   &lt;!-- email validation rule targeted at the email element in the header... --&gt;
   &lt;validation:rule executeOn="Order/header/email" name="customer.email" onFail="WARN"/&gt;

&lt;/smooks-resource-list&gt;</pre>
<p>The &#8216;<strong>exeuteOn</strong>&#8216; attribte specifies the fragment or attribute that you want the validation rule to be applied to.  In the case of a Regex rule, it specifies a specific field of data (attribute or element text), while in the case of an MVEL rule, it simply identifies the fragment that triggers execution of that rule.</p>
<p>The next thing to notice is the &#8216;<strong>name</strong>&#8216; attribute. This attribute refers to a rule in one of the configured ruleBase.  In the case of the example above, we refer to the &#8216;<strong>email</strong>&#8216; rule in the &#8216;<strong>customer</strong>&#8216; ruleBase i.e. &#8216;<strong>customer.email</strong>&#8216;. You can define as many ruleBase elements and validation element as you need, but we are only using one of each here to keep this easy to read.</p>
<p>The &#8216;customer&#8217; ruleBase is handled by the RegexProvider, as defined in the &#8216;provider&#8217; attribute on the ruleBase configuration.  We can also see that the &#8216;customer&#8217; ruleBase rules are located in a properties file named &#8216;<strong>rules/customer.properties</strong>&#8216;:</p>
<pre class="brush: xml;"># Email address...
email=^[\\w-\\.]+@([\\w-]+\\.)+[\\w-]{2,4}$</pre>
<p>Next, lets take a look at how we execute Smooks to capture some validation results in a <a href="http://www.milyn.org/javadoc/v1.2/smooks-cartridges/validation/org/milyn/validation/ValidationResult.html">ValidationResult</a> instance:</p>
<pre class="brush: java;">final Smooks smooks = new Smooks("smooks-config.xml");
try
{
    // Create an exec context - no profiles....
    final ExecutionContext executionContext = smooks.createExecutionContext();
    final ValidationResult validationResult = new ValidationResult();

    // Filter the input message...
    smooks.filterSource(executionContext, new StringSource(messageIn), validationResult);

    for (OnFailResult result : results.getWarnings())
    {
        System.out.println("\t" + result.getMessage());
    }
}
finally
{
    smooks.close();
}</pre>
<p>As you can see, Validation faiures can be reported at different levels of severity.  This is controlled by setting &#8216;<strong>onFail</strong>&#8216; to one of &#8216;<strong>OK</strong>&#8216;, &#8216;<strong>WARN</strong>&#8216;, &#8216;<strong>ERROR</strong>&#8216;, or &#8216;<strong>FATAL</strong>&#8216;. Setting onFail to &#8216;FATAL&#8217; will cause an exception to be thrown and processing to halt.  The other three levels will not generate an exception.  Failures at these lower severity levels can be accessed through the <a href="http://www.milyn.org/javadoc/v1.2/smooks-cartridges/validation/org/milyn/validation/ValidationResult.html">ValidationResult</a> instance supplied to the Smooks.filterSource method.  An example of getting WARN level failures is shown above with the <strong>result.getWarnings()</strong> call.</p>
<p>Having usable validation reports is important and Smooks validation supports <strong>localized messages for validation failures</strong>. These messages can be defined in standard Java ResourceBundle files (.properties format). A convention is used here, based on the rule source name (&#8221;<strong>src</strong>&#8220;). The validation message bundle base name is derived from the rule source (&#8221;<strong>src</strong>&#8220;) by dropping the rule source file extension and appending a &#8220;<strong>_messages</strong>&#8220;.</p>
<p>So for our example we could have a file named &#8216;<strong>customer_messages.properties</strong>&#8216; containing our default locale results:</p>
<pre class="brush: xml;">email=ftl:Invalid email address '${ruleResult.text}' at '${path}'.</pre>
<p>So calling <strong>result.getMessage()</strong> for a validation failure on &#8216;customer.email&#8217; rule will result in the following message:</p>
<p class="brush: xml;" style="padding-left: 30px;"><span style="color: #000000;"><em>Invalid email address &#8216;harry.fletcher@gmail.&#8217; at &#8216;/Order/header/email&#8217;.</em></span></p>
<p>And we could also add a message bundle file for Swedish users.  Following the ResourceBundle naming convention, it should be named &#8216;<strong>customer_messages_sv_SE.properties</strong>&#8216; and would contain the Sweish localized messages:</p>
<pre class="brush: xml;">email=ftl:Felaktig epost adress '${ruleResult.text}' i '${path}'.</pre>
<p>Calling <strong>result.getMessage(new Locale(&#8221;sv, &#8220;SE&#8221;))</strong> will produce:</p>
<p class="brush: xml;" style="padding-left: 30px;"><span style="color: #000000;"><em>Felaktig epost adress &#8216;harry.fletcher@gmail.&#8217; i &#8216;/Order/header/email&#8217;.</em></span></p>
<p>We have only shown a portion of the validation features here.  More information can be found in the <a href="http://www.smooks.org/mediawiki/index.php?title=V1.2:Smooks_v1.2_User_Guide">Smooks User Guide</a>.  An example of the validation features can be found in <a href="http://www.smooks.org/mediawiki/index.php?title=V1.2:validation-basic">Validation Example</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.smooks.org/2009/05/21/data-validation-with-smooks-v12/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 4.153 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2010-03-03 16:06:12 -->
<!-- Compression = gzip -->