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
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
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
jibx-devs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-devs