Hey people,

so I've found that castor (wrongly) creates Java Enums of all uppercase symbols for an xsd:enumeration xsd:restriction like the following:

<xsd:simpleType>
 <xsd:restriction base="xsd:token">
  <xsd:enumeration value="m"> <!-- prefix 'milli' -->
  <xsd:enumeration value="M"> <!-- prefix 'mega' -->
 </xsd:restriction>
</xsd:simpleType>

The generated enum symbols for that will be 'M' and, er, yes, 'M'. So I found that code, fixed it, and then wanted to compile castor. Heh, dumb me. I'm getting more errors than my time allows to report, so instead I'm asking you:

Where is the FieldMappingType, ClassMapping etc. etc. coming from? I assume that is coming from some java generated code that you generate from some schema. But how to bootstrap that? Why isn't that bootstrap procedure in the build.xml? How do YOU compile castor just from the released sources?

I admit I'm not a java expert, but I would assume that given the build.xml, and having ant available as well as a recent JDK would be enough to compile castor.

To give you a scent of what I'm talking about, running the distributed build.bat gives me ...

    [javac] symbol  : class FieldMapping
    [javac] location: class org.exolab.castor.xml.XMLMappingLoader
    [javac]     protected FieldDescriptorImpl createFieldDesc( Cla
    [javac]
    [javac] symbol  : class FieldMapping
    [javac] location: class org.exolab.castor.xml.XMLMappingLoader
    [javac]     protected TypeInfo getTypeInfo( Class fieldType, C
    [javac]
    [javac] symbol  : class ClassMapping
    [javac] location: class org.exolab.castor.tools.MappingTool
    [javac]         ClassMapping classMap;
    [javac]         ^
    [javac] symbol  : class FieldMapping
    [javac] location: class org.exolab.castor.tools.MappingTool
    [javac]         FieldMapping fieldMap;
    [javac]         ^
    [javac] symbol  : class ClassMapping
    [javac] location: class org.exolab.castor.tools.MappingTool
    [javac]         classMap = new ClassMapping();
    [javac]                        ^
    [javac] symbol  : class MapTo
    [javac] location: class org.exolab.castor.tools.MappingTool
    [javac]         MapTo mapTo = new MapTo();
    [javac]         ^
    [javac] symbol  : class MapTo
    [javac] location: class org.exolab.castor.tools.MappingTool
    [javac]         MapTo mapTo = new MapTo();
    [javac]                           ^

(cut some at the x axis as well as removed my path references. Files it's talking abou tis XMLMappingLoader.java and MappingTool.java).

So I guess my question really boils down to: Why is your build.xml incomplete?
And what do I have to do which is not noted in the build.xml?

Regards,

-Martin Weber

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to