Community
Participate
Working Groups
In certain cases, while a given XML element can have a number of child elements, one of the child elements occurs by itself with high frequency. In these cases, it useful to reduce the verbosity of XML by folding the child element into the parent. Consider the following schema: root a (required) b (optional) c (optional) If you know that the following usage occurs with high frequency: <root> <a>xyz</a> </root> It is useful to fold that syntax into a less verbose form: <root>xyz</root> While retaining ability to the more verbose form for case where other child elements are present: <root> <a>xyz</a> <b>123</b> </root> Sapphire XML binding should support this scenario.
Feature implement. Use it like this... @CustomXmlValueBinding( impl = FoldingXmlValueBindingImpl.class, params = "a" )
Verify with Sapphire UI definition editor -> <property-editor>