Keith Visco wrote:
Hi Honglin,
Looks like Castor is having trouble determining which choice to use when it encounters the "t" element. What happens if you put <a_child> or <b_child> first before the "<t>". I know that's not what you want, but it might be the only work around at the moment.
Also can you file this bug at http://bugzilla.exolab.org
Thanks,
--Keith
Honglin Ye wrote:
I too have unmarshal problem with choice.
My schema is like this:
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"> <xs:element name="setup" type="setupType"/> <xs:complexType name="setupType"> <xs:choice> <xs:group ref="aSetupType"/> <xs:group ref="bSetupType"/> </xs:choice> <xs:attribute name="setup_name" type="xs:string"/> </xs:complexType>
<xs:group name="aSetupType"> <xs:sequence> <xs:element name="t" type="a_tType"/> <xs:element name="a_child" type="aChildType"/> </xs:sequence> </xs:group>
<xs:group name="bSetupType"> <xs:sequence> <xs:element name="t" type="b_tType"/> <xs:element name="b_child" type="bChildType"/> </xs:sequence> </xs:group>
castor could not unmarshal the following, which was generated by its own marshal framework: <setup setup_name="B"> <t>b_tType content</t> <b_child>bChildType content</b_child> </setup>
change the order of aSetupType and bSetupType in the choice block, it can unmarshal the above, but it could not marshal
<setup setup_name="A"> <t>a_tType content</t> <a_child>aChildType content</a_child> </setup>
Can anyone tell me how to get arround of this?
Thanks
Honglin
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-user
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
Hi, Keith, Thank you very much! You are right, If I put <t> element at the end, it works fine. I can live with that with no problem. I looked at the source generated, there is no choice logic in the code. I just keep an eye the development on this item.
Honglin
----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
unsubscribe castor-user
