Order of Transformation [message #1017286] |
Mon, 11 March 2013 13:42 |
Eclipse User |
|
|
|
Dears,
I use ATL in a simple transformation.
I need to know how to keep the order of the input model elements after the transformation.
for example:
If I have 2 different entities (input_1 and input_2) in the input model need to be transformed to their corresponding 2 output entities (output_1 and output_2).
I will make 2 rules, one to transform each entity as follows:
rule input_1_to_output_1
{}
rule input_2_to_output_2
{}
If the input file is as follows:
<input_1 ></input_1 >
<input_2 ></input_2 >
<input_1 ></input_1 >
The rules will run sequentially (rule 1 then rule 2)writing to the output file and the result will be:
<output_1 ></output_1 >
<output_1 ></output_1 >
<output_2 ></output_2 >
so it transformed all input_1 first then input 2 and this changed the order of lines in the output.
In my problem I need them to be ordered.
How can I solve this?
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.01690 seconds