Hi, The relevant section of the spec would appear to be 10.4.2.4 (http://www.day.com/specs/jcr/2.0/10_Writing.html):
<snip> Every property must have a value. The range of property states does not include having a "null value", or "no value". Setting a property to "null" is equivalent to removing that property (see ยง10.9 Removing Nodes and Properties). </snip> I wouldn't classify an empty string as either "null value" or "no value" myself - unless the type of the property is specified as non-string, in which case it would be "no value". Sounds like a bug to me... Cheers, James -----Original Message----- From: Jeremy Booth [mailto:[email protected]] Sent: 16 July 2012 13:48 To: [email protected] Subject: Empty string property values Hi If we setup some initial content to have an empty string as a value it goes in to the jcr backend fine, but if we later try to update a value to be an empty string the property gets deleted. I see the @deleted suffix can be added if delete is the required operation (which we do elsewhere), but in this case, we want the value to be present, but blank (empty string). Some digging suggests that the block in SlingPropertyValueHandler is making the decision that blank string means delete. I can't see anything in the jcr specs that suggest a blank string (rather than null) is not valid. Wondering if this is a bug, or I've missed something here. Thanks Jeremy -- Homepage: http://www.computerbooth.com/ Codepage: http://www.newdawnsoftware.com/ Information in this e-mail and any attachments is confidential, and may not be copied or used by anyone other than the addressee, nor disclosed to any third party without our permission. There is no intention to create any legally binding contract or other binding commitment through the use of this electronic communication unless it is issued in accordance with the Experian Limited standard terms and conditions of purchase or other express written agreement between Experian Limited and the recipient. Although Experian has taken reasonable steps to ensure that this communication and any attachments are free from computer virus, you are advised to take your own steps to ensure that they are actually virus free. Companies Act information: Registered name: Experian Limited. Registered office: Landmark House, Experian Way, NG2 Business Park, Nottingham, NG80 1ZZ, United Kingdom. Place of registration: England and Wales. Registered number: 653331
