users@jaxb.java.net

RE: Integer in Enumeration value

From: Sam Cheung <sylcheung_at_hotmail.com>
Date: Sun, 15 Feb 2004 21:10:45 +0000

Thanks. I put this in my binding file, and
<jxb:globalBindings
          typesafeEnumBase="xs:string"/>

and change the base to "xs:string" in my enumeration base.
<xs:restriction base="xs:string">
                        <xs:enumeration value="5.6.0" />
                        <xs:enumeration value="5.5.0" />
                        <xs:enumeration value="5.3.0" />
                </xs:restriction>

but I get this error instead:

     [xjc] [ERROR] Cannot derive a valid Java identifier from "5.6.0".
Specify a customization to change the name.
      [xjc] line 384 of REL-5-MM7-1-3.xsd.out
      [xjc] [ERROR] Cannot derive a valid Java identifier from "5.5.0".
Specify a customization to change the name.
      [xjc] line 384 of REL-5-MM7-1-3.xsd.out
      [xjc] [ERROR] Cannot derive a valid Java identifier from "5.3.0".
Specify a customization to change the name.
      [xjc] line 384 of REL-5-MM7-1-3.xsd.out


>From: "Robert Lowe" <rmlowe_at_rmlowe.com>
>Reply-To: users_at_jaxb.dev.java.net
>To: <users_at_jaxb.dev.java.net>
>Subject: RE: Integer in Enumeration value
>Date: Mon, 16 Feb 2004 04:21:56 +0800
>
> > > Do you know if there is a way for jaxb to generate a strong type enum
> > java
> > > class for enum values such as "5.0.1." , "5.0.2", "5.0.3"?
> >
> > I'm pretty sure there's a binding customization that will do it, but I
>don't
> > remember the details. Check the spec and/or the docs for the reference
> > inplementation.
>
>Got it--it's the typesafeEnumBase option--see section 6.5 of the spec.
>
>
>Best regards,
>
>Robert Lowe
>http://RMLowe.com/
>
>
>
>---------------------------------------------------------------------
>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
>

_________________________________________________________________
Create your own personal Web page with the info you use most, at My MSN.
http://click.atdmt.com/AVE/go/onm00200364ave/direct/01/


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net