Hi All,I am stumped and stuck with the JiBX handling of xsd:choice
elements.Here is my schema:<?xml version="1.0" encoding="UTF-8"?><xsd:schema
targetNamespace="http://www.test.com/testapp"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:ogp="http://www.test.com/testapp"> <xsd:element name="root">
<xsd:complexType> <xsd:choice> <xsd:element
ref="ogp:mainApp" minOccurs="1" maxOccurs="1" /> <xsd:element
name="statusInfo" maxOccurs="1" minOccurs="1" /> </xsd:choice>
<xsd:attribute ref="ogp:ver"></xsd:attribute> </xsd:complexType>
</xsd:element> <xsd:element name="mainApp"> <xsd:complexType>
<xsd:sequence> <xsd:element name="appinfo" maxOccurs="1"
minOccurs="0" /> <xsd:choice> <xsd:sequence>
<xsd:element name="op2" maxOccurs="1"
minOccurs="0" /> <xsd:element name="op1"
maxOccurs="1" minOccurs="0" /> </xsd:sequence>
<xsd:element name="receipt" maxOccurs="1" minOccurs="1" />
</xsd:choice> </xsd:sequence> </xsd:complexType>
</xsd:element> <xsd:element name="statusInfo"> <xsd:complexType>
<xsd:sequence> <xsd:element name="status"
maxOccurs="1" minOccurs="1" /> <xsd:element
name="message" maxOccurs="1" minOccurs="1" /> </xsd:sequence>
</xsd:complexType> </xsd:element></xsd:schema>And the binding generated by
xsd2jibxis:<?xml version="1.0" encoding="UTF-8"?><binding> <mapping
name="root" class="com.test.testapp.Root"> <namespace
uri="http://www.test.com/testapp" default="elements"/> <structure
field="mainApp" usage="optional" map-as="com.test.testapp.MainApp"></structure>
<value name="statusInfo" field="statusInfo" usage="optional"/> <value
field="unknownSimpleStructureName" usage="optional" style="attribute"/>
</mapping> <mapping name="mainApp" class="com.test.testapp.MainApp">
<namespace uri="http://www.test.com/testapp" default="elements"/> <value
name="appinfo" field="appinfo" usage="optional"/> <value name="receipt"
field="receipt" usage="optional"/> </mapping> <mapping name="statusInfo"
class="com.test.testapp.StatusInfo"> <namespace
uri="http://www.test.com/testapp" default="elements"/> <value name="status"
field="status" usage="required"/> <value name="message" field="message"
usage="required"/> </mapping></binding>Now the generated binding doesn't
support CHOICE at all (or does it?).I have no idea, how can I change it to
support my schema above.Can somebody HELP? (SOS :)Thanks for your time,RD
_________________________________________________________________
Take a break and play crossword puzzles - FREE!
http://games.msn.com/en/flexicon/default.htm?icid=flexicon_
wlmemailtaglinemarch07
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
jibx-users mailing list
jibx-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jibx-users