Steven E. Harris wrote:
> Dennis Sosnoski <[EMAIL PROTECTED]> writes:
>
>   
>> Here's a sample from the JiBX build test cases:
>>
>>   <mapping name="myelement" class="simple.MyClass3">
>>     <structure ordered="false" choice="true">
>>       <value name="a" field="a" usage="optional"/>
>>       <value name="b" field="b" usage="optional"/>
>>       <value name="c" field="c" usage="optional"/>
>>       <value name="d" field="d" usage="optional"/>
>>     </structure>
>>     <value name="e" field="e" usage="optional" format="char.string"/>
>>     
>
> I notice that you marked all of the constituent choice values as
> optional. I did fiddle around with this as well, but found that if I
> mark all of them as optional, I've made myself vulnerable to accepting
> a document with /none/ of the choice values present -- even though the
> choice particle is supposed to mandate exactly one value being
> present.
>   

Ah, so that's the difference. It's true that the JiBX handling using 
choice="true" is not completely equivalent to the schema <choice> 
particle, for either marshalling or unmarshalling. It looks like I could 
probably handle the no matching value present case in the code 
generation without too much trouble, so if you want to enter an 
enhancement request Jira for this purpose I'll see about adding it in 
for an upcoming release.

But 100% schema compatibility is definitely not a goal for JiBX 1.X, and 
even for JiBX 2.0 I'm planning for better schema compatibility rather 
than 100%.

> ...
> It's good to see you back posting here. I was getting worried that you
> had abandoned the JiBX project.
>
>   

No, there's no chance of that happening. But I do get busy with support 
for my clients, and with new code, and when I do my attention to the 
mailing lists gets dropped. I've very glad to see the people on the list 
picking up the slack when this happens!

  - Dennis

-------------------------------------------------------------------------
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-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to