<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Schema Metadata</title>
	<atom:link href="http://forms.stefcameron.com/2009/08/28/schema-metadata/feed/" rel="self" type="application/rss+xml" />
	<link>http://forms.stefcameron.com/2009/08/28/schema-metadata/</link>
	<description>Building intelligent forms using Adobe LiveCycle Designer</description>
	<lastBuildDate>Sat, 20 Mar 2010 21:36:17 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Duane</title>
		<link>http://forms.stefcameron.com/2009/08/28/schema-metadata/comment-page-1/#comment-56671</link>
		<dc:creator>Duane</dc:creator>
		<pubDate>Wed, 30 Sep 2009 05:04:36 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/2009/08/28/schema-metadata/#comment-56671</guid>
		<description>Thanks again for your help Stefan.  I had not flushed the cache properly in XMLSpy and had been unwittingly validating against the wrong schema for a while.
The sample works great, and I&#039;ve been able to get the workaround into our forms.
Please pass my thanks on to John as well.

I found it a little strange that attempting use the script to rename the &lt;value&gt; element as &lt;NamespacePrefix:value&gt; caused an error with LoadXML.  However as you&#039;ve demonstrated, &lt;value xmlns=&quot;myNamespace&quot;&gt; works just as well, so I&#039;m not worrying about it.

Cheers
- Duane</description>
		<content:encoded><![CDATA[<p>Thanks again for your help Stefan.  I had not flushed the cache properly in XMLSpy and had been unwittingly validating against the wrong schema for a while.<br />
The sample works great, and I&#8217;ve been able to get the workaround into our forms.<br />
Please pass my thanks on to John as well.</p>
<p>I found it a little strange that attempting use the script to rename the &lt;value&gt; element as &lt;NamespacePrefix:value&gt; caused an error with LoadXML.  However as you&#8217;ve demonstrated, &lt;value xmlns=&#8221;myNamespace&#8221;&gt; works just as well, so I&#8217;m not worrying about it.</p>
<p>Cheers<br />
- Duane</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2009/08/28/schema-metadata/comment-page-1/#comment-56633</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Tue, 29 Sep 2009 12:55:14 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/2009/08/28/schema-metadata/#comment-56633</guid>
		<description>Duane,

I&#039;m glad you figured it out! In case you&#039;re still curious, &lt;a href=&quot;http://forms.stefcameron.com/samples/comment-help/post20090828-com12.xsd&quot; rel=&quot;nofollow&quot;&gt;this&lt;/a&gt; is the schema I used for my test (the namespace is different but as long as namespaces match, that shouldn&#039;t matter). The listbox was bound to &quot;$.BusinessName&quot; which had to be specified manually in the &quot;Object palette &gt; Binding tab &gt; Default Binding property&quot;.

I will be blogging about multi-selection lists, namespaces and schemas shortly. I will provide a working sample along with a couple of caveats I have come across.</description>
		<content:encoded><![CDATA[<p>Duane,</p>
<p>I&#8217;m glad you figured it out! In case you&#8217;re still curious, <a href="http://forms.stefcameron.com/samples/comment-help/post20090828-com12.xsd" rel="nofollow">this</a> is the schema I used for my test (the namespace is different but as long as namespaces match, that shouldn&#8217;t matter). The listbox was bound to &#8220;$.BusinessName&#8221; which had to be specified manually in the &#8220;Object palette > Binding tab > Default Binding property&#8221;.</p>
<p>I will be blogging about multi-selection lists, namespaces and schemas shortly. I will provide a working sample along with a couple of caveats I have come across.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duane</title>
		<link>http://forms.stefcameron.com/2009/08/28/schema-metadata/comment-page-1/#comment-56622</link>
		<dc:creator>Duane</dc:creator>
		<pubDate>Tue, 29 Sep 2009 09:04:26 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/2009/08/28/schema-metadata/#comment-56622</guid>
		<description>Hello Stefan,
Sorry for bogarting your blog on this issue ...

I was finally able to bind correctly to the schema - I was making a silly error in XMLSpy.  The proper schema element for the listbox is as reported above (repeated here for clarity)

&lt;xsd:element name=&quot;AssociatedBusinessName&quot; minOccurs=&quot;0&quot; &gt;
&lt;xsd:complexType&gt;
&lt;xsd:sequence&gt;
&lt;xsd:element name=&quot;value&quot; type=&quot;doc:TextType&quot; minOccurs=&quot;0&quot; maxOccurs=&quot;unbounded&#039;/&gt;
&lt;/xsd:sequence&gt;
&lt;/xsd:complexType&gt;
&lt;/xsd:element&gt; 

The binding on the field would be set to $.AssociatedBusinessName

Thanks for your help.
- Duane</description>
		<content:encoded><![CDATA[<p>Hello Stefan,<br />
Sorry for bogarting your blog on this issue &#8230;</p>
<p>I was finally able to bind correctly to the schema &#8211; I was making a silly error in XMLSpy.  The proper schema element for the listbox is as reported above (repeated here for clarity)</p>
<p>&lt;xsd:element name=&#8221;AssociatedBusinessName&#8221; minOccurs=&#8221;0&#8243; &gt;<br />
&lt;xsd:complexType&gt;<br />
&lt;xsd:sequence&gt;<br />
&lt;xsd:element name=&#8221;value&#8221; type=&#8221;doc:TextType&#8221; minOccurs=&#8221;0&#8243; maxOccurs=&#8221;unbounded&#8217;/&gt;<br />
&lt;/xsd:sequence&gt;<br />
&lt;/xsd:complexType&gt;<br />
&lt;/xsd:element&gt; </p>
<p>The binding on the field would be set to $.AssociatedBusinessName</p>
<p>Thanks for your help.<br />
- Duane</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duane</title>
		<link>http://forms.stefcameron.com/2009/08/28/schema-metadata/comment-page-1/#comment-56611</link>
		<dc:creator>Duane</dc:creator>
		<pubDate>Tue, 29 Sep 2009 06:02:21 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/2009/08/28/schema-metadata/#comment-56611</guid>
		<description>Hi again Stefan
I&#039;ve been working through this all day.  It must be something different between our schemas.  With the workaround that you and John developed - were you able to successfully validate the XML produced against your schema?  I can get the data, and can manipulate the dataNode, but it still doesn&#039;t validate.

Also a side point - I noticed that if I attempted to change the dataNode from 
&lt; value &gt;
to
&lt; doc:value &gt; (as doc is my namespace prefix)
instead of &lt; value xmlns=&#039;myNamespace&#039; &gt;
as you have in your sample, I got a General Error being thrown when it attempted to load the XML.  Maybe it doesn&#039;t like the colon?

- Duane</description>
		<content:encoded><![CDATA[<p>Hi again Stefan<br />
I&#8217;ve been working through this all day.  It must be something different between our schemas.  With the workaround that you and John developed &#8211; were you able to successfully validate the XML produced against your schema?  I can get the data, and can manipulate the dataNode, but it still doesn&#8217;t validate.</p>
<p>Also a side point &#8211; I noticed that if I attempted to change the dataNode from<br />
&lt; value &gt;<br />
to<br />
&lt; doc:value &gt; (as doc is my namespace prefix)<br />
instead of &lt; value xmlns=&#8217;myNamespace&#8217; &gt;<br />
as you have in your sample, I got a General Error being thrown when it attempted to load the XML.  Maybe it doesn&#8217;t like the colon?</p>
<p>- Duane</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duane</title>
		<link>http://forms.stefcameron.com/2009/08/28/schema-metadata/comment-page-1/#comment-56603</link>
		<dc:creator>Duane</dc:creator>
		<pubDate>Tue, 29 Sep 2009 02:07:08 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/2009/08/28/schema-metadata/#comment-56603</guid>
		<description>Whoops .. Sorry Stefan - spelled your named wrong above ^^^^</description>
		<content:encoded><![CDATA[<p>Whoops .. Sorry Stefan &#8211; spelled your named wrong above ^^^^</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Duane</title>
		<link>http://forms.stefcameron.com/2009/08/28/schema-metadata/comment-page-1/#comment-56602</link>
		<dc:creator>Duane</dc:creator>
		<pubDate>Tue, 29 Sep 2009 02:06:10 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/2009/08/28/schema-metadata/#comment-56602</guid>
		<description>Thank you very much Stephan (and John).

However, what did the schema you use look like for this element, and how did you bind it?

In my implementation, I&#039;ve found that this works if the listbox is single-select, but if I change it to multi-select, then the dataNode is null.

Since it works properly in your sample - it must be because the element definition in the schemas are different (that&#039;s the only thing I can think of).

Thanks
Duane</description>
		<content:encoded><![CDATA[<p>Thank you very much Stephan (and John).</p>
<p>However, what did the schema you use look like for this element, and how did you bind it?</p>
<p>In my implementation, I&#8217;ve found that this works if the listbox is single-select, but if I change it to multi-select, then the dataNode is null.</p>
<p>Since it works properly in your sample &#8211; it must be because the element definition in the schemas are different (that&#8217;s the only thing I can think of).</p>
<p>Thanks<br />
Duane</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2009/08/28/schema-metadata/comment-page-1/#comment-56241</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Wed, 23 Sep 2009 21:07:42 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/2009/08/28/schema-metadata/#comment-56241</guid>
		<description>duane,

I asked some of my colleagues for help on this one and was able to find a workaround with &lt;a href=&quot;http://blogs.adobe.com/formfeed/&quot; rel=&quot;nofollow&quot;&gt;John Brinkman&lt;/a&gt;&#039;s help.

When a multi-selection is made in a list, its rawValue property stores the multi-selection as a new line (\n)-delimited list of strings (in the Form DOM). This value then gets stored in the Data DOM as a series of &lt;value&gt; nodes (as you already know).

Using a data node&#039;s loadXML method, it&#039;s possible to load arbitrary XML into a data node, replacing its current contents. Given this, you could write script in your list&#039;s Exit event which parses the list&#039;s rawValue property, builds an XML string of the properly-namespaced &lt;doc:value&gt; nodes and loads them into the listbox&#039;s data node in the Data DOM:

&lt;pre&gt;&lt;code&gt;// JavaScript (thanks John!):

// build XML string with wrapping &lt;nodeValue&gt; node:
var vList = ListBox1.rawValue.split(&quot;\n&quot;);
var sXML = &quot;&lt;nodeValue&gt;&quot;;
for (var i = 0; i &lt; vList.length; i++)
{
    sXML += &quot;&lt;doc:value xmlns:doc=&#039;doc-namespace&#039;&gt;&quot; +
        vList[i] + &quot;&lt;/doc:value&gt;&quot;;
}
sXML += &quot;&lt;/nodeValue&gt;&quot;;

// load content of &lt;nodeValue&gt; node into ListBox1&#039;s data node,
//  discarding root &lt;nodeValue&gt; node itself:
ListBox1.dataNode.loadXML(sXML, true, true);&lt;/code&gt;&lt;/pre&gt;

The result would look like this, in the output data, assuming you had selected two items in ListBox1:

&lt;pre&gt;&lt;code&gt;&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;xfa:data xmlns:xfa=&quot;http://www.xfa.org/schema/xfa-data/1.0/&quot;&gt;
   &lt;doc:Application xmlns:doc=&quot;doc-namespace&quot;&gt;
      &lt;doc:AssociatedBusinessName&gt;
         &lt;doc:value&gt;name1&lt;/doc:value&gt;
         &lt;doc:value&gt;name2&lt;/doc:value&gt;
      &lt;/doc:AssociatedBusinessName&gt;
   &lt;/doc:Application&gt;
&lt;/xfa:data&gt;&lt;/code&gt;&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>duane,</p>
<p>I asked some of my colleagues for help on this one and was able to find a workaround with <a href="http://blogs.adobe.com/formfeed/" rel="nofollow">John Brinkman</a>&#8217;s help.</p>
<p>When a multi-selection is made in a list, its rawValue property stores the multi-selection as a new line (\n)-delimited list of strings (in the Form DOM). This value then gets stored in the Data DOM as a series of &lt;value> nodes (as you already know).</p>
<p>Using a data node&#8217;s loadXML method, it&#8217;s possible to load arbitrary XML into a data node, replacing its current contents. Given this, you could write script in your list&#8217;s Exit event which parses the list&#8217;s rawValue property, builds an XML string of the properly-namespaced &lt;doc:value> nodes and loads them into the listbox&#8217;s data node in the Data DOM:</p>
<pre><code>// JavaScript (thanks John!):

// build XML string with wrapping &lt;nodeValue> node:
var vList = ListBox1.rawValue.split("\n");
var sXML = "<nodevalue>";
for (var i = 0; i &lt; vList.length; i++)
{
    sXML += "&lt;doc:value xmlns:doc='doc-namespace'>" +
        vList[i] + "&lt;/doc:value>";
}
sXML += "&lt;/nodeValue>";

// load content of &lt;nodeValue> node into ListBox1's data node,
//  discarding root &lt;nodeValue> node itself:
ListBox1.dataNode.loadXML(sXML, true, true);</nodevalue></code></pre>
<p>The result would look like this, in the output data, assuming you had selected two items in ListBox1:</p>
<pre><code>&lt;?xml version="1.0" encoding="UTF-8"?>
&lt;xfa:data xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
   &lt;doc:Application xmlns:doc="doc-namespace">
      &lt;doc:AssociatedBusinessName>
         &lt;doc:value>name1&lt;/doc:value>
         &lt;doc:value>name2&lt;/doc:value>
      &lt;/doc:AssociatedBusinessName>
   &lt;/doc:Application>
&lt;/xfa:data></code></pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2009/08/28/schema-metadata/comment-page-1/#comment-55801</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Thu, 17 Sep 2009 22:29:03 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/2009/08/28/schema-metadata/#comment-55801</guid>
		<description>Bruce,

Thanks! I don&#039;t know if this is officially documented anywhere. It may be buried somewhere deep inside the &lt;a href=&quot;http://partners.adobe.com/public/developer/xml/index_arch.html&quot; rel=&quot;nofollow&quot;&gt;XFA spec&lt;/a&gt; but I&#039;m not sure.</description>
		<content:encoded><![CDATA[<p>Bruce,</p>
<p>Thanks! I don&#8217;t know if this is officially documented anywhere. It may be buried somewhere deep inside the <a href="http://partners.adobe.com/public/developer/xml/index_arch.html" rel="nofollow">XFA spec</a> but I&#8217;m not sure.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Stefan Cameron</title>
		<link>http://forms.stefcameron.com/2009/08/28/schema-metadata/comment-page-1/#comment-55794</link>
		<dc:creator>Stefan Cameron</dc:creator>
		<pubDate>Thu, 17 Sep 2009 21:17:41 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/2009/08/28/schema-metadata/#comment-55794</guid>
		<description>duane,

Your timing is perfect as I&#039;m preparing a blog post on schemas and mutli-selection lists though I had not considered the namespace issue with the generated &lt;value&gt; nodes.

I will investigate further and report back here when I get some answers.</description>
		<content:encoded><![CDATA[<p>duane,</p>
<p>Your timing is perfect as I&#8217;m preparing a blog post on schemas and mutli-selection lists though I had not considered the namespace issue with the generated &lt;value> nodes.</p>
<p>I will investigate further and report back here when I get some answers.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Bruce</title>
		<link>http://forms.stefcameron.com/2009/08/28/schema-metadata/comment-page-1/#comment-55751</link>
		<dc:creator>Bruce</dc:creator>
		<pubDate>Wed, 16 Sep 2009 23:27:09 +0000</pubDate>
		<guid isPermaLink="false">http://forms.stefcameron.com/2009/08/28/schema-metadata/#comment-55751</guid>
		<description>Hi Stefan,

This is a great post.  Is this documented anywhere, I often feel like I&#039;m missing a manual working with Designer.

Thanks again.</description>
		<content:encoded><![CDATA[<p>Hi Stefan,</p>
<p>This is a great post.  Is this documented anywhere, I often feel like I&#8217;m missing a manual working with Designer.</p>
<p>Thanks again.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
