Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Model-to-Model Transformation » [ATL] M2M: a Set of target elements in the transformation
[ATL] M2M: a Set of target elements in the transformation [message #997835] Tue, 08 January 2013 21:03 Go to next message
Jaroslav K. is currently offline Jaroslav K.
Messages: 6
Registered: March 2012
Junior Member
Hello all,

I need your help...

lets have a source model (XMI part):
<s:source-element1 ...>
  <property_1 ...>
  <property_2 ...>
  <property_3 ...>
</s:element1>


The count of properties is not a constant.
How can I declare a rule, where "to" part is a set of target model elements? Number of target elements must be equal to the count of the count of sub-elements in the source model.

How to obtain something similar to:
rule SourceElement1_to_Target_structure {
  from 
    s1 : s!source-element1
  to
    t1 : t!target-element1(...),    -- a unique element I must reference to in every t2 element
    t2 : Set(t!target-element2(s, t1))    -- such structure is not allowed; used only to demonstrate the need
}


Should I use a lazy rules for that? Cannot find any description or example, how to iterate thru properties...

Sorry for so long explanation, but, cannot do that better.
Thank you for any suggestions.

[Updated on: Thu, 10 January 2013 18:44]

Report message to a moderator

Re: [ATL] M2M: a Set of target elements in the transformation [message #1000076 is a reply to message #997835] Mon, 14 January 2013 00:13 Go to previous message
Jaroslav K. is currently offline Jaroslav K.
Messages: 6
Registered: March 2012
Junior Member
Hello,

the problem was solved using Lazy Rules.
Previous Topic:New QVT mailing lists
Next Topic:org.eclipse.emf.mwe.utils.Reader is not working
Goto Forum:
  


Current Time: Fri Oct 31 05:50:35 GMT 2014

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

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