users@jaxb.java.net

Re: Validate Error

From: Ed Mooney <Ed.Mooney_at_sun.com>
Date: Tue, 03 Dec 2002 13:10:27 -0500

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:
[ ... ]