users@jaxb.java.net

Re: Normative meaning of "cannot"

From: Joe Fialli <joseph.fialli_at_sun.com>
Date: Mon, 10 Feb 2003 09:32:26 -0500

Wiedmann, Jochen wrote:
> Hi,
>
> in 6.5.1 the spec contains the following words:
>
> The typesafeEnumBase cannot contain the following
> simple types and therefore a JAXB implementation is
> not required to support binding of these types to
> typesafe enumeration class: "xs:QName", ...
>
> After reading the section 7 on "Compatibility", I'm
> still stuck, how to understand the above paragraph.
> Is support for these types in typesafe enumeration
> classes conforming to the JAXB specification or does
> it require some sort of non-default switch?

A non-default switch. For example, if you wanted
to support XML Schema concepts whose binding was not
yet specified, your implementation could with a non-default
switch. The JAXB RI has such a switch and it is
called "-extension".


However, could you provide a good use case on why it
is important to map xs:QNames to a Java typesafe enum class?

JAXB does not support the mapping of xs:QName and several
other builtin XML Schema datatypes to typesafe enum
classes ever since it would be contrived to compute a valid
Java identifier from the enum value facet for these types.
We really did not want to ever factor an xml namespace
prefix into any of the generated Java identifier.
JAX-RPC additionally does not support ever binding
these XML Schema datatypes to typesafe enum classes.

-Joe Fialli, Sun Microsystems



>
>
> Regards,
>
> Jochen


--