Stefan,

On 6/17/05, Liebig, Stefan <[EMAIL PROTECTED]> wrote:
>   
> Your proposed ´default´ attribute would "conflict" with the already existing
> possibilty to define defaults within the initializers of the translators.
> So, this 
> would lead to two places defining defaults with slightly different
> semantics! 
>   

Yes, the semantics would be slightly different and would "conflict" in
so far that the default value could be specified in two locations.

As you pointed out, however, the current semantics of a default value
is "flawed" as the default value is only used if the attribute value
is the empty string, or if the 'skip-if-null' attribute is used.

> How about adding something like a ´skip-if-null´ to the <conversion>
> element? 
> This could tell the underlying
> <create-object>/<read-attribute> to use this vaule. 
> The default of this attribute would be ´true´, for compatibility. 
>   

I thought about that as well. But what about the attributes which
don't specify a default value in the translator initializer? I think
this could cause object properties to be set to null (i.e.
setFoo(null)), which in turn could cause default values in the Java
code to be overwritten...

IMHO it should be either left as is (adding a caveat notice to
<conversion> would not hurt) or a 'default' attribute to <attribute>
should be considered. What do others think?

--knut

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to