[ATL] what about two nested "distinct..foreach" ? [message #842531] |
Thu, 12 April 2012 11:36 |
Xiaopu Huang 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'};
}
to
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
|
|
|
Powered by
FUDForum. Page generated in 0.03510 seconds