users@jaxb.java.net

Re: [BULK] xsd:any unmarshalled to DOM

From: Jeremiah Voris <JVoris_at_naverus.com>
Date: Wed, 17 Oct 2007 23:07:59 -0700

Sparefroh <zwatte_at_gmx.net> wrote on 10/12/2007 07:58:11 AM:
> I tried this now, but I am still facing the same problem.
> This is the part out of my xsd schema:
     <snip>
> <xs:complexType name="XMLContentType">
> <xs:complexContent mixed="true">
> <xs:extension base="AnyChildrenType">
> <xs:attribute ref="xml:space" use="required"/>
     <snip>
> Do you see any mistakes?
> Thanks for your help!

Sorry for taking so long to respond. Curiosity got the best of me so I
actually did a lot of poking around on this. As far as I'm concerned, it's
a bug. Similar to this one, in fact:
<https://jaxb.dev.java.net/issues/show_bug.cgi?id=396>

This is more the flipside of that bug, though, since that one deals with
jaxb not reading data containing whitespace correctly while this is more
an issue of jaxb not conforming to the "preserve all data outside of tags"
(or whatever the exact quote is) rule. I'd file a bug on it (here: <
https://jaxb.dev.java.net/issues/>).

As far as I can tell, if whitespace handling needs to be w3c conformant to
the extent that you can create an output file matching, or even close to,
an input file, jaxb does not seem the tool to use. At least not at the
moment. I'd also preprocess any xml file containing date values to ensure
all whitespace surrounding the value is removed until bug 396 is fixed.
That one is a big ouch especially since even trailing space seems to cause
it.

Good luck!

--
Jeremiah