translator attribute ignores default unless you also specify skip-if-null="false"

Description

The default value for a translator is ignored unless you also set skip-if-null="false".
I think a more reasonable default is to assume skip-if-null="false" if you specify a default value for a translator.

An example can be found in the hivemind mailing list: http://www.nabble.com/int-translator-default-not-working--tt12427740.html#a12427740

Environment

None

Activity

Show:
J
July 8, 2009, 5:53 AM

skip-if-null is an attribute that the SchemaParser understands and processes. The default values for translators are parsed by the translators.
So to change the behaviour of the schema parser it must delegate decisions about parsing to the translator. To make this work the schema parser needs redesign and it is probably not worth it just for this feature request.
I suggest clarifications in the documentation instead. On every translator that supports default values it should state that "skip-if-null" should be set to false in the descriptor XML or the default value will have no effect.

J
July 8, 2009, 6:21 AM

Changed the priority to "trivial" since this isn't actually a bug and it is the behaviour Hivemind had for years.

J
July 13, 2009, 3:22 AM

I've updated the documentation to say that you need to set skip-if-null to false in order to use default values on the translators that support them. I suggest we close this issue.

JohanL
July 13, 2009, 7:37 AM

Fine with me if all agree

JohanL
July 15, 2009, 9:17 AM

Docs updated

Assignee

Raffael Herzog

Reporter

J

Labels

None

Components

Fix versions

Affects versions

Priority

Trivial
Configure