I figured out the solution:
using constraints and enumerations:
<xsd:simpleType name="test">
<xsd:restriction base='xsd:string'>
<xsd:enumeration value="a" />
</xsd:restriction>
</xsd:simpleType>
On Dec 12, 2007 11:36 PM, Kenny MacLeod <kennym_at_kizoom.com> wrote:
> The fixedAttributeAsConstantProperty binding customisation does that for
> you.
>
>
>
> Felipe Gaścho wrote:
> > is there a way to generate constants ?
> >
> > public static final String a = "constant";
> >
> > ??
> >
> > <xsd:complexType name="test">
> > <xsd:attribute name="a" type="xsd:string" fixed="constant"/>
> > </xsd:complexType>
> >
> > ---------------------------------------------------------------------
> > 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
>
>