Réf. : RE: Problem with boolean type

2007-10-10 Thread valerie . bauche
Yes I get mustUnderstand=true instead of mustUnderstand=1 Valerie Wing Yew Poon [EMAIL PROTECTED] 09/10/2007 21:40 Veuillez répondre à user Pour : user@xmlbeans.apache.org cc : Objet : RE: Problem with boolean type Valerie, what exactly is the incorrect behavior

Re: Réf. : RE: Problem with boolean type

2007-10-10 Thread Albert Bupp
I recently had a similar problem. A schema defines an element thusly: xsd:element name=DayWorking type=xsd:boolean minOccurs=0/ When calling the generated interface: d.setDayWorking(true); XMLBeans then writes: DayWorkingtrue/DayWorking However, the application reading the XML instance

RE: Réf. : RE: Problem with boolean type

2007-10-10 Thread Cezar Andrei
It is not a bug, as Dennis said in a previous email, XMLBeans and binding tools in general, try to do the right thing in many cases, but this is not one of them. Even if this Boolean restriction seems simple enough, to support all restrictions is impossible. Check out the following example

RE: Réf. : RE: Problem with boolean type

2007-10-10 Thread Wing Yew Poon
This one is not a bug. true and 1 are both valid values for the schema type. When XMLBeans writes the xml, it uses the canonical lexical representation, which is true. From: Albert Bupp [mailto:[EMAIL PROTECTED] Sent: Wednesday, October 10, 2007 8:46 AM To:

RE: Réf. : RE: Problem with boolean type

2007-10-10 Thread Wing Yew Poon
Please see what Cezar wrote on this thread. I guess to do what you want (without changing your schema), you can use the generated xsetter instead of the setter. So - for xsd:element name=DayWorking type=xsd:boolean minOccurs=0/ you can set it by XmlBoolean xb =

RE: Réf. : RE: Problem with boolean type

2007-10-10 Thread Albert Bupp
I agree that it's not a bug, however, it would be helpful if there were a way to direct the setter as to the form to output the value in, as either true or 1, since both are legitimate boolean representations. At 03:04 PM 10/10/2007, you wrote: This one is not a bug. true and 1 are both

Re: Réf. : RE: Problem with boolean type

2007-10-10 Thread Jacob Danner
would restricting it via an enumeration work for you Albert? -Jacobd On 10/10/07, Wing Yew Poon [EMAIL PROTECTED] wrote: This one is not a bug. true and 1 are both valid values for the schema type. When XMLBeans writes the xml, it uses the canonical lexical representation, which is true.

RE: Réf. : RE: Problem with boolean type

2007-10-10 Thread Albert Bupp
I see. Thanks for the incite into the library. I hadn't realized that the I could invoke xsetfoobar on a given setter. At 03:22 PM 10/10/2007, you wrote: Please see what Cezar wrote on this thread. I guess to do what you want (without changing your schema), you can use the generated xsetter