users@jaxb.java.net

RE: Re: Boolean 0 or 1 true or false

From: Lulseged Zerfu <lulseged.zerfu_at_ericsson.com>
Date: Fri, 6 Nov 2009 11:41:31 +0100

Thanks

Who is not a friend of google?

lulseged

-----Original Message-----
From: Pavel.Bucek_at_Sun.COM [mailto:Pavel.Bucek_at_Sun.COM]
Sent: den 6 november 2009 11:02
To: users_at_jaxb.dev.java.net
Subject: Re: Boolean 0 or 1 true or false

google is your friend:
http://stackoverflow.com/questions/343669/how-to-let-jaxb-render-boolean
-as-0-and-1-not-true-and-false


Lulseged Zerfu wrote:
> Hi
>
> Thanks
>
> How can I give a direction so that it writes 0 and 1 instead of false

> and true?
>
> Lulseged
>
> -----Original Message-----
> From: Pavel.Bucek_at_Sun.COM [mailto:Pavel.Bucek_at_Sun.COM]
> Sent: den 6 november 2009 10:35
> To: users_at_jaxb.dev.java.net
> Subject: Re: Boolean 0 or 1 true or false
>
> Hello,
>
> XML spec says:
>
> ""
> 3.2.2.1 Lexical representation
>
> An instance of a datatype that is defined as *boolean* can have the
> following legal literals {true, false, 1, 0}.
> ""
>
> so all values you mentioned are fine.
>
> Pavel
>
>
>
> Lulseged Zerfu wrote:
>
>> Hi
>>
>> We use jaxb to merge to xml files to one and see that 0's are changed

>> to false and 1's are changed to true in the output.
>>
>> In the xsd file we have the following declaration:
>>
>> <xs:element name="enableAM" type="xs:boolean" default="false"
>> minOccurs="0">
>> <xs:annotation>
>> <xs:documentation>Use to configure saAmfCompAMEnable
>> mib object.</xs:documentation>
>> </xs:annotation>
>> </xs:element>
>>
>> In put <enableAM>0</enableAM> is output to <enableAM>false</enableAM>

>> and <enableAM>1</enableAM> is output to <enableAM>true</enableAM>.
>>
>>
>> The xml document looks valid. JAXB never complains about 0's an 1's.
>> Gives output.
>>
>> What is correct?
>>
>> Lulseged
>>
>>
>>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
> For additional commands, e-mail: users-help_at_jaxb.dev.java.net
>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net