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

Dennis Sosnoski resolved JIBX-164.
----------------------------------

         Assignee: Dennis Sosnoski
       Resolution: Fixed
    Fix Version/s: JiBX 1.2

Eliminated the requirement for usage="optional" some time ago, and current 
choice handling does check for one and only one instance present.

> Enforce proper cardinality for xsd:choice particles -- one and only one 
> should be tolerated
> -------------------------------------------------------------------------------------------
>
>                 Key: JIBX-164
>                 URL: http://jira.codehaus.org/browse/JIBX-164
>             Project: JiBX
>          Issue Type: Improvement
>          Components: Generator Tools
>    Affects Versions: JiBX 1.1.4
>         Environment: N/A
>            Reporter: Steven E. Harris
>            Assignee: Dennis Sosnoski
>             Fix For: JiBX 1.2
>
>
> Per the following discussion thread on the JiBX-users list
>   Tryng to bind xsd:choice -- JiBX requires each choice to be present
>   http://thread.gmane.org/gmane.comp.java.jibx.users/947
> the current implementation of xsd:choice handling via the "choice=true" 
> qualifier misses an important constraint on xsd:choice particles: exactly one 
> of the choice values must be provided in a valid document instance. At 
> present JiBX forces the mapping to note each choice value as optional 
> ("usage=optional"), and in fact permits all the constituent values to be 
> optional, accepting zero of them being present in an instance document as 
> valid. JiBX should enforce that one and only one choice value is provided for 
> each "choice=true"-qualified structure.
> While on this topic, it's confusing to the mapping author to have to specify 
> "usage=optional" in addition to the "choice=true" qualifier. The optional 
> implication isn't really what's intended here. We're trying to say "one and 
> only one of these", not that "some or all of these are optional". Toward 
> that, I suggest either introducing a "choice" element or at least dropping 
> the requirement to specify "optional=true" on each of the constituent choice 
> values.

-- 
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

        

------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs

Reply via email to