users@jaxb.java.net

Re: Strange output for nillable elements at marshall time

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Fri, 29 Aug 2003 15:35:40 -0700

> You cannot have what you wish unless you define your type as a
> derivative of xsd:string where the empty string is a valid value and
> then in your code you can covert the empty string to null and vice versa
> (but this gives the obvious problem of how to actually pass an empty
> string?).

Or alternatively you could define the type as an union between date and
empty string. In that way, you can either pass in Calendar or "" to get
the desired output.


regards,
--
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net