It is exactly as you described, the validator for the _content field in
HomeZip is missing the facets from the simple types. By the way, "Blank"
looks like this:
<xs:simpleType name="Blank">
        <xs:restriction base="xs:string">
                <xs:maxLength value="0"/>
                <xs:minLength value="0"/>
        </xs:restriction>
</xs:simpleType>

Does anyone else have any suggestions? Is this in fact a bug, is it perhaps
not supported, or is there something I am missing in the configuration?
Thanks.


Werner Guttmann wrote:
> 
> Patrick,
> 
> I have just tried code generation myself, and here's a few observations:
> 
> a) No (descriptor) classes should be generated for the simple types.
> b) No (descriptor) class(es) should be generated for the <xs:union>.
> c) The facets as defined on the simple types used in the union should be 
>   'propagated' to the validator for the '_content' field in 'HomeZip.
> 
> Unfortunately, this si not happening, which I'd consider to be a bug. As 
> such, can you please raise a new Jira issue and attach the relevnt 
> information as discussed here.
> 
> Regards
> Werner
> 
> Patrick Marchwiak wrote:
>> Is there a reason why the code generator may not be generating
>> validation for the minlength and maxlength facets of HomeZip?
>> It also appears that the "Zip" type and descriptor are not being
>> generated at all. I am using Castor 1.1.2.1.
>> 
>> An excerpt from my schema is below.
>> 
>> <xs:element name="HomeZip">
>>  <xs:complexType>
>>  <xs:simpleContent>
>>  <xs:extension base="Zip">
>>  <xs:attribute ref="abc"/>
>>  </xs:extension>
>>  </xs:simpleContent>
>>  </xs:complexType>
>> </xs:element>
>> 
>> and later ...
>> 
>> <xs:simpleType name="Zip">
>>  <xs:union memberTypes="Blank">
>>  <xs:simpleType>
>>  <xs:restriction base="xs:string">
>>  <xs:maxLength value="10"/>
>>  <xs:minLength value="5"/>
>>  </xs:restriction>
>>  </xs:simpleType>
>>  </xs:union>
>>  </xs:simpleType>
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe from this list please visit:
>> 
>>     http://xircles.codehaus.org/manage_email
>> 
>> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe from this list please visit:
> 
>     http://xircles.codehaus.org/manage_email
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Facets-and-type-not-being-generated-tf4817844.html#a13796556
Sent from the Castor - User mailing list archive at Nabble.com.


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

    http://xircles.codehaus.org/manage_email

Reply via email to