Hi,
 
I'm using castor-0.9.4 for creating Java classes from our XML scheme via
the SourceGenerator. One problem I came about is, that in the generated
source classes the package indication is missing, when an element
content is a type with its own type handling class, e.g. an enumeration
of a base type string. Instead of producing "my.package.types.MyType"
the generator just produces "types.MyType" with the javac compiler
complainig about unknown classes.
 
E.g., the following XML snippet generated with "-package my.package"

<xs:element name="TestName" type="myNS:MyTestType"/>
<xs:complexType name="MyTestType">
  <xs:simpleContent>
    <xs:extension base="myNS:MyType">
      <xs:attribute name="Scheme" type="xs:string" use="required" />
    </xs:extension>
  </xs:simpleContent>
</xs:complexType>
<xs:simpleType name="MyType">
  <xs:restriction base="xs:string">
    <xs:enumeration value="FirstValue" />
    <xs:enumeration value="SecondValue" />
  </xs:restiction>
</xs:simpleType>
 
Will produce variabels of type "types.MyType" in MyTestType.java and
MyTestTypeDescriptor.java, instead of "my.package.types.MyType". The
import instruction also only referres to type.MyType.
 
Best regards,
Kurt Spanier

----------==========#########>>>>>ZDV<<<<<#########==========----------

X.500:                                              Tel.:
   Kurt Spanier, Zentrum fuer Datenverarbeitung,      +49 7071 29-70334
   Universitaet Tuebingen, DE
SMTP-Mail:                                          FAX.:
   [EMAIL PROTECTED]                   +49 7071 29-5912
Snail-Mail:
   Dr. Kurt Spanier, Zentrum fuer Datenverarbeitung,
   Universitaet Tuebingen, Waechterstrasse 76, D-72074 Tuebingen
PGP-Public-Key:
   finger "Kurt Spanier"@x500.uni-tuebingen.de

----------==========##########>>>>>@<<<<<##########==========----------

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

Reply via email to