<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic optional elements with minOccurs 0 doesn't work? in Alfresco Archive</title>
    <link>https://connect.hyland.com/t5/alfresco-archive/optional-elements-with-minoccurs-0-doesn-t-work/m-p/114658#M80794</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I want to create optional elements in my web forms.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;I've defined a form something like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;xs:complexType name="myType"&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;xs:sequence&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:element name="name" type="xs:normalizedString"/&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:element name="value" type="xs:normalizedString"/&amp;gt;&lt;BR /&gt;&amp;nbsp; &amp;lt;/xs:sequence&amp;gt;&lt;BR /&gt;&amp;lt;/xs:complexType&amp;gt;&lt;BR /&gt;&lt;BR /&gt;…&lt;BR /&gt;&amp;lt;xs:element name="theName" type="myNS:myType minOccurs="0" maxOccurs="1"/&amp;gt;&lt;BR /&gt;…&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;Now in my form the "theName" element in the form is still required and I cannot save the form until I add it. Is this not the way of making optional elements? Did anyone come into this "problem"? Or anyone has a solution for it?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am doing this on Alfresco 2.0.1 Enterprise&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BjÃ¶rn&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 08 Jun 2007 09:12:21 GMT</pubDate>
    <dc:creator>bjornl</dc:creator>
    <dc:date>2007-06-08T09:12:21Z</dc:date>
    <item>
      <title>optional elements with minOccurs 0 doesn't work?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/optional-elements-with-minoccurs-0-doesn-t-work/m-p/114658#M80794</link>
      <description>Hi,I want to create optional elements in my web forms.I've defined a form something like this:&amp;lt;xs:complexType name="myType"&amp;gt;&amp;nbsp; &amp;lt;xs:sequence&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:element name="name" type="xs:normalizedString"/&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:element name="value" type="xs:normalizedString"/&amp;gt;&amp;nbsp; &amp;lt;/xs:sequence&amp;gt;&amp;amp;l</description>
      <pubDate>Fri, 08 Jun 2007 09:12:21 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/optional-elements-with-minoccurs-0-doesn-t-work/m-p/114658#M80794</guid>
      <dc:creator>bjornl</dc:creator>
      <dc:date>2007-06-08T09:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: optional elements with minOccurs 0 doesn't work?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/optional-elements-with-minoccurs-0-doesn-t-work/m-p/114659#M80795</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;xs:element name="required_string" type="xs:normalizedString" minOccurs="1" maxOccurs="1"/&amp;gt;&lt;BR /&gt;&amp;lt;xs:element name="optional_string" type="xs:normalizedString" minOccurs="0" maxOccurs="1"/&amp;gt;&lt;BR /&gt;&lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Jun 2007 04:10:42 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/optional-elements-with-minoccurs-0-doesn-t-work/m-p/114659#M80795</guid>
      <dc:creator>arielb</dc:creator>
      <dc:date>2007-06-10T04:10:42Z</dc:date>
    </item>
    <item>
      <title>Re: optional elements with minOccurs 0 doesn't work?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/optional-elements-with-minoccurs-0-doesn-t-work/m-p/114660#M80796</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;i apologize - i didn't read your post closely enough.&amp;nbsp; i'd need to run some tests to figure out exactly what's going on - but intuitively, i think it has to do with where the xsi:nillable attribute is being inserted.&amp;nbsp; i'll run some tests tomorrow to see exactly what needs to be done here but in the meantime, my suggestion is to use attributes rather than sub elements if that works for you.&amp;nbsp; that should make the nillable propogate properly, so instead, try this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;PRE class="language-none line-numbers"&gt;&lt;CODE&gt;&lt;BR /&gt;&amp;lt;xs:complexType name="myType"&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:attribute name="name" type="xs:normalizedString" use="required"/&amp;gt;&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;xs:attribute name="value" type="xs:normalizedString" use="required"/&amp;gt;&lt;BR /&gt;&amp;lt;/xs:complexType&amp;gt;&lt;BR /&gt;&lt;BR /&gt;…&lt;BR /&gt;&amp;lt;xs:element name="theName" type="myNS:myType minOccurs="0" maxOccurs="1"/&amp;gt; &lt;SPAN class="line-numbers-rows"&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;SPAN&gt;‍&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/CODE&gt;&lt;/PRE&gt;&lt;BR /&gt;&lt;SPAN&gt;please let me know if that works.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sun, 10 Jun 2007 21:01:06 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/optional-elements-with-minoccurs-0-doesn-t-work/m-p/114660#M80796</guid>
      <dc:creator>arielb</dc:creator>
      <dc:date>2007-06-10T21:01:06Z</dc:date>
    </item>
    <item>
      <title>Re: optional elements with minOccurs 0 doesn't work?</title>
      <link>https://connect.hyland.com/t5/alfresco-archive/optional-elements-with-minoccurs-0-doesn-t-work/m-p/114661#M80797</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi again.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I've tried using attributes as you suggest, to create complex types. However I receive a NullPointerException from Chiba when using attributes. Is this a well-known problem?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;regards,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;BjÃ¶rn&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Jun 2007 11:41:16 GMT</pubDate>
      <guid>https://connect.hyland.com/t5/alfresco-archive/optional-elements-with-minoccurs-0-doesn-t-work/m-p/114661#M80797</guid>
      <dc:creator>bjornl</dc:creator>
      <dc:date>2007-06-19T11:41:16Z</dc:date>
    </item>
  </channel>
</rss>

