[ 
http://jira.codehaus.org/browse/JIBX-348?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Dennis Sosnoski updated JIBX-348:
---------------------------------

    Assignee: Dennis Sosnoski

Although this may be counterintuitive, it's by design. <collection> binding 
components always represent the equivalent of minOccurs="0" 
maxOccurs="unbounded". The only reason you'd need usage="optional" on a 
<collection> element of the binding is if there were a wrapper element name 
associated with the collection, and that wrapper element were itself optional - 
corresponding to this type of schema structure:

  <xs:element name="wrapper">
    <xs:complexType>
      <xs:complexContent>
        <xs:sequence>
          <xs:element name="value" type="xs:string"/>
        </xs:sequence>
      </xs:complexContent>
    </xs:complexType>
  </xs:element>

> codegen - generating <collection> in binding xml without usage=optional with 
> minOccurs=0
> ----------------------------------------------------------------------------------------
>
>                 Key: JIBX-348
>                 URL: http://jira.codehaus.org/browse/JIBX-348
>             Project: JiBX
>          Issue Type: Bug
>          Components: CodeGen
>    Affects Versions: JiBX 1.2.1
>            Reporter: Arnabkanti
>            Assignee: Dennis Sosnoski
>
> codegen is generating binding xml with <collection> element having no 
> usage=optional even when the minOccurs is set to zero (maxOccurs=unbounded)
> XSD Snippet:
> <xsd:complexType name="ABC">
>               <xsd:sequence>
>                       <xsd:element type="test:xxT" name="xx"
>                               minOccurs="0" maxOccurs="unbounded" />
>                </xsd:sequence>
> </xsd:complexType>
> binding Xml:
>  <collection get-method="getXxs" set-method="setXxs">
>       <structure map-as="ns2:xxT" name="xx"/>
>     </collection>
> Thanks,
> Arnab

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

------------------------------------------------------------------------------
SOLARIS 10 is the OS for Data Centers - provides features such as DTrace,
Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW
http://p.sf.net/sfu/solaris-dev2dev
_______________________________________________
jibx-devs mailing list
jibx-devs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to