I tried the CVS version and the simple 'choice' bug I experienced is fixed. Sorry for the false alarm...
Thanks, Mark --- Mark Lanz <[EMAIL PROTECTED]> wrote: > Arnaud, > > I am using 0.9.3. I haven't tried the CVS, yet. > I'll > give it a try and let you know. > > Thanks, > Mark > --- Arnaud Blandin <[EMAIL PROTECTED]> wrote: > > Hi Mark, > > > > which version are you using? have you tried the > CVS? > > > > Arnaud > > > > -> -----Original Message----- > > -> From: Mark Lanz [mailto:[EMAIL PROTECTED]] > > -> Sent: Thursday, November 15, 2001 3:20 PM > > -> To: [EMAIL PROTECTED] > > -> Subject: [castor-dev] XML Schema 'choice' > > -> > > -> > > -> When I do a simple 'choice' in XML Schema, the > > -> generated Castor classes require all of the > > -> sub-elements to be present, instead of > requiring > > -> exactly 1. Is this a known bug? Or am I doing > > -> something wrong? > > -> > > -> The XSD looks like this: > > -> > > -> <?xml version = "1.0" encoding = "UTF-8"?> > > -> <xsd:schema > > -> > xmlns:xsd="http://www.w3.org/2001/XMLSchema" > > -> elementFormDefault = "qualified"> > > -> <xsd:element name = "a"> > > -> <xsd:complexType> > > -> <xsd:choice> > > -> <xsd:element ref = "b"/> > > -> <xsd:element ref = "c"/> > > -> </xsd:choice> > > -> </xsd:complexType> > > -> </xsd:element> > > -> <xsd:element name = "b" type = "xsd:string"/> > > -> <xsd:element name = "c" type = "xsd:string"/> > > -> </xsd:schema> > > -> > > -> The following should be valid XML for this > > schema, but > > -> when I unmarshal with validation on, it fails. > > -> > > -> <a> > > -> <b>xxx</b> > > -> </a> > > -> > > -> Error: > > -> ValidationException: c is a required field.; > > -> > > -> > > -> Thanks, > > -> Mark > > -> > > -> > > __________________________________________________ > > -> Do You Yahoo!? > > -> Find the one for you at Yahoo! Personals > > -> http://personals.yahoo.com > > -> > > -> > > > ----------------------------------------------------------- > > > > -> If you wish to unsubscribe from this mailing, > > send mail to > > -> [EMAIL PROTECTED] with a subject of: > > -> unsubscribe castor-dev > > > > > ----------------------------------------------------------- > > > > If you wish to unsubscribe from this mailing, send > > mail to > > [EMAIL PROTECTED] with a subject of: > > unsubscribe castor-dev > > > > > __________________________________________________ > Do You Yahoo!? > Find the one for you at Yahoo! Personals > http://personals.yahoo.com > > ----------------------------------------------------------- > > If you wish to unsubscribe from this mailing, send > mail to > [EMAIL PROTECTED] with a subject of: > unsubscribe castor-dev > __________________________________________________ Do You Yahoo!? Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month. http://geocities.yahoo.com/ps/info1 ----------------------------------------------------------- If you wish to unsubscribe from this mailing, send mail to [EMAIL PROTECTED] with a subject of: unsubscribe castor-dev
