<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/rss2full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><rss 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/" version="2.0">

<channel>
	<title>Stefan Cameron on Forms</title>
	
	<link>http://forms.stefcameron.com</link>
	<description>Building intelligent forms using Adobe LiveCycle Designer</description>
	<lastBuildDate>Fri, 06 Nov 2009 21:11:30 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" href="http://feeds.feedburner.com/SConForms" type="application/rss+xml" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com" /><item>
		<title>LiveCycle ES2 Ships</title>
		<link>http://forms.stefcameron.com/2009/11/06/livecycle-es2-ships/</link>
		<comments>http://forms.stefcameron.com/2009/11/06/livecycle-es2-ships/#comments</comments>
		<pubDate>Fri, 06 Nov 2009 21:11:30 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Designer]]></category>
		<category><![CDATA[LiveCycle]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/?p=467</guid>
		<description><![CDATA[Adobe&#8217;s enterprise platform, LiveCycle Enterprise Suite 2, is now officially released.
This means, amongst other awesome things about this release, that LiveCycle Designer ES2 (version 9.0) is officially released as well! Designer ES2 supports XFA 3.0 which is already supported by Acrobat 9.1.
]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/ZUdh6rV0Vq-9YK2cPuQt3EEgd1E/0/da"><img src="http://feedads.g.doubleclick.net/~a/ZUdh6rV0Vq-9YK2cPuQt3EEgd1E/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/ZUdh6rV0Vq-9YK2cPuQt3EEgd1E/1/da"><img src="http://feedads.g.doubleclick.net/~a/ZUdh6rV0Vq-9YK2cPuQt3EEgd1E/1/di" border="0" ismap="true"></img></a></p><p>Adobe&#8217;s enterprise platform, LiveCycle Enterprise Suite 2, is now <a href="http://www.businesswire.com/portal/site/home/permalink/?ndmViewId=news_view&#038;newsId=20091102006657&#038;newsLang=en">officially released</a>.</p>
<p>This means, amongst other awesome things about this release, that <a href="http://forms.stefcameron.com/2009/07/20/more-details-about-the-next-designer/">LiveCycle Designer ES2</a> (version 9.0) is officially released as well! Designer ES2 supports <a href="http://forms.stefcameron.com/2009/03/24/xfa-30-specification-available/">XFA 3.0</a> which is already supported by Acrobat 9.1.</p>
<img src="http://feeds.feedburner.com/~r/SConForms/~4/qzT9lvsypsI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2009/11/06/livecycle-es2-ships/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Designer Environment Initial Setup</title>
		<link>http://forms.stefcameron.com/2009/10/30/designer-environment-initial-setup/</link>
		<comments>http://forms.stefcameron.com/2009/10/30/designer-environment-initial-setup/#comments</comments>
		<pubDate>Fri, 30 Oct 2009 11:18:59 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Designer]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/2009/10/30/designer-environment-initial-setup/</guid>
		<description><![CDATA[While I was attending MAX 2009 a couple of weeks ago, I mentioned setting-up a keyboard shortcut for showing/hiding the Script Editor palette to one of my colleagues who thought it was the greatest thing since sliced bread! (OK, maybe not that great but it was obvious this would be a great time-saver). Since this [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/WPWPABIHIZiHtXQfNf4gGbMDD-w/0/da"><img src="http://feedads.g.doubleclick.net/~a/WPWPABIHIZiHtXQfNf4gGbMDD-w/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/WPWPABIHIZiHtXQfNf4gGbMDD-w/1/da"><img src="http://feedads.g.doubleclick.net/~a/WPWPABIHIZiHtXQfNf4gGbMDD-w/1/di" border="0" ismap="true"></img></a></p><p>While I was <a href="http://forms.stefcameron.com/max2009/">attending MAX 2009</a> a couple of weeks ago, I mentioned setting-up a keyboard shortcut for showing/hiding the Script Editor palette to one of my colleagues who thought it was the greatest thing since sliced bread! (OK, maybe not that great but it was obvious this would be a great time-saver). Since this is part of what I do whenever I install a new version of Designer, I thought others may find it useful to know all of what I do to get my form development environment setup just right, <strong>maximizing</strong> design canvas <strong>real estate</strong> and making it as <strong>easy</strong> as possible to <strong>edit scripts</strong>. The following steps are based on Designer ES2 however most should apply to older versions as well:</p>
<ol>
<li>Click &#8220;don&#8217;t show again&#8221; on welcome screen; click &#8216;exit&#8217;.
<li>Maximize the Designer window on your largest monitor &#8212; mine is a 24in monitor with 1920&#215;1200 resolution.
<li>Drag the Script Editor (SE), initially displayed in single-line mode at the top of the window, out over the Designer window so it&#8217;s floating in multi-line mode. Hold the [Ctrl] key down while positioning the palette so that it doesn&#8217;t dock to any side. Make the palette almost as big as the Designer window but not so wide as to hide palettes on left hand side where the Hierarchy palette is located.</p>
<p><img alt="Maximized Script Editor palette" src="http://forms.stefcameron.com/images/DesEnvInitSetup/DesEnvInitSetup-1.jpg"> <br /> 
<li>Hide/close the SE by clicking on the tiny &#8220;x&#8221; at the top right hand side of the palette.
<li>&#8220;Tools menu &gt; <strong>Keyboard Shortcuts</strong>&#8220;; choose &#8220;Window&#8221; from &#8220;Product Area&#8221; drop down; scroll almost to the end of the command list that appears/filters below and select &#8220;Script Editor&#8221;; click the &#8220;Remove&#8221; button to remove the current [Ctrl+Shift+F5] shortcut; put your cursor in the &#8220;New Shortcut&#8221; field and press &#8220;F5&#8243;; press the &#8220;Assign&#8221; button &#8212; you&#8217;ll get a warning that F5 is already assigned to &#8220;PDF Preview&#8221; &#8212; choose &#8220;Yes&#8221; to re-assign it to the SE palette.</p>
<p><img alt="F5 keyboard shortcut for Script Editor palette" src="http://forms.stefcameron.com/images/DesEnvInitSetup/DesEnvInitSetup-2.jpg"> <br /> 
<li>Optional: Set the keyboard shortcut for &#8220;PDF Preview&#8221; (under the &#8220;View&#8221; product area) to &#8220;Ctrl + F5&#8243;. I tend to always click on the &#8220;PDF Preview&#8221; tab to preview so I usually don&#8217;t bother with setting-up this shortcut.
<li>Set &#8220;Tools menu &gt; Options &gt; Doc Handling &gt; Default File Type for New Forms&#8221; to &#8220;Dynamic XML Form&#8221; &#8212; part of ensuring your forms <a href="http://forms.stefcameron.com/2006/07/24/previewing-as-dynamic-pdf/">preview as Dynamic PDFs</a>.
<li>Set &#8220;Tools menu &gt; Options &gt; Workspace &gt; Script Editor &gt; Show Line Numbers&#8221; to checked.
<li>Set &#8220;Tools menu &gt; Options &gt; Workspace &gt; XML Source &gt; Show Line Numbers&#8221; to checked.
<li>Set &#8220;Tools menu &gt; Options &gt; Data Binding &gt; Show <a href="http://forms.stefcameron.com/2006/07/29/dynamic-properties/">Dynamic Properties</a>&#8221; to checked.
<li>Set &#8220;Tools menu &gt; Options &gt; Data Binding &gt; Subform Binding &gt; Default Binding for New Subforms&#8221; to &#8220;None&#8221; or &#8220;No Data Binding&#8221; &#8212; this prevents data binding errors when adding new subforms to control layout and forces you to think of the data binding when adding subforms for data structure.
<li>Set &#8220;Tools menu &gt; Options &gt; <a href="http://forms.stefcameron.com/2008/09/22/tab-order-revamped/">Tab Order</a> &gt; Display Additional Visual Aids for Tab Order&#8221; to checked &#8212; &#8217;cause it&#8217;s really cool!
<li>If using Designer prior to version ES2/9.0 (where toolbar customization was removed), right-click on a toolbar, choose &#8220;Customize&#8221;, then un-check &#8220;Large Buttons&#8221; to reduce the screen real estate consumed by the large toolbar buttons. It&#8217;s not much but a few pixels here and there add-up to a lot of savings.
<li>Choose &#8220;Window menu &gt; Font&#8221; to show the Font and Paragraph palettes docked together in a floating window in the center of the app window; dock the palette to the left hand side with the Hierarchy, PDF Structure, Data View and Tab Order palette group above; click on the Paragraph tab to activate the palette and force it to resize to its &#8220;normal&#8221; height (it&#8217;s taller than the Font palette and doing this now means it won&#8217;t shift the next time you switch back and forth between the two palettes).
<li>Hide the &#8220;How To&#8221; palette &#8212; this leaves the Object Library on the top half of the right side and the Object/Accessibility palettes on the bottom half.
<li>Right-click on the Object palette&#8217;s tab: you&#8217;ll get a drop down menu containing the names of other palettes within that group that aren&#8217;t visible: Layout and Border. Select Layout, then Border to show those palettes within the group.
<li>Click on the &#8220;New&#8221; button in the toolbar (not the drop down arrow next to it, the button part) &#8212; this gives you a new document using the default document template (letter size). Drag a text field onto the form; check that the Paragraph palette on the bottom left side and Object palette on the bottom right side don&#8217;t have &#8220;expansion handles&#8221; visible, indicating that the palette UI isn&#8217;t entirely visible</p>
<p><img alt="Partially-visible Paragraph palette" src="http://forms.stefcameron.com/images/DesEnvInitSetup/DesEnvInitSetup-3.jpg"> <br />Partially-visible Paragraph palette</p>
<p><img alt="Partially-visible Object palette" src="http://forms.stefcameron.com/images/DesEnvInitSetup/DesEnvInitSetup-4.jpg"> <br />Partially-visible Object palette</p>
<p>If they are visible, click on them to make the palettes wide enough to display all of the UI, then reduce the width of the left/right dock area by clicking and dragging on the edge between the palettes and the form area until the &#8220;expansion handles&#8221; appear, then drag back out just until they disappear &#8212; this ensures the left and right dock areas are just wide enough to display all palette UI but no wider than necessary so that your form design canvas real estate is maximized. You can also play with the width so that it&#8217;s just a little larger, making the Object Library Standard objects display in two columns rather than a single, long column which you may have to scroll in order to get to objects you want to use.</p>
<p><img alt="Fully-visible Object palette" src="http://forms.stefcameron.com/images/DesEnvInitSetup/DesEnvInitSetup-5.jpg"> <br />Fully-visible Object palette after performing steps above<br /> 
<li>Right-click on the &#8220;Design View&#8221; tab to see a context menu of hidden form canvas area views: Master Pages and XML Source. Choose &#8220;Master Pages&#8221; then &#8220;XML Source&#8221; to show the tabs. Go back to &#8220;Design View&#8221;.
<li>Close the new form you created (most likely, there&#8217;s no need to save changes).
<li>Choose &#8220;File menu &gt; Open&#8221;, set the file type to &#8220;Adobe LiveCycle Designer Templates (*.tds)&#8221; and open
<pre><code>c:\Users\&lt;username&gt;\AppData\Roaming\Adobe\Designer\&lt;version&gt;\&lt;lang(EN)&gt;\Templates\Blank\Letter.tds</code></pre>
<p>(the location will vary depending on the version of Windows you are using). This is the default template used to create new documents, as set in the Template Manager by default. </p>
<li>With the Letter.tds template open, choose &#8220;File menu &gt; Form Properties &gt; Defaults&#8221;; set &#8220;Target Version &gt; Choose version&#8230;&#8221; to the latest available version, &#8220;Acrobat/Reader 9.1&#8243;; set &#8220;Scripting &gt; Default Language&#8221; to &#8220;JavaScript&#8221; (thought in v9 this can now be set in &#8220;Tools menu &gt; Options &gt; Workspace &gt; Script Editor &gt; Default Language for New Forms&#8221;); (optional) set &#8220;Scripting &gt; Default Run At&#8221; to &#8220;Client and Server&#8221; (to make sure your code runs when rendering on the server to PDF/A, for example, if this is a frequent requirement); set &#8220;Scripting &gt; <a href="http://forms.stefcameron.com/2008/09/29/restoring-the-state-of-your-form/">Preserve scripting changes</a> to form when saved&#8221; to &#8220;Manually&#8221; (it&#8217;s a good habit to take care of it yourself so you don&#8217;t get into a snag with certified forms); set &#8220;Scripting &gt; Enforce <a href="http://blogs.adobe.com/formfeed/2009/02/scope_of_javascript_objects.html">Strict Scoping Rules</a> in JavaScript&#8221; to checked (only possible if target version is 8.1 or later and helps you write more robust scripts); set &#8220;Server &gt; PDF Render Format&#8221; to &#8220;Dynamic XML Form&#8221; (again, to ensure your PDFs are <a href="http://forms.stefcameron.com/2006/07/24/previewing-as-dynamic-pdf/">dynamic</a>, this time for server renderings). Ensure that &#8220;Preview &gt; Preview Type&#8221; is set to &#8220;Interactive Form&#8221; and &#8220;Preview &gt; Preview Adobe XML Form As&#8221; is set to &#8220;Dynamic XML Form&#8221; &#8212; makes sure that your forms are <a href="http://forms.stefcameron.com/2006/07/24/previewing-as-dynamic-pdf/">previewed as Dynamic PDFs</a> rather than Static PDFs, even when previewing an XDP, although this <a href="http://forms.stefcameron.com/2006/07/24/previewing-as-dynamic-pdf/">still won&#8217;t help you</a> if you if you save your form as a Static PDF.
<li>Switch to the XML Source view and search (Ctrl+F) for &#8220;originalXFAVersion&#8221;. If found, remove the processing instruction to <a href="http://forms.stefcameron.com/2009/02/11/careful-with-form-compatibility-settings/">ensure</a> that you are truly creating the latest and greatest type of XFA document (as you specified in &#8220;File menu &gt; Form Properties Defaults &gt; Target Version&#8221;) when you create a new form from the default template. Remove the following (or similar) processing instruction (PI), if found:
<pre><code>&lt;?originalXFAVersion http://www.xfa.org/schema/xfa-template/2.8/?&gt;</code></pre>
<p>Click on &#8220;Design View&#8221; and apply your changes to the source. </p>
<li>Save your changes to the Letter.tds template. Repeat steps 20 to 22 for any other templates you use regularly.
<li>Click on the &#8220;New&#8221; button in the toolbar (not the drop down, the actual button to the left hand side of it). Verify that your &#8220;Form Properties&#8221; settings are applied to the new form and that the originalXFAVersion PI is not in the source (the one you may have removed from the template&#8217;s source in step 22).</li>
</ol>
<img src="http://feeds.feedburner.com/~r/SConForms/~4/CXfaPFnSGRo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2009/10/30/designer-environment-initial-setup/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Versions of Reader and Acrobat</title>
		<link>http://forms.stefcameron.com/2009/10/19/new-versions-of-reader-and-acrobat/</link>
		<comments>http://forms.stefcameron.com/2009/10/19/new-versions-of-reader-and-acrobat/#comments</comments>
		<pubDate>Mon, 19 Oct 2009 17:46:40 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Acrobat]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/2009/10/19/new-versions-of-reader-and-acrobat/</guid>
		<description><![CDATA[On Oct 13, 2009, Adobe released a security bulletin providing information about new versions of Reader and Acrobat that address various critical vulnerabilities.
The new versions are:

Acrobat/Reader 9.2
Acrobat/Reader 8.1.7
Acrobat/Reader 7.1.4

The Adobe Updater application should automatically download and install the latest version the next time you run Acrobat/Reader. Otherwise, you should definitely consider installing the updates to [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/USEUy4J2Murr91A_VmNFroJQrlw/0/da"><img src="http://feedads.g.doubleclick.net/~a/USEUy4J2Murr91A_VmNFroJQrlw/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/USEUy4J2Murr91A_VmNFroJQrlw/1/da"><img src="http://feedads.g.doubleclick.net/~a/USEUy4J2Murr91A_VmNFroJQrlw/1/di" border="0" ismap="true"></img></a></p><p>On Oct 13, 2009, Adobe released a <a href="http://www.adobe.com/support/security/bulletins/apsb09-15.html">security bulletin</a> providing information about new versions of Reader and Acrobat that address various critical vulnerabilities.</p>
<p>The new versions are:</p>
<ul>
<li>Acrobat/Reader 9.2</li>
<li>Acrobat/Reader 8.1.7</li>
<li>Acrobat/Reader 7.1.4</li>
</ul>
<p>The Adobe Updater application should automatically download and install the latest version the next time you run Acrobat/Reader. Otherwise, you should definitely consider installing the updates to protect your computer. Download links are available in the security bulletin.</p>
<img src="http://feeds.feedburner.com/~r/SConForms/~4/Sgs4sh4IIus" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2009/10/19/new-versions-of-reader-and-acrobat/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>@SConForms at Adobe MAX 2009</title>
		<link>http://forms.stefcameron.com/2009/10/02/sconforms-at-adobe-max-2009/</link>
		<comments>http://forms.stefcameron.com/2009/10/02/sconforms-at-adobe-max-2009/#comments</comments>
		<pubDate>Fri, 02 Oct 2009 19:00:50 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Conferences]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/2009/10/02/sconforms-at-adobe-max-2009/</guid>
		<description><![CDATA[It&#8217;s hard to believe but only 48 hours remain until I find myself in Los Angeles heading to the LA Convention Center to check-in at the MAX 2009 conference. Before I head down there, I though I would share a few final details that might interest you.
Whether or not you are heading to MAX, Twitter [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/128R2qzqMgdpxqLRFqoUrlYNw6o/0/da"><img src="http://feedads.g.doubleclick.net/~a/128R2qzqMgdpxqLRFqoUrlYNw6o/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/128R2qzqMgdpxqLRFqoUrlYNw6o/1/da"><img src="http://feedads.g.doubleclick.net/~a/128R2qzqMgdpxqLRFqoUrlYNw6o/1/di" border="0" ismap="true"></img></a></p><p>It&#8217;s hard to believe but only 48 hours remain until I find myself in Los Angeles heading to the <a href="http://www.lacclink.com/">LA Convention Center</a> to check-in at the <a href="http://max.adobe.com/">MAX 2009</a> conference. Before I head down there, I though I would share a few final details that might interest you.</p>
<p>Whether or not <em>you</em> are heading to MAX, <strong>Twitter is a huge part of MAX this year:</strong></p>
<ul>
<li>Though I have yet to follow the masses, I will attempt to tweet at <a href="http://twitter.com/SConForms/">@SConForms</a>;</li>
<li>You can check-out what people are saying about MAX by searching for the <a href="http://search.twitter.com/search?q=%23adobemax">#adobemax</a> tag (and if <em>you</em> tweet about MAX, you should use the tag as well!); and</li>
<li>Each of my labs will have designated Twitter tags, <a href="http://search.twitter.com/search?q=%23adobemax49">#adobemax49</a> (Oct 6, 3:30-5pm, PST) and <a href="http://search.twitter.com/search?q=%23adobemax357">#adobemax357</a> (Oct 7, 11am-12:30pm, PST), so that attendees can collaborate, ask questions and give feedback.</li>
</ul>
<p>The <a href="http://www.max.adobe.com/resources/">MAX Resources</a> page has even more Twitter details, including other ways to follow MAX like FaceBook, the MAX Blog, flickr, etc.</p>
<p>For those of you who can&#8217;t join us this year, Adobe has just launched the <a href="http://www.max.adobe.com/online/">MAX Online</a> site where you&#8217;ll be able to watch <strong>live keynotes</strong> and the <strong>top 3 daily sessions</strong>.</p>
<p>Here&#8217;s to an awesome MAX conference this year and Happy Canadian Thanksgiving! I&#8217;ll be <strong>back to my blog as of Oct 19</strong>, after taking a little bit of time off following the conference.</p>
<img src="http://feeds.feedburner.com/~r/SConForms/~4/-0AS9xkaZ8k" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2009/10/02/sconforms-at-adobe-max-2009/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Multi-Selection List Schema Definition</title>
		<link>http://forms.stefcameron.com/2009/09/30/multi-selection-list-schema-definition/</link>
		<comments>http://forms.stefcameron.com/2009/09/30/multi-selection-list-schema-definition/#comments</comments>
		<pubDate>Wed, 30 Sep 2009 14:07:02 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Acrobat]]></category>
		<category><![CDATA[Bugs]]></category>
		<category><![CDATA[Data Binding]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[XFA]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/2009/09/30/multi-selection-list-box-schema-definition/</guid>
		<description><![CDATA[After spending some time, recently, showing you how to connect your form to a schema and highlighting Designer&#8217;s support for schema metadata, I thought I would round-off my current train of thought on schemas by tackling multi-selection listboxes. Since they store their selected data in &#60;value&#62; nodes, once you think about it, their schema definition [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/RKERc5-8lxbmApJF_eh-tX51mZQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/RKERc5-8lxbmApJF_eh-tX51mZQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/RKERc5-8lxbmApJF_eh-tX51mZQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/RKERc5-8lxbmApJF_eh-tX51mZQ/1/di" border="0" ismap="true"></img></a></p><p>After spending some time, recently, showing you how to <a href="http://forms.stefcameron.com/2009/08/03/connecting-to-a-schema/">connect your form to a schema</a> and highlighting Designer&#8217;s support for <a href="http://forms.stefcameron.com/2009/08/28/schema-metadata/">schema metadata</a>, I thought I would round-off my current train of thought on schemas by tackling multi-selection listboxes. Since they store their selected data in &lt;value&gt; nodes, once you think about it, their schema definition may not be obvious. When you&#8217;re working with XML data that isn&#8217;t governed by a schema and namespaces, it is perhaps easier to work with (i.e. accept) these &lt;value&gt; nodes however things change when you have a schema telling you how your data must be structured and scoped (with namespaces).</p>
<p><span id="more-449"></span><br />
<h2>How Lists Store Selected Items</h2>
<p>To better understand the challenges, let&#8217;s look at how list form objects store a multi-selection of values.</p>
<p>In the <strong>Form DOM</strong>, the list&#8217;s value actually contains XML rather than plain text. For example, say we have a multi-selection list named &#8220;ListBox1&#8243; (bound to a data element named &#8220;list1&#8243;) with items (&#8221;item1&#8243;, &#8220;item2&#8243;, &#8220;item3&#8243;). If the first two items were selected, the list&#8217;s value would look like this:</p>
<pre><code>&lt;value&gt;
    &lt;exData contentType="text/xml"&gt;
        &lt;list1&gt;
            &lt;value&gt;item1&lt;/value&gt;
            &lt;value&gt;item2&lt;/value&gt;
        &lt;/list1&gt;
    &lt;/exData&gt;
&lt;/value&gt;</code></pre>
<p>In <strong>script</strong>, this would translate to a newline (\n)-delimited string when the list&#8217;s value is accessed from its rawValue property:</p>
<pre><code>item1\nitem2</code></pre>
<p>In the <strong>Data DOM</strong>, the list&#8217;s value is stored in a series of repeating &lt;value&gt; nodes, much like the way it is stored in the Form DOM:</p>
<pre><code>&lt;list1&gt;
    &lt;value&gt;item1&lt;/value&gt;
    &lt;value&gt;item2&lt;/value&gt;
&lt;/list1&gt;</code></pre>
<h2>Adding the Schema</h2>
<p>A schema describes how XML should be structured. Given how lists store their selected items in data, a schema that includes a multi-selection list will need to allow for the element that defines the list to contain zero or more repeating &lt;value&gt; nodes. Unfortunately, this means modifying your schema, if you already have one. (I can think of at least one workaround to this which would involve script and a sibling, hidden text field bound to the element in your schema, as opposed to the list itself, in which you would store the selection, but I won&#8217;t get into that in this article.)</p>
<p>For example, <a href="http://forms.stefcameron.com/samples/data-binding/schema-multisellist/multiSelList-schema.xsd">this</a> is a schema that defines a &#8220;form1&#8243; root element that contains an element named &#8220;list1&#8243; that has a multi-selection list type (the way XFA expects it).</p>
<h3>Data Connection</h3>
<p>The problem with this structure is that once you connect your form to this schema, the Data View connection tree will interpret the list1 element as being a subform that contains a repeating node, &#8220;value&#8221;:</p>
<p><img src="http://forms.stefcameron.com/images/SchemaMultiSelList/SchemaMultiSelList-1.jpg"> </p>
<p>Because of this interpretation, you cannot simply drag &amp; drop the &#8220;list1&#8243; schema element into your form in order to get a multi-selection list. Instead, you&#8217;ll get a subform with a text field inside of it instead (only an element with a simple type restricted to an enumeration of values would be interpreted as a list). Furthermore, you cannot use the picker widget next to the &#8220;Object palette &gt; Binding tab &gt; Data Binding property&#8221; to assign &#8220;list1&#8243; to a listbox you have already dragged into your form from the Object Library palette because &#8220;list1&#8243; is viewed as a container (subform) and the form object you are attempting to bind is a field.</p>
<h3>Data Binding</h3>
<p>In order to bind the listbox to the &#8220;list1&#8243; schema element, you must manually type its binding expression into the &#8220;Object palette &gt; Binding tab &gt; Data Binding property&#8221;. For our simple use case, <strong>the binding is &#8220;list1&#8243;</strong>. Note that you don&#8217;t actually bind the repeating &#8220;value&#8221; element to anything and that the schema data connection tree will not actually indicate that the &#8220;list1&#8243; element is bound to a form object even though it now is (I&#8217;m guessing this is because it is expecting &#8220;list1&#8243; to be bound to a subform, not a field).</p>
<p>The result of binding the listbox to the &#8220;list1&#8243; schema element is that the Form DOM output changes slightly to include the proper namespace on the bound element within the field&#8217;s value:</p>
<pre><code>&lt;value&gt;
    &lt;exData contentType="text/xml"&gt;
        &lt;scof:list1 xmlns:scof="http://forms.stefcameron.com/ns/2009/"&gt;
            &lt;value&gt;item1&lt;/value&gt;
            &lt;value&gt;item2&lt;/value&gt;
        &lt;/scof:list1&gt;
    &lt;/exData&gt;
&lt;/value&gt;</code></pre>
<h2>Submitting Data</h2>
<p>As you might expect, given the structure of the listbox&#8217;s selection in the Form DOM above, the list&#8217;s selection data will be similar in the Data DOM (which is what would be submitted from the form as well):</p>
<pre><code>&lt;xfa:data xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"&gt;
    &lt;scof:form1 xmlns:scof="http://forms.stefcameron.com/ns/2009/"&gt;
        &lt;scof:list1&gt;
            &lt;value&gt;item1&lt;/value&gt;
            &lt;value&gt;item2&lt;/value&gt;
        &lt;/scof:list1&gt;
    &lt;/scof:form1&gt;
&lt;/xfa:data&gt;</code></pre>
<p>The only problem with the data above is that it isn&#8217;t valid against the schema which specifies that the repeating &lt;value&gt; nodes inside the list1 element are part of the &#8220;scof&#8221; (target) namespace and should therefore look like &lt;scof:value&gt;.</p>
<h2>Submitting Namespaced Data</h2>
<p>In order to get the namespace into the repeating &lt;value&gt; nodes for the selected values, we have to use a workaround that involves a little script in the listbox&#8217;s Exit event (though the script could be triggered elsewhere, if you like):</p>
<pre><code>// JavaScript:

// schema namespace info
var nspace = "scof";
var nsUri = "http://forms.stefcameron.com/ns/2009/";

// get selection from list
var selection = this.rawValue.split("\n");

// build XML string for new selection in *Form DOM*
//  that includes the namespace in the &lt;value&gt;
//  nodes the outer &lt;listSelection&gt; node is
//  essentially irrelevant and will be discarded later
//  however it is required so that we can load its
//  content into the listbox's exData value node where
//  its value is set in the Form DOM
// this.dataNode.name gets the listbox's bound data
//  element name from the Data DOM which is required
//  in the XML
var newSelection = "&lt;listSelection&gt;\n&lt;" + nspace +
    ":" + this.dataNode.name + " xmlns:" + nspace +
    "='" + nsUri + "'&gt;";

// add selected items into the new selection -- take
//  note of the newline character at the beginning of
//  the string as it is critical to the XML loading
//  properly later on (it shouldn't be but it is...)
for (var i = 0; i &lt; selection.length; i++)
{
    newSelection += "\n&lt;" + nspace + ":value&gt;" +
        selection[i] + "&lt;/" + nspace + ":value&gt;";
}

// close the XML elements in the string
newSelection += "\n&lt;/" + nspace + ":" +
    this.dataNode.name + "&gt;\n&lt;/listSelection&gt;";

// load the new namespaced selection into the listbox's
//  exData value node, ignoring the root &lt;listSelection&gt;
//  node in the XML string
this.value.exData.loadXML(newSelection, true, true);</code></pre>
<p>The script above essentially builds an XML string equivalent in structure to that which is normally used to store the list&#8217;s selection in the Form DOM however it adds the necessary namespaces to the repeating &lt;ns:value&gt; nodes. This change is then replicated in the list1 data node in the Data DOM and the form&#8217;s exported data changes to this (which can be successfully validated against the schema we&#8217;re using):</p>
<pre><code>&lt;xfa:data xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/"&gt;
    &lt;scof:form1 xmlns:scof="http://forms.stefcameron.com/ns/2009/"&gt;
        &lt;scof:list1&gt;
            &lt;scof:value&gt;item1&lt;/scof:value&gt;
            &lt;scof:value&gt;item2&lt;/scof:value&gt;
        &lt;/scof:list1&gt;
    &lt;/scof:form1&gt;
&lt;/xfa:data&gt;</code></pre>
<h3><a name="warning"></a>Import Data Warning</h3>
<p>Unfortunately, I have to point-out a bug as it relates to exporting multi-selection values with namespaces (which you only get when you use the above workaround script): Importing data with namespaced &lt;ns:value&gt; nodes for multi-selection lists &#8212; though valid XML and valid against the schema &#8212; will fail in Acrobat 9.1.3 (I have not done any testing on previous versions). My testing has revealed that the form doesn&#8217;t render properly after the data merge. Importing namespaced data that does not have namespaced &lt;value&gt; nodes for multi-selection lists, however, does work fine (this is the default way data is exported, unless you use the script I outlined above).</p>
<h2>Sample Form</h2>
<p>I have built a sample form that demonstrates how multi-selection lists store their data in the Form DOM and Data DOM. The form also includes a checkbox which, when checked, will generate namespaced &lt;ns:value&gt; nodes instead of the default &lt;value&gt; nodes, using the workaround script in the list&#8217;s Exit event.</p>
<p>Download:</p>
<ul>
<li><a href="http://forms.stefcameron.com/samples/data-binding/schema-multisellist/SchemaMultiSelList.pdf">Form [pdf]</a>
<li><a href="http://forms.stefcameron.com/samples/data-binding/schema-multisellist/multiSelList-schema.xsd">Schema [xsd]</a>
<li><a href="http://forms.stefcameron.com/samples/data-binding/schema-multisellist/sampleData.xml">Sample Data [xml]</a>
<li><a href="http://forms.stefcameron.com/samples/data-binding/schema-multisellist/sampleData-ns.xml">Sample Data (namespaced) [xml]</a></li>
</ul>
<p><strong>Minimum Requirements:</strong> I designed this form using Designer ES2 Beta and Acrobat 9.1.3 however the form should work all the way back to Designer 7.1 and Acrobat 7.0.5.</p>
<img src="http://feeds.feedburner.com/~r/SConForms/~4/1nG780MIrEI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2009/09/30/multi-selection-list-schema-definition/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Featur-O-meter Fixed!</title>
		<link>http://forms.stefcameron.com/2009/09/24/featur-o-meter-fixed/</link>
		<comments>http://forms.stefcameron.com/2009/09/24/featur-o-meter-fixed/#comments</comments>
		<pubDate>Fri, 25 Sep 2009 03:07:03 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Designer]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/?p=445</guid>
		<description><![CDATA[Last week, I asked you to start voting for your favorite next feature on the new Featur-O-meter poll.
I&#8217;m not sure how many of you might have tried to vote since then and weren&#8217;t able to but I just noticed the poll was broken and it&#8217;s now fixed.
Please vote! We want to hear what you think.

]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/OQpyor7ciXDlkYSi-TDzAnx10_s/0/da"><img src="http://feedads.g.doubleclick.net/~a/OQpyor7ciXDlkYSi-TDzAnx10_s/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/OQpyor7ciXDlkYSi-TDzAnx10_s/1/da"><img src="http://feedads.g.doubleclick.net/~a/OQpyor7ciXDlkYSi-TDzAnx10_s/1/di" border="0" ismap="true"></img></a></p><p>Last week, I asked you to start voting for your <a href="http://forms.stefcameron.com/2009/09/15/vote-for-your-favorite-next-feature/">favorite next feature</a> on the <a href="http://forms.stefcameron.com/featur-o-meter/">new Featur-O-meter poll</a>.</p>
<p>I&#8217;m not sure how many of you might have tried to vote since then and weren&#8217;t able to but I just noticed the poll was broken and it&#8217;s now fixed.</p>
<p>Please vote! We want to hear what you think.</p>
<p style="text-align: center;"><a href="http://forms.stefcameron.com/featur-o-meter/"><img src="http://forms.stefcameron.com/images/featur-o-meter.jpg"/></a></p>
<img src="http://feeds.feedburner.com/~r/SConForms/~4/mtM7mBpUnmo" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2009/09/24/featur-o-meter-fixed/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Army Run 2009 Race Results</title>
		<link>http://forms.stefcameron.com/2009/09/20/army-run-2009-race-results/</link>
		<comments>http://forms.stefcameron.com/2009/09/20/army-run-2009-race-results/#comments</comments>
		<pubDate>Sun, 20 Sep 2009 19:26:21 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/2009/09/20/army-run-2009-race-results/</guid>
		<description><![CDATA[What a perfect morning for a half marathon race! My goal was 1:30:00 but the weather was perfect, I felt really good and God answered my prayers with an official time, and personal best, of 1:28:59 (that&#8217;s a 4:14 kilometer pace for 21.1km) and a chip time of 1:28:54 (obviously I was very well positioned [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/vlQ_yOFL_O8UXk88RKQXd1WgzIY/0/da"><img src="http://feedads.g.doubleclick.net/~a/vlQ_yOFL_O8UXk88RKQXd1WgzIY/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/vlQ_yOFL_O8UXk88RKQXd1WgzIY/1/da"><img src="http://feedads.g.doubleclick.net/~a/vlQ_yOFL_O8UXk88RKQXd1WgzIY/1/di" border="0" ismap="true"></img></a></p><p>What a perfect morning for a half marathon race! My goal was 1:30:00 but the weather was perfect, I felt really good and God answered my prayers with an <strong>official time, and personal best, of 1:28:59</strong> (that&#8217;s a 4:14 kilometer pace for 21.1km) and a chip time of 1:28:54 (obviously I was very well positioned being only 5 seconds behind the start line). The rest of my stats are available online at <a href="http://sportstats.ca/display-results.php?racecode=45524&amp;first=STEFAN&amp;last=CAMERON&amp;city=Ottawa">Sportstats</a>. (For comparison, my fastest time on record, so far, had been 1:36:54 at the Ottawa Race Weekend 2009 Half Marathon last May.)</p>
<p>This being only the second annual Army Run, the race was still small in comparison with the Ottawa Race Weekend. There were just under half the number of participants at a total of 4270 runners which made it much more enjoyable for me. Don&#8217;t get me wrong: it&#8217;s awesome to see and be with all those runners but bigger crowds pose more logistical challenges than smaller ones.</p>
<p>This race was special, being a way for Canadian civilians to support their troops and for the troops to say &#8220;thanks&#8221; for the support. A cannon was fired instead of the usual blow horn for the start of the race, a group of injured soldiers (one single-leg amputee hoping to break a 1:20:00 record, one double-leg amputee and others in race wheelchairs) participated, military bands were playing at various locations throughout the course and a group of soldiers were just beyond the finish line handing-out the dog tag-style finisher medals. Pretty cool!</p>
<p><img src="http://forms.stefcameron.com/images/ArmyRun2009/ArmyRun2009-1.jpg"><br />A military band at the start line.</p>
<p><img src="http://forms.stefcameron.com/images/ArmyRun2009/ArmyRun2009-2.jpg"><br />My sprint to the finish line &#8212; you can see I&#8217;m just about to cross over and the official time clock reads 1:28:58.</p>
<p><img src="http://forms.stefcameron.com/images/ArmyRun2009/ArmyRun2009-3.jpg"><br />Few! Those 16 weeks of hard training really paid off!!! :)</p>
<img src="http://feeds.feedburner.com/~r/SConForms/~4/8sgHlExr2iI" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2009/09/20/army-run-2009-race-results/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Vote for your Favorite Next Feature</title>
		<link>http://forms.stefcameron.com/2009/09/15/vote-for-your-favorite-next-feature/</link>
		<comments>http://forms.stefcameron.com/2009/09/15/vote-for-your-favorite-next-feature/#comments</comments>
		<pubDate>Tue, 15 Sep 2009 16:08:50 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Designer]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/2009/09/15/vote-for-your-favorite-next-feature/</guid>
		<description><![CDATA[Now that LC Designer ES2 (9.0) is in beta, the team is setting their sites on the next release. I invite you to start voting on what you would most like to see in the new version by checking-out the new Featur-O-meter poll.
 
The LC Designer ES2 (9.0) poll results are now archived here.
]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/6ih_hywwlflPQYtfK9nvJGyH2Gk/0/da"><img src="http://feedads.g.doubleclick.net/~a/6ih_hywwlflPQYtfK9nvJGyH2Gk/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/6ih_hywwlflPQYtfK9nvJGyH2Gk/1/da"><img src="http://feedads.g.doubleclick.net/~a/6ih_hywwlflPQYtfK9nvJGyH2Gk/1/di" border="0" ismap="true"></img></a></p><p>Now that LC Designer ES2 (9.0) is in <a href="http://blogs.adobe.com/mtg/2009/07/adobe_livecycle_es_next_beta_a.html">beta</a>, the team is setting their sites on the next release. I invite you to <strong>start voting </strong>on what you would most like to see in the new version by checking-out the <a href="http://forms.stefcameron.com/featur-o-meter/">new Featur-O-meter poll</a>.</p>
<p align="center"><a href="http://forms.stefcameron.com/featur-o-meter/"><img src="http://forms.stefcameron.com/images/featur-o-meter.jpg"></a> </p>
<p>The LC Designer ES2 (9.0) poll results are now <a href="http://forms.stefcameron.com/featur-o-meter-designer-90/">archived here</a>.</p>
<img src="http://feeds.feedburner.com/~r/SConForms/~4/syDQk_glZpc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2009/09/15/vote-for-your-favorite-next-feature/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Schema Metadata</title>
		<link>http://forms.stefcameron.com/2009/08/28/schema-metadata/</link>
		<comments>http://forms.stefcameron.com/2009/08/28/schema-metadata/#comments</comments>
		<pubDate>Sat, 29 Aug 2009 03:48:35 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[Data Binding]]></category>
		<category><![CDATA[Designer]]></category>
		<category><![CDATA[Scripting]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[XFA]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/2009/08/28/schema-metadata/</guid>
		<description><![CDATA[My first tutorial on XML schemas explained how to connect your form to a schema however it did not show some of the Data View palette&#8217;s special features with respect to metadata in XML schemas.
Using metadata based on a combination of the XML Schema appInfo and Dublin Core title and description elements, you can influence [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/o6hcIVYdbVASFksHgbMV3vl7mZc/0/da"><img src="http://feedads.g.doubleclick.net/~a/o6hcIVYdbVASFksHgbMV3vl7mZc/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/o6hcIVYdbVASFksHgbMV3vl7mZc/1/da"><img src="http://feedads.g.doubleclick.net/~a/o6hcIVYdbVASFksHgbMV3vl7mZc/1/di" border="0" ismap="true"></img></a></p><p>My first tutorial on XML schemas explained how to <a href="http://forms.stefcameron.com/2009/08/03/connecting-to-a-schema/">connect your form to a schema</a> however it did not show some of the Data View palette&#8217;s special features with respect to metadata in XML schemas.</p>
<p>Using metadata based on a combination of the XML Schema <a href="http://www.w3.org/TR/xmlschema-1/#element-appinfo">appInfo</a> and Dublin Core <a href="http://dublincore.org/documents/2008/01/14/dcmi-terms/#elements-title">title</a> and <a href="http://dublincore.org/documents/2008/01/14/dcmi-terms/#elements-description">description</a> elements, you can influence how the Data Connection Wizard creates fields you drag and drop from the data connection tree into your form. You can also direct the Data View palette to show some of this information in the Schema Data Connection Tree that it displays.</p>
<p><span id="more-428"></span>
<p>To demonstrate these features, I have <a href="http://forms.stefcameron.com/samples/data-binding/schema/movieRental-meta.xsd">extended</a> the <a href="http://forms.stefcameron.com/samples/data-binding/schema/movieRental.xsd">original</a> movie rental schema by adding metadata to its schema elements.<br />
<h2>Element Descriptions</h2>
<p>Sometimes a schema element&#8217;s purpose or use isn&#8217;t immediately clear based on its name and/or other properties. For example, just by seeing that the schema has a &#8220;customer.account&#8221; element wouldn&#8217;t necessarily tell you that this element should be empty for a new customer (since the system would generate a new account number upon submission of the customer&#8217;s first movie rental order). To clarify the use of this element, a description can be provided:</p>
<pre><code>&lt;xs:element name="account" type="xs:string" minOccurs="0"&gt;
    &lt;xs:annotation&gt;
        &lt;xs:appinfo&gt;
            &lt;dc:description&gt;
                Customer's account number (empty if it's a new customer).
            &lt;/dc:description&gt;
        &lt;/xs:appinfo&gt;
    &lt;/xs:annotation&gt;
&lt;/xs:element&gt;</code></pre>
<p>Using the &#8220;Data View palette &gt; Palette menu button <img style="display: inline" src="http://forms.stefcameron.com/images/SchemaMetadata/SchemaMetadata-6.jpg"> &gt; &#8216;Show Both&#8217; command&#8221;, you can see the &lt;dc:description&gt; metadata associated with elements in your schema right within the Data Connection Tree:</p>
<p><img src="http://forms.stefcameron.com/images/SchemaMetadata/SchemaMetadata-1.jpg"> </p>
<p>Note that the description element must be part of the Dublin Core namespace (xmlns:dc=http://purl.org/dc/elements/1.1/) and must be contained within the XML Schema //annotation/appInfo elements in order for the Data Connection Wizard to detect it.</p>
<h2>Form Object Captions</h2>
<p>Often times schemas are defined at a corporate level because they can represent business rules and describe how data must be structured for its systems to be able to interpret it correctly. In those cases, it may be useful to also influence/dictate the labels that should be used to identify fields associated to certain schema elements. This can also be achieved with metadata by specifying title information:</p>
<pre><code>&lt;xs:element name="account" type="xs:string" minOccurs="0"&gt;
    &lt;xs:annotation&gt;
        &lt;xs:appinfo&gt;
            &lt;dc:title&gt;Account #:&lt;/dc:title&gt;
        &lt;/xs:appinfo&gt;
    &lt;/xs:annotation&gt;
&lt;/xs:element&gt;</code></pre>
<p>Unlike descriptive metadata, this information is not displayed in the Data Connection Tree. Instead, it is used by the Data Connection Wizard when you drag and drop a schema element from the Data Connection Tree into your form.</p>
<p>Remember that, in the original schema (that didn&#8217;t have any metadata), generated fields would get captions similar to their schema element names. For example,&nbsp; dragging the &#8220;customer.account&#8221; field into a form would produce a field with &#8220;Account&#8221; as its caption. With the title metadata as defined above, the generated caption would instead be &#8220;Account #:&#8221;, as in the image below:</p>
<p><img src="http://forms.stefcameron.com/images/SchemaMetadata/SchemaMetadata-2.jpg"> </p>
<p>Note that the title element must be part of the Dublin Core namespace (xmlns:dc=http://purl.org/dc/elements/1.1/) and must be contained within the XML Schema //annotation/appInfo elements in order for the Data Connection Wizard to detect it.</p>
<h2>Extra Descriptive Information</h2>
<p>There&#8217;s one more way to provide information related to an element in a schema: Any text that is directly specified within an XML Schema //annotation/appInfo element (and is <strong>not</strong> further contained within a Dublin Core title or description element) is interpreted as extra &#8220;descriptive information&#8221;. When the element is dragged and dropped into a form, this text will be imported and associated with the generated field within a &lt;desc&gt; node, <em>provided the &#8220;Generate Descriptive Information&#8221; option is checked</em> in the &#8220;Data View palette &gt; Palette menu button <img style="display: inline" src="http://forms.stefcameron.com/images/SchemaMetadata/SchemaMetadata-6.jpg"> &gt; Options dialog&#8221;:</p>
<p><img src="http://forms.stefcameron.com/images/SchemaMetadata/SchemaMetadata-3.jpg"> </p>
<p>For example, the &#8220;returnBy&#8221; schema element is defined as follows:</p>
<pre><code>&lt;xs:element name="returnBy" type="xs:date"&gt;
    &lt;xs:annotation&gt;
        ...
        &lt;xs:appinfo&gt;
            Movies must be returned by 11:59pm on this date.
        &lt;/xs:appinfo&gt;
        &lt;xs:appinfo&gt;
            The late fee is is $0.50/hour.
        &lt;/xs:appinfo&gt;
    &lt;/xs:annotation&gt;
&lt;/xs:element&gt;</code></pre>
<p>Dragging and dropping that element into your form would produce the following field mark-up in the XML Source view:</p>
<pre><code>&lt;field name="returnBy"&gt;
    ...
    &lt;desc&gt;
        &lt;text name="Schema Annotation"&gt;
            Movies must be returned by 11:59pm on this date.
        &lt;/text&gt;
        &lt;text name="Schema Annotation 2"&gt;
            The late fee is is $0.50/hour.
        &lt;/text&gt;
    &lt;/desc&gt;
&lt;/field&gt;</code></pre>
<p>The Info palette could then be used to view the contents of all nodes inside the selected field&#8217;s &lt;desc&gt; node:</p>
<p><img src="http://forms.stefcameron.com/images/SchemaMetadata/SchemaMetadata-4.jpg"> </p>
<p>You can associate any number of extra &#8220;descriptive information&#8221; metadata elements to a single schema element definition. Each one would be imported as a separate &lt;text name=&#8221;Schema Annotation {x}&#8221;&gt; node within the associated form object&#8217;s &lt;desc&gt; node</p>
<p>This information can also be viewed within the Data View palette by choosing the &#8220;Palette menu button <img style="display: inline" src="http://forms.stefcameron.com/images/SchemaMetadata/SchemaMetadata-6.jpg"> &gt; &#8216;Show Info&#8217; command&#8221;. This will display the Info Panel in the bottom half of the palette. Selecting the &#8220;returnBy&#8221; schema element would then display the following information:</p>
<ul>
<li>XFA object name (returnBy);
<li>associated XFA object type (date/time field, since the schema defines its type as &#8220;date&#8221;);
<li>occurrence (single since it isn&#8217;t repeatable like the &#8220;movie&#8221; element, for example); and
<li>all other metadata identified as &#8220;descriptive info&#8221; associated to the element.</li>
</ul>
<p><img src="http://forms.stefcameron.com/images/SchemaMetadata/SchemaMetadata-5.jpg"> </p>
<h3>Script Access</h3>
<p>Finally, the descriptive information found in a form object&#8217;s //desc/text nodes can be retrieved via script by accessing its &#8220;desc&#8221; node property and iterating through all child nodes that are of type &#8220;text&#8221; and have &#8220;Schema Annotation&#8221; in their name.</p>
<p>For example, to output the two descriptions in the &#8220;returnBy&#8221; field (as defined above) to the <a href="http://forms.stefcameron.com/2006/05/05/debugging-scripts/">JavaScript Console</a> in Acrobat, you could use the following script:</p>
<pre><code>// JavaScript:
var descList = returnBy.desc.nodes;
for (var i = 0; i &lt; descList.length; i++)
{
    var item = descList.item(i);
    if (item.className == "text" &amp;&amp; item.name &amp;&amp;
            item.name.indexOf("Schema Annotation") == 0)
    {
        console.println(item.value);
    }
}</code></pre>
<p>With a little more effort, you could parse-out all sorts of useful information provided by this type of metadata in your schemas though, most of the time, that information can usually be expressed in real schema mark-up (e.g. list items and values).</p>
<h2>Combinations</h2>
<p>Of course, you aren&#8217;t limited to using a single type of metadata on a given schema element: You can combine them to provide the degree of information you require for any element. For example, the &#8220;customer.account&#8221; element specifies both title and description metadata while the &#8220;returnBy&#8221; element specifies title and descriptive information metadata.</p>
<img src="http://feeds.feedburner.com/~r/SConForms/~4/BBovGJqOQfY" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2009/08/28/schema-metadata/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>Adobe MAX 2009 Lab Update</title>
		<link>http://forms.stefcameron.com/2009/08/24/adobe-max-2009-lab-update/</link>
		<comments>http://forms.stefcameron.com/2009/08/24/adobe-max-2009-lab-update/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 17:00:33 +0000</pubDate>
		<dc:creator>Stefan Cameron</dc:creator>
				<category><![CDATA[CM]]></category>
		<category><![CDATA[Conferences]]></category>
		<category><![CDATA[LiveCycle]]></category>

		<guid isPermaLink="false">http://forms.stefcameron.com/2009/08/24/adobe-max-2009-lab-update/</guid>
		<description><![CDATA[We have been hard at work on our Solution Accelerator lab (filter by Speaker and choose my name, &#8220;Cameron, Stefan&#8221;). Now that the content is coming together, there have been a few changes which I thought I should mention in light of my previous post.
In order to ensure the lab is successful in the short [...]]]></description>
			<content:encoded><![CDATA[
<p><a href="http://feedads.g.doubleclick.net/~a/9JjXRLrmwTbwEnw2AEdRRxLS_YQ/0/da"><img src="http://feedads.g.doubleclick.net/~a/9JjXRLrmwTbwEnw2AEdRRxLS_YQ/0/di" border="0" ismap="true"></img></a><br/>
<a href="http://feedads.g.doubleclick.net/~a/9JjXRLrmwTbwEnw2AEdRRxLS_YQ/1/da"><img src="http://feedads.g.doubleclick.net/~a/9JjXRLrmwTbwEnw2AEdRRxLS_YQ/1/di" border="0" ismap="true"></img></a></p><p>We have been hard at work on our <a href="http://max.adobe.com/scheduler/#view=1">Solution Accelerator lab</a> (filter by Speaker and choose my name, &#8220;Cameron, Stefan&#8221;). Now that the content is coming together, there have been a few changes which I thought I should mention in light of my <a href="http://forms.stefcameron.com/2009/07/22/adobe-max-2009/">previous post</a>.</p>
<p>In order to ensure the lab is successful in the short amount of time we have (90 minutes) to build a small end-to-end solution, the Content Creation (CCR) and Correspondence Generation (CGR) building blocks will no longer be featured. Instead, we will feature the following building blocks, which should give you a taste for their power to accelerate your own solutions:</p>
<ul>
<li><a href="http://www.adobe.com/devnet/livecycle/solutions/bb_selection_capture.html">Selection and Capture (SNC)</a> &#8212; capture data and guide users through filling specific forms within a given set;</li>
<li><a href="http://www.adobe.com/devnet/livecycle/solutions/review_buildingblock.html">Review, Commenting and Approval (RCA)</a> &#8212; review the submitted forms and approve or reject as needed;</li>
<li><a href="http://www.adobe.com/devnet/livecycle/solutions/ondemand_buildingblock.html">On-Demand Assembly (ODA)</a> &#8212; automate the creation of a PDF package, a single PDF document containing a copy of submitted forms and other appropriate documentation.</li>
</ul>
<p>In the mean time, here&#8217;s some fun MAX trivia. You never know when it might come in handy&#8230;</p>
<p><img style="visibility: hidden; width: 0px; height: 0px" height="0" src="http://counters.gigya.com/wildfire/IMP/CXNID=2000002.0NXC/bT*xJmx*PTEyNTExMjU*ODkzNjQmcHQ9MTI1MTEyNTU1MDIzMCZwPTc3NDM3MSZkPW1heDA5d2lkZ2V*Jmc9MiZvPTIyNzRhMDcyN2E5NDQzZmY4YjZhNzRkZmM2MWZhZDVjJm9mPTA=.gif" width="0" border="0"> <object id="MaxWidget" codebase="http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab" height="400" width="400" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"><param name="_cx" value="10583"><param name="_cy" value="10583"><param name="FlashVars" value=""><param name="Movie" value="http://max.adobe.com/widget/MaxWidget.swf"><param name="Src" value="http://max.adobe.com/widget/MaxWidget.swf"><param name="WMode" value="Window"><param name="Play" value="0"><param name="Loop" value="-1"><param name="Quality" value="High"><param name="SAlign" value="LT"><param name="Menu" value="-1"><param name="Base" value=""><param name="AllowScriptAccess" value="sameDomain"><param name="Scale" value="NoScale"><param name="DeviceFont" value="0"><param name="EmbedMovie" value="0"><param name="BGColor" value="869CA7"><param name="SWRemote" value=""><param name="MovieData" value=""><param name="SeamlessTabbing" value="1"><param name="Profile" value="-1"><param name="ProfileAddress" value=""><param name="ProfilePort" value="1802317617"><param name="AllowNetworking" value="all"><param name="AllowFullScreen" value="false"><embed src="http://max.adobe.com/widget/MaxWidget.swf" quality="high" bgcolor="#869ca7" width="400" height="400" name="MaxWidget" align="middle" play="true" loop="false" allowscriptaccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.adobe.com/go/getflashplayer" flashvars="crtr=1&amp;gig_lt=1251125489364&amp;gig_pt=1251125550230&amp;gig_g=2"></embed></object></p>
<img src="http://feeds.feedburner.com/~r/SConForms/~4/3WEcUtp-bFc" height="1" width="1"/>]]></content:encoded>
			<wfw:commentRss>http://forms.stefcameron.com/2009/08/24/adobe-max-2009-lab-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
