Hi David,

David Blevins wrote:
> 
> Hello Castor crew, hope all is well.

It's been a while! Things are good...hope all is well with you.

> 
> I am also having trouble with preserving whitespace, figured I'd respond
> to this thread for archive purposes (love news.gmane.org).
> 
> I am in the process of upgrading OpenEJB to Castor 0.9.5.3 from 0.9.2.
> I updated schemas and regenerated our config objects with no problems,
> but now all element data is without line separators.  The generated code
> for getContent() looks good:
> 
>          desc = new XMLFieldDescriptorImpl(
>                 String.class, "_content", "PCDATA", NodeType.Text);
>          [snip]
>          StringValidator typeValidator = new StringValidator();
>          typeValidator.setWhiteSpace("preserve");
>          fieldValidator.setValidator(typeValidator);
> 
> Any ideas?

Try setting unmarshaller.setWhitespacePreserve(true);

I think the problem is that the whiteSpace preserve specified in the
schema is being put into the validator, this should be put into the
field descriptor not the validator. So in my opinion there is a bug
there...but you can try as a workaround setting Whitespace preserving
for the entire document, by using the above.

If that still doesn't solve it...please let us know and I'll try and get
that fixed for 0.9.5.4.

Thanks,

--Keith

----------------------------------------------------------- 
If you wish to unsubscribe from this mailing, send mail to
[EMAIL PROTECTED] with a subject of:
        unsubscribe castor-dev

Reply via email to