Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » M2M (model-to-model transformation) » add an element to a sequence
add an element to a sequence [message #107283] Fri, 26 June 2009 06:00 Go to next message
bouhmid  is currently offline bouhmid Friend
Messages: 5
Registered: July 2009
Junior Member
Hi

I want to add elements to the sequence w by the rule r1

helper def : w : Sequence(String) = Sequence{};

rule r1
{
from s : m1!f
to t:m2!g
do {thisModule.w->includes(Sequence{'aa'});}
}


It does not work
Please help me to find the solution
Thanks
Re: add an element to a sequence [message #107808 is a reply to message #107283] Sat, 04 July 2009 12:52 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: mschneider.uni-koblenz.de

Hi,

I'm not sure, but maybe you should try "append" resp. "prepend" instead
of "includes", since "includes" only tests in your case, if the string
'aa' is included in your sequence w.

Hth,
Mark


bouhmid schrieb:
> Hi
>
> I want to add elements to the sequence w by the rule r1
>
> helper def : w : Sequence(String) = Sequence{};
>
> rule r1
> {
> from s : m1!f
> to t:m2!g
> do {thisModule.w->includes(Sequence{'aa'});}
> }
>
>
> It does not work Please help me to find the solution
> Thanks
>
Re: add an element to a sequence [message #108287 is a reply to message #107808] Tue, 14 July 2009 05:06 Go to previous message
venkatesh  is currently offline venkatesh Friend
Messages: 41
Registered: July 2009
Member
Hi bouhmid,

For adding in sequence

rule r1{
from
s : m1!f

to
t:m2!g (

children <- Sequence{fileN,fileN,si}
),
fileN : XML!Element ( name <- 'filename'),
fileNVal : XML!Text (value <- ma.filename),
si : XML!Element (name <- 'size')

}
you can refer this link for all kind of scenarios

http://www.eclipse.org/m2m/atl/atlTransformations/

regards,
venky
Previous Topic:[ATL] Running ATL Transformation from JAVA
Next Topic:[QVTo] print out log and debug messages
Goto Forum:
  


Current Time: Thu Mar 28 12:58:37 GMT 2024

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

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

Back to the top