Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » [ATL] what about two nested "distinct..foreach" ?(what about two nested "distinct..foreach" ?)
[ATL] what about two nested "distinct..foreach" ? [message #842531] Thu, 12 April 2012 11:36
Xiaopu Huang is currently offline Xiaopu HuangFriend
Messages: 1
Registered: April 2012
Junior Member
The following code is on page 42 of ATL User Manual - version 0.7 -


using {
coll : Sequence(String) = Sequence{'Score1', 'Score2', 'Total'};
tab : Table!Table (
lines <- t_lines
t_lines : distinct Table!Line foreach(e in coll)(
id <- coll->indexOf(e),
caption <- line_captions
line_captions : distinct Table!Caption foreach(e in coll)(
content <- e


the result of this transformation is that each line has a caption.
My question is that how to make each line has three captions if a Line may have 1..* captions?
This question really bothered me for a long time.
Write the code down if poosible, thanks a lot!

[Updated on: Thu, 12 April 2012 11:41]

Report message to a moderator

Previous Topic:[ATL] Transformation failure with model references serialized with absolute paths
Next Topic:Transformation failure
Goto Forum:

Current Time: Mon Mar 04 17:19:58 GMT 2024

Powered by FUDForum. Page generated in 0.02297 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top