Skip to main content



      Home
Home » Modeling » ATL » xmi:XMI root node to uml:Package root node
xmi:XMI root node to uml:Package root node [message #916423] Tue, 18 September 2012 22:06 Go to next message
Eclipse UserFriend
I need to write a very simple transformation (last phase of a huge one), just need to transform the XMI root node to uml:Package root node and copy rest of the elements as they are. How do I proceed to do this?

rule XmoToUml {
from s: ???????
to t: UML!Package (
packagedElement <- ?????????
)
}

Thank you
Re: xmi:XMI root node to uml:Package root node [message #916614 is a reply to message #916423] Wed, 19 September 2012 04:26 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

XMI is just a serialization format for your models, what you have to consider when defining your transformation are the source and target metamodels.
In your case, UML seems to be the target metamodel.
You have to take a look to your source metamodel to identify the actual type of the root element in your input model.

Best regards,

Hugo
Re: xmi:XMI root node to uml:Package root node [message #916853 is a reply to message #916614] Wed, 19 September 2012 10:55 Go to previous message
Eclipse UserFriend
Dear Hugo,

The source model and the target models are the same, which is UML.
The root element in the source model in UML!Package. Unfortunately, I am not able to produce UML!Package root element in the target model. Model elements were being placed outside the root node by my transformation. Hence the target model contains xmi:XMI root node. This forces me to write a second transformation that would convert xmi:XMI root node to UML!Package root node.
You further guidance will be appreciated.
Previous Topic:[ATL] Help with lazy rule
Next Topic:[ATL] Not transformed all code
Goto Forum:
  


Current Time: Wed Jul 23 12:27:33 EDT 2025

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

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

Back to the top