<?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:georss="http://www.georss.org/georss" xmlns:gml="http://www.opengis.net/gml"
>

<channel>
	<title>LiquidFoot &#187; Web</title>
	<atom:link href="http://www.liquidfoot.com/tag/web/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.liquidfoot.com</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Sat, 17 Apr 2010 16:36:10 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>Form Validation</title>
		<link>http://www.liquidfoot.com/2006/09/21/form-validation/</link>
		<comments>http://www.liquidfoot.com/2006/09/21/form-validation/#comments</comments>
		<pubDate>Thu, 21 Sep 2006 16:17:42 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[AJAX]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[JavaScript]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.liquidfoot.com/?p=202</guid>
		<description><![CDATA[]]></description>
			<content:encoded><![CDATA[<div class="body">
<p>I&#8217;ve been playing with some form validation stuff for CF. I had been usign , but I wanted the HTML interface to act a bit more like the Flash interface, but I don&#8217;t really want to use Flash. I&#8217;ve also been doing a lot more work with some of the DHTML libraries that AJAX has made popular, so I figured there had to be a relatively elegent way to do form validations with something like <a href="http://prototype.conio.net/%3Eprototype%3C/a%3E.%3C/p%3E%3Cp%3EI%20remembered%20seeing%20something%20on%20%3Ca%20href=">Ajaxian</a> about easy form validation and decided to give it a try. The article on <a href="http://tetlaw.id.au/view/blog/really-easy-field-validation-with-prototype/">Dexagogo</a> shows how they created a library to handle form-validations that doesn&#8217;t require any other work than creating a form. This was just what I was looking for!</p>
<p>Basically, you just need the latest files from <a href="http://script.aculo.us/">script.aclo.us</a> with the latest prototype version (the 1.5 release candidate is included in the latest script.aculo.us lib folder), and the validation library. Convienently, they&#8217;re all included <a href="http://tetlaw.id.au/upload/dev/validation/validation1.5.3.zip">in the demo file on the site</a>.</p>
<p>To use this, you really only need prototype and the validation library (script.aculo.us adds a nice effect – much like the Flash format in cfform). For me, I made these calls:</p>
<div class="code"><span style="color: #000080;">&lt;head&gt;</span><br />
<span style="color: #000080;"><span style="color: #800000;">&lt;script type=<span style="color: #0000ff;">&#8220;text/javascript&#8221;</span> src=<span style="color: #0000ff;">&#8220;/scripts/scriptaculous/lib/prototype.js&#8221;</span>&gt;</span></span><span style="color: #000080;"><span style="color: #800000;">&lt;/script&gt;</span></span><br />
<span style="color: #000080;"><span style="color: #800000;">&lt;script type=<span style="color: #0000ff;">&#8220;text/javascript&#8221;</span> src=<span style="color: #0000ff;">&#8220;/scripts/validator.js&#8221;</span>&gt;</span></span><span style="color: #000080;"><span style="color: #800000;">&lt;/script&gt;</span></span><br />
<span style="color: #000080;"><span style="color: #800000;">&lt;script type=<span style="color: #0000ff;">&#8220;text/javascript&#8221;</span> src=<span style="color: #0000ff;">&#8220;/scripts/scriptaculous/scriptaculous.js?load=effects&#8221;</span>&gt;</span></span><span style="color: #000080;"><span style="color: #800000;">&lt;/script&gt;</span></span><br />
<span style="color: #000080;">&lt;/head&gt;</span></div>
<p>This is slightly different than the example on their page; they load the effects.js file directly, I&#8217;m calling the library via script.aculo.us with the load parameter. This isn&#8217;t really a big deal for one library, but it is convenient when you want to use several, but not all, of the libraries (e.g. scriptaculous.js?load=effects,dragdrop,slider).</p>
<p>Anyway, to actually use this, you need to create a form with an id attribute:</p>
<div class="code"><span style="color: #000080;"><span style="color: #ff8000;">&lt;form name=<span style="color: #0000ff;">&#8220;feedback&#8221;</span> id=<span style="color: #0000ff;">&#8220;feedback&#8221;</span> action=<span style="color: #0000ff;">&#8220;#cgi.script_name#&#8221;</span> method=<span style="color: #0000ff;">&#8220;post&#8221;</span>&gt;</span></span><br />
&#8230;<br />
<span style="color: #000080;"><span style="color: #ff8000;">&lt;/form&gt;</span></span></div>
<p>Now, we add some fields and use the class attribute to call the validator:</p>
<div class="code">Name: <span style="color: #000080;"><span style="color: #ff8000;">&lt;input type=<span style="color: #0000ff;">&#8220;text&#8221;</span> name=<span style="color: #0000ff;">&#8220;name&#8221;</span> id=<span style="color: #0000ff;">&#8220;name&#8221;</span> class=<span style="color: #0000ff;">&#8220;required&#8221;</span> /&gt;</span></span><span style="color: #000080;">&lt;br/&gt;</span><br />
Email: <span style="color: #000080;"><span style="color: #ff8000;">&lt;input type=<span style="color: #0000ff;">&#8220;text&#8221;</span> name=<span style="color: #0000ff;">&#8220;email&#8221;</span> id=<span style="color: #0000ff;">&#8220;email&#8221;</span> class=<span style="color: #0000ff;">&#8220;required validate-email&#8221;</span> /&gt;</span></span><br />
<span style="color: #000080;"><span style="color: #ff8000;">&lt;input type=<span style="color: #0000ff;">&#8220;submit&#8221;</span> /&gt;</span></span></div>
<p>There are 11 options for use in the validation library (this is directly off their page):</p>
<ul>
<li>required (not blank)</li>
<li>validate-number (a valid number)</li>
<li>validate-digits (digits only)</li>
<li>validate-alpha (letters only)</li>
<li>validate-alphanum (only letters and numbers)</li>
<li>validate-date (a valid date value)</li>
<li>validate-email (a valid email address)</li>
<li>validate-url (a valid URL)</li>
<li>validate-date-au (a date formatted as; dd/mm/yyyy)</li>
<li>validate-currency-dollar (a valid dollar value)</li>
<li>validate-one-required (At least one textbox/radio element must be selected in a group)</li>
</ul>
<p>This is really nice, because if you want to allow an optional field, but validate it, you can do:</p>
<div class="code"><span style="color: #000080;"><span style="color: #ff8000;">&lt;input type=<span style="color: #0000ff;">&#8220;text&#8221;</span> name=<span style="color: #0000ff;">&#8220;email&#8221;</span> class=<span style="color: #0000ff;">&#8220;validate-email&#8221;</span> /&gt;</span></span></div>
<p>There&#8217;s one more piece of the pie&#8230;to call the validation library. At the bottom of your page add:</p>
<div class="code"><span style="color: #000080;"><span style="color: #800000;">&lt;script type=<span style="color: #0000ff;">&#8220;text/javascript&#8221;</span>&gt;</span></span><br />
new Validation(&#8216;feedback&#8217;, {immediate:true});<br />
<span style="color: #000080;"><span style="color: #800000;">&lt;/script&gt;</span></span></div>
<p>The first argument is the id attribute of the form you&#8217;re wanting to validate. The second tells the Validator object what to do. This particular example enables validation on each field as you leave it (which I find useful). Some of the other options are:</p>
<ul>
<li>stopOnFirst (boolean): Stop on the first validation failure; default: false</li>
<li>onSubmit (boolean): Override the default behavior of adding an even listener to the onsubmit event (set to false if you want to make sure your onsubmit method gets called no matter what); default: true</li>
<li>immediate (boolean): validate when the cursor leaves the field; default: false</li>
<li>focusOnError (boolean): place the focus on the first field with an error; default: true</li>
<li>useTitles (boolean): make field validators use form element title attributes as error advice message; default: false</li>
<li>onFormValidate (string function): call a function when the form is validated</li>
<li>onElementValidate (string function): call a function when an element is validated</li>
</ul>
<p>What I thought was really cool was the ability to add custom validation types via an API. Say you only want folks to use capital letters for their names, you simply add a new validation type like:</p>
<div class="code"><span style="color: #000080;"><span style="color: #800000;">&lt;script type=<span style="color: #0000ff;">&#8220;javascript&#8221;</span>&gt;</span></span><br />
Validation.add(&#8216;validate-ucase&#8217;, &#8216;Please only use upper-case letters (A-Z) in this field.&#8217;, function(v){<br />
return Validation.get(&#8216;IsEmpty&#8217;).test(v) || /^[A-Z]+$/.test(v);<br />
}<br />
<span style="color: #000080;"><span style="color: #800000;">&lt;/script&gt;</span></span></div>
<p>Want to add several? You can do that too:</p>
<div class="code"><span style="color: #000080;"><span style="color: #800000;">&lt;script type=<span style="color: #0000ff;">&#8220;javascript&#8221;</span>&gt;</span></span><br />
Validation.addAllThese([<br />
['validate-lcase', 'Please only use lower-case (a-z) letters in this field', function(v){<br />
return Validation.get('IsEmpty').test(v) || /^[a-z]+$/.test(v);<br />
}],<br />
['validate-zip', 'Please check your zip code', function(v){<br />
return Validation.get('IsEmpty').test(v) || /^(\d{5})(( |-)?(\d{4}))?$/.test(v);<br />
}],<br />
['validate-phone', 'Please check your phone number', function(v){<br />
return Validation.get('IsEmpty').test(v) || /^(([0-9]{3}-)|\([0-9]{3}\) ?)?[0-9]{3}-[0-9]{4}$/.test(v);<br />
}],<br />
['validate-ssn', 'Please check the Social Security Number. It should follow the format 999-99-9999', function(v){<br />
return Validation.get('IsEmpty').test(v) || /^([0-9]{3}(-?)[0-9]{2}(-?)[0-9]{4})$/.test(v);<br />
}],<br />
['validate-ip', 'Please check the IP address', function(v){<br />
return Validation.get('IsEmpty').test(v) || /^(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])\.(\d|[1-9]\d|1\d\d|2[0-4]\d|25[0-5])$/.test(v);<br />
}],<br />
['validate-uuid', 'Please check the UUID', function(v){<br />
return Validation.get('IsEmpty').test(v) || /^[0-9A-F]{8}-[0-9A-F]{4}-[0-9A-F]{4}-[0-9A-F]{16}$/.test(v);<br />
}],<br />
['validate-guid', 'Please check the GUID', function(v){<br />
return Validation.get('IsEmpty').test(v) || /^[0-9a-f]{8,<span style="color: #0000ff;">8</span>}-[0-9a-f]{4,<span style="color: #0000ff;">4</span>}-[0-9a-f]{4,<span style="color: #0000ff;">4</span>}-[0-9a-f]{4,<span style="color: #0000ff;">4</span>}-[0-9a-f]{12,<span style="color: #0000ff;">12</span>}]$/.test(v);<br />
}],<br />
['validate-float', 'Please only use floating point numbers in this field', function(v){<br />
return Validation.get('IsEmpty').test(v) || /^(\b[0-9]+\.([0-9]+\b)?|\.[0-9]+\b)$/.test(v);<br />
}],<br />
['validate-visa', 'Please check your credit card number', function(v){<br />
return Validation.get('IsEmpty').test(v) || /^4\d{3}-?\d{4}-?\d{4}-?\d{4}$/.test(v);<br />
}],<br />
['validate-mastercard', 'Please check your credit card number', function(v){<br />
return Validation.get('IsEmpty').test(v) || /^5[1-5]\d{2}-?\d{4}-?\d{4}-?\d{4}$/.test(v);<br />
}],<br />
['validate-discovery', 'Please check your credit card number', function(v){<br />
return Validation.get('IsEmpty').test(v) || /^6011-?\d{4}-?\d{4}-?\d{4}$/.test(v);<br />
}],<br />
['validate-amex', 'Please check your credit card number', function(v){<br />
return Validation.get('IsEmpty').test(v) || /^3[4,<span style="color: #0000ff;">7</span>]\d{13}$/.test(v);<br />
}],<br />
['validate-diners', 'Please check your credit card number', function(v){<br />
return Validation.get('IsEmpty').test(v) || /^3[0,<span style="color: #0000ff;">6</span>,<span style="color: #0000ff;">8</span>]\d{12}$/.test(v);<br />
}],<br />
['validate-time', 'Please only use time in this field', function(v){<br />
return Validation.get('IsEmpty').test(v) || /^\d{1,<span style="color: #0000ff;">2</span>}[:]\d{2}([:]\d{2})?( [aApP][mM]?)?$/.test(v);<br />
}]<br />
]);<br />
<span style="color: #000080;"><span style="color: #800000;">&lt;/script&gt;</span></span></div>
<p>This should be all of the normal items included in  (plus a couple extra for good measure). Now the only thing left is to make it look pretty. One of the nice things about the Flash format in  is that it color codes required fields with the different halo effects. To obtain a similar effect in the forms, we&#8217;ll use style sheets instead.</p>
<p>This is a rather light stylesheet, but it&#8217;ll give you something to start with (based on the default haloGreen skin):</p>
<div class="code">input.required, textarea.required {<br />
border: 1px solid #ffbf2b;<br />
}<br />
input.validation-failed, textarea.validation-failed{<br />
border: 1px solid #ff3300;<br />
color: #ff3300;<br />
}<br />
input.validation-passed, textarea.validation-passed{<br />
border: 1px solid #00cc00;<br />
color: #000;<br />
}<br />
.validation-advice {<br />
margin: 5px 0;<br />
padding: 5px;<br />
background-color: #FF3300;<br />
color: #fff;<br />
font-weight: bold;<br />
}<br />
.custom-advice {<br />
margin: 5px 0;<br />
padding: 5px;<br />
background-color: #c8aa00;<br />
color: #fff;<br />
font-weight:bold;<br />
}</div>
<p>I made a short example of some of the validations at <a href="http://swem.wm.edu/blogs/waynegraham/examples/validation/">http://swem.wm.edu/blogs/waynegraham/examples/validation/</a>. I have to say that I&#8217;ve found this to be a bit better solution (at least for my needs) than using !</div>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2006/09/21/form-validation/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Real Life XSLT 2.0 transformations</title>
		<link>http://www.liquidfoot.com/2006/08/23/real-life-xslt-20-transformations/</link>
		<comments>http://www.liquidfoot.com/2006/08/23/real-life-xslt-20-transformations/#comments</comments>
		<pubDate>Wed, 23 Aug 2006 18:56:31 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[Web]]></category>
		<category><![CDATA[XML]]></category>
		<category><![CDATA[xslt]]></category>

		<guid isPermaLink="false">http://www.liquidfoot.com/?p=208</guid>
		<description><![CDATA[I ran into a bit of a situation that was really blowing my mind. I have a rather large XML file (around 20,000+ lines) marked up in TEI that I wanted to do some transformations on (a day book and ledger from the 1850s). Essentially the code follows the format &#8230; &#60;figure&#62; &#60;head&#62;Page 12&#60;/head&#62; &#60;graphic [...]]]></description>
			<content:encoded><![CDATA[<div class="body">
<p>I ran into a bit of a situation that was really blowing my mind. I have a rather large XML file (around 20,000+ lines) marked up in TEI that I wanted to do some transformations on (a day book and ledger from the 1850s). Essentially the code follows the format</p>
<div class="code">&#8230;<br />
<span style="color: #ff8000;">&lt;figure&gt;</span><br />
<span style="color: #000080;">&lt;head&gt;</span>Page 12<span style="color: #000080;">&lt;/head&gt;</span><br />
&lt;graphic url=<span style="color: #0000ff;">&#8220;0023_p12&#8243;</span>/&gt;<br />
<span style="color: #ff8000;">&lt;/figure&gt;</span></p>
<p>&lt;fw type=<span style="color: #0000ff;">&#8220;header&#8221;</span> place=<span style="color: #0000ff;">&#8220;top-center&#8221;</span>&gt;<br />
<span style="color: #000080;">&lt;name type=<span style="color: #0000ff;">&#8220;place&#8221;</span> key=<span style="color: #0000ff;">&#8220;7022220&#8243;</span>&gt;</span>Williamsburg<span style="color: #000080;">&lt;/name&gt;</span>,<br />
<span style="color: #000080;">&lt;date value=<span style="color: #0000ff;">&#8220;1850&#8243;</span>&gt;</span>1850<span style="color: #000080;">&lt;/date&gt;</span>,<br />
&lt;/fw&gt;</p>
<p><span style="color: #008080;">&lt;table&gt;</span><br />
<span style="color: #000080;">&lt;row&gt;</span><br />
<span style="color: #000080;">&lt;cell&gt;</span><br />
<span style="color: #000080;">&lt;date value=<span style="color: #0000ff;">&#8220;1850-10-03&#8243;</span>&gt;</span>&lt;choice&gt;<span style="color: #008000;">&lt;abbr&gt;</span>Oct<span style="color: #000080;">&lt;hi rend=<span style="color: #0000ff;">&#8220;sup;underline&#8221;</span>&gt;</span>r<span style="color: #000080;">&lt;/hi&gt;</span><span style="color: #008000;">&lt;/abbr&gt;</span><span style="color: #000080;">&lt;expan&gt;</span>October<span style="color: #000080;">&lt;/expan&gt;</span>&lt;/choice&gt; 3<span style="color: #000080;">&lt;hi rend=<span style="color: #0000ff;">&#8220;sup&#8221;</span>&gt;</span>th<span style="color: #000080;">&lt;/hi&gt;</span> 1850<span style="color: #000080;">&lt;/date&gt;</span><br />
<span style="color: #000080;">&lt;/cell&gt;</span><br />
<span style="color: #000080;">&lt;cell&gt;</span><br />
<span style="color: #000080;">&lt;name type=<span style="color: #0000ff;">&#8220;person&#8221;</span> key=<span style="color: #0000ff;">&#8220;griffss01&#8243;</span>&gt;</span>Doct<span style="color: #000080;">&lt;hi rend=<span style="color: #0000ff;">&#8220;sup;underline&#8221;</span>&gt;</span>r<span style="color: #000080;">&lt;/hi&gt;</span> S S Griffin<span style="color: #000080;">&lt;/name&gt;</span><br />
<span style="color: #000080;">&lt;/cell&gt;</span><br />
<span style="color: #000080;">&lt;cell&gt;</span><strong><em>&amp;nbsp;</em></strong><span style="color: #000080;">&lt;/cell&gt;</span><br />
<span style="color: #000080;">&lt;/row&gt;</span><br />
&#8230;<br />
<span style="color: #008080;">&lt;/table&gt;</span><br />
<span style="color: #000080;">&lt;pb/&gt;</span><br />
&#8230;</div>
<p>What I wanted to accomplish was group all this together in separate divs for HTML output (ok, I actually need to write each page to its own file, but this is pretty much just one more step).</p>
<p>I just could not find a way to group this info this way using XSLT 1 without wrapping each page within its own div structure. I didn&#8217;t really want to go back and do this, so I asked the TEI-L list. David Sewell pinged me back with some XQuery code that recursively recalls the document structure for a given node.</p>
<p>He also mentioned that it would be pretty easy to write an XSLT 2 transformation that groups these nodes together. I did a little bit of digging and came up with</p>
<div class="code"><span style="color: #000080;">&lt;xsl:template match=<span style="color: #0000ff;">&#8220;tei:div&#8221;</span>&gt;</span><br />
<span style="color: #000080;">&lt;xsl:for-each-group select=<span style="color: #0000ff;">&#8220;*&#8221;</span> group-ending-with<span style="color: #0000ff;">&#8220;tei:pb&#8221;</span>&gt;</span><br />
<span style="color: #000080;">&lt;div class=<span style="color: #0000ff;">&#8220;page&#8221;</span>&gt;</span><br />
<span style="color: #000080;">&lt;xsl:apply-templates select=<span style="color: #0000ff;">&#8220;current-group()&#8221;</span> /&gt;</span><br />
<span style="color: #000080;">&lt;/div&gt;</span><br />
<span style="color: #000080;">&lt;/xsl:for-each-group&gt;</span><br />
<span style="color: #000080;">&lt;/xsl:template&gt;</span></div>
<p>This transformed the pages to what I was wanting</p>
<div class="code"><span style="color: #000080;">&lt;div class=<span style="color: #0000ff;">&#8220;page&#8221;</span>&gt;</span><br />
<span style="color: #000080;"><span style="color: #800080;">&lt;img src=<span style="color: #0000ff;">&#8220;0023_12.png&#8221;</span> alt=<span style="color: #0000ff;">&#8220;Page 12&#8243;</span> /&gt;</span></span></p>
<p><span style="color: #000080;">&lt;h1 class=<span style="color: #0000ff;">&#8220;fw&#8221;</span>&gt;</span>Williamsburg,<span style="color: #0000ff;"> 1850</span>,<span style="color: #000080;">&lt;/h1&gt;</span></p>
<p><span style="color: #008080;">&lt;table&gt;</span><br />
<span style="color: #008080;">&lt;tr&gt;</span><br />
<span style="color: #008080;">&lt;td&gt;</span><br />
<span style="color: #000080;">&lt;span class=<span style="color: #0000ff;">&#8220;abbr&#8221;</span>&gt;</span>Oct<span style="color: #000080;">&lt;sup&gt;</span><span style="color: #000080;">&lt;u&gt;</span>r<span style="color: #000080;">&lt;/u&gt;</span><span style="color: #000080;">&lt;/sup&gt;</span><span style="color: #000080;">&lt;/span&gt;</span><span style="color: #000080;">&lt;span class=<span style="color: #0000ff;">&#8220;expan&#8221;</span>&gt;</span>October<span style="color: #000080;">&lt;/span&gt;</span> 3<span style="color: #000080;">&lt;sup&gt;</span>th<span style="color: #000080;">&lt;/sup&gt;</span> 1850<span style="color: #000080;">&lt;/date&gt;</span><br />
<span style="color: #008080;">&lt;/td&gt;</span><br />
<span style="color: #008080;">&lt;td&gt;</span><br />
<span style="color: #008000;">&lt;a href=<span style="color: #0000ff;">&#8220;javascript:getName(&#8216;griffss01&#8242;);&gt;</span>Doct<span style="color: #000080;">&lt;sup&gt;</span><span style="color: #000080;">&lt;u&gt;</span>r<span style="color: #000080;">&lt;/u&gt;</span><span style="color: #000080;">&lt;/sup&gt;</span> S S Griffin<span style="color: #008000;">&lt;/a&gt;</span><br />
<span style="color: #008080;">&lt;/td&gt;</span><br />
<span style="color: #008080;">&lt;td&gt;</span><strong><em>&amp;nbsp;</em></strong><span style="color: #008080;">&lt;/td&gt;</span><br />
<span style="color: #000080;">&lt;/row&gt;</span><br />
&#8230;<br />
<span style="color: #008080;">&lt;/table&gt;</span><br />
<span style="color: #000080;">&lt;/div&gt;</span></p>
<p><span style="color: #000080;">&lt;div class=&#8221;</span>page&#8221;&gt;</span><br />
&#8230;<br />
<span style="color: #000080;">&lt;/div&gt;</span></div>
<p>The XSLT processor for ColdFusion doesn&#8217;t support XSLT 2.0 (it&#8217;s still a draft spec). However, Saxon does (specifically Saxon 8). For more on doing XSLT transformations, see <a href="http://swem.wm.edu/blogs/waynegraham/index.cfm/2005/11/21/XSLT-20-in-ColdFusion">XSLT 2.0 in ColdFusion</a>.</div>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2006/08/23/real-life-xslt-20-transformations/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>MG Unity</title>
		<link>http://www.liquidfoot.com/2006/06/23/mg-unity/</link>
		<comments>http://www.liquidfoot.com/2006/06/23/mg-unity/#comments</comments>
		<pubDate>Fri, 23 Jun 2006 21:27:46 +0000</pubDate>
		<dc:creator>Wayne</dc:creator>
				<category><![CDATA[General]]></category>
		<category><![CDATA[coldfusion]]></category>
		<category><![CDATA[modelglue]]></category>
		<category><![CDATA[Web]]></category>

		<guid isPermaLink="false">http://www.liquidfoot.com/?p=216</guid>
		<description><![CDATA[It&#8217;s been a while since I&#8217;ve written on this blog&#8230;I&#8217;m attempting to keep this one on CF. Anyway, MG Unity has come out and I have to admit that I&#8217;m REALLY glad it has. I&#8217;ve been working on a project with five academics from four different institutions looking at the vernacular architecture of the Colonial [...]]]></description>
			<content:encoded><![CDATA[<div class="body">
<p>It&#8217;s been a while since I&#8217;ve written on this blog&#8230;I&#8217;m attempting to keep this one on CF. Anyway, MG Unity has come out and I have to admit that I&#8217;m REALLY glad it has.</p>
<p>I&#8217;ve been working on a project with five academics from four different institutions looking at the vernacular architecture of the Colonial Chesapeake to 1720 for an article in the William and Mary Quarterly for the 2007 celebration of Jamestown. The objective was to write an scholarly article that looks at everything that has been excavated and see if the arguments of past scholars still hold. Not only were the scholars looking at individual sites as an aggregate, but wanted to track changes to the structures over time (additions, fireplaces, cellars, etc.).</p>
<p>I knew this was going to be a challenging project from the beginning, so I attempted to set the expectations early for the application development cycle. I thought it a fluke that I actually got them all to aggree on a set of important fields and tables before I started coding anything (a first for me). However, as I got into the project a bit more, requests for additional fields here, moving this data to this table, all while attempting to support constant input into the application got to be a bit more than was really feasible for a &#8220;spare-time&#8221; project.</p>
<p>I had set out to use as good of coding practices as I could. Each table had its own DAO, gateway, TOs, validators, etc. However, each change to these fields made me keep mucking around in these files and the forms calling the objects. After a while of making constant changes, I fell back on some old &#8220;bad&#8221; practices and kind of strong-armed some of the solution with spaghetti code&#8230;and I hated myself for it because I knew that I would have to come back at a later date to fix it.</p>
<p>About this time Joe started doing some work with Arf! And Doug Hughes started work on Reactor. I continued to code in my bad style, but since I knew what I had done, I just kept doing it.</p>
<p>After the project members presented their paper, I set the project down for a while since my daughter had just been born. Since Joe brought out Unity, I decided now was as good a time as any to pick up the refactoring of the project.</p>
<p>All I can say is that what I&#8217;ve done in half-a-day with Unity would take me three- to four-times longer my old way. The scaffolds (once I figured out how they were working) have been an absolute godsend for the rather complex relationships between phases of construction and the overall archaeological and architectural record. The Reactor syntax is so easy (especially since ColdSpring seperates all the configuration) that everything just clicks.</p>
<p>The entire framework is just so intuitive (at least compared to my previous experiences with frameworks). The ability to not have to worry any more about building the basic web pages, forms, CRUD, and displays makes Unity a pleasure. Also, changes will be a breeze compared to what they entailed a couple of months ago, which will allow me to do some of the cool stuff I had planned with Google Maps and Google Earth to map out the locations of these archeaological/historical sites!</p></div>
]]></content:encoded>
			<wfw:commentRss>http://www.liquidfoot.com/2006/06/23/mg-unity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
