Skip to main content



      Home
Home » Modeling » ATL » [solved] xmi:id and xmi:type tags in SysML(How to transform structural tags of SysML is ATL)
[solved] xmi:id and xmi:type tags in SysML [message #1770101] Tue, 08 August 2017 06:45 Go to next message
Eclipse UserFriend
I am trying to transform a SysML model in ATL. I am able to read all user-defined tags in ATL but i have no idea on how to read the structural tags i.e xmi: id and xmi:type.

The xmi prefix is causing the problem, i cannot understand how to tell ATL to understand that prefix. I need the information stored in those tags to maintain the uniqueness of the elements and to keep a track of their type.

Right now i am using a short Java program to rewrite the tags as user-defined tags., so essentially i am removing the xmi prefix.

Is their a way to make ATL read that prefix?

Thanks in advance

A example of the source model is
<packagedElement xmi:type="uml:StateMachine" xmi:id="_l5i3EE9SEee6CKexC3qy0Q" name="StateMachine1">
   <region xmi:type="uml:Region" xmi:id="_odpLgE9SEee6CKexC3qy0Q" name="Region1">
      <transition xmi:type="uml:Transition" xmi:id="_3MBrgE9SEee6CKexC3qy0Q" source="_1rXxEE9SEee6CKexC3qy0Q" target="_z54lUE9SEee6CKexC3qy0Q"/>
      <subvertex xmi:type="uml:State" xmi:id="_z54lUE9SEee6CKexC3qy0Q" name="State1"/>
      <subvertex xmi:type="uml:Pseudostate" xmi:id="_1rXxEE9SEee6CKexC3qy0Q" name="Initial1"/>
    </region>
  </packagedElement>


I figured out how to do it
for xmi:id use __xmiID__
and for xmi:type use eclass().name

[Updated on: Wed, 16 August 2017 04:26] by Moderator

Re: [solved] xmi:id and xmi:type tags in SysML [message #1807312 is a reply to message #1770101] Mon, 27 May 2019 22:34 Go to previous messageGo to next message
Eclipse UserFriend
First of all , i am new to the modeling features of eclipse, so the question may be trivial, but i am searching for days and haven't found an answer.
I tried to convert one XML file into another XML file through ATL at the beginning, but the xsi:type attribute was not included in the file I generated.
I tried to save the file in uml format, but I still didn't achieve my goal, and I don't know what went wrong.
I am looking for information, xsi:type is an attribute of XMI, not an attribute of ecore, so I wonder if I should configure it somewhere to solve this problem?
Re: [solved] xmi:id and xmi:type tags in SysML [message #1809986 is a reply to message #1807312] Sat, 27 July 2019 06:59 Go to previous message
Eclipse UserFriend
xiaoxiao Yi wrote on Tue, 28 May 2019 04:34
First of all , i am new to the modeling features of eclipse, so the question may be trivial, but i am searching for days and haven't found an answer.
I tried to convert one XML file into another XML file through ATL at the beginning, but the xsi:type attribute was not included in the file I generated.
I tried to save the file in uml format, but I still didn't achieve my goal, and I don't know what went wrong.
I am looking for information, xsi:type is an attribute of XMI, not an attribute of ecore, so I wonder if I should configure it somewhere to solve this problem?


ATL does not control how models are written to XMI (or XML). This is controlled entirely through EMF, and is configurable per language. For example, UML has specific formatting rules for its XMI representation. If you created your own EMF "language" from XML schema, then formatting rules are generally taken from the input schema, and can be customized further afterwards in the generated *ResourceImpl class.
Previous Topic:What is 'var' in resolveTemp(var, target_pattern_name) ?
Next Topic:Multiple values for the source pattern
Goto Forum:
  


Current Time: Thu Jul 03 05:56:43 EDT 2025

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

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

Back to the top