These trim() calls in the serialization service are likely a hold-over from before there was a normalization service and can be safely removed. Please open a bug.
- Konstantin
From: sapphire-dev-bounces@xxxxxxxxxxx [mailto:sapphire-dev-bounces@xxxxxxxxxxx] On Behalf Of Greg Amerson
Sent: Friday, June 15, 2012 3:38 AM
To: Sapphire project
Subject: Re: [sapphire-dev] ValueSerializationMasterService does not respect @Whitespace( trim = false)
Oh, looks like maybe there is another one here that perhaps needs to be fixed? ValueSerializationService.java line 36?
On Fri, Jun 15, 2012 at 6:23 PM, Greg Amerson <gregory.amerson@xxxxxxxxxxx> wrote:
Hey sapphire team,
In my adopter product I have property that represents a user's "script" text content (_javascript_ or groovy, etc). This script resides within a CDATA[] section in the XML document. This script usually contains whitespace, particularly leading whitespace (newline and some tabs) that are important to make the script code seem like its a child text of that node (properly nested, so its "pretty"). So on this property I found out I should be setting @Whitespace( trim = false) which I wasn't before today but I am now. After setting that I now see the ValueNormalizationService correctly not trimming my script content, however, the ValueSerializationMasterService is still always trimming my text content (see line 91 of ValueSerializationMasterService.java) regardless of the @Whitespace annotation. Should we fix this?
Thanks for your feedback.
--
--