Hi,
seems like a bug, please file an issue with reproducible testcase,
MartiNG
On 08/10/2011 05:28 PM, VanIngen, Erik (FIPS) wrote:
> Hi all,
>
> My xsd has a type hierarchy with restriction from *CodeType*, through
> *ItemType*, to *ItemBaseType*. The latter defines the id. When using
> <xjc:treatRestrictionLikeNewType />, *CodeType* is losing *id*. Is
> this a known bug? Is there a solution for this?
>
> The xsd cannot be changed since it is a third party artifact. The
> <xjc:treatRestrictionLikeNewType /> is used in my custom binding in
> order to generate friendly mapping classes.
>
> Kind Regards,
> Erik
>
>
>
> <xs:complexType name="*CodeType*">
> <xs:complexContent>
> <xs:restriction base="*ItemType*">
> ..................
>
>
> <xs:complexType name="ItemType" abstract="true">
> <xs:complexContent>
> <xs:extension
> base="*ItemBaseType*">
> ......................
>
>
> <xs:complexType name="*ItemBaseType*" abstract="true">
> <xs:complexContent>
> <xs:restriction base="NameableType">
> <xs:sequence>
> .............................................................................
>
> </xs:sequence>
> <xs:attribute name="id"
> type="common:IDType" use="required"/>
> </xs:restriction>
> </xs:complexContent>
> </xs:complexType>
>
--
Martin Grebac, GlassFish/Metro/JAXB/Tooling at Oracle
http://blogs.sun.com/mgrebac
ICQ: 93478885