Julian Reschke wrote:
Well, in the JCR property model "null" and non-existance are the same.
As far as I can tell, the same applies to WebDAV properties, RDF and the
XPath data model.
I can't say for WebDAV, but I can say that for FS file with length 0 and no file
are different things.
And you are wrong about XPath, Here is an example:
<data>
<distance case="1" unit="km">120</distance>
<distance case="2" unit="">130</distance>
<distance case="3">140</distance>
</data>
exists(/data/[EMAIL PROTECTED]'1']/@unit) = true
exists(/data/[EMAIL PROTECTED]'2']/@unit) = true
exists(/data/[EMAIL PROTECTED]'3']/@unit) = false
The null is a value, even it has a special meaning, but it is a value and have
the same weight as for instance 10 or 100 or 0 or Integer.MAX_VALUE.
I think it is a *feature* that these data models are compatible.
It is not true.
BTW: what would be a use case for the ability to differentiate between
"null" and "not there"?
inside JCR -- and for solving this one must usually create a null-like
value.
The OP is suggesting that this is a spec issue and storing null values
should be allowed. But doing so results in API behavioral changes,
because currently property.setValue(null) is equivalent to remove.
Since we are talking about 2.0 and many things will get broken, so let's do all
fixes at one time, to minimize developers pain.
P.S. I wonder why to defend current behavior when everybody understand that
setting value to a property does not mean that it should be deleted, regardless
of the set value ...
--
Ivan Latysh
[EMAIL PROTECTED]