Hello everyone,
I wish, based on two xml:
1. ui.xml: defines a layout, based on variables/conditions in its attributes, such as:
2. data.xml: defines actual data came from another data source:
to merge the two into one result.xml, which, in that case would be:
I started from the end, as i think its clearer, I want to define attributes values based on what I have in my data.
Of course, the language I have there is just some pseudo -code, it can be anything, as long as its readable :)
I have read about mustache / handlebars implementations in java, which is more or less what I need (some sort of templating engine) but sadly, those are logic-less approaches.
I need less-logic or full-of-logic kind of approach.
What would you advice based on your knowledge?
I wish, based on two xml:
1. ui.xml: defines a layout, based on variables/conditions in its attributes, such as:
Code:
<root> <item title="if data/gender = 'female': Ms.; else: Mr." /> </root>
Code:
<data> <gender>male</gender> </data>
Code:
<root> <item title="Mr." /> </root>
Of course, the language I have there is just some pseudo -code, it can be anything, as long as its readable :)
I have read about mustache / handlebars implementations in java, which is more or less what I need (some sort of templating engine) but sadly, those are logic-less approaches.
I need less-logic or full-of-logic kind of approach.
What would you advice based on your knowledge?
Comment