[ETL] How to to generate xml code for the compartments of a define node. [message #636754] |
Tue, 02 November 2010 12:38  |
Eclipse User |
|
|
|
Hi All,
I am trying to generate code using ETL, I get into the problem in specifying ETL for the compartments of specified node.
For example in:
@gmf.node(label="name")
class House {
attr String name;
@gmf.compartment(layout="list")
val Room [*] rooms;
@gmf.link(label="To_House")
ref House[*] To_House ;
}
@gmf.node(label="name")
class Room {
attr String name;
}
The ETL sytax I wrote :
Quote: |
pre {
var map = new Target!t_Map;
Target.document.appendChild(map);
}
rule HouseNode
transform s : Source!House
to t : Target!t_House {
t.a_name := s.name;
t.a_rooms ::= s.rooms;
//For link
if ( s.To_House.isDefined()) {map.appendChild(t); }
// For Compartment ??
}
rule RoomNode
transform s : Source!Room
to t : Target!t_Room {
t.a_name := s.name;
}
|
For links I don't have problems but how to define compartments. The output is simple xml code.
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03099 seconds