Skip to main content



      Home
Home » Modeling » ATL » call a text file
call a text file [message #1060847] Tue, 28 May 2013 12:03 Go to next message
Eclipse UserFriend
Hi,
I want to know if I can do like this: to call a text file :"s<-'@s.text'

thank you,
Samar

[Updated on: Tue, 28 May 2013 12:14] by Moderator

Re: call a text file [message #1060851 is a reply to message #1060847] Tue, 28 May 2013 12:22 Go to previous messageGo to next message
Eclipse UserFriend
Hello,

What do you mean by "calling to a text file"?
Please could you describe your actual problem and intent?
Re: call a text file [message #1060907 is a reply to message #1060851] Wed, 29 May 2013 02:27 Go to previous messageGo to next message
Eclipse UserFriend
Thank you,

ok, my model is:

<?xml version="1.0" encoding="ISO-8859-1"?>
<Root xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="/projet2/metamodele/XML.xml" startLine="1" startColumn="1" endLine="11687" endColumn="13" name="x">
<children xsi:type="Text" startLine="2" startColumn="12" endLine="3" endColumn="4" name="#text" value="&#xA; "/>
<children xsi:type="Element" startLine="506" startColumn="4" endLine="11686" endColumn="19" name="cont">
<children xsi:type="Text" startLine="506" startColumn="18" endLine="507" endColumn="6" name="#text" value="&#xA; "/>
<children xsi:type="Element" startLine="507" startColumn="6" endLine="2390" endColumn="17" name="C">
<children xsi:type="Attribute" name="s" value="c"/>
<children xsi:type="Attribute" name="g" value="5035"/>
<children xsi:type="Attribute" name="p" value="undefined"/>
<children xsi:type="Text" startLine="507" startColumn="108" endLine="508" endColumn="8" name="#text" value="&#xA; "/>
<children xsi:type="Element" startLine="508" startColumn="8" endLine="526" endColumn="20" name="pr">
<children xsi:type="Text" startLine="508" startColumn="19" endLine="509" endColumn="10" name="#text" value="&#xA; "/>
<children xsi:type="Element" startLine="509" startColumn="10" endLine="509" endColumn="45" name="A">
<children xsi:type="Attribute" name="name" value="Aut"/>
<children xsi:type="Text" startLine="509" startColumn="29" endLine="509" endColumn="40" name="#text" value="undefined"/>
</children>
<children xsi:type="Text" startLine="509" startColumn="45" endLine="510" endColumn="10" name="#text" value="&#xA; "/>
<children xsi:type="Element" startLine="510" startColumn="10" endLine="510" endColumn="50" name="A">
<children xsi:type="Attribute" name="name" value="Des"/>
<children xsi:type="Text" startLine="510" startColumn="34" endLine="510" endColumn="45" name="#text" value="undefined"/>
</children>
<children xsi:type="Text" startLine="510" startColumn="50" endLine="511" endColumn="10" name="#text" value="&#xA; "/>
<children xsi:type="Element" startLine="511" startColumn="10" endLine="511" endColumn="40" name="A">
<children xsi:type="Attribute" name="name" value="V"/>
<children xsi:type="Text" startLine="511" startColumn="30" endLine="511" endColumn="35" name="#text" value="1"/>
</children>
</children>
</children>

<children xsi:type="Text" startLine="506" startColumn="18" endLine="507" endColumn="6" name="#text" value="&#xA; "/>
<children xsi:type="Element" startLine="507" startColumn="6" endLine="2390" endColumn="17" name="C">
<children xsi:type="Attribute" name="s" value="mm"/>
<children xsi:type="Attribute" name="g" value="503554"/>
<children xsi:type="Attribute" name="p" value="undefined"/>
<children xsi:type="Text" startLine="507" startColumn="108" endLine="508" endColumn="8" name="#text" value="&#xA; "/>
<children xsi:type="Element" startLine="508" startColumn="8" endLine="526" endColumn="20" name="pr">
<children xsi:type="Text" startLine="508" startColumn="19" endLine="509" endColumn="10" name="#text" value="&#xA; "/>
<children xsi:type="Element" startLine="509" startColumn="10" endLine="509" endColumn="45" name="A">
<children xsi:type="Attribute" name="name" value="voi"/>
<children xsi:type="Text" startLine="509" startColumn="29" endLine="509" endColumn="40" name="#text" value="undefined"/>
</children>
<children xsi:type="Text" startLine="509" startColumn="45" endLine="510" endColumn="10" name="#text" value="&#xA; "/>
<children xsi:type="Element" startLine="510" startColumn="10" endLine="510" endColumn="50" name="A">
<children xsi:type="Attribute" name="name" value="Dom"/>
<children xsi:type="Text" startLine="510" startColumn="34" endLine="510" endColumn="45" name="#text" value="undefined"/>
</children>
<children xsi:type="Text" startLine="510" startColumn="50" endLine="511" endColumn="10" name="#text" value="&#xA; "/>
<children xsi:type="Element" startLine="511" startColumn="10" endLine="511" endColumn="40" name="A">
<children xsi:type="Attribute" name="name" value="Fab"/>
<children xsi:type="Text" startLine="511" startColumn="30" endLine="511" endColumn="35" name="#text" value="hm"/>
</children>
</children>
</children>


....
</children>
</Root>

AND my goal is to assign every C children (orange color) to an attribute in my target metamodel.


So, i think for the solution that i put every C children in a text and after I just call the text file.


Thank you and i need your help,
Samar
Re: call a text file [message #1060985 is a reply to message #1060907] Wed, 29 May 2013 08:25 Go to previous message
Eclipse UserFriend
Hello,

I don't really understand what you are trying to do with a "text file".
Anyway, before looking to the XMI file (which is not a good habit for beginners, using a proper model editor/browser is largely preferable), you should first ask yourself what is the actual mapping between your source metamodel and target metamodel.
By the way, what is your target metamodel?

But very first, I strongly encourage you to take a deeper look to the basics of model transformation and ATL (concepts, overview, language itself, etc.).
Previous Topic:many attributes Source en one target attribute
Next Topic:XML Schema (XSD) generation
Goto Forum:
  


Current Time: Tue Jul 22 17:47:52 EDT 2025

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

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

Back to the top