Skip to main content



      Home
Home » Archived » M2M (model-to-model transformation) » How to generate like <tag>Information</tag> by using ATL
How to generate like <tag>Information</tag> by using ATL [message #103663] Fri, 17 April 2009 04:11 Go to next message
Eclipse UserFriend
I want to achieve generation like <tag>Information</tag> by using ATL, but
I don't know how to do it.Who can teach me? Thanks in advance.
Re: How to generate like <tag>Information</tag> by using ATL [message #103753 is a reply to message #103663] Fri, 17 April 2009 08:12 Go to previous messageGo to next message
Eclipse UserFriend
Hi Kirk,

what do you want to do exactly? Do you want to create a text file from a
model? If this is the case you might have a look at the m2t projects
(http://www.eclipse.org/modeling/m2t/). Please provide some more
information.

Greetings,
Max


> I want to achieve generation like <tag>Information</tag> by using ATL,
> but I don't know how to do it.Who can teach me? Thanks in advance.
>
Re: How to generate like <tag>Information</tag> by using ATL [message #103889 is a reply to message #103753] Wed, 22 April 2009 10:43 Go to previous messageGo to next message
Eclipse UserFriend
Hi Max,
What I want to do is just model2model transformation. The problem is that,
the kind of sencences which the generated XML file should contains, is
just similar to "<tag>abc</tag>".

I know using ATL, I can get "<tag property="abc"/>". But I don't know how
to get "<tag>abc</tag>". Please help me.

Thanks in advance.
Re: How to generate like <tag>Information</tag> by using ATL [message #103903 is a reply to message #103889] Wed, 22 April 2009 17:11 Go to previous messageGo to next message
Eclipse UserFriend
I'm sorry, but your XML confuses me. Do you mean the serialization of the
output model, or the in-memory representation? If you mean the
serialization, you might have to write your own serializer. If you call
ATL via ANT, you can write your own extractor. See
http://wiki.eclipse.org/ATL_Howtos#How_can_I_implement_my_ow n_injector_or_extractor.3F
If you call ATL from Java and you have an EMF output model you could
implement your own Resource.Factory for reading and writing into your own
serialization. See
http://help.eclipse.org/stable/index.jsp?topic=/org.eclipse. emf.doc/references/javadoc/org/eclipse/emf/ecore/resource/pa ckage-summary.html
I don't think you could use the existing XMIResourceFactoryImpl to
serialize in that way. But to be sure you could ask on the EMF newsgroup.
If you call your ATL transformations from the Eclipse run configurations,
I don't know if it is possible to serialize the models in a format other
than XMI (maybe someone else knows about that).

I hope this helped.

Greetings,
Max
Re: How to generate like <tag>Information</tag> by using ATL [message #103917 is a reply to message #103903] Thu, 23 April 2009 00:46 Go to previous message
Eclipse UserFriend
Hello Max,

Thank you for giving me so much help. It's my mistake that I said the
generated file was a XML file. Exactly, it's a XMI file. I use ADT to call
my ATL transformation from the Eclipse run configurations. What I want to
generate in the XMI file, is just similar to "<tag>abc</tag>". And "abc"
represents the information of the source model.

Thanks.
Previous Topic:[ATL] Get the father of an element
Next Topic:[ATL] Register ATL metamodel in EMF Registry
Goto Forum:
  


Current Time: Fri Jul 18 05:20:58 EDT 2025

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

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

Back to the top