<?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/"
	>

<channel>
	<title>Mantis and Jessamine</title>
	<atom:link href="http://www.carolinamantis.com/wordpress/?feed=rss2" rel="self" type="application/rss+xml" />
	<link>http://www.carolinamantis.com/wordpress</link>
	<description>Thoughts on Web Applications and Design</description>
	<lastBuildDate>Thu, 13 Jun 2013 16:29:30 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Trimming Trailing Whitespace in Adobe DreamWeaver</title>
		<link>http://www.carolinamantis.com/wordpress/?p=208</link>
		<comments>http://www.carolinamantis.com/wordpress/?p=208#comments</comments>
		<pubDate>Thu, 16 Feb 2012 18:19:53 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.carolinamantis.com/wordpress/?p=208</guid>
		<description><![CDATA[Bronze Option, Search and Replace My co-worker Brian Hall and I have long wanted to have a &#8220;delete trailing whitespace&#8221; feature for Dreamweaver. I&#8217;ve Googled, used the Adobe forums, looked in the Adobe Dreamweaver Marketplace, and nothing. We thought we had the answer in using regular expression search and replace, but my experiments with that [...]]]></description>
				<content:encoded><![CDATA[<h2>Bronze Option, Search and Replace</h2>
<p>My co-worker <a href="https://plus.google.com/101435401065935497502/posts" title="Brian Hall's Google Plus Profile" target="_blank">Brian Hall</a> and I have long wanted to have a &#8220;delete trailing whitespace&#8221; feature for Dreamweaver.  I&#8217;ve Googled, used the Adobe forums, looked in the Adobe Dreamweaver Marketplace, and nothing.  We thought we had the answer in using regular expression search and replace, but my experiments with that were failures.  Until today!  Although it seems that the following search:</p>
<p><code>\s+$</code></p>
<p>to be replace with nothing would work, Dreamweaver (on Windows, at least), treats $ as end of file, not end of line.  No good.  We got closer with looking for carriage returns, but still didn&#8217;t have it.  The breakthrough came today when Brian had the &#8220;aha&#8221; moment with capturing.  Here&#8217;s the regex you want to use for your find:</p>
<p><code>[ \t]+([\r\n]+)</code></p>
<p>and what you want to replace that with is:</p>
<p><code>$1</code></p>
<p>Make sure that you have the checkbox for &#8220;Use regular expression&#8221; turned ON.  Just to provide explanation, what we&#8217;re doing is looking for one or more spaces or tabs (in any order), following by one or more newlines or carriage returns (in any order).  We use parentheses to capture the string of newlines / carriage returns, and then put that captured string (the $1) back.</p>
<p>Et voila, you retain the newlines (whether UNIX style or DOS style) that previously existed, don&#8217;t delete wanted blank lines in your code, but do delete all spaces and tabs at the end of lines.</p>
<p>Here&#8217;s a screenshot to help (it&#8217;s linked to larger version, follow link to embiggen):</p>
<p><a href="http://www.carolinamantis.com/wordpress/wp-content/uploads/2012/02/screenshot.2.png"><img src="http://www.carolinamantis.com/wordpress/wp-content/uploads/2012/02/screenshot.2-300x125.png" alt="" title="Dreamweaver Search and Replace to Trim Trailing Whitespace" width="300" height="125" class="alignnone size-medium wp-image-216" /></a></p>
<h2>Silver Option, Dreamweaver Command</h2>
<p>But wait, there&#8217;s more.  Brian also discovered the mechanism to add commands to Dreamweaver (those things that appear in the &#8220;Commands&#8221; menu).  Take the following HTML and put it in your Commands directory with the file name &#8220;Remove Trailing Whitespace.html&#8221; (remove quotes, leave spaces):</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!DOCTYPE HTML SYSTEM &quot;-//Macromedia//DWExtension layout-engine 5.0//dialog&quot;&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Remove Trailing Whitespace&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
	function canAcceptCommand() {
		// Only enable this command if a document is active
		var theDOM = dw.getDocumentDOM();
		if (theDOM) return true;
		else return false;
	}

	function runCommand() {
	// Get the DOM again
	var theDOM = dw.getDocumentDOM();

	// Get the outerHTML of the HTML tag (the
	// entire contents of the document)
	var theDocEl = theDOM.documentElement;
	var theWholeDoc = theDocEl.outerHTML;

	// Get tabs and spaces preceding newlines and carriage returns
	// Use submatch for the newlines and carriage returns, and put those back into document
	var fixedString = theWholeDoc.replace(/[ \t]+([\r\n]+)/g, &quot;$1&quot;);
	theDocEl.outerHTML = fixedString;
	}
// --&gt;
&lt;/script&gt;
&lt;/head&gt;
&lt;body onLoad=&quot;runCommand()&quot;&gt;&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>In my installation of Dreamweaver 5.5 on Windows, that&#8217;s: </p>
<p><code>C:\Program Files (x86)\Adobe\Adobe Dreamweaver CS5.5\configuration\Commands</code></p>
<p>If you find the top level of your Adobe installation, look for the Dreamweaver directory, then configuration, then Commands (which might be commands).  Create the file as &#8220;Replace Trailing Whitespace.htm&#8221; (including spaces in the file name).  If you have Dreamweaver running, close it and restart.  Your Commands menu should now contain a new entry of &#8220;Remove Trailing Whitespace&#8221;.  If you have no open files, the option will be grayed out.  Open any file.  The menu option should now be enabled.  Add some trailing whitespace such as spaces or tabs.  Verify you have them in your file by using View -> Code View Options -> Hidden Characters.  Go to Commands -> Remove Trailing Whitespace.  Your file should show it is edited, and the trailing whitespace should be removed.</p>
<h2>Gold Option, Dreamweaver Extension</h2>
<p>But wait, there&#8217;s even more!</p>
<p>We investigated the possibility of packaging this as a bona-fide Dreamweaver extension.  To do so, you need an MXI file that describes the properties of your extension.  The best resource we could find is an <a href="http://download.macromedia.com/pub/exchange/mxi_file_format.pdf">Adobe PDF describing the format</a>.  Using that, plus information from <a href="http://dreamweaverfever.com/extensions/">Dreamweaver Fever on creating Dreamweaver extensions</a>, we were able to create this XML.  Create a new directory, named anything you want.  This will be used to hold the HTML, the MXI, and store the rsulting MXP file.  Save the following XML as RemoveTrailingWhitespace.mxi:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;macromedia-extension id=&quot;&quot; 
	name=&quot;Remove Trailing Whitespace&quot; 
	version=&quot;1&quot; 
	type=&quot;object&quot;&gt; 
&lt;!-- List the required/compatible products --&gt; 
 &lt;products&gt; 
 &lt;product name=&quot;Dreamweaver&quot; 
	version=&quot;4&quot; primary=&quot;true&quot; /&gt; 
 &lt;/products&gt; 

&lt;!-- Describe the author --&gt; 
 &lt;author name=&quot;Brian Hall and Tony Miller&quot; /&gt; 

&lt;!-- Describe the extension --&gt; 
&lt;description&gt; 
 &lt;![CDATA[Takes the entire current document and removes trailing spaces and tabs, preserving new lines and carriage returns.]]&gt; 
&lt;/description&gt; 

&lt;ui-access&gt; 
 &lt;![CDATA[Click on Remove Trailing Whitespace from Commands menu.]]&gt; 
&lt;/ui-access&gt; 

&lt;files&gt; 
 &lt;file name=&quot;RemoveTrailingWhitespace.htm&quot; 
    destination=&quot;$dreamweaver/configuration/Commands&quot; /&gt; 
&lt;/files&gt; 

&lt;!-- Describe the changes to the configuration --&gt; 
&lt;configuration-changes&gt;
	&lt;menu-insert insertAfter=&quot;DWMenu_Commands_SortTable&quot; skipSeparator=&quot;true&quot;&gt;
		&lt;menuitem id=&quot;com_carolinamantis_Menu_Commands_Remove_Trailing_Whitespace&quot; name=&quot;_Remove Trailing Whitespace&quot; dynamic=&quot;true&quot; file=&quot;Commands/RemoveTrailingWhitespace.htm&quot; enabled=&quot;canAcceptCommand()&quot;&gt;
	&lt;/menu-insert&gt;
&lt;/configuration-changes&gt;
&lt;/macromedia-extension&gt;
</pre>
<p>You will also need the HTML/JavaScript that defines the command.  Save the following HTML as RemoveTrailingSpace.htm:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;!-- MENU-LOCATION=NONE --&gt;
&lt;!DOCTYPE HTML SYSTEM &quot;-//Macromedia//DWExtension layout-engine 5.0//dialog&quot;&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;Remove Trailing Whitespace&lt;/title&gt;
&lt;script type=&quot;text/javascript&quot;&gt;
&lt;!--
	function canAcceptCommand() {
		// Only enable this command if a document is active
		var theDOM = dw.getDocumentDOM();
		if (theDOM) {
			return true;
		} else {
			return false;
		}
	}

	function runCommand() {
	// Get the DOM again
	var theDOM = dw.getDocumentDOM();

	// Get the outerHTML of the HTML tag (the
	// entire contents of the document)
	var theDocEl = theDOM.documentElement;
	var theWholeDoc = theDocEl.outerHTML;

	// Get tabs and spaces preceding newlines and carriage returns
	// Use submatch for the newlines and carriage returns, and put those back into document
	var fixedString = theWholeDoc.replace(/[ \t]+([\r\n]+)/g, &quot;$1&quot;);
	theDocEl.outerHTML = fixedString;
	}
// --&gt;
&lt;/script&gt;
&lt;/head&gt;
&lt;body onLoad=&quot;runCommand()&quot;&gt;&lt;/body&gt;
&lt;/html&gt;
</pre>
<p>You&#8217;ll note that this is exactly the same HTML as the Silver option, just using a file name without space (personal preference) and with an explicit comment that Dreamweaver uses to not automatically create a menu option.  We want to suppress the automatic menu because we&#8217;re explicitly defining the menu information in our MXI file.</p>
<p>Start your Adobe Extension manager.  Choose File -> Package Extension (which seems to now be File -> Package MXP Extension in 5.5).  Go to the directory with your RemoveTrailingWhitespace.mxi file.  Choose it and click &#8220;Open&#8221;.  You will then be prompted to save your Extension Package as.  Call it RemoveTrailingWhitespace.mxp (you don&#8217;t have to call it the same thing as the MXI or HTML, but we&#8217;re doing so to be consistent).  Once it&#8217;s successfully created, use File -> Install Extension.  Choose your RemoveTrailingWhitespace.mxp.  Accept the boilerplate disclaimer, and what it be included in your Dreamweaver extensions list.  If you have DW open, close it and restart.  You should have a grayed out menu option as described in the for the Silver Option.  Open a file, add whitespace at the end of some lines, choose Commands -> Remove Trailing Whitespace, and your document should show that it&#8217;s modified and the trailing whitespace should be gone.</p>
<p>If you don&#8217;t want to roll your own, then keep reading.</p>
<h2>Files and References</h2>
<dl>
<dt>ZIP file containing HTML, MXI, MXP</dt>
<dd><a href="http://www.carolinamantis.com/documents/RemoveTrailingWhitespace.zip">RemoveTrailingWhitespace.zip</a></dd>
<dt>MXI Reference from Adobe</dt>
<dd><a href="http://download.macromedia.com/pub/exchange/mxi_file_format.pdf">http://download.macromedia.com/pub/exchange/mxi_file_format.pdf</a></dd>
<dt>Dreamweaver Fever Extension Information</dt>
<dd><a href="http://dreamweaverfever.com/extensions/">http://dreamweaverfever.com/extensions/</a></dd>
<dt>Macromedia Dreamweaver Support Center &#8211; Extending Dreamweaver</dt>
<dd><a href="http://www.adobe.com/support/dreamweaver/extend/creating_simple_cmmd_ext/index.html">http://www.adobe.com/support/dreamweaver/extend/creating_simple_cmmd_ext/index.html</a></dd>
<dt>Extending Dreamweaver CS5 and CS5.5</dt>
<dd><a href="http://help.adobe.com/en_US/dreamweaver/cs/extend/dreamweaver_cs5_extending.pdf">http://help.adobe.com/en_US/dreamweaver/cs/extend/dreamweaver_cs5_extending.pdf</a></dd>
<dt>Extending Dreamweaver &#8211; Types of Extensions</dt>
<dd><a href="http://help.adobe.com/en_US/Dreamweaver/10.0_Extending/WS5b3ccc516d4fbf351e63e3d117f508c8de-8000.html">http://help.adobe.com/en_US/Dreamweaver/10.0_Extending/WS5b3ccc516d4fbf351e63e3d117f508c8de-8000.html</a></dd>
<dt>
</dl>
]]></content:encoded>
			<wfw:commentRss>http://www.carolinamantis.com/wordpress/?feed=rss2&#038;p=208</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Linking to HTML Elements via id Attribute</title>
		<link>http://www.carolinamantis.com/wordpress/?p=194</link>
		<comments>http://www.carolinamantis.com/wordpress/?p=194#comments</comments>
		<pubDate>Wed, 19 Oct 2011 18:18:47 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[HTML]]></category>

		<guid isPermaLink="false">http://www.carolinamantis.com/wordpress/?p=194</guid>
		<description><![CDATA[My coworker Brian Hall and I came across a posting saying &#8220;everyone knows this&#8221;, and the this was that you can use a hash to link to an id.  Here&#8217;s a snippet to demonstrate: My Page With Internal Links Navigation A B C A Some content here that if relevant to 'A' B Some content [...]]]></description>
				<content:encoded><![CDATA[<p>My coworker Brian Hall and I came across a posting saying &#8220;everyone knows this&#8221;, and the this was that you can use a hash to link to an id.  Here&#8217;s a snippet to demonstrate:</p>
<pre name="code" class="html">
<h1>My Page With Internal Links</h1>

<h2>Navigation</h2>
<ul>
	<li><a href="#a">A</a></li>
	<li><a href="#b">B</a></li>
	<li><a href="#c">C</a></li>
</ul>

<h2 id="a">A</h2>
<p>Some content here that if relevant to 'A'</p>

<h2 id="b">B</h2>
<p>Some content here that is relevant to 'B'</p>

<h2 id="c">C</h2>
<p>Some content here that is relevant to 'C'</p>
</pre>
<p>Previously, the way you would do this is to use an a tag with a name value around the h2 elements:</p>
<pre name="code" class="html">
<h1>My Page With Internal Links Using Name Attribute</h1>
<h2>Navigation</h2>
<ul>
	<li><a href="#a">A</a></li>
	<li><a href="#b">B</a></li>
	<li><a href="#c">C</a></li>
</ul>

<a name="a"><h2>A</h2></a>
<p>Some content here that if relevant to 'A'</p>

<a name="b"><h2>B</h2></a>
<p>Some content here that is relevant to 'B'</p>

<a name="c"><h2>C</h2></a>
<p>Some content here that is relevant to 'C'</p>
</pre>
<p>The &#8220;everyone knows this&#8221; technique has many advantages:</p>
<ul>
<li>No extraneous a tags that have to be unstyled, because they&#8217;re not really links</li>
<li>Better cooperation with jQuery code because you are now using id attributes</li>
<li>You can do some nifty styling using the <a href="http://css-tricks.com/5841-css3-tabs/">target pseudo class selector</li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://www.carolinamantis.com/wordpress/?feed=rss2&#038;p=194</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Google Deprecates Google Maps API for Flash</title>
		<link>http://www.carolinamantis.com/wordpress/?p=189</link>
		<comments>http://www.carolinamantis.com/wordpress/?p=189#comments</comments>
		<pubDate>Wed, 07 Sep 2011 16:30:34 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Google Maps]]></category>

		<guid isPermaLink="false">http://www.carolinamantis.com/wordpress/?p=189</guid>
		<description><![CDATA[Well, I guess the decision that was made at ECU to use the JavaScript API, not the Flash API for Google Maps was ultimately the correct one.  According to the Google Geo Developers Blog, the Flash API deprecation announcement has been made.  At the time, the Flash API was not chosen due to lack of [...]]]></description>
				<content:encoded><![CDATA[<p>Well, I guess the decision that was made at ECU to use the <a href="http://code.google.com/apis/maps/documentation/javascript/">JavaScript API</a>, not the <a href="http://code.google.com/apis/maps/documentation/flash/">Flash API</a> for Google Maps was ultimately the correct one.  According to the <a href="http://googlegeodevelopers.blogspot.com">Google Geo Developers Blog</a>, the <a href="http://googlegeodevelopers.blogspot.com/2011/09/maps-api-for-flash-deprecation.html">Flash API deprecation announcement</a> has been made.  At the time, the Flash API was not chosen due to lack of experience with ActionScript, plus the benefits of using HTML, CSS, and JavaScript for maps development.  Many advanced Google Maps I&#8217;ve seen have used the Flash API, so it will be interesting to see if the projects are converted to the JavaScript API, if they will be considered feature complete and not updated (Google will make bug fixes, but not add new features to the Flash API), or if work will continue with the knowledge that Google won&#8217;t add new features to the Flash API.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.carolinamantis.com/wordpress/?feed=rss2&#038;p=189</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UNC CAUSE 2011 Proposal Accepted</title>
		<link>http://www.carolinamantis.com/wordpress/?p=186</link>
		<comments>http://www.carolinamantis.com/wordpress/?p=186#comments</comments>
		<pubDate>Sat, 27 Aug 2011 20:41:12 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Conference]]></category>

		<guid isPermaLink="false">http://www.carolinamantis.com/wordpress/?p=186</guid>
		<description><![CDATA[My coworker Brian Hall and I submitted a proposal for UNC CAUSE 2011.  I&#8217;m really excited that we were accepted!  Our talk is titled &#8220;A Pirate Looks at Forty (Weeks of Mobile Development)&#8220;.  We will be talking about our experiences implementing ECU&#8217;s mobile web site as well as working with Blackboard Mobile to implement the ECU [...]]]></description>
				<content:encoded><![CDATA[<p>My coworker Brian Hall and I submitted a proposal for <a href="https://cause11.appstate.edu/">UNC CAUSE 2011</a>.  I&#8217;m really excited that we were accepted!  Our talk is titled &#8220;<a href="https://cause11.appstate.edu/sessions/pirate-looks-forty-weeks-mobile-development">A Pirate Looks at Forty (Weeks of Mobile Development)</a>&#8220;.  We will be talking about our experiences implementing <a href="http://m.ecu.edu">ECU&#8217;s mobile web site</a> as well as working with <a href="http://www.blackboard.com/Platforms/Mobile/Overview.aspx">Blackboard Mobile</a> to implement the ECU Mobile App (currently available for <a href="http://itunes.apple.com/us/app/ecu-mobile/id445017701?mt=8">iOS</a> and <a href="https://market.android.com/details?id=com.blackboard.android.central.ecu&amp;feature=search_result">Android</a>, BlackberryOS and WebOS coming soon).</p>
]]></content:encoded>
			<wfw:commentRss>http://www.carolinamantis.com/wordpress/?feed=rss2&#038;p=186</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Theme: Busby</title>
		<link>http://www.carolinamantis.com/wordpress/?p=182</link>
		<comments>http://www.carolinamantis.com/wordpress/?p=182#comments</comments>
		<pubDate>Sat, 27 Aug 2011 20:22:41 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.carolinamantis.com/wordpress/?p=182</guid>
		<description><![CDATA[I&#8217;ve been saving links to interesting WordPress themes in my Delicious account, and the most recent is a rather impressive theme indeed.  It&#8217;s called Busby, and it&#8217;s got many advanced features.  I&#8217;ve set the basic options, but will want to explore the nifty image slider that&#8217;s a default part of the theme.  I also need [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;ve been saving links to interesting WordPress themes in <a href="http://delicious.com/sinistral">my Delicious account</a>, and the most recent is a rather impressive theme indeed.  It&#8217;s called <a href="http://wplift.com/busby-free-wordpress-personal-blog-theme/">Busby</a>, and it&#8217;s got many advanced features.  I&#8217;ve set the basic options, but will want to explore the nifty image slider that&#8217;s a default part of the theme.  I also need to come up with a 200x50px logo image.  I&#8217;m a tech person, not a graphics designer, so the initial ones are no doubt going to be of rather poor quality.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.carolinamantis.com/wordpress/?feed=rss2&#038;p=182</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>UNC CAUSE 2010 Slides</title>
		<link>http://www.carolinamantis.com/wordpress/?p=176</link>
		<comments>http://www.carolinamantis.com/wordpress/?p=176#comments</comments>
		<pubDate>Fri, 19 Nov 2010 21:23:17 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Conference]]></category>
		<category><![CDATA[Google Maps]]></category>

		<guid isPermaLink="false">http://www.carolinamantis.com/wordpress/?p=176</guid>
		<description><![CDATA[Here are the slides from my UNC CAUSE 2010 talk about Google Maps:]]></description>
				<content:encoded><![CDATA[<p>Here are the slides from my <a href="http://www.unccause.org/cause10/">UNC CAUSE 2010</a> talk about Google Maps:</p>
<iframe src="http://www.slideshare.net/slideshow/embed_code/5742109" width="625" height="507" frameborder="0" marginwidth="0" marginheight="0" scrolling="no"></iframe><br/><br/>
]]></content:encoded>
			<wfw:commentRss>http://www.carolinamantis.com/wordpress/?feed=rss2&#038;p=176</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ColdFusion, DDX, and PDFs Part 1: Gotchas</title>
		<link>http://www.carolinamantis.com/wordpress/?p=157</link>
		<comments>http://www.carolinamantis.com/wordpress/?p=157#comments</comments>
		<pubDate>Thu, 28 Oct 2010 02:29:42 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://www.carolinamantis.com/wordpress/?p=157</guid>
		<description><![CDATA[Before getting into the details of styling PDF document components using DDX, I wanted to share two very big &#8220;gotchas&#8221; that Brian and I experienced: When declaring the DDX element, make sure you copy it exactly, including the (seemingly) incorrect space in the schemaLocation. When testing your DDX using the IsDDX() function, make sure that [...]]]></description>
				<content:encoded><![CDATA[<p>Before getting into the details of styling PDF document components using DDX, I wanted to share two very big &#8220;gotchas&#8221; that Brian and I experienced:</p>
<ol>
<li>When declaring the DDX element, make sure you copy it exactly, including the (seemingly) incorrect space in the schemaLocation.</li>
<li>When testing your DDX using the <a href="http://help.adobe.com/en_US/ColdFusion/9.0/CFMLRef/WSc3ff6d0ea77859461172e0811cbec22c24-798b.html">IsDDX()</a> function, make sure that your server isn&#8217;t locking the file</li>
</ol>
<p>Here&#8217;s the correct DDX element to use whenever you&#8217;re trying to create a valid DDX document instance:</p>
<pre class="brush: xml; title: ; notranslate">
&lt;DDX xmlns=&quot;http://ns.adobe.com/DDX/1.0/&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://ns.adobe.com/DDX/1.0/ coldfusion_ddx.xsd&quot;&gt;
</pre>
<p>If you remove the space, IsDDX() will return false, and you&#8217;ll pull your hair out trying to create a minimal DDX that will work.</p>
<p>As for 2, we again discovered the file locking propensity of Windows 7 and Adobe&#8217;s Acrobat reader.  Even if your PDF is downloaded from a web server, it&#8217;s quite possible to remain locked if it&#8217;s open.  Whether testing with your dev server (especially a local machine) or a production server, make sure that when doing the tweak code/rerun PDF generation/view result cycle that you absolutely positively are not viewing, previewing, or have any possibility of keeping an open handle on the output PDF.  If you do, once again IsDDX() will return false.  Again you&#8217;ll want to pull out your hair in frustration as code that worked just a moment ago now refuses to regenerate a PDF.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.carolinamantis.com/wordpress/?feed=rss2&#038;p=157</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>ColdFusion, DDX, and PDFs Part 2: Styling a Table of Contents</title>
		<link>http://www.carolinamantis.com/wordpress/?p=151</link>
		<comments>http://www.carolinamantis.com/wordpress/?p=151#comments</comments>
		<pubDate>Thu, 28 Oct 2010 02:29:06 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[ColdFusion]]></category>

		<guid isPermaLink="false">http://www.carolinamantis.com/wordpress/?p=151</guid>
		<description><![CDATA[As promised, experiences from working with Brian Hall on the ECU printable telephone directory.  We knew we want Adobe Acrobat (aka PDF) files to provide a reasonable platform-agnostic method of producing quality printed output.  One of the features that we wanted is a table of contents.  That&#8217;s reasonably easy using DDX, and you can see [...]]]></description>
				<content:encoded><![CDATA[<p>As promised, experiences from working with <a href="http://bssandbrninalain.blogspot.com/">Brian Hall</a> on the <a href="http://www.ecu.edu/cs-ecu/email_phone.cfm">ECU printable telephone directory</a>.  We knew we want Adobe Acrobat (aka PDF) files to provide a reasonable platform-agnostic method of producing quality printed output.  One of the features that we wanted is a table of contents.  That&#8217;s reasonably easy using DDX, and you can see the DDX-101 version mentioned by <a href="http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec11e6d-7fec.html">Adobe</a> and by the ever-popular <a href="http://www.coldfusionjedi.com/index.cfm/2007/7/24/ColdFusion-8-Working-with-PDFs-Part-7">ColdFusion Jedi </a>.  Beyond the ability to create a table of contents, there&#8217;s not much out there about modifying the look and feel.  Hence the excitement when Brian was able to dig up the DDX reference manual.  It turns out that you actually do have control over the style of the table of contents even with the modified LiveCycle support within ColdFusion 9.0.1.</p>
<pre class="brush: coldfusion; title: ; notranslate">
&lt;cfsavecontent variable=&quot;myDDX&quot;&gt;
&lt;DDX xmlns=&quot;http://ns.adobe.com/DDX/1.0/&quot; xmlns:xsi=&quot;http://www.w3.org/2001/XMLSchema-instance&quot; xsi:schemaLocation=&quot;http://ns.adobe.com/DDX/1.0/ coldfusion_ddx.xsd&quot;&gt;
	&lt;PDF result=&quot;Out1&quot;&gt;
	&lt;TableOfContents includeInTOC=&quot;false&quot; bookmarkTitle=&quot;Table of Contents&quot;&gt;
		&lt;TableOfContentsEntryPattern applicableLevel=&quot;all&quot; &gt;
			&lt;StyledText&gt;
				&lt;p font-family=&quot;Times New Roman&quot; font-size=&quot;12pt&quot;&gt;
					&lt;_BookmarkTitle/&gt;
					&lt;Space/&gt;
					&lt;Space/&gt;
					&lt;leader leader-pattern=&quot;dotted&quot;/&gt;
					&lt;Space/&gt;
					&lt;Space/&gt;
					&lt;_BookmarkPageCitation/&gt;
				&lt;/p&gt;
			&lt;/StyledText&gt;
		&lt;/TableOfContentsEntryPattern&gt;
	&lt;/TableOfContents&gt;
	&lt;PDFGroup&gt;
		&lt;PDF source=&quot;Doc1&quot; /&gt;
		&lt;PDF source=&quot;Doc2&quot; /&gt;
	&lt;/PDFGroup&gt;
	&lt;/PDF&gt;
&lt;/DDX&gt;
&lt;/cfsavecontent&gt;
&lt;cfif IsDDX(#myDDX#)&gt;
	&lt;cfset inputStruct = StructNew()&gt;
	&lt;cfset inputStruct.Doc1 = &quot;FirstDocument.pdf&quot;&gt;
	&lt;cfset inputStruct.Doc2 = &quot;SecondDocument.pdf&quot;&gt;
	&lt;cfset outputStruct = StructNew()&gt;
	&lt;cfset outputStruct.Out1 = &quot;CombinedDocument.pdf&quot;&gt;
	&lt;cfpdf action=&quot;processddx&quot; ddxfile=&quot;#myddx#&quot; inputfiles=&quot;#inputStruct#&quot; outputfiles=&quot;#outputStruct#&quot; name=&quot;ddxVar&quot;&gt;
	&lt;cfdump var=&quot;#ddxVar#&quot;&gt;
&lt;cfelse&gt;
	&lt;cfoutput&gt;&lt;p&gt;NO, DDX IS NOT OK&lt;/p&gt;&lt;/cfoutput&gt;
&lt;/cfif&gt;
</pre>
<p>Above is a complete snippet, suitable for saving to a CFM file that will run completely.  For it to function on your own ColdFusion instance, you&#8217;ll need the following:</p>
<ul>
<li>A PDF file with the file name FirstDocument.pdf</li>
<li>A PDF file with the file name SecondDocument.pdf</li>
</ul>
<p>Given these two files and the above code saved to a ColdFusion cfm file, you&#8217;ll get a new file generated called CombinedFile.pdf.  If you open this file with a PDF reader, you&#8217;ll see a table of contents page followed by the contents of your two PDFs.  You&#8217;ll also see a bookmark called &#8220;Table of Contents&#8221;.  The table of contents will have entries for your two PDFs; these entries can be clicked and you&#8217;ll go directly to that sub-document.</p>
<p>The reason for this blog post is not the part that takes individual PDFs and combines them (you can find that in the <a href="http://help.adobe.com/en_US/ColdFusion/9.0/Developing/WSc3ff6d0ea77859461172e0811cbec11e6d-7fed.html">Adobe documentation</a>), but the fact that you can actually style the ToC, not just accept the defaults (which for us was a plain-jane Courier font).  The key is discovering the TableOfContentsEntryPattern, leader, _BookmarkTitle, and _BookmarkPageCitation elements.  The TableOfContentsEntryPattern defines how each line in your ToC will look.  Within that is a StyledText element, which is necessary whenever you are using styled text within DDX.  Further, since you&#8217;re defining a single instance of an element that gets repeated by the LiveCycle engine, you need markers for the title and page number.  The title is the _BookmarkTitle and the page number is _BookmarkPageCitation.</p>
<p>The leader element is used for producing the stream of periods between the title and page number.  The leader element has a leader-pattern attribute, which can be:</p>
<div id="_mcePaste">
<ul>
<li>space (default)</li>
<li>dashed</li>
<li>double-dashed</li>
<li>triple-dashed</li>
<li>solid</li>
<li>double</li>
<li>triple</li>
<li>dotted</li>
<li>double-dotted</li>
<li>triple-dotted</li>
</ul>
</div>
<p>This valuable information exists only in the DDX reference, without which you&#8217;re not going to be able to produce complex formats.</p>
<p>With the font size we were using, we needed a little space after the document title and before the page number.  The oh-so-useful Space element fit the bill exactly.  Finally, we added a couple of optional attributes to the TableOfContents: includeInToc (which means that the table of contents page itself is not included in the ToC) and bookmarkTitle (which is the text used for the bookmark that references the ToC).</p>
<p>Oh, and one final thing: almost all of the DDX examples I found used a file system file containing the DDX.  Big thanks to <span style="font-family: 'Lucida Grande', 'Lucida Sans Unicode', Calibri, Arial, Helvetica, Sans, FreeSans, Jamrul, Garuda, Kalimati; line-height: 16px;"><a href="http://www.coldfusionjedi.com">Raymond Camden</a> for providing examples where cfsavecontext is used to have an inline version.  Make sure that you use the trim function on your context saved variable, or you&#8217;ll have (yet another!) instance of where IsDDX() will return false.</span></p>
<p>In Part 3, there will be additional formatting options we discovered through a combination of trial and error and combing the DDX documentation.  Until then, get some PDFs and have fun playing with these options.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.carolinamantis.com/wordpress/?feed=rss2&#038;p=151</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>UNC CAUSE 2010 Speaker</title>
		<link>http://www.carolinamantis.com/wordpress/?p=142</link>
		<comments>http://www.carolinamantis.com/wordpress/?p=142#comments</comments>
		<pubDate>Thu, 14 Oct 2010 00:26:00 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[Conference]]></category>

		<guid isPermaLink="false">http://www.carolinamantis.com/wordpress/?p=142</guid>
		<description><![CDATA[I&#8217;m delighted that my abstract submission to UNC CAUSE 2010 has been accepted. That means I now get to use the lovely graphic they&#8217;ve provided My talk is &#8220;What&#8217;s that Building? Using Google’s Map API to Create a Campus Map. I got to attend UNC CAUSE 2008 (the last held one; last year&#8217;s was canceled [...]]]></description>
				<content:encoded><![CDATA[<p>I&#8217;m delighted that my abstract submission to <a href="http://www.unccause.org/cause10/">UNC CAUSE 2010</a> has been accepted.  That means I now get to use the lovely graphic they&#8217;ve provided</p>
<p><a href="http://www.unccause.org/cause10/sessions"><img src="http://www.unccause.org/cause10/badge.png" alt="UNC CAUSE Speaker" /></a></p>
<p>My talk is &#8220;<a href="http://www.unccause.org/cause10/sessions/whats-that-building-using-googles-map-api-to-create-a-campus-map/">What&#8217;s that Building?  Using Google’s Map API to Create a Campus Map</a>.</p>
<p>I got to attend UNC CAUSE 2008 (the last held one; last year&#8217;s was canceled due to NC&#8217;s budget issues) as a substitute attendee.  The experience was fantastic, meeting tech people from all over the <a href="http://www.northcarolina.edu/">UNC System</a>.  The keynotes, presentations, and BoF sessions were excellent, and the between-session socializing let me meet fantastic folks with tons of great things to share.   UNC CAUSE 2010 is shaping up to be even better.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.carolinamantis.com/wordpress/?feed=rss2&#038;p=142</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>WordPress 3.0.1: That was Easy</title>
		<link>http://www.carolinamantis.com/wordpress/?p=138</link>
		<comments>http://www.carolinamantis.com/wordpress/?p=138#comments</comments>
		<pubDate>Thu, 14 Oct 2010 00:06:06 +0000</pubDate>
		<dc:creator>Tony</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://www.carolinamantis.com/wordpress/?p=138</guid>
		<description><![CDATA[I kept putting off my upgrade, but now I&#8217;m finally running the very up to date release of WordPress. After doing the requisite cp -R to make a backup of the files and mysqldump for the db, I pressed the button. Done. And, now I even get notifications about the theme I&#8217;m using having an [...]]]></description>
				<content:encoded><![CDATA[<p>I kept putting off my upgrade, but now I&#8217;m finally running the very up to date release of WordPress.  After doing the requisite cp -R to make a backup of the files and mysqldump for the db, I pressed the button.  Done.  And, now I even get notifications about the theme I&#8217;m using having an update.  Most Excellent!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.carolinamantis.com/wordpress/?feed=rss2&#038;p=138</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
