Morning all

I wonder if anyone can help me,

I'd like to know if there is a way to force the source generator to be strict when it comes to element types. In the previous version of castor i was using (0.9.5) if you had an element with a type that did not exist in the schema then the source generation would fail but with 1.1 it simply makes the type a java.lang.Object and procedes happily.

using the following schema (note that there is no declaration of type 'blahblahblah'):

<?xml version="1.0" encoding="UTF-8"?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema";>
        <xs:simpleType name="HOST">
                <xs:restriction base="xs:string"/>
        </xs:simpleType>
        <xs:simpleType name="ID">
                <xs:restriction base="xs:string"/>
        </xs:simpleType>
        <xs:simpleType name="PASSWORD">
                <xs:restriction base="xs:string"/>
        </xs:simpleType>
        <xs:complexType name="FLOWER">
                <xs:sequence>
                        <xs:element name="HOST" type="HOST"/>
                        <xs:element name="ID" type="blahblahblah" />
                        <xs:element name="PASSWORD" type="PASSWORD"/>
                </xs:sequence>
        </xs:complexType>
</xs:schema>

with castor 0.9.x you get the following error:

    [javac] FLOWER.java:47: cannot find symbol
    [javac] symbol  : class ID
    [javac] location: package mypackage.common
    [javac]     private mypacakge.common.ID _ID;
    [javac]                      ^


but with castor 1.1 it happily builds the source setting the property 'ID' to a java.lang.Object in the source file.


is there some property i can pass to the source generator so it will fail on this sort of problem?


Thank you for your time

Simon Lord

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

   http://xircles.codehaus.org/manage_email

Reply via email to