Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338173 - Support folding XML binding
Summary: Support folding XML binding
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Sapphire (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Konstantin Komissarchik CLA
QA Contact:
URL:
Whiteboard:
Keywords: plan
Depends on:
Blocks:
 
Reported: 2011-02-24 21:37 EST by Konstantin Komissarchik CLA
Modified: 2021-11-19 09:21 EST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Konstantin Komissarchik CLA 2011-02-24 21:37:48 EST
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.
Comment 1 Konstantin Komissarchik CLA 2011-02-25 19:18:26 EST
Feature implement. Use it like this...

@CustomXmlValueBinding( impl = FoldingXmlValueBindingImpl.class, params = "a" )
Comment 2 Ling Hao CLA 2011-06-08 15:47:21 EDT
Verify with Sapphire UI definition editor -> <property-editor>