Hi Dennis!

Thanks for the prompt answer.

When I use your mentioned solution, I get the following error:

java.lang.IllegalStateException: Internal error - content not ordered

Any idea?
Thanks,
Thomas

Dennis Sosnoski wrote:

You should be able to do this by just using a separate <structure> for the unordered elements:

 <mapping ...>
   <value style="attribute" name="a" field="a"/>
   <value style="attribute" name="b" field="b"/>
   <structure ordered="false">
     <collection field="c" item-type="..." usage="optional"/>
     <collection field="d" item-type="..." usage="optional"/>
   </structure>
 </mapping>

I agree there's no real reason that attributes should have to be optional when they're in an unordered list, except for consistency. The consistency issue is an important one, though - I just solved a customer problem where they were getting bad code generation from JiBX because they'd used <structure> elements in an unordered list without making them optional.

 - Dennis

Thomas Behrends wrote:

Hi!

Is there any way to create a unordered mapping with non-optional attribute-values? Whenever I use ordered="false" the compiler want's me to make all value-element optional, even when they are only attributes and no elements.

Example:

<binding ... ordered="false">
   <value style="attribute" name="a" field="a"/>
   <value style="attribute" name="b" field="b"/>
   <collection field="c" item-type="..." usage="optional"/>
   <collection field="d" item-type="..." usage="optional"/>
</binding>

The compiler doesn't accept this, because the attributes a and b are not optional.

Thanks,
Tom




------------------------------------------------------- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org _______________________________________________ jibx-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jibx-users




------------------------------------------------------- This SF.Net email is sponsored by: GNOME Foundation Hackers Unite! GUADEC: The world's #1 Open Source Desktop Event. GNOME Users and Developers European Conference, 28-30th June in Norway http://2004/guadec.org _______________________________________________ jibx-users mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to