Hi,

it seems that XmlBeans is generating invalid xml when I change the type to a 
type with fewer elements. There is an example with abstract conrete types on 
the XmlBeans homepage called "AbstractTypes". In the file AbstractTypes.java 
there is this section:

...
Circle circle = (Circle) s1.changeType(Circle.type);
circle.setRadius(10.0);
...

s1 is a shape (more common). If the type of circle is changed to a more common 
type, the radius is nevertheless set for the Shape type. The Validation of the 
changed circle to a Shape will fail, because the radius is existing in the xml 
event though the xsi:type is correct. The xml and the java representation seems 
to be here out of sync. Isn't it ? Or is there a trick ?

Regards,
Oliver

Reply via email to