Does the Castor source generator support use of derived types?

I have the following schema and xml instance document.  Castor 0.9.3
generates classes that appear correct (Derived extends Base), but I cannot
unmarshal the instance document : Top.unmarshal(new FileReader("test.xml"));
fails with the exception:
ERROR org.xml.sax.SAXException: unable to find FieldDescriptor for 'Second'
in ClassDescriptor of Value{file: [not available]; line: 5; column: 13}

Should this work?
If this is not supported, any guess when it will be added into Castor?

Thanks,
Ross

--------------------- Schema ---------------------
<?xml version="1.0"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema";>

<xsd:element name="Top">
  <xsd:complexType>
    <xsd:sequence>
      <xsd:element name="Value" type="Base"/>
    </xsd:sequence>
  </xsd:complexType>
</xsd:element>

<xsd:complexType name="Base">
  <xsd:sequence>
    <xsd:element name="First" type="xsd:string"/>
  </xsd:sequence>
</xsd:complexType>

<xsd:complexType name="Derived">
  <xsd:complexContent>
    <xsd:extension base="Base">
      <xsd:sequence>
        <xsd:element name="Second" type="xsd:string"/>
      </xsd:sequence>
    </xsd:extension>
  </xsd:complexContent>
</xsd:complexType>

</xsd:schema>

--------------------- XML instance  (test.xml) ---------------------
<?xml version="1.0"?>
<Top xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";>
  <Value xsi:type="Derived">
    <First>aaa</First>
    <Second>bbb</Second>
  </Value>
</Top>

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to