Quoting Ias <[EMAIL PROTECTED]>:

> According to JAXB 1.0 spec final draft, isSet feature described in section
> 4.5.4 demands one more additioinal method: unsetProperty() is used to
> discard a set value of a property. The real problem is, this unsetProperty
> method requires a subsequent call to getProperty to obtain the default value
> when the schema in question specifies that.

I can't follow here. Do you mean that

- the specification states that "whenever I as the JAXB user call
  unsetProperty(), I have to call getProperty() immediately thereafter" or
- if I call getProperty() after unsetProperty(), I receive the configured
  default value, if any

In the former case I see no reason for special handling, in the latter
case I cannot see a problem, because this is just what I would expect.
Or do I get you completely wrong?


> Moreover, section 4.5 states how
> a property's value should be set with the schema default value prior to
> setting value by unmarshalling or invoking its mutation methods. As far as
> I've learned JaxMe 2, there's no way to access "default" attribute of
> "<xs:element>" and "<xs:attribute>".

If this is not yet possible, it has to be changed, of course. JaxMeXS
is able to provide the default value, at least on the syntax level.
Possibly not on the logical level, but that's just a matter of omission.
The SimpleTypeSG of JaxMe 2 is prepared for default values via the
method "getCastFromString" (the one without a JavaMethod argument, that
is).


> In conclusion, unsetProperty is necessary for a list property and a simple
> property with a non-reference base type along with isSetProperty and the
> exact implementation necessitates JaxMe 2 to have an access to schema
> default values.

I can see the necessity for primitive values. Why is it necessary for
list properties? In either case, I see no problem in providing an "unset"
method.


Jochen



-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
_______________________________________________
Jaxme-jaxb-dev mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jaxme-jaxb-dev

Reply via email to