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

Reply via email to