users@jaxb.java.net

Re: Validate Error

From: Yuemin Wang <ywang_at_todo1.com>
Date: Tue, 03 Dec 2002 14:55:57 -0500

Hi Ed,

Thank you for your team done excellent job on JAXB. I am a big fan of JAXB,
and found extremely success by using it in my project, and I believe this is
the best way to parse XML. I am sorry to hear that jaxb-1.0-ea it is no
longer supported.

I have another case may be good for you to enhancement of any version of
JAXB:

There is no way (or may be I don't know that there is a way) I can specify a
String field as "preserve" -- leave the content as it was in XML. All
default field is "collapse", I have tried different way to modified the
bind-schema file, but I was fail. I have to manually change the code after
I generate java classes.

From:
    if (xs.atChars(XMLScanner.WS_COLLAPSE)) {
        s = xs.takeChars(XMLScanner.WS_COLLAPSE);

To:
    if (xs.atChars(XMLScanner.WS_PRESERVE)) {
        s = xs.takeChars(XMLScanner.WS_PRESERVE);

Other than these two problems I am a happy user of JAXB.

Thanks again for all the excellent job you guys done!

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 2:19 PM
To: JAXB-INTEREST_at_JAVA.SUN.COM
Subject: Re: Validate Error


Hi Yuemin,

Aha.

In jaxb-1.0-beta, validate is part of the API, not a member of the
generated classes. So, there's no need to modify them.

While I think you have a good case for an enhancement to jaxb-1.0-ea, I
regret to say we're no longer supporting it. I hesitate to call it a
bug, because I suspect it behaves as designed.

While it's premature for me to comment on our plans for JAXB, the use
case you represent hasn't gone unnoticed.

All the best,
--
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,
>
> 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
[ ... ]