users@jaxb.java.net

Re: Would a XMLGregorianCalendar field marshal as a "datetime" value if not qualified with @XMLSchemaType(name="date")?

From: Wolfgang Laun <wolfgang.laun_at_gmail.com>
Date: Tue, 12 Jan 2010 16:43:26 +0100

On Tue, Jan 12, 2010 at 1:29 AM, KARR, DAVID (ATTCINW) <dk068x_at_att.com>wrote:

> To provide a little more background on this, I think I might be seeing a
> jaxb buglet that created the situation I'm in, but I need to try some
> more experiments. I had an element in a schema that is of type
> "xs:date", but it was wrapped by a local type with an xs:date
> restriction.


Could you please provide the schema code for this "local type"? I can't
imagine
what you are describing. xs:date is a simple type, so how can it be a
"wrapper"
for another XML element?

-W


> The resulting generated code didn't add the
> "@XmlSchemaType(name="date")" annotation, which I think it should have.
> To work around this, would we be able to add a "<xs:annotation>
> <xs:appinfo>" block to the wrapper type to make it somehow generate with
> the "@XmlSchemaType..." annotation? What would that look like?
>
> > -----Original Message-----
> > From: KARR, DAVID (ATTCINW)
> > Sent: Monday, January 11, 2010 4:07 PM
> > To: users_at_jaxb.dev.java.net
> > Subject: Would a XMLGregorianCalendar field marshal as a "datetime"
> > value if not qualified with @XMLSchemaType(name="date")?
> >
> > If I have a XMLGregorianCalendar field, and I do NOT have a
> > @XMLSchemaType(name="date") annotation on it, will it render as a
> > "datetime" value? That's essentially what I'm seeing. I need to make
> > it render as just a date. Is it possible to configure JAXB to do this
> > without changing the schema or the generated classes?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> > For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>