users@jaxb.java.net

Re: Validate Error

From: Yuemin Wang <ywang_at_todo1.com>
Date: Tue, 03 Dec 2002 13:11:17 -0500

Hi Ed,

Thank you for your comment, but my point is not return "false" instead of
throws exception, all I want to see is after I generate the java classes by
using JAXB, I don't have to modify the generated code.

Do you admit that this is a bug in jaxb-1.0-ea? and will JAXB be continue
supporting DTD in the future?

Thank you

Yuemin


-----Original Message-----
From: Discussion list for the Java Architecture for XML Binding
[mailto:JAXB-INTEREST_at_JAVA.SUN.COM]On Behalf Of Ed Mooney
Sent: Tuesday, December 03, 2002 1:10 PM
To: JAXB-INTEREST_at_JAVA.SUN.COM
Subject: Re: Validate Error


Hi Yuemin,

Indeed, I believe your observation applies to jaxb-1.0-beta. That is,
Validator.validate() throws an exception if it encounters an error. If I
understand correctly, you would rather it simply return "false". I think
there's a good case to be made for that behavior, and will take it up
with the team.

Thank you for your persistence and understanding.

Regards,
--
Ed Mooney         |Sun Microsystems, Inc.|Time flies like
Java Web Services |UBUR02-201            |an arrow, but
Ed.Mooney_at_Sun.COM |1 Network Drive       |fruit flies like
781-442-0459      |Burlington, MA  01803 |a banana. Groucho
Yuemin Wang wrote:
> Hi Ed,
>
> Sorry, you are right, the jaxb-1.0-beta only supports XML Schema.  My
> environment was still point at jaxb-1.0-ea.
>
> Because all our messeage schemas are DTDs and it is not going to be
changed
> in years, I have to use jaxb-1.0-ea.
>
> Now we are talking about DTD and jaxb-1.0-ea.
>
> I still believe the validation for XXXX? type of element have bug.  My
work
> around is adding the "if (XXXX != null)" in the java code which contains
'?'
> type of element after I generate the code.
>
> To reproduce the bug I did a test as following:
[ ... ]