dev@fi.java.net

Re: JAXB and of base64 data and FI

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Wed, 03 Aug 2005 10:02:28 -0700

Paul Sandoz wrote:
> Yes, that is a little more tricky. Perhaps we can have a simple test
> with two JAXB beans one that maps an element to byte[] and another that
> maps to char[].

OK.

>> OK. JAXB uses DOM comparator to check the equivalence. So I'll check the
>> equivalence of marshal -> UTF8 -> DOM and marshal -> FI -> DOM.
>
> Ah interesting does the production of the DOM ensure that attributes
> ordered etc. i.e. a normalized canonical DOM?
>
> Is the code in the JAXB CVS? maybe it is something better to use than
> what we currently have for FI.

DOM is produced normally. It's a DOM comparator that compares attributes
by ignoring orders, ignoring comments, ignoring ns decls, etc.

It actually works against JDOM, and it's at
http://cvsync.red.iplanet.com/cvsweb/vmtools/?cvsroot=WPTS

Originally the project was started elsewhere, but they abandoned the
maintenance, so I'm maintaining a local copy here.

If you are interested in using it, you are welcome to do so. But I'm not
particularly happy with it (especially its performance when comparing a
large tree). It's originally developed as a diff tool, not just an
equality tester, so that's probably why.

What are you using in FI today?

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com