Affects Version/s: JiBX 1.2.2
Fix Version/s: None
Number of attachments :
As per email below.
Subject: Re: [jibx-users] CodeGen - attribute default value
From: Dennis Sosnoski <dms () sosnoski ! com>
Date: 2009-06-20 23:52:18
Message-ID: 4A3D7632.8080509 () sosnoski ! com
[Download message RAW]
Yes, the default="..." is currently ignored by the code generation from
schema. It should be pretty easy to implement, and if you'll add a Jira
to get this in the tracking system I'll make sure it's corrected for the
1.2.2 release (now planned for early July).
Alexander Ziller wrote:
> Hello all
> I m trying to replace our prior XML binding framework JAXB with JiBX since
> it's WAY faster. I only have a few problems so far, most of them are easily
> solved. But no this one:
> When using CodeGen, could it be, that it ignores default values of
> * Schema fragment(s) for this class:
> * <pre>
> * ....
> * <xs:attribute type="xs:string" default="true" name="enabled"/>
> * ....
> The class gets initialized with start value NULL for the field "enabled"
> instead of TRUE. Is this a missing feature?
> I would have to rewrite half of our code because JAXB seems to recognize
> this feature and acts accordingly.