users@jaxb.java.net

Re: White Spaces in xsd:string

From: Kohsuke Kawaguchi <Kohsuke.Kawaguchi_at_Sun.COM>
Date: Thu, 13 Jan 2005 08:52:21 -0800

Thomas Roschi wrote:
> i'am new to JAXB and i have a problem:
> I'am transferring text data containing new lines (\n\r) in a xsd:string
> type. The resulting string in the generated java-classes does no more
> contain this new lines. They are replaced by a space.

Roughly speaking, XML does not always preserve new lines in attributes.
I'm suspecting that's causing your problem.

Newlines in elements, if they are typed as xs:string, should be
preserved by JAXB. If it doesn't, that's a bug. Please file a bug report
with a schema and an instance so that we can investigate the problem.

-- 
Kohsuke Kawaguchi
Sun Microsystems                   kohsuke.kawaguchi_at_sun.com
---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe_at_jaxb.dev.java.net
For additional commands, e-mail: users-help_at_jaxb.dev.java.net