What I had in mind was for you to manually edit your xml binding after
xsd2jibx generates it adding the default attribute, and just add the
default values there. 

Then whenever you unmarshall a document if any of the optional
attributes aren't there, then JiBX will set the values of your fields to
the default values automatically. This isn't exactly what you asked for,
but it seems like it might meet your requirements, and possibly save you
from having to call a bunch of "hasAttribute" methods and then
conditionally setting some defaults yourself.
 
Mocky


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Lorelei
Tosello
Sent: Wednesday, September 21, 2005 8:03 AM
To: [email protected]
Subject: RE: [jibx-users] new functionality...


Thank you for your response but I can’t change the xsd document. I can
only use java classes…
Moreover I have tested your solution and I don’t see any changing when I
use “default=” or not… 
Are there more compilation options than those explained on the home page
xsd2jibx site? (http://jibx.sourceforge.net/xsd2jibx/index.html)
 
 
Lorelei Tosello



De : [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] De la part de Mocky
Habeeb
Envoyé : mercredi 21 septembre 2005 12:38
À : [email protected]
Objet : RE: [jibx-users] new functionality...
 
I'm pretty sure this functionality does not exist currently in xsd2jibx.
Is it the case that using defaults (e.g. <value name="macStage"
field="macStage" usage="optional" default="4191526"/> )does not meet
your needs?
 
Mocky 




-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. Download
it for free - -and be entered to win a 42" plasma tv or your very own
Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
jibx-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jibx-users

Reply via email to