users@glassfish.java.net

jaxb - restrictions that remove elements dont show up in code?

From: <glassfish_at_javadesktop.org>
Date: Mon, 10 Nov 2008 08:32:40 PST

Hey all, I have the following schema snippet:

<xs:complexType name="child">
  <xs:sequence>
    <xs:element minOccurs="0" name="foo" type="xs:string" />
  </xs:sequence>
  <xs:attribute name="alpha" type="xs:int" />
</xs:complexType>

<xs:complexType name="no-child">
  <xs:complexContent>
    <xs:restriction base="child">
      <xs:sequence />
    </xs:restriction>
  </xs:complexContent>
</xs:complexType>

However, the generated code for no-child still has methods for accessing foo. Is there something I am missing? Thanks!
[Message sent by forum member 'goulding' (goulding)]

http://forums.java.net/jive/thread.jspa?messageID=315816